-
Notifications
You must be signed in to change notification settings - Fork 8
Created dark theme #330
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Created dark theme #330
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,6 +2,7 @@ | |
| <v-app | ||
| id="app-wrapper" | ||
| > | ||
| <link href="https://cdn.jsdelivr.net/npm/@mdi/[email protected]/css/materialdesignicons.min.css" rel="stylesheet"> | ||
| <router-view /> | ||
| </v-app> | ||
| </template> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,7 @@ import About from './pages/About.vue'; | |
| import Vuetify from 'vuetify'; | ||
| import VueRouter from 'vue-router'; | ||
| import VueCookies from 'vue-cookies'; | ||
| import colors from 'vuetify/es5/util/colors'; | ||
| import './css/app.css'; | ||
|
|
||
| import { library } from '@fortawesome/fontawesome-svg-core'; | ||
|
|
@@ -18,7 +19,27 @@ library.add(faSignInAlt, faSignOutAlt, faCloudDownloadAlt, faCloudUploadAlt); | |
|
|
||
| Vue.component('font-awesome-icon', FontAwesomeIcon); | ||
|
|
||
| Vue.use(Vuetify); | ||
| Vue.use(Vuetify, { | ||
| theme: { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it might be better to keep the theme general, so like |
||
| primary: "#F26521", | ||
| defaultPrimary: "#1976D2", | ||
| discordOrange: "#F26521", | ||
| discordPurple: "#7289DA", | ||
| crlogo: colors.blueGrey.darken2, | ||
| crlogoDark: colors.blueGrey.darken2, | ||
| crlogoLight: colors.blueGrey.lighten5, | ||
| background: colors.grey.darken4, | ||
| background2: colors.grey.darken4, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no need to duplicate these two? |
||
| search: colors.grey.darken4, | ||
| backgroundDark: colors.grey.darken4, | ||
| backgroundLight: colors.grey.lighten2, | ||
| background2Light: colors.grey.lighten4, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are there not already colors like this as part of the Vuetify default theme? I feel like we should just be able to use what's already there, and override that if it's not sufficient. |
||
| searchLight: colors.shades.white, | ||
| warning: colors.yellow.base, | ||
| success: colors.green.base, | ||
| error: colors.red.base | ||
| } | ||
| }); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to override all of these or are some the defaults? |
||
| Vue.use(VueCookies); | ||
| Vue.use(VueRouter); | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,15 +35,14 @@ | |
| </v-flex> | ||
| </v-layout> | ||
| <v-layout v-else> | ||
| <v-flex xs10 :style="{ 'color': semData.textColor }"> | ||
| <v-flex xs10 :class="semData.textColor+'--text '+textBrightness"> | ||
| {{ semData.message }} | ||
| </v-flex> | ||
| </v-layout> | ||
| </v-layout> | ||
| </v-container> | ||
|
|
||
| <v-container | ||
| class="lighten-3" | ||
| fluid | ||
| grid-list-md | ||
| :class="semData.bgColor" | ||
|
|
@@ -93,6 +92,10 @@ export default { | |
| }; | ||
| }, | ||
| computed: { | ||
| textBrightness (){ | ||
| var value = 'text--'+(this.$store.state.useDarkTheme ? 'lighten-2' : 'darken-4') ; | ||
| return value; | ||
| }, | ||
| isActiveRoad () { | ||
| return this.$store.state.activeRoad === this.roadID; | ||
| }, | ||
|
|
@@ -176,50 +179,50 @@ export default { | |
| if (this.addingFromCard || this.draggingOver) { | ||
| if (!this.subjectsLoaded) { | ||
| return { | ||
| bgColor: 'red', | ||
| bgColor: "error", | ||
| message: 'Loading subjects... give us a minute', | ||
| textColor: 'DarkRed' | ||
| textColor: "error" | ||
| }; | ||
| } else if (this.itemAdding === undefined) { | ||
| return { | ||
| bgColor: 'red', | ||
| bgColor: "error", | ||
| message: 'If you see this message, contact [email protected] and tell them "710".', | ||
| textColor: 'DarkRed' | ||
| textColor: "error" | ||
| }; | ||
| } else if (this.index === 0 || this.offeredNow) { | ||
| return { | ||
| bgColor: 'green', | ||
| bgColor: "success", | ||
| message: 'Add class here', | ||
| textColor: 'DarkGreen' | ||
| textColor: "success" | ||
| }; | ||
| } else if (this.itemAddingNoLongerOffered) { | ||
| return { | ||
| bgColor: 'yellow', | ||
| bgColor: "warning", | ||
| message: 'Subject no longer offered', | ||
| textColor: 'DarkGoldenRod' | ||
| textColor: "warning" | ||
| }; | ||
| } else if (this.itemAddingNotCurrentlyOffered) { | ||
| return { | ||
| bgColor: 'yellow', | ||
| bgColor: "warning", | ||
| message: 'Subject not offered this year', | ||
| textColor: 'DarkGoldenRod' | ||
| textColor: "warning" | ||
| }; | ||
| } else if (this.isSameYear) { | ||
| return { | ||
| bgColor: 'red', | ||
| bgColor: "error", | ||
| message: 'Subject not available this semester', | ||
| textColor: 'DarkRed' | ||
| textColor: "error" | ||
| }; | ||
| } else { | ||
| return { | ||
| bgColor: 'yellow', | ||
| bgColor: "warning", | ||
| message: 'Subject may not be available this semester', | ||
| textColor: 'DarkGoldenRod' | ||
| textColor: "warning" | ||
| }; | ||
| } | ||
| } | ||
| return { | ||
| bgColor: 'grey', | ||
| bgColor: 'background', | ||
| message: '', | ||
| textColor: '' | ||
| }; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these should already be bundled with the app? Definitely check out how other icons are done. We shouldn't need to import more