From e2079c538892b7c85aeeb0c9cbb526c4f1f544c6 Mon Sep 17 00:00:00 2001 From: Miao_Spring <539943419@qq.com> Date: Mon, 13 Jan 2025 12:44:53 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E4=BA=86=E5=87=A0?= =?UTF-8?q?=E4=B8=AA=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ components/icons/chevronDown.vue | 6 ++++ components/icons/link.vue | 6 ++++ components/icons/tag.vue | 8 +++++ components/icons/time.vue | 8 +++++ components/miaoDivider-left.vue | 2 ++ package.json | 1 - pages/index.vue | 58 +++++++++++++++++++++++++------- pages/posts/index.vue | 37 ++++++++++++++++---- pages/posts/post-[id].vue | 9 ++++- pnpm-lock.yaml | 8 ----- server/api/test/testDir.ts | 8 +++++ 12 files changed, 124 insertions(+), 29 deletions(-) create mode 100644 components/icons/chevronDown.vue create mode 100644 components/icons/link.vue create mode 100644 components/icons/tag.vue create mode 100644 components/icons/time.vue create mode 100644 server/api/test/testDir.ts diff --git a/.gitignore b/.gitignore index 4a7f73a..772cf59 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,5 @@ logs .env .env.* !.env.example + +userData \ No newline at end of file diff --git a/components/icons/chevronDown.vue b/components/icons/chevronDown.vue new file mode 100644 index 0000000..9b079f1 --- /dev/null +++ b/components/icons/chevronDown.vue @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/components/icons/link.vue b/components/icons/link.vue new file mode 100644 index 0000000..f0aa0ed --- /dev/null +++ b/components/icons/link.vue @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/components/icons/tag.vue b/components/icons/tag.vue new file mode 100644 index 0000000..a5b1333 --- /dev/null +++ b/components/icons/tag.vue @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/components/icons/time.vue b/components/icons/time.vue new file mode 100644 index 0000000..e321315 --- /dev/null +++ b/components/icons/time.vue @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git a/components/miaoDivider-left.vue b/components/miaoDivider-left.vue index 7b40564..f777301 100644 --- a/components/miaoDivider-left.vue +++ b/components/miaoDivider-left.vue @@ -25,10 +25,12 @@ .left-line { flex: 1; + min-width: 25px; } .right-line { flex: 32; + min-width: 25px; } .miao-divider-text { diff --git a/package.json b/package.json index bff0318..ad36863 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,6 @@ }, "dependencies": { "@pinia/nuxt": "^0.9.0", - "@vicons/ionicons5": "^0.13.0", "dayjs": "^1.11.13", "markdown-it": "^14.1.0", "node-fetch": "^3.3.2", diff --git a/pages/index.vue b/pages/index.vue index fba613a..29fe2a5 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -14,14 +14,14 @@ - +
{{ cItem.name }}
{{ cItem.description }}
@@ -36,7 +36,8 @@ import { reactive } from 'vue'; import miaoDividerLeft from '~/components/miaoDivider-left.vue'; // @ts-ignore -import ChevronDown from "@vicons/ionicons5/ChevronDown" +import ChevronDown from "~/components/icons/ChevronDown.vue"; +import linkIcon from '~/components/icons/link.vue'; type PageContent = { subTitle: string, @@ -62,7 +63,7 @@ const PageContent = reactive([ show: true, content: [ { - name: 'miaoDirectory', + name: 'MiaoDirectory', description: '有个插件功能的单文件文件托管服务', links: [ { @@ -76,7 +77,7 @@ const PageContent = reactive([ ] }, { - name: 'miaoShare', + name: 'MiaoShare', description: '多了个加密环节的文件分享平台', links: [ { @@ -86,7 +87,7 @@ const PageContent = reactive([ ] }, { - name: 'miaoBlog', + name: 'MiaoBlog', description: '施工中,不过不要抱有太大期待', links: [ { @@ -101,7 +102,7 @@ const PageContent = reactive([ show: true, content: [ { - name: 'genshin-gacha', + name: 'Genshin-Gacha', description: '通过模拟来计算抽卡成功率的小工具', nuxtLinks: [ { @@ -111,7 +112,7 @@ const PageContent = reactive([ ] }, { - name: 'miaoTracker', + name: 'MiaoTracker', description: '仅仅是个接口而已,用来查询开发者的位置记录', nuxtLinks: [ { @@ -135,6 +136,26 @@ const PageContent = reactive([ } ] }, + { + name: 'Nuxt', + description: 'Nuxt官方文档', + links: [ + { + name: 'Nuxt', + url: 'https://nuxt.com/' + } + ] + }, + { + name: 'Element-plus', + description: 'element-plus官方文档', + links: [ + { + name: 'element-plus', + url: 'https://element-plus.org/zh-CN/guide/design.html' + } + ] + } ] }, ]) @@ -252,14 +273,15 @@ const switchItemShow = (item: PageContent) => { } .content-item-name { + box-sizing: border-box; width: 100%; font-size: 20px; padding-bottom: 5px; background-color: #15aa87ce; color: #fff; - margin-bottom: 10px; - padding-left: 10px; + padding: 3px 10px 5px; letter-spacing: 0px; + margin-bottom: 10px; // font-family: PT Serif, Serif; // font-weight: 600; } @@ -281,10 +303,14 @@ const switchItemShow = (item: PageContent) => { user-select: none; padding-right: 10px; - &>div { - font-size: 14px; - font-weight: 300; + &-icon { + // font-size: 14px; + // font-weight: 300; margin-right: 10px; + height: 16px; + aspect-ratio: 1; + transform: translateY(0px) rotate(-45deg); + opacity: .7; } &>a { @@ -321,4 +347,10 @@ const switchItemShow = (item: PageContent) => { } } } + +@media screen and (max-width: 999px) { + .main .content-wrap .content .content-items-wrap { + grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); + } +} \ No newline at end of file diff --git a/pages/posts/index.vue b/pages/posts/index.vue index 082879c..1b6e577 100644 --- a/pages/posts/index.vue +++ b/pages/posts/index.vue @@ -6,15 +6,21 @@

{{ post.summary }}...

- +
- +
@@ -22,6 +28,8 @@