valaxy-theme-yun 0.22.5 → 0.22.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/components/YunDebug.vue
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<script setup lang="ts">
|
2
|
-
import { computed } from 'vue'
|
2
|
+
import { computed, ref } from 'vue'
|
3
3
|
import { useYunAppStore } from '../stores'
|
4
4
|
|
5
5
|
const yun = useYunAppStore()
|
@@ -32,12 +32,16 @@ const infoList = computed(() => {
|
|
32
32
|
},
|
33
33
|
]
|
34
34
|
})
|
35
|
+
|
36
|
+
const show = ref(true)
|
35
37
|
</script>
|
36
38
|
|
37
39
|
<template>
|
38
40
|
<div
|
41
|
+
v-if="show"
|
39
42
|
class="bg-black/50 fixed bottom-20 left-2 p-2 gap-1 rounded z-9999"
|
40
43
|
text="xs white" flex="~ col"
|
44
|
+
@click="show = false"
|
41
45
|
>
|
42
46
|
<div v-for="item in infoList" :key="item.label" class="gap-2 inline-flex">
|
43
47
|
<span class="w-6" font="bold">{{ item.label }}: </span>
|
@@ -47,25 +47,35 @@ watch(() => props.open, () => {
|
|
47
47
|
<div v-if="input" class="flex-center" w="full" py="4">
|
48
48
|
{{ t('search.hits', results.length || 0) }}
|
49
49
|
</div>
|
50
|
-
<div v-if="results.length > 0" overflow="auto" flex="~" w="full">
|
51
|
-
<div class="yun-fuse-result-container" flex="~ col" w="full">
|
50
|
+
<div v-if="results.length > 0" overflow="auto" flex="~" w="full" class="justify-center">
|
51
|
+
<div class="yun-fuse-result-container max-w-3xl" flex="~ col" w="full">
|
52
52
|
<AppLink
|
53
53
|
v-for="result in results" :key="result.item.title"
|
54
54
|
:to="result.item.link"
|
55
|
-
class="yun-fuse-result-item text-$va-c-text hover:(text-$va-c-bg bg-$va-c-text-dark bg-opacity-100)"
|
56
|
-
flex="~ col"
|
55
|
+
class="yun-fuse-result-item text-$va-c-text hover:(text-$va-c-bg bg-$va-c-text-dark bg-opacity-100) text-left p-2"
|
56
|
+
flex="~ col"
|
57
57
|
@click="emit('close')"
|
58
58
|
>
|
59
|
-
<h3 font="
|
59
|
+
<h3 font="medium">
|
60
60
|
{{ result.item.title }}
|
61
61
|
</h3>
|
62
|
-
<span text="sm" opacity="80">
|
62
|
+
<span text="sm" font="light" opacity="80">
|
63
63
|
{{ result.item.excerpt }}
|
64
64
|
</span>
|
65
|
-
<
|
66
|
-
|
67
|
-
|
65
|
+
<div class="flex justify-between op-50" text-xs mt="1" font="light">
|
66
|
+
<span>
|
67
|
+
{{ result.item.link }}
|
68
|
+
</span>
|
69
|
+
<span flex="~ gap-1">
|
70
|
+
<span>Score Index:</span>
|
71
|
+
<div class="text-right w-4">{{ result.refIndex }}</div>
|
72
|
+
</span>
|
73
|
+
</div>
|
68
74
|
</AppLink>
|
75
|
+
|
76
|
+
<div class="flex op-30 justify-end text-xs p-4">
|
77
|
+
Search by Local
|
78
|
+
</div>
|
69
79
|
</div>
|
70
80
|
</div>
|
71
81
|
</div>
|
@@ -1,28 +1,17 @@
|
|
1
1
|
<script lang="ts" setup>
|
2
|
-
import dayjs from '
|
3
|
-
|
4
|
-
import relativeTime from 'dayjs/plugin/relativeTime'
|
5
|
-
import { useFrontmatter } from 'valaxy'
|
2
|
+
import { dayjs, useFrontmatter } from 'valaxy'
|
6
3
|
|
7
4
|
import { computed } from 'vue'
|
8
5
|
import { useI18n } from 'vue-i18n'
|
9
6
|
|
10
|
-
dayjs.extend(relativeTime)
|
11
|
-
|
12
7
|
const fm = useFrontmatter()
|
13
|
-
const { t } = useI18n()
|
8
|
+
const { t, locale } = useI18n()
|
14
9
|
|
15
10
|
const updated = computed(() => {
|
16
|
-
return dayjs(fm.value.updated || fm.value.date)
|
11
|
+
return dayjs(fm.value.updated || fm.value.date).locale(locale.value)
|
17
12
|
})
|
18
13
|
|
19
|
-
const ago = computed(() =>
|
20
|
-
const fromNow = updated.value.fromNow()
|
21
|
-
if (/^\d/.test(fromNow))
|
22
|
-
return ` ${fromNow}`
|
23
|
-
else
|
24
|
-
return fromNow
|
25
|
-
})
|
14
|
+
const ago = computed(() => updated.value.fromNow())
|
26
15
|
|
27
16
|
/**
|
28
17
|
* when the post is updated more than 180 days ago, show a warning
|
@@ -21,8 +21,7 @@ function onClick() {
|
|
21
21
|
|
22
22
|
<template>
|
23
23
|
<button
|
24
|
-
class="yun-search-btn popup-trigger size-12 inline-flex justify-center items-center"
|
25
|
-
:class="!open && 'hover-bg-white/80 hover:bg-black/80'"
|
24
|
+
class="yun-search-btn yun-icon-btn popup-trigger rounded-none! size-12 inline-flex justify-center items-center"
|
26
25
|
text="xl $va-c-text"
|
27
26
|
:title="t('menu.search')"
|
28
27
|
@click="onClick"
|
@@ -9,7 +9,7 @@ const yun = useYunAppStore()
|
|
9
9
|
<template>
|
10
10
|
<button
|
11
11
|
v-if="fm.aside !== false"
|
12
|
-
class="xl:hidden toc-btn shadow-md fixed yun-icon-btn z-
|
12
|
+
class="xl:hidden toc-btn shadow-md fixed yun-icon-btn z-20 bg-$va-c-bg-soft"
|
13
13
|
opacity="75" right="4" bottom="19"
|
14
14
|
@click="yun.rightSidebar.toggle()"
|
15
15
|
>
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "valaxy-theme-yun",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.22.
|
4
|
+
"version": "0.22.6",
|
5
5
|
"author": {
|
6
6
|
"email": "me@yunyoujun.cn",
|
7
7
|
"name": "YunYouJun",
|
@@ -32,8 +32,8 @@
|
|
32
32
|
},
|
33
33
|
"devDependencies": {
|
34
34
|
"@types/animejs": "^3.1.12",
|
35
|
-
"valaxy": "0.
|
36
|
-
"valaxy
|
35
|
+
"valaxy-addon-waline": "0.2.0",
|
36
|
+
"valaxy": "0.22.6"
|
37
37
|
},
|
38
38
|
"scripts": {
|
39
39
|
"release": "bumpp && pnpm publish"
|