Skip to content

Commit 420469b

Browse files
author
Fro-Q
committed
fix: no addons in popups
1 parent 98fa5b6 commit 420469b

21 files changed

Lines changed: 1429 additions & 1347 deletions

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ docs/posts/_config/*
88
docs/.DS_Store
99
docs/posts/_template/blog_temp.md
1010
docs/posts/_template/blog_temp.md
11+
Session.vim

docs/.vitepress/theme/Layout.vue

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
<script setup lang="ts">
2-
import { defaultDocument } from "@vueuse/core";
3-
import mediumZoom from "medium-zoom";
4-
import { useRoute } from "vitepress";
5-
import { nextTick, onMounted, watch } from "vue";
6-
import ButtonVerticalNavigation from "./components/ButtonVerticalNavigation.vue";
7-
import PageContent from "./components/PageContent.vue";
8-
import PageFooter from "./components/PageFooter.vue";
9-
import PageLogo from "./components/PageLogo.vue";
2+
import { defaultDocument } from '@vueuse/core'
3+
import mediumZoom from 'medium-zoom'
4+
import { useRoute } from 'vitepress'
5+
import { nextTick, onMounted, watch } from 'vue'
6+
import ButtonVerticalNavigation from './components/ButtonVerticalNavigation.vue'
7+
import PageContent from './components/PageContent.vue'
8+
import PageFooter from './components/PageFooter.vue'
9+
import PageLogo from './components/PageLogo.vue'
1010
11-
import PageNav from "./components/PageNav.vue";
11+
import PageNav from './components/PageNav.vue'
1212
13-
const route = useRoute();
13+
const route = useRoute()
1414
1515
function initZoom() {
16-
mediumZoom("#content figure img", {
16+
mediumZoom('#content figure img', {
1717
margin: 24,
18-
background: "var(--image-mask-bg)",
18+
background: 'var(--image-mask-bg)',
1919
container: defaultDocument!.body,
20-
});
20+
})
2121
}
2222
2323
onMounted(() => {
24-
initZoom();
25-
});
24+
initZoom()
25+
})
2626
2727
watch(
2828
() => route.path,
2929
() => nextTick(() => initZoom()),
30-
);
30+
)
3131
</script>
3232

3333
<template>
@@ -40,7 +40,10 @@ watch(
4040
<PageLogo />
4141
<PageNav />
4242
<PageContent :key="route.path" />
43-
<ButtonVerticalNavigation un-hidden un-md:flex />
43+
<ButtonVerticalNavigation
44+
un-hidden
45+
un-md:flex
46+
/>
4447
<PageFooter />
4548
</div>
4649
</template>

docs/.vitepress/theme/components/ButtonVerticalNavigation.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ const { top, bottom } = toRefs(arrivedState)
1717
>
1818
<button
1919
:un-opacity="top ? 0 : 100"
20+
un-items-center
21+
un-transition
2022
un-bg-vp-c-brand-1
2123
un-text-white
2224
un-border-none
2325
un-rounded-full
2426
un-w-10
2527
un-h-10
2628
un-flex
27-
un-items-center
2829
un-justify-center
2930
un-cursor-pointer
30-
un-transition
3131
un-duration-300
3232
@click="y = 0"
3333
>

docs/.vitepress/theme/components/CheckboxToggle.vue

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,23 @@ const isChecked = computed({
1313
get: () => props.modelValue,
1414
set: value => emit('update:modelValue', value),
1515
})
16+
17+
export interface Data {
18+
url: string
19+
frontmatter: Record<string, any>
20+
excerpt?: string
21+
created: Date
22+
lastModified: Date
23+
readingTime: number
24+
tagsExtended: string[]
25+
tags: string[]
26+
title: string
27+
groupProperty: {
28+
category: string
29+
chineseYear: string
30+
}
31+
html?: string
32+
}
1633
</script>
1734

1835
<template>
@@ -24,24 +41,27 @@ const isChecked = computed({
2441
:id="id"
2542
v-model="isChecked"
2643
type="checkbox"
44+
45+
un-relative
46+
un-transition
2747
un-appearance-none
2848
un-w-4
2949
un-h-4
3050
un-rounded-sm
31-
un-relative
32-
un-transition
3351
un-border="px neutral-600"
3452
un-before="transition content-empty bg-neutral-800 dark:bg-neutral-200 w-2 h-2 scale-0 absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2 rounded-none"
3553
un-checked="border-neutral-600 dark:border-neutral-400 before:scale-100"
3654
un-hover="border-neutral-800 dark:border-neutral-200 before:scale-20 checked:before:scale-100"
3755
>
3856
<label
3957
:for="id"
40-
un-ml-2
58+
4159
un-text="neutral-600 dark:neutral-400 base"
42-
un-block
60+
4361
un-flex="~ row"
4462
un-items-center
63+
un-ml-2
64+
un-block
4565
>
4666
4767
<span>

docs/.vitepress/theme/components/LinkUnderline.vue

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,14 @@ onMounted(() => {
6262

6363
<template>
6464
<div
65-
un-min-w-0
65+
66+
un-after="content-empty bg-neutral-200 dark:bg-neutral-800 w-full h-2px absolute bottom-0 left-0 z-0"
67+
6668
un-inline-block
6769
un-duration-400
6870
un-relative
71+
un-min-w-0
6972
un-px-2
70-
un-after="content-empty bg-neutral-200 dark:bg-neutral-800 w-full h-2px absolute bottom-0 left-0 z-0"
7173
un-before-w-0
7274
un-before-h-3px
7375
un-before-left-0
@@ -97,17 +99,19 @@ onMounted(() => {
9799
ref="tooltipRef"
98100
class="tooltip"
99101
:style="tooltipStyle"
102+
103+
un-bg="neutral-200 dark:neutral-800"
104+
un-text="neutral-800 dark:neutral-200"
105+
106+
un-fixed
107+
un-rounded-sm
108+
un-whitespace-nowrap
100109
un-text-align-start
101110
un-text-base
102-
un-fixed
103111
un-z-50
104-
un-bg="neutral-200 dark:neutral-800"
105-
un-text="neutral-800 dark:neutral-200"
106112
un-py-2
107113
un-px-4
108-
un-rounded-sm
109114
un-shadow-lg
110-
un-whitespace-nowrap
111115
>
112116
<div
113117
un-flex="~ col"

docs/.vitepress/theme/components/PageContentContact.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ import contacts from '../src/contacts.json' with { type: 'json' }
4141
target="_blank"
4242
rel="noopener noreferrer"
4343
>
44-
<code
45-
:class="`hover:text-${contact.colorUno}-500`"
46-
>
44+
<code :class="`hover:text-${contact.colorUno}-500`">
4745
{{ link.text }}
4846
</code>
4947
</a>

docs/.vitepress/theme/components/PageContentHome.vue

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@ const categories: string[] = ['全', ...usePostFilters().allUniqueCategories.val
1616
<template>
1717
<un-page-content un-min-h-100vh>
1818
<div
19-
un-select-none
19+
2020
un-text="neutral-700 dark:neutral-300 3xl"
2121
un-h="[calc(100vh-100px)]"
2222
un-flex="~ col grow-1"
2323
un-justify-center
24+
un-select-none
2425
>
2526
<div
2627
un-mb-10
@@ -35,17 +36,19 @@ const categories: string[] = ['全', ...usePostFilters().allUniqueCategories.val
3536
<input
3637
id="self-description"
3738
type="text"
38-
un-z-20
39+
40+
un-border-b="2px emerald-600 dark:emerald-400"
41+
3942
un-appearance-none
43+
un-inline-block
44+
un-max-w-full
45+
un-relative
46+
un-z-20
4047
un-rounded-none
4148
un-bg-transparent
42-
un-border-b="2px emerald-600 dark:emerald-400"
4349
un-outline-none
4450
un-text-center
4551
un-font-thin
46-
un-inline-block
47-
un-max-w-full
48-
un-relative
4952
autocomplete="off"
5053
maxlength="10"
5154
>

docs/.vitepress/theme/components/PageContentNotFound.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ randomPosts['-']['-'] = randomPosts['-']['-'].sort(() => Math.random() - 0.5).sl
1515
<h1
1616
un-text="align-right 400px rose-500/10"
1717
un-font="900"
18+
1819
un-absolute
19-
un-right-0
2020
un-bottom-0
2121
un-select-none
22+
un-right-0
2223
un-z-0
2324
>
2425
404

docs/.vitepress/theme/components/PageContentPost.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,11 @@ const prevPost = computed(() => {
7979
<template>
8080
<un-page-content>
8181
<div
82-
un-my-10
82+
8383
un-text="5xl/relaxed"
8484
un-max-w-full
85-
class="markdown-rendered"
85+
un-my-10
86+
class="markdown-rendered text-2xl"
8687
v-html="post?.frontmatter.title ? renderMdInline(post.frontmatter.title) : ''"
8788
/>
8889
<!-- Display post meta information (e.g., date, reading time) -->

docs/.vitepress/theme/components/PostListSection.vue

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { computed, ref } from 'vue'
44
import CheckboxToggle from './CheckboxToggle.vue'
55
import LinkUnderline from './LinkUnderline.vue'
66
import ProgressBarHeader from './ProgressBarHeader.vue'
7+
import TooltipPostInfo from './TooltipPostInfo.vue'
78
89
// TODO: Abstract this component
910
@@ -99,26 +100,31 @@ const excerptVisible = ref(Object.fromEntries(Object.keys(posts).map(group => [g
99100
un-w-full
100101
>
101102
<div
102-
un-text-3xl
103+
103104
un-text="neutral-600 dark:neutral-400 2xl"
105+
106+
style="writing-mode: vertical-lr;"
107+
108+
un-px-4
109+
un-text-3xl
104110
un-sticky
105111
un-top-50
106-
style="writing-mode: vertical-lr;"
107112
un-z-2
108113
un-w-fit
109-
un-px-4
110114
>
111115
{{ subGroup !== '-' ? subGroup : '' }}
112116
</div>
113117
<div
114118
v-for="post in subGroupedPosts"
115119
:key="post.url"
116-
un-p-2
117-
un-ml-15
120+
118121
un-flex="~ col"
122+
119123
un-gap-2
120124
un-items-end
121125
un-relative
126+
un-p-2
127+
un-ml-15
122128
>
123129
<div
124130
un-flex="~ row"

0 commit comments

Comments
 (0)