feat: nav side

zio/stable
Anthony Fu 2022-11-16 01:14:10 +08:00
parent 49a20c01b7
commit 94bde9487a
6 changed files with 72 additions and 12 deletions

View File

@ -0,0 +1,13 @@
<script setup lang="ts">
// eslint-disable-next-line @typescript-eslint/prefer-ts-expect-error
// @ts-ignore build time
const buildTime = __BUILD_TIME__
const buildTimeAgo = useTimeAgo(buildTime)
</script>
<template>
<div p4 text-sm op25>
A Mastodon client powered by Nuxt<br>
Built <span :title="buildTime">{{ buildTimeAgo }}</span> · <a href="https://github.com/antfu/nuxtodon" target="_blank">GitHub</a>
</div>
</template>

View File

@ -0,0 +1,40 @@
<script setup lang="ts">
</script>
<template>
<div px6 py2 flex="~ col gap6" text-lg>
<NuxtLink flex gap2 items-center to="/home">
<div i-ri:home-5-line />
<span>Home</span>
</NuxtLink>
<NuxtLink flex gap2 items-center to="/notifications">
<div i-ri:notification-4-line />
<span>Notifications</span>
</NuxtLink>
<NuxtLink flex gap2 items-center>
<div i-ri:hashtag />
<span>Explore</span>
</NuxtLink>
<NuxtLink flex gap2 items-center to="/public/local">
<div i-ri:group-2-line />
<span>Local</span>
</NuxtLink>
<NuxtLink flex gap2 items-center to="/public">
<div i-ri:earth-line />
<span>Federated</span>
</NuxtLink>
<NuxtLink flex gap2 items-center>
<div i-ri:at-line />
<span>Direct Messages</span>
</NuxtLink>
<NuxtLink flex gap2 items-center>
<div i-ri:heart-3-line />
<span>Favorites</span>
</NuxtLink>
<NuxtLink flex gap2 items-center>
<div i-ri:home-5-line />
<span>Bookmarks</span>
</NuxtLink>
</div>
</template>

View File

View File

@ -1,6 +1,6 @@
<template> <template>
<div h-full of-hidden> <div h-full of-hidden>
<main grid="~ lg:cols-[1fr_40rem_1fr]" h-full> <main grid="~ lg:cols-[1fr_40rem_18rem]" h-full>
<div> <div>
<slot name="left"> <slot name="left">
<NavTitle p4 /> <NavTitle p4 />
@ -9,9 +9,12 @@
<div h-full of-auto border="l r border"> <div h-full of-auto border="l r border">
<slot /> <slot />
</div> </div>
<div> <div flex="~ col">
<slot name="right"> <slot name="right">
<AccountMe /> <AccountMe />
<NavSide border="y border" py8 />
<div flex-auto />
<NavFooter />
</slot> </slot>
</div> </div>
</main> </main>

View File

@ -20,6 +20,11 @@ export default defineNuxtConfig({
alias: { alias: {
querystring: 'rollup-plugin-node-polyfills/polyfills/qs', querystring: 'rollup-plugin-node-polyfills/polyfills/qs',
}, },
vite: {
define: {
__BUILD_TIME__: JSON.stringify(new Date().toISOString()),
},
},
postcss: { postcss: {
plugins: { plugins: {
'postcss-nested': {}, 'postcss-nested': {},

View File

@ -1,26 +1,25 @@
* { * {
scrollbar-color: #555 var(--color-border); scrollbar-color: #5555 var(--color-border);
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 10px; width: 10px;
} }
::-webkit-scrollbar:horizontal { ::-webkit-scrollbar:horizontal {
height: 10px; height: 10px;
} }
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {
background: var(--color-border); background: var(--color-border);
border-radius: 1px; border-radius: 1px;
} }
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
background: #555; background: #555;
border-radius: 1px; border-radius: 1px;
} }
::-webkit-scrollbar-thumb:hover { ::-webkit-scrollbar-thumb:hover {
background: #666; background: #666;
} }