Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@ Please note the starter code was "stolen" from https://github.com/janishutz/Musi

## Development
### Getting Started with WebDev
Learning Vue:
- [Official Docs](https://vuejs.org/guide/introduction.html)
- Docs here
Learning Vue & Vuetify (learning the basics of Vue should suffice to be able to use Vuetify):
- [Vuetify Docs](https://vuetifyjs.com)
- [Vue Docs](https://vuejs.org/guide/introduction.html)
- [Guide in reporting repo](https://github.com/studyphoenix/reporting/blob/main/DOCS.md)
- [Icons](https://vuetifyjs.com/en/components/icons/)
- This README
- [MDN Docs](https://developer.mozilla.org/en-US/)
- [MusicPlayer](https://github.com/janishutz/MusicPlayer/tree/dev/web) by @janishutz (as a reference for implementation)
- [EYE-TAP frontend](https://github.com/eye-tap/frontend) (as a reference for implementation)
- Any other docs online
- [FontAwesome](https://fontawesome.com/search?ic=free-collection)

We may add fontawesome icons if you prefer them over the Material Design Icons.


### Linter and type checker runs on PRs
Expand Down
1 change: 1 addition & 0 deletions env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/// <reference types="vite/client" />
/// <reference types="vite-plugin-vue-layouts-next/client" />
16 changes: 7 additions & 9 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
<!DOCTYPE html>
<html lang="">

<head>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="/layers.css">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Vite App</title>
</head>

<body>
<title>Welcome to Vuetify 4</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>

</body>
</html>
45 changes: 22 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,43 @@
{
"name": "frontend",
"version": "0.0.0",
"name": "studyphoenix-frontend",
"private": true,
"type": "module",
"version": "1.0.0",
"scripts": {
"dev": "vite",
"build": "run-p type-check \"build-only {@}\" --",
"preview": "vite preview",
"build-only": "vite build",
"type-check": "vue-tsc --build --force",
"lint": "eslint ./src",
"lint-fix": "eslint ./src --fix",
"type-check": "vue-tsc --build"
"lint-fix": "eslint ./src --fix"
},
"dependencies": {
"@fortawesome/fontawesome-free": "^7.3.1",
"@fontsource/roboto": "^5.2.10",
"@janishutz/oidc-login-sdk-browser": "^1.5.2",
"@kyvg/vue3-notification": "^3.4.2",
"pinia": "^4.0.3",
"vue": "^3.5.42",
"vue-router": "^5.3.1"
"@mdi/font": "7.4.47",
"pinia": "^3.0.4",
"vue": "^3.5.30",
"vue-router": "^5.0.3",
"vuetify": "^4.0.2"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@stylistic/eslint-plugin": "^5.10.0",
"@tsconfig/node24": "^24.0.5",
"@types/node": "^24.13.4",
"@vitejs/plugin-vue": "^6.0.8",
"@vue/tsconfig": "^0.9.1",
"@tsconfig/node22": "^22.0.5",
"@types/node": "^24.12.0",
"@vitejs/plugin-vue": "^6.0.5",
"@vue/tsconfig": "^0.9.0",
"eslint": "^10.14.0",
"eslint-plugin-vue": "^10.12.0",
"globals": "^17.13.0",
"npm-run-all2": "^9.0.3",
"sass-embedded": "^1.107.0",
"typescript": "~6.0.0",
"globals": "^17.14.0",
"npm-run-all2": "^8.0.4",
"sass-embedded": "^1.98.0",
"typescript": "~5.9.3",
"typescript-eslint": "^8.72.1",
"vite": "^8.2.2",
"vite-plugin-vue-devtools": "^8.2.1",
"vue-tsc": "^3.3.11"
},
"engines": {
"node": "^22.18.0 || >=24.12.0"
"unplugin-fonts": "^2.0.0",
"vite": "^8.0.0",
"vite-plugin-vuetify": "^2.1.3",
"vue-tsc": "^3.2.5"
}
}
Binary file modified public/favicon.ico
Binary file not shown.
1 change: 1 addition & 0 deletions public/layers.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@layer vuetify-core, vuetify-components, vuetify-overrides, vuetify-utilities, vuetify-final;
124 changes: 8 additions & 116 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,119 +1,11 @@
<script setup lang="ts">
import {
darkMode,
selectedTheme,
themes
} from './ts/util/theme';
import {
Notifications
} from '@kyvg/vue3-notification';
import {
RouterView
} from 'vue-router';
import SwitchOption from './components/elements/SwitchOption.vue';
import {
ref
} from 'vue';

const changeTheme = () => {
showThemePanel.value = !showThemePanel.value;
};

const showThemePanel = ref( false );
</script>

<template>
<div id="main">
<notifications
position="top center"
:duration="5000"
class="notifications"
style="top: 20px;"
width="400px"
:max="3"
/>
<i
id="theme-selector"
class="fa-solid fa-moon"
title="Toggle between light and dark mode"
@click="changeTheme();"
>
</i>
<div
id="theme-selection-panel"
:class="showThemePanel ? 'shown' : undefined"
>
<h3>Themes</h3>
<select v-model="selectedTheme">
<option v-for="(val, index) in themes" :key="index" :value="val">
{{ val }}
</option>
</select>
<SwitchOption v-model="darkMode" text="Dark mode" />
</div>
<router-view v-slot="{ Component, route }">
<transition :name="route.meta.transition ? String( route.meta.transition ) : 'fade'" mode="out-in">
<component :is="Component" />
</transition>
</router-view>
</div>
<v-app>
<v-main>
<router-view />
</v-main>
</v-app>
</template>

<style lang="scss">
@include gen-theme('.theme-red-dark', $theme-red-dark);
@include gen-theme('.theme-red-light', $theme-red-light);
@include gen-theme('.theme-blue-dark', $theme-blue-dark);
@include gen-theme('.theme-blue-light', $theme-blue-light);
@include gen-theme('.theme-purple-dark', $theme-purple-dark);
@include gen-theme('.theme-purple-light', $theme-purple-light);
@include gen-theme('.theme-monochrome-light', $theme-monochrome-light);
@include gen-theme('.theme-monochrome-dark', $theme-monochrome-dark);

#main {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}

#theme-selector {
position: fixed;
top: 10px;
left: 10px;
font-size: 1rem;
z-index: 100;
cursor: pointer;
}

#theme-selection-panel {
position: fixed;
z-index: 100;
top: calc(5px + 2rem);
left: -230px;
width: 180px;
height: 200px;
padding: 20px;
background-color: var(--theme-primary);
color: var(--theme-on-primary);
border: solid 1px var(--theme-on-bg);
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
overflow: hidden;
border-radius: 20px;
transition: left 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);

&.shown {
left: 5px;
}

>select {
width: 100%;
margin-bottom: 10px;
color: var(--theme-on-primary);
border-color: var(--theme-on-primary);
background-color: var(--theme-primary);
}
}
</style>
<script lang="ts" setup>
//
</script>
Binary file added src/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/assets/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
114 changes: 114 additions & 0 deletions src/components/HelloWorld.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
<script setup lang="ts">
import LoginProvider from './authz/LoginProvider.vue';

const links = [
{
'href': 'https://vuetifyjs.com/',
'icon': 'mdi-text-box-outline',
'subtitle': 'Learn about all things Vuetify in our documentation.',
'title': 'Documentation'
},
{
'href': 'https://vuetifyjs.com/introduction/why-vuetify/#feature-guides',
'icon': 'mdi-star-circle-outline',
'subtitle': 'Explore available framework Features.',
'title': 'Features'
},
{
'href': 'https://vuetifyjs.com/components/all',
'icon': 'mdi-widgets-outline',
'subtitle': 'Discover components in the API Explorer.',
'title': 'Components'
},
{
'href': 'https://discord.vuetifyjs.com',
'icon': 'mdi-account-group-outline',
'subtitle': 'Connect with Vuetify developers.',
'title': 'Community'
}
];
</script>

<template>
<v-container class="fill-height d-flex flex-column justify-center" max-width="1100">
<div>
<v-img
class="mb-4 font-weight-bold"
height="150"
src="@/assets/logo.png"
/>

<div class="mb-8 text-center">
<div class="text-body-medium font-weight-light mb-n1">
Welcome to
</div>
<div class="text-display-medium font-weight-bold">
Vuetify
</div>
<login-provider />
</div>

<v-row>
<v-col cols="12">
<v-card
class="py-4"
color="surface-variant"
image="https://cdn.vuetifyjs.com/docs/images/one/create/feature.png"
rounded="lg"
variant="tonal"
>
<template #prepend>
<v-avatar
class="ml-2 mr-4"
icon="mdi-rocket-launch-outline"
size="60"
variant="tonal"
/>
</template>

<template #image>
<v-img position="top right" />
</template>

<template #title>
<div class="my-title my-uppercase text-headline-medium font-weight-bold">
Get started
</div>
</template>

<template #subtitle>
<div class="text-body-large">
Change this page by updating <v-kbd>{{ `<HelloWorld />` }}</v-kbd>
in <v-kbd>components/HelloWorld.vue</v-kbd>.
</div>
</template>
</v-card>
</v-col>

<v-col v-for="link in links" :key="link.href" cols="6">
<v-card
append-icon="mdi-open-in-new"
class="py-4"
color="surface-variant"
:href="link.href"
rel="noopener noreferrer"
rounded="lg"
:subtitle="link.subtitle"
target="_blank"
:title="link.title"
variant="tonal"
>
<template #prepend>
<v-avatar
class="ml-2 mr-4"
:icon="link.icon"
size="60"
variant="tonal"
/>
</template>
</v-card>
</v-col>
</v-row>
</div>
</v-container>
</template>
Loading
Loading