-
-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Adjust the home page layout with inner router view
- Loading branch information
Showing
88 changed files
with
3,144 additions
and
1,270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<template> | ||
<div | ||
class="flex flex-grow-0 items-center text-sm rounded pr-2" | ||
@click="emit('click', $event)" | ||
> | ||
<v-avatar | ||
:left="true" | ||
class="w-[34px] h-[34px]" | ||
:class="{ responsive }" | ||
> | ||
<img | ||
v-if="avatar" | ||
:src="avatar" | ||
> | ||
<v-icon v-else-if="icon"> | ||
{{ icon }} | ||
</v-icon> | ||
</v-avatar> | ||
|
||
<div | ||
v-if="text" | ||
class="whitespace-nowrap overflow-hidden overflow-ellipsis text" | ||
> | ||
<div | ||
class="text-gray-300 font-semibold" | ||
:style="{ | ||
color: bgColor | ||
}" | ||
> | ||
{{ title }} | ||
</div> | ||
{{ text }} | ||
</div> | ||
</div> | ||
</template> | ||
<script lang="ts" setup> | ||
import { useVuetifyColor } from '@/composables/vuetify' | ||
const props = defineProps<{ | ||
color?: string | ||
avatar?: string | ||
icon?: string | ||
title?: string | ||
text?: string | ||
responsive?: boolean | ||
}>() | ||
const { getColorCode } = useVuetifyColor() | ||
const bgColor = computed(() => props.color ? getColorCode(props.color) : undefined) | ||
const emit = defineEmits(['click']) | ||
</script> | ||
<style scoped> | ||
.responsive { | ||
display: none !important; | ||
} | ||
.text { | ||
padding-left: 0.5rem; | ||
} | ||
@media (min-width: 1000px) { | ||
.responsive { | ||
display: block !important; | ||
} | ||
.text { | ||
padding-left: 0rem; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<template> | ||
<div | ||
class="flex flex-row items-center gap-1 flex-grow-0 justify-center" | ||
> | ||
<template | ||
v-for="(i) of items" | ||
> | ||
<AvatarItem | ||
:key="i.title" | ||
:icon="i.icon" | ||
:title="i.title" | ||
:text="i.text" | ||
:color="i.color" | ||
:avatar="i.avatar" | ||
/> | ||
<v-divider | ||
v-if="i !== items[items.length - 1]" | ||
:key="i.title + 'divider'" | ||
vertical | ||
/> | ||
</template> | ||
</div> | ||
</template> | ||
<script lang="ts" setup> | ||
import AvatarItem from './AvatarItem.vue' | ||
defineProps<{ items: { | ||
small?: boolean | ||
color?: string | ||
avatar?: string | ||
icon?: string | ||
title?: string | ||
text?: string | ||
}[] }>() | ||
</script> |
Oops, something went wrong.