Compare commits

...

3 Commits

Author SHA1 Message Date
8763923f33 Side bar navigation 2024-09-22 18:53:32 +08:00
76d9d18587 🔍 Improve post page SEO 2024-09-22 18:47:39 +08:00
d4e2d74c7b 💄 Fix mobile size activity mis-padded 2024-09-22 18:08:30 +08:00
6 changed files with 56 additions and 67 deletions

View File

@ -1,7 +1,7 @@
<template>
<div class="text-xs text-grey" :class="props.noCentered ? 'text-left' : 'text-center'">
<p>{{ t("copyright") }} © {{ new Date().getFullYear() }} {{ t("brandNameFormal") }}</p>
<p v-if="services" class="flex justify-center">
<p v-if="services" class="flex" :class="props.noCentered ? 'justify-start' : 'justify-center'">
<span>Powered by</span>
<span class="flex services-list ms-1">
<a class="service underline" v-for="item in services" :href="projects[item][1]">

View File

@ -1,15 +1,19 @@
<template>
<v-app-bar flat color="primary" scroll-behavior="hide" scroll-threshold="800">
<v-app-bar flat color="primary">
<v-container fluid class="mx-auto d-flex align-center justify-center px-8">
<nuxt-link to="/" exact>
<v-img class="me-4 ms-1" width="32" height="32" alt="Logo" :src="Logo" />
</nuxt-link>
<v-tooltip>
<template #activator="{ props }">
<div @click="openDrawer = !openDrawer" v-bind="props" class="cursor-pointer">
<v-img class="me-4 ms-1" width="32" height="32" alt="Logo" :src="Logo" />
</div>
</template>
Open / close drawer
</v-tooltip>
<div class="nav-links overflow-y-auto flex">
<v-btn variant="text" :text="t('navProducts')" to="/products" exact />
<v-btn variant="text" :text="t('navActivity')" to="/activity" exact />
<v-btn variant="text" :text="t('navGallery')" to="/gallery" exact />
</div>
<nuxt-link to="/" exact>
<h2 class="mt-1">Solsynth LLC</h2>
</nuxt-link>
<v-spacer></v-spacer>
@ -40,6 +44,25 @@
</v-container>
</v-app-bar>
<v-navigation-drawer v-model="openDrawer" location="left" width="300" floating>
<v-list density="compact" nav color="primary">
<v-list-item :title="t('navProducts')" prepend-icon="mdi-shape" to="/products" exact />
<v-list-item :title="t('navActivity')" prepend-icon="mdi-newspaper" to="/activity" exact />
<v-list-item :title="t('navGallery')" prepend-icon="mdi-album" to="/gallery" exact />
</v-list>
<v-divider class="border-opacity-50 mb-4" />
<copyright no-centered service="capital" class="px-5" />
<div class="px-5 mt-3 text-xs text-grey sidebar-footer transition-opacity duration-500">
<div class="flex footer-links flex-wrap">
<nuxt-link to="/terms/privacy-policy" class="hover:underline">Privacy Policy</nuxt-link>
<nuxt-link to="/terms/user-agreement" class="hover:underline">Term of Service</nuxt-link>
</div>
</div>
</v-navigation-drawer>
<v-main>
<slot />
</v-main>
@ -49,15 +72,27 @@
import Logo from "../assets/logo-w-shadow.png"
const { locale, locales, setLocale, t } = useI18n()
const openDrawer = ref(false)
</script>
<style scoped>
.nav-links::-webkit-scrollbar {
display: none;
.sidebar-footer {
opacity: 0.3;
}
.nav-links {
-ms-overflow-style: none;
scrollbar-width: none;
.sidebar-footer:hover {
opacity: 1;
}
.footer-links *:not(:last-child):after {
content: "·";
font-family: monospace;
font-weight: bold;
text-align: center;
margin-left: 4px;
margin-right: 4px;
text-decoration: none !important;
display: inline-block;
}
</style>

View File

@ -1,46 +0,0 @@
<template>
<v-system-bar color="primary">
<span>© {{ new Date().getFullYear() }} {{ t("brandName") }}</span>
<v-spacer />
<span>{{ t("embedWidget") }}</span>
</v-system-bar>
<v-container fluid class="mx-auto justify-center px-8">
<v-main>
<slot />
</v-main>
<div class="text-center flex flex-col justify-center gap-1.5 text-grey text-xs">
<copyright :service="['capital', 'solar-network']" />
<div class="flex gap-2 justify-center">
<v-menu location="top center">
<template v-slot:activator="{ props }">
<span v-bind="props">{{ t("language") }}</span>
</template>
<v-list class="w-fit">
<v-list-item
class="w-48"
density="compact"
v-for="item in locales"
:key="item.code"
:value="item.code"
:active="locale == item.code"
@click.prevent.stop="setLocale(item.code)"
>
<v-list-item-title>{{ item.name }}</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
<v-divider vertical />
<nuxt-link target="_blank" :to="route.fullPath.replace('/embed', '')">
{{ t("openInSite") }}
</nuxt-link>
</div>
</div>
</v-container>
</template>
<script setup lang="ts">
const route = useRoute()
const { locale, locales, setLocale, t } = useI18n()
</script>

View File

@ -1,6 +1,6 @@
<template>
<v-container class="content-container mx-auto">
<div class="my-3 mx-[3.5ch]">
<div class="my-3 mx-[1.5ch]">
<div class="flex gap-1">
<h1 class="text-2xl">{{ t("navActivity") }}</h1>
<v-btn size="x-small" variant="text" icon="mdi-rss" slim to="/activity/feed" />
@ -8,7 +8,7 @@
<span>{{ t("navActivityCaption") }}</span>
</div>
<post-list :realm="config.public.solarRealm" />
<post-list class="mx-[-2.5ch]" :realm="config.public.solarRealm" />
</v-container>
</template>

View File

@ -1,5 +1,5 @@
<template>
<v-container class="flex flex-col my-2 gap-[4rem]">
<v-container class="flex flex-col my-2 px-12 gap-[4rem]">
<v-row class="content-section">
<v-col cols="12" md="4" class="flex justify-start">
<div class="flex flex-col items-start">

View File

@ -106,8 +106,8 @@ if (!post.value) {
navigateTo(`/posts/${post.value.area_alias}/${post.value.alias}`)
}
const title = computed(() => post.value.body?.title ? `${post.value.body?.title} from ${post.value.author.nick}` : `Post from ${post.value.author.nick}`)
const description = computed(() => post.value.body?.description ?? post.value.body?.content.substring(0, 160).trim())
const title = computed(() => post.value.body?.title ? `${post.value.body?.title} by @${post.value.author.name}` : `Post by @${post.value.author.name}`)
const description = computed(() => post.value.body?.description ?? post.value.body?.content.substring(0, 280).trim())
watch(attachments, (value) => {
if (post.value.body?.thumbnail) {
@ -124,7 +124,7 @@ watch(attachments, (value) => {
useHead({
title: title.value,
titleTemplate: "%s on Solar Network",
titleTemplate: "%s",
link: [
{ rel: "icon", type: "image/png", href: "/icon-solar-network.png" },
{ rel: "apple-touch-icon", type: "image/png", href: "/icon-solar-network.png" },