Update theme

Update ChangeLog
This commit is contained in:
thehrz 2023-06-24 19:34:02 +08:00
parent bf9ab7e541
commit ee92fbc553
No known key found for this signature in database
GPG Key ID: 683658B4CAC43158
4 changed files with 29 additions and 11 deletions

View File

@ -1,9 +1,26 @@
<script setup lang="ts"> <script setup lang="ts">
const { data } = useFetch('https://git.thehrz.net/api/v1/repos/thehrz/19yuke2-vue/commits?stat=false') interface Commit {
sha: string
commit: {
message: string
}
author: {
username: string
avatar_url: string
}
}
const { isFetching, data } = useFetch('https://git.thehrz.net/api/v1/repos/thehrz/19yuke2-vue/commits?stat=false&limit=3').json<Commit[]>()
</script> </script>
<template> <template>
<p>{{ data }}</p> <p v-if="isFetching">
Loading...
</p>
<v-list v-else lines="two">
<v-list-item v-for="commit in data" :key="commit.commit.message" :title="commit.commit.message" subtitle="..." />
</v-list>
</template> </template>
<style scoped></style> <style scoped></style>

View File

@ -2,7 +2,6 @@
const { t, availableLocales, locale } = useI18n() const { t, availableLocales, locale } = useI18n()
function toggleLocales() { function toggleLocales() {
// change to some real logic
const locales = availableLocales const locales = availableLocales
locale.value = locales[(locales.indexOf(locale.value) + 1) % locales.length] locale.value = locales[(locales.indexOf(locale.value) + 1) % locales.length]
} }

View File

@ -20,7 +20,7 @@ export default {
</script> </script>
<template> <template>
<v-app-bar :theme="isDark ? 'dark' : 'light'" class="!static"> <v-app-bar class="!static">
<img class="mx-3 w-40px" src="/favicon.svg"> <img class="mx-3 w-40px" src="/favicon.svg">
<router-link to="/"> <router-link to="/">

View File

@ -9,11 +9,13 @@ export default {
</script> </script>
<template> <template>
<v-layout class="text-gray-700 dark:text-gray-200 min-h-screen flex flex-col"> <v-theme-provider :theme="isDark ? 'dark' : 'light'">
<Nav /> <v-layout class="text-gray-700 dark:text-gray-200 min-h-screen flex flex-col">
<div class="m-auto mt-0 px-5 text-left flex"> <Nav />
<RouterView /> <div class="m-auto mt-0 px-5 text-left flex">
</div> <RouterView />
<Footer /> </div>
</v-layout> <Footer />
</v-layout>
</v-theme-provider>
</template> </template>