Skip to content

Commit

Permalink
style: apply md3 blueprint
Browse files Browse the repository at this point in the history
  • Loading branch information
kingyue737 committed Sep 28, 2023
1 parent b3424e0 commit 5340dd9
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 7 deletions.
4 changes: 4 additions & 0 deletions src/assets/styles/_global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,7 @@ html {
.v-overlay__content > .v-card {
overflow-y: overlay !important;
}

.v-btn {
text-transform: initial;
}
24 changes: 18 additions & 6 deletions src/components/layout/AppDrawer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const rail = computed(() => !drawerStored.value && !mobile.value)
const gradient = computed(() =>
useTheme().current.value.dark
? 'to bottom, rgba(0, 0, 0, 1), rgba(0, 0, 0, .7)'
: 'to bottom, rgba(255, 255, 255, 1), rgba(255, 255, 255, .7)',
: 'to bottom, rgba(255, 255, 255, 1) 5%, rgba(255, 255, 255, .8) 80%, rgba(255, 255, 255, 1) 100%',
)
routes.sort((a, b) => (a.meta?.drawerIndex ?? 99) - (b.meta?.drawerIndex ?? 98))
Expand Down Expand Up @@ -57,7 +57,10 @@ nextTick(() => {
color="primary"
/>
</template>
<v-list-item-title class="text-h5" style="line-height: 2rem">
<v-list-item-title
class="text-h5 font-weight-bold"
style="line-height: 2rem"
>
Vitify <span class="text-primary">Admin</span>
</v-list-item-title>
</v-list-item>
Expand All @@ -70,18 +73,18 @@ nextTick(() => {
<v-spacer />
<template #append>
<v-list-item class="drawer-footer px-0 d-flex flex-column justify-center">
<div class="text-body-2 font-weight-light pt-6 pt-md-0 text-center">
<div class="text-caption pt-6 pt-md-0 text-center">
&copy; Copyright 2023
<a
href="https://github.com/kingyue737"
class="font-weight-regular"
class="font-weight-bold"
target="_blank"
>Yue JIN</a
>
<span> & </span>
<a
href="https://www.nustarnuclear.com/"
class="font-weight-regular"
class="font-weight-bold"
target="_blank"
>NuStar</a
>
Expand All @@ -93,9 +96,18 @@ nextTick(() => {

<style lang="scss">
.v-navigation-drawer {
transition-property: box-shadow, transform, visibility, width, height, left,
right, top, bottom, border-radius !important;
overflow: hidden;
&.v-navigation-drawer--rail {
border-top-right-radius: 0px;
border-bottom-right-radius: 0px;
&.v-navigation-drawer--is-hovering {
box-shadow: 0px 0px 6px 2px rgba(100, 100, 100, 0.6);
border-top-right-radius: 15px;
border-bottom-right-radius: 15px;
box-shadow:
0px 1px 2px 0px rgb(0 0 0 / 30%),
0px 1px 3px 1px rgb(0 0 0 / 15%);
}
&:not(.v-navigation-drawer--is-hovering) {
.drawer-footer {
Expand Down
1 change: 1 addition & 0 deletions src/components/layout/AppNotification.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ function toggleAll() {
<v-btn
size="x-small"
variant="flat"
color=""
:icon="
notifications.length ? 'mdi-bell-badge-outline' : 'mdi-bell-outline'
"
Expand Down
1 change: 1 addition & 0 deletions src/components/layout/ButtonSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const toggleDark = useToggle(isDark)
<v-btn
size="x-small"
variant="flat"
color=""
icon="mdi-palette-outline"
v-bind="mergeProps(menu, tooltip)"
:rounded="0"
Expand Down
2 changes: 1 addition & 1 deletion src/pages/dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,6 @@ const stats = ref([

<style scoped lang="scss">
.v-card:not(.stats-card) {
height: 350px;
height: 340px;
}
</style>
13 changes: 13 additions & 0 deletions src/plugins/vuetify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { VDataTable } from 'vuetify/labs/VDataTable'
import { en, zhHans } from 'vuetify/locale'
import { aliases, mdi } from 'vuetify/iconsets/mdi-svg'
import { useDark } from '@vueuse/core'
import { md3 } from 'vuetify/blueprints'

type UnwrapReadonlyArrayType<A> = A extends Readonly<Array<infer I>>
? UnwrapReadonlyArrayType<I>
Expand Down Expand Up @@ -41,6 +42,7 @@ const theme = {
}

export default createVuetify({
blueprint: md3,
components: { VDataTable },
locale: {
locale: 'zhHans',
Expand All @@ -55,6 +57,17 @@ export default createVuetify({
fixedHeader: true,
hover: true,
},
VCard: {
flat: true,
},
VNavigationDrawer: {
VList: {
nav: true,
VListItem: {
rounded: 'xl',
},
},
},
},
theme: {
defaultTheme: useDark().value ? 'dark' : 'light',
Expand Down

0 comments on commit 5340dd9

Please sign in to comment.