Skip to content

Commit

Permalink
feat: 更新样式
Browse files Browse the repository at this point in the history
  • Loading branch information
Otto-J committed Mar 1, 2024
1 parent ed1d743 commit 5ad593e
Show file tree
Hide file tree
Showing 9 changed files with 2,496 additions and 3,880 deletions.
5 changes: 3 additions & 2 deletions app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<footer
class="mt-20 space-x-2 text-xs text-gray-500 dark:text-gray-200 text-center container mx-auto mb-2"
>
<span>Copyright &copy; 2013-2023 辛宝Otto</span>
<span>Copyright &copy; 2013-{{ endYear }} 辛宝Otto</span>
<span>🚀</span>
<a target="_blank" href="https://beian.miit.gov.cn/">
京ICP备17060663号-2
Expand All @@ -18,7 +18,8 @@
<script lang="ts" setup>
import "@varlet/touch-emulator";
import "@/assets/md.css";
//
const endYear = new Date().getFullYear();
const appConfig = useAppConfig();
Expand Down
11 changes: 6 additions & 5 deletions components/c-article.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@
<ProseBlockquote v-if="doc.description">{{
doc.description
}}</ProseBlockquote>
<ContentRenderer
class="mt-8 w-full max-w-none"
tag="article"
:value="doc"
/>

<ContentRenderer class="mt-8 w-full max-w-none" tag="article" :value="doc">
<template #empty>
<p>No content found.</p>
</template>
</ContentRenderer>

<div class="my-10 border-b-2 border-gray-200" />
</var-paper>
Expand Down
16 changes: 12 additions & 4 deletions components/c-side-bar.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<template>
<div class="w-full">
<div class="title text-white py-8 text-center bg-gray-900 flex flex-col">
<h1 class="text-xl">{{ appConfig.website_title }}</h1>
<h1 class="text-xl">
<a href="/">{{ appConfig.website_title }}</a>
</h1>
<p class="text-sm mt-4">{{ appConfig.website_description }}</p>
</div>
<div class="space-y-2">
Expand Down Expand Up @@ -88,8 +90,12 @@
:elevation="2"
>
<var-image width="50%" class="mx-auto" src="/boy.png" />
<p class="text-lg text-gray-600">{{ appConfig.website_author_name }}</p>
<p class="text-sm text-gray-500">{{ appConfig.website_author_desc }}</p>
<p class="text-lg text-gray-600 dark:text-slate-100">
{{ appConfig.website_author_name }}
</p>
<p class="text-sm text-gray-500 dark:text-slate-200">
{{ appConfig.website_author_desc }}
</p>

<div class="flex justify-center items-center space-x-2 mt-2">
<div v-for="item of socialLinks" :key="item.link">
Expand All @@ -111,7 +117,9 @@
</div>
</div>

<p class="mt-4 text-sm text-gray-500">最近在学 Nuxt.js</p>
<p class="mt-4 text-sm text-gray-500 dark:text-slate-100">
最近在学 Nuxt.js
</p>
</var-paper>
</div>
</div>
Expand Down
10 changes: 5 additions & 5 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@ export default defineNuxtConfig({
},
feedme: {
feeds: {
"/feed.atom": { revisit: "6h", type: "atom1", content: true },
"/feed.xml": { revisit: "6h", type: "rss2", content: true },
"/rss.xml": { revisit: "6h", type: "rss2", content: true },
"/feed.atom": { revisit: "12h", type: "atom1", content: true },
"/feed.xml": { revisit: "12h", type: "rss2", content: true },
"/rss.xml": { revisit: "12h", type: "rss2", content: true },
},
content: {
feed: {
defaults: {
id: "/",
title: "辛宝的玄酒清谈",
language: "zh-cn",
description: "描述",
description: "辛宝的玄酒清谈",

link: "/", // 完整网址
ttl: 360,
Expand All @@ -80,7 +80,7 @@ export default defineNuxtConfig({
},
categories: ["blogs", "podcasts"],
favicon: "/favicon.png",
copyright: "2013-2023 @辛宝Otto", // copyright
copyright: "2013-2024 @辛宝Otto", // copyright
},
},
item: {
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,26 @@
"zip": "zip -r dist.zip dist"
},
"devDependencies": {
"@flydotio/dockerfile": "^0.4.10",
"@nuxt/content": "^2.10.0",
"@flydotio/dockerfile": "^0.4.11",
"@nuxt/content": "^2.12.0",
"@nuxt/devtools": "1.0.0-beta.0",
"@nuxthq/studio": "^1.0.6",
"@nuxtjs/tailwindcss": "^6.8.1",
"@types/trianglify": "^1.2.2",
"nuxt": "^3.9.1",
"@nuxthq/studio": "^1.0.12",
"@nuxtjs/tailwindcss": "^6.11.4",
"@types/trianglify": "^1.2.3",
"nuxt": "^3.10.3",
"nuxt-feedme": "^1.0.0",
"nuxt-icon": "^0.5.0",
"prettier": "^3.0.3",
"prettier": "^3.2.5",
"unplugin-auto-import": "^0.16.7",
"unplugin-vue-components": "^0.25.2"
},
"dependencies": {
"@nuxt/image": "1.0.0-rc.3",
"@varlet/touch-emulator": "^2.18.1",
"@varlet/ui": "^2.18.1",
"@vueuse/core": "^10.5.0",
"@varlet/touch-emulator": "^2.22.8",
"@varlet/ui": "^2.22.8",
"@vueuse/core": "^10.9.0",
"class-variance-authority": "^0.7.0",
"clsx": "^2.0.0",
"clsx": "^2.1.0",
"dayjs": "^1.11.10",
"html-to-image": "^1.11.11",
"lucide-vue-next": "^0.286.0",
Expand Down
22 changes: 17 additions & 5 deletions pages/[...slug].vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
<template>
<main>
<!-- <div>home slug</div> -->
<ContentDoc v-slot="{ doc }">
<article>
<h1>{{ doc.title }}</h1>
<ContentRenderer :value="doc" />
</article>
<ContentDoc>
<template v-slot="{ doc }">
<article>
<h1>{{ doc.title }}</h1>
<ContentRenderer :value="doc" />
</article>
</template>
<template #not-found>
<div class="text-center h-20 flex justify-center items-center">
<p>😅 对应文章未找到</p>
</div>
</template>
<template #empty>
<div class="text-center h-20 flex justify-center items-center">
<h1>😅 Document is empty</h1>
</div>
</template>
</ContentDoc>
</main>
</template>
6 changes: 6 additions & 0 deletions pages/error.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<template>
<div>404</div>
</template>
<script lang="ts" setup></script>

<style></style>
4 changes: 2 additions & 2 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<div class="m-8 flex justify-center">
<NuxtLink to="/archive/1">
<var-button :color="pkOrange" text-color="#fff">查看更多</var-button>
<var-button :color="pkGreen" text-color="#fff">查看更多</var-button>
</NuxtLink>
</div>
</div>
Expand Down Expand Up @@ -83,7 +83,7 @@ const recent5Posts: QueryBuilderParams = {
// sort: [{ date: -1 }],
};
const _temp = await queryContent(recent5Posts).find();
// const _temp = await queryContent(recent5Posts).find();
const count = await blogsCount().count();
pager.total = count;
Expand Down
Loading

0 comments on commit 5ad593e

Please sign in to comment.