hexo-theme-lnote 1.2.7 → 1.2.8
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/README.md +36 -36
- package/_config.yml +19 -19
- package/config/links.yml +63 -63
- package/config/svg.yml +33 -33
- package/index.d.ts +3 -3
- package/languages/de.yml +69 -69
- package/languages/en.yml +73 -73
- package/languages/eo.yml +69 -69
- package/languages/es.yml +69 -69
- package/languages/ja.yml +69 -69
- package/languages/ru.yml +69 -69
- package/languages/zh-CN.yml +73 -73
- package/languages/zh-HK.yml +73 -73
- package/languages/zh-TW.yml +73 -73
- package/layout/404.ejs +8 -8
- package/layout/_partials/archive-list.ejs +17 -17
- package/layout/_partials/category-chains.ejs +19 -19
- package/layout/_partials/category-list.ejs +62 -62
- package/layout/_partials/comments/changyan.ejs +11 -11
- package/layout/_partials/comments/cusdis.ejs +25 -25
- package/layout/_partials/comments/discuss.ejs +17 -17
- package/layout/_partials/comments/disqus.ejs +32 -32
- package/layout/_partials/comments/giscus.ejs +36 -36
- package/layout/_partials/comments/gitalk.ejs +19 -19
- package/layout/_partials/comments/livere.ejs +10 -10
- package/layout/_partials/comments/remark42.ejs +29 -29
- package/layout/_partials/comments/twikoo.ejs +25 -25
- package/layout/_partials/comments/utterances.ejs +27 -27
- package/layout/_partials/comments/valine.ejs +23 -23
- package/layout/_partials/comments/waline.ejs +24 -24
- package/layout/_partials/comments.ejs +8 -8
- package/layout/_partials/css.ejs +9 -9
- package/layout/_partials/footer/beian.ejs +33 -33
- package/layout/_partials/footer/statistics.ejs +39 -39
- package/layout/_partials/footer.ejs +7 -7
- package/layout/_partials/head.ejs +46 -46
- package/layout/_partials/header/banner.ejs +24 -24
- package/layout/_partials/header/navigation.ejs +56 -56
- package/layout/_partials/header.ejs +4 -4
- package/layout/_partials/markdown-plugins.ejs +24 -24
- package/layout/_partials/paginator.ejs +14 -14
- package/layout/_partials/plugins/CSR.ejs +4 -4
- package/layout/_partials/plugins/analytics.ejs +75 -75
- package/layout/_partials/plugins/anchorjs.ejs +39 -39
- package/layout/_partials/plugins/code-widget.ejs +7 -7
- package/layout/_partials/plugins/encrypt.ejs +18 -18
- package/layout/_partials/plugins/fancybox.ejs +11 -11
- package/layout/_partials/plugins/highlight.ejs +13 -13
- package/layout/_partials/plugins/math.ejs +51 -51
- package/layout/_partials/plugins/mermaid.ejs +4 -4
- package/layout/_partials/plugins/nprogress.ejs +7 -7
- package/layout/_partials/plugins/typed.ejs +20 -20
- package/layout/_partials/post/category-bar.ejs +18 -18
- package/layout/_partials/post/copyright.ejs +50 -50
- package/layout/_partials/post/css.ejs +3 -3
- package/layout/_partials/post/meta-bottom.ejs +16 -16
- package/layout/_partials/post/meta-top.ejs +27 -27
- package/layout/_partials/post/scripts.ejs +8 -8
- package/layout/_partials/post/sidebar-left.ejs +1 -1
- package/layout/_partials/post/sidebar-right.ejs +2 -2
- package/layout/_partials/post/toc.ejs +6 -6
- package/layout/_partials/scripts.ejs +10 -10
- package/layout/_partials/search.ejs +19 -19
- package/layout/about.ejs +22 -22
- package/layout/archive.ejs +10 -10
- package/layout/categories.ejs +20 -20
- package/layout/category.ejs +12 -12
- package/layout/index.ejs +61 -61
- package/layout/layout.ejs +60 -60
- package/layout/links.ejs +31 -31
- package/layout/page.ejs +15 -15
- package/layout/post.ejs +77 -77
- package/layout/tag.ejs +12 -12
- package/layout/tags.ejs +26 -26
- package/package.json +73 -73
- package/scripts/index.js +2 -1
- package/source/css/_functions/base.styl +8 -8
- package/source/css/_mixins/base.styl +23 -23
- package/source/css/_pages/_about/about.styl +32 -32
- package/source/css/_pages/_archive/archive.styl +32 -32
- package/source/css/_pages/_base/_widget/anchorjs.styl +8 -8
- package/source/css/_pages/_base/_widget/banner.styl +29 -29
- package/source/css/_pages/_base/_widget/board.styl +11 -11
- package/source/css/_pages/_base/_widget/code-widget.styl +36 -36
- package/source/css/_pages/_base/_widget/copyright.styl +90 -90
- package/source/css/_pages/_base/_widget/footer.styl +65 -65
- package/source/css/_pages/_base/_widget/footnote.styl +25 -25
- package/source/css/_pages/_base/_widget/header.styl +173 -173
- package/source/css/_pages/_base/_widget/modal.styl +100 -100
- package/source/css/_pages/_base/_widget/navlink.styl +15 -15
- package/source/css/_pages/_base/_widget/ngrogress.styl +12 -12
- package/source/css/_pages/_base/_widget/noscript.styl +12 -12
- package/source/css/_pages/_base/_widget/pagination.styl +23 -23
- package/source/css/_pages/_base/_widget/qrcode.styl +17 -17
- package/source/css/_pages/_base/_widget/scroll-btn.styl +48 -48
- package/source/css/_pages/_base/_widget/text.styl +19 -19
- package/source/css/_pages/_base/_widget/toc.styl +75 -75
- package/source/css/_pages/_base/base.styl +67 -67
- package/source/css/_pages/_base/color-schema.styl +79 -79
- package/source/css/_pages/_base/inline.styl +51 -51
- package/source/css/_pages/_base/keyframes.styl +31 -31
- package/source/css/_pages/_base/print.styl +38 -38
- package/source/css/_pages/_category/category-bar.styl +58 -58
- package/source/css/_pages/_category/category-chain.styl +6 -6
- package/source/css/_pages/_category/category-list.styl +62 -62
- package/source/css/_pages/_index/index.styl +75 -75
- package/source/css/_pages/_links/links.styl +79 -79
- package/source/css/_pages/_post/comment.styl +27 -27
- package/source/css/_pages/_post/highlight.styl +76 -76
- package/source/css/_pages/_post/markdown.styl +96 -96
- package/source/css/_pages/_post/post-page.styl +179 -179
- package/source/css/_pages/_post/post-plugin.styl +9 -9
- package/source/css/_pages/_post/post-tag.styl +74 -74
- package/source/css/_pages/_tag/tags.styl +9 -9
- package/source/css/_pages/pages.styl +8 -8
- package/source/css/_variables/base.styl +72 -72
- package/source/css/gitalk.css +546 -546
- package/source/css/main.styl +19 -19
- package/source/js/color-schema.js +279 -279
- package/source/js/events.js +72 -72
- package/source/js/img-lazyload.js +10 -10
- package/source/js/local-search.js +70 -70
- package/source/js/post/copying-code.js +34 -34
- package/source/js/post/enable.js +6 -6
- package/source/js/post/img-swipe-bf.js +47 -47
- package/source/js/post/img-swipe.js +83 -83
- package/source/js/post/mermaiding.js +9 -9
- package/source/js/post/play-imgs.js +58 -58
- package/source/js/post/toc.js +24 -24
- package/source/js/post/view-imgs.js +27 -27
- package/source/js/utils.js +245 -245
- package/source/xml/local-search.xml +45 -45
- package/templates/Chat.vue +52 -52
- package/templates/GroupImage.vue +36 -36
- package/templates/MenuNav.vue +39 -39
- package/templates/Note.vue +33 -33
- package/templates/Noun.vue +25 -25
- package/templates/NounContent.vue +29 -29
- package/templates/Tab.vue +40 -40
- package/templates/footer.ejs +12 -12
- package/templates/utils/uri.ts +39 -39
package/templates/Chat.vue
CHANGED
@@ -1,52 +1,52 @@
|
|
1
|
-
<template>
|
2
|
-
<article class="chats">
|
3
|
-
<template v-for="item in chats">
|
4
|
-
<section
|
5
|
-
v-if="item.role === 'sender'"
|
6
|
-
class="chat-sender py-3 d-flex align-items-start justify-content-start"
|
7
|
-
>
|
8
|
-
<img
|
9
|
-
class="chat-avatar rounded"
|
10
|
-
:src="uriFor(['/img/chat/sender.jpg'])"
|
11
|
-
/>
|
12
|
-
<div
|
13
|
-
class="chat-part overflow-hidden ms-3 flex-fill d-flex flex-column align-items-start"
|
14
|
-
>
|
15
|
-
<div class="chat-name mb-2 overflow-hidden">
|
16
|
-
{{ item.name }}
|
17
|
-
</div>
|
18
|
-
<div
|
19
|
-
class="chat-content rounded bg-secondary-subtle px-3 py-2"
|
20
|
-
v-html="item.content"
|
21
|
-
></div>
|
22
|
-
</div>
|
23
|
-
</section>
|
24
|
-
<section
|
25
|
-
v-else
|
26
|
-
class="chat-responder py-3 flex-row-reverse d-flex align-items-start justify-content-start"
|
27
|
-
>
|
28
|
-
<img
|
29
|
-
class="chat-avatar rounded"
|
30
|
-
:src="uriFor(['/img/chat/responder.jpg'])"
|
31
|
-
/>
|
32
|
-
<div
|
33
|
-
class="chat-part overflow-hidden me-3 flex-fill d-flex flex-column align-items-end"
|
34
|
-
>
|
35
|
-
<div class="chat-name mb-2 overflow-hidden">
|
36
|
-
{{ item.name }}
|
37
|
-
</div>
|
38
|
-
<div
|
39
|
-
class="chat-content rounded bg-primary-subtle px-3 py-2"
|
40
|
-
v-html="item.content"
|
41
|
-
></div>
|
42
|
-
</div>
|
43
|
-
</section>
|
44
|
-
</template>
|
45
|
-
</article>
|
46
|
-
</template>
|
47
|
-
|
48
|
-
<script lang="ts" setup>
|
49
|
-
import { uriFor } from './utils/uri'
|
50
|
-
import type { Chat } from '../types/tag'
|
51
|
-
const chats: Chat[] = []
|
52
|
-
</script>
|
1
|
+
<template>
|
2
|
+
<article class="chats">
|
3
|
+
<template v-for="item in chats">
|
4
|
+
<section
|
5
|
+
v-if="item.role === 'sender'"
|
6
|
+
class="chat-sender py-3 d-flex align-items-start justify-content-start"
|
7
|
+
>
|
8
|
+
<img
|
9
|
+
class="chat-avatar rounded"
|
10
|
+
:src="uriFor(['/img/chat/sender.jpg'])"
|
11
|
+
/>
|
12
|
+
<div
|
13
|
+
class="chat-part overflow-hidden ms-3 flex-fill d-flex flex-column align-items-start"
|
14
|
+
>
|
15
|
+
<div class="chat-name mb-2 overflow-hidden">
|
16
|
+
{{ item.name }}
|
17
|
+
</div>
|
18
|
+
<div
|
19
|
+
class="chat-content rounded bg-secondary-subtle px-3 py-2"
|
20
|
+
v-html="item.content"
|
21
|
+
></div>
|
22
|
+
</div>
|
23
|
+
</section>
|
24
|
+
<section
|
25
|
+
v-else
|
26
|
+
class="chat-responder py-3 flex-row-reverse d-flex align-items-start justify-content-start"
|
27
|
+
>
|
28
|
+
<img
|
29
|
+
class="chat-avatar rounded"
|
30
|
+
:src="uriFor(['/img/chat/responder.jpg'])"
|
31
|
+
/>
|
32
|
+
<div
|
33
|
+
class="chat-part overflow-hidden me-3 flex-fill d-flex flex-column align-items-end"
|
34
|
+
>
|
35
|
+
<div class="chat-name mb-2 overflow-hidden">
|
36
|
+
{{ item.name }}
|
37
|
+
</div>
|
38
|
+
<div
|
39
|
+
class="chat-content rounded bg-primary-subtle px-3 py-2"
|
40
|
+
v-html="item.content"
|
41
|
+
></div>
|
42
|
+
</div>
|
43
|
+
</section>
|
44
|
+
</template>
|
45
|
+
</article>
|
46
|
+
</template>
|
47
|
+
|
48
|
+
<script lang="ts" setup>
|
49
|
+
import { uriFor } from './utils/uri'
|
50
|
+
import type { Chat } from '../types/tag'
|
51
|
+
const chats: Chat[] = []
|
52
|
+
</script>
|
package/templates/GroupImage.vue
CHANGED
@@ -1,36 +1,36 @@
|
|
1
|
-
<template>
|
2
|
-
<div v-if="rowCol === 1" class="group-image-container">
|
3
|
-
<img
|
4
|
-
class="img-fluid object-fit-cover w-100 img-swipe-single"
|
5
|
-
:alt="list[0].title"
|
6
|
-
:src="uriFor([list[0].url])"
|
7
|
-
/>
|
8
|
-
</div>
|
9
|
-
<div v-else class="group-image-container img-swipe-group">
|
10
|
-
<div :class="['row', `row-cols-${rowCol}`, 'gx-2', 'gy-2']">
|
11
|
-
<div class="col" v-for="item in list">
|
12
|
-
<img
|
13
|
-
v-if="isSameSize"
|
14
|
-
class="img-fluid object-fit-cover"
|
15
|
-
:alt="item.title"
|
16
|
-
:src="uriFor([item.url])"
|
17
|
-
/>
|
18
|
-
<div class="image-adapter" v-else>
|
19
|
-
<div>
|
20
|
-
<img
|
21
|
-
class="img-fluid object-fit-cover"
|
22
|
-
:alt="item.title"
|
23
|
-
:src="uriFor([item.url])"
|
24
|
-
/>
|
25
|
-
</div>
|
26
|
-
</div>
|
27
|
-
</div>
|
28
|
-
</div>
|
29
|
-
</div>
|
30
|
-
</template>
|
31
|
-
<script lang="ts" setup>
|
32
|
-
import { uriFor } from './utils/uri'
|
33
|
-
const rowCol: number = 1
|
34
|
-
const isSameSize: boolean = false
|
35
|
-
const list: { title: string; url: string }[] = []
|
36
|
-
</script>
|
1
|
+
<template>
|
2
|
+
<div v-if="rowCol === 1" class="group-image-container">
|
3
|
+
<img
|
4
|
+
class="img-fluid object-fit-cover w-100 img-swipe-single"
|
5
|
+
:alt="list[0].title"
|
6
|
+
:src="uriFor([list[0].url])"
|
7
|
+
/>
|
8
|
+
</div>
|
9
|
+
<div v-else class="group-image-container img-swipe-group">
|
10
|
+
<div :class="['row', `row-cols-${rowCol}`, 'gx-2', 'gy-2']">
|
11
|
+
<div class="col" v-for="item in list">
|
12
|
+
<img
|
13
|
+
v-if="isSameSize"
|
14
|
+
class="img-fluid object-fit-cover"
|
15
|
+
:alt="item.title"
|
16
|
+
:src="uriFor([item.url])"
|
17
|
+
/>
|
18
|
+
<div class="image-adapter" v-else>
|
19
|
+
<div>
|
20
|
+
<img
|
21
|
+
class="img-fluid object-fit-cover"
|
22
|
+
:alt="item.title"
|
23
|
+
:src="uriFor([item.url])"
|
24
|
+
/>
|
25
|
+
</div>
|
26
|
+
</div>
|
27
|
+
</div>
|
28
|
+
</div>
|
29
|
+
</div>
|
30
|
+
</template>
|
31
|
+
<script lang="ts" setup>
|
32
|
+
import { uriFor } from './utils/uri'
|
33
|
+
const rowCol: number = 1
|
34
|
+
const isSameSize: boolean = false
|
35
|
+
const list: { title: string; url: string }[] = []
|
36
|
+
</script>
|
package/templates/MenuNav.vue
CHANGED
@@ -1,39 +1,39 @@
|
|
1
|
-
<template>
|
2
|
-
<div :class="['btn-group', typeBgClass(type)]" role="group">
|
3
|
-
<div class="btn-group" role="group" v-for="menu in menus">
|
4
|
-
<button
|
5
|
-
type="button"
|
6
|
-
:class="['btn', `btn-outline-${type}`, 'dropdown-toggle']"
|
7
|
-
data-bs-toggle="dropdown"
|
8
|
-
aria-expanded="false"
|
9
|
-
>
|
10
|
-
{{ menu.text }}
|
11
|
-
</button>
|
12
|
-
<ul :class="['dropdown-menu']">
|
13
|
-
<li v-for="item in menu.secondaryMenus">
|
14
|
-
<a
|
15
|
-
:class="['dropdown-item']"
|
16
|
-
:href="uriFor([item.link])"
|
17
|
-
>
|
18
|
-
{{ item.text }}
|
19
|
-
</a>
|
20
|
-
</li>
|
21
|
-
</ul>
|
22
|
-
</div>
|
23
|
-
</div>
|
24
|
-
</template>
|
25
|
-
|
26
|
-
<script setup lang="ts">
|
27
|
-
import { uriFor, typeBgClass } from './utils/uri'
|
28
|
-
import type { Type } from '../types/tag'
|
29
|
-
type SecondaryMenu = {
|
30
|
-
text: string
|
31
|
-
link: string
|
32
|
-
}
|
33
|
-
type FirstMenu = {
|
34
|
-
text: string
|
35
|
-
secondaryMenus: SecondaryMenu[]
|
36
|
-
}
|
37
|
-
const type: Type = 'warning'
|
38
|
-
const menus: FirstMenu[] = []
|
39
|
-
</script>
|
1
|
+
<template>
|
2
|
+
<div :class="['btn-group', typeBgClass(type)]" role="group">
|
3
|
+
<div class="btn-group" role="group" v-for="menu in menus">
|
4
|
+
<button
|
5
|
+
type="button"
|
6
|
+
:class="['btn', `btn-outline-${type}`, 'dropdown-toggle']"
|
7
|
+
data-bs-toggle="dropdown"
|
8
|
+
aria-expanded="false"
|
9
|
+
>
|
10
|
+
{{ menu.text }}
|
11
|
+
</button>
|
12
|
+
<ul :class="['dropdown-menu']">
|
13
|
+
<li v-for="item in menu.secondaryMenus">
|
14
|
+
<a
|
15
|
+
:class="['dropdown-item']"
|
16
|
+
:href="uriFor([item.link])"
|
17
|
+
>
|
18
|
+
{{ item.text }}
|
19
|
+
</a>
|
20
|
+
</li>
|
21
|
+
</ul>
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
</template>
|
25
|
+
|
26
|
+
<script setup lang="ts">
|
27
|
+
import { uriFor, typeBgClass } from './utils/uri'
|
28
|
+
import type { Type } from '../types/tag'
|
29
|
+
type SecondaryMenu = {
|
30
|
+
text: string
|
31
|
+
link: string
|
32
|
+
}
|
33
|
+
type FirstMenu = {
|
34
|
+
text: string
|
35
|
+
secondaryMenus: SecondaryMenu[]
|
36
|
+
}
|
37
|
+
const type: Type = 'warning'
|
38
|
+
const menus: FirstMenu[] = []
|
39
|
+
</script>
|
package/templates/Note.vue
CHANGED
@@ -1,33 +1,33 @@
|
|
1
|
-
<template>
|
2
|
-
<div
|
3
|
-
v-if="iconType"
|
4
|
-
:class="[
|
5
|
-
'note',
|
6
|
-
'alert',
|
7
|
-
`alert-${alertType}`,
|
8
|
-
'd-flex',
|
9
|
-
'align-items-top',
|
10
|
-
]"
|
11
|
-
role="alert"
|
12
|
-
>
|
13
|
-
<svg
|
14
|
-
class="flex-shrink-0 me-2"
|
15
|
-
role="img"
|
16
|
-
width="1.2em"
|
17
|
-
height="1.2em"
|
18
|
-
:style="{marginTop: '0.2rem'}"
|
19
|
-
>
|
20
|
-
<use :xlink:href="`#${iconType}`"></use>
|
21
|
-
</svg>
|
22
|
-
<div v-html="html"></div>
|
23
|
-
</div>
|
24
|
-
<div v-else :class="['note', 'alert', `alert-${alertType}`]">
|
25
|
-
<div v-html="html"></div>
|
26
|
-
</div>
|
27
|
-
</template>
|
28
|
-
<script lang="ts" setup>
|
29
|
-
import type { Type } from '../types/tag'
|
30
|
-
const alertType: Type = 'info'
|
31
|
-
const iconType: Type = 'info'
|
32
|
-
const html: string = ''
|
33
|
-
</script>
|
1
|
+
<template>
|
2
|
+
<div
|
3
|
+
v-if="iconType"
|
4
|
+
:class="[
|
5
|
+
'note',
|
6
|
+
'alert',
|
7
|
+
`alert-${alertType}`,
|
8
|
+
'd-flex',
|
9
|
+
'align-items-top',
|
10
|
+
]"
|
11
|
+
role="alert"
|
12
|
+
>
|
13
|
+
<svg
|
14
|
+
class="flex-shrink-0 me-2"
|
15
|
+
role="img"
|
16
|
+
width="1.2em"
|
17
|
+
height="1.2em"
|
18
|
+
:style="{marginTop: '0.2rem'}"
|
19
|
+
>
|
20
|
+
<use :xlink:href="`#${iconType}`"></use>
|
21
|
+
</svg>
|
22
|
+
<div v-html="html"></div>
|
23
|
+
</div>
|
24
|
+
<div v-else :class="['note', 'alert', `alert-${alertType}`]">
|
25
|
+
<div v-html="html"></div>
|
26
|
+
</div>
|
27
|
+
</template>
|
28
|
+
<script lang="ts" setup>
|
29
|
+
import type { Type } from '../types/tag'
|
30
|
+
const alertType: Type = 'info'
|
31
|
+
const iconType: Type = 'info'
|
32
|
+
const html: string = ''
|
33
|
+
</script>
|
package/templates/Noun.vue
CHANGED
@@ -1,25 +1,25 @@
|
|
1
|
-
<template>
|
2
|
-
<button
|
3
|
-
type="button"
|
4
|
-
:class="['btn', 'btn-link', `text-${type}-emphasis`, 'lnote-popover-btn']"
|
5
|
-
data-bs-toggle="popover"
|
6
|
-
data-bs-trigger="hover focus"
|
7
|
-
data-bs-placement="right"
|
8
|
-
:data-bs-custom-class="`lnote-popover ${type}`"
|
9
|
-
data-bs-html="true"
|
10
|
-
:data-bs-content="content"
|
11
|
-
>
|
12
|
-
{{ text }}
|
13
|
-
<svg width="18" height="18">
|
14
|
-
<use xlink:href="#question-circle-fill"></use>
|
15
|
-
</svg>
|
16
|
-
</button>
|
17
|
-
</template>
|
18
|
-
|
19
|
-
<script lang="ts" setup>
|
20
|
-
import { typeBgClass } from './utils/uri'
|
21
|
-
import type { Type } from '../types/tag'
|
22
|
-
const type: Type = 'primary'
|
23
|
-
const content = ''
|
24
|
-
const text = ''
|
25
|
-
</script>
|
1
|
+
<template>
|
2
|
+
<button
|
3
|
+
type="button"
|
4
|
+
:class="['btn', 'btn-link', `text-${type}-emphasis`, 'lnote-popover-btn']"
|
5
|
+
data-bs-toggle="popover"
|
6
|
+
data-bs-trigger="hover focus"
|
7
|
+
data-bs-placement="right"
|
8
|
+
:data-bs-custom-class="`lnote-popover ${type}`"
|
9
|
+
data-bs-html="true"
|
10
|
+
:data-bs-content="content"
|
11
|
+
>
|
12
|
+
{{ text }}
|
13
|
+
<svg width="18" height="18">
|
14
|
+
<use xlink:href="#question-circle-fill"></use>
|
15
|
+
</svg>
|
16
|
+
</button>
|
17
|
+
</template>
|
18
|
+
|
19
|
+
<script lang="ts" setup>
|
20
|
+
import { typeBgClass } from './utils/uri'
|
21
|
+
import type { Type } from '../types/tag'
|
22
|
+
const type: Type = 'primary'
|
23
|
+
const content = ''
|
24
|
+
const text = ''
|
25
|
+
</script>
|
@@ -1,29 +1,29 @@
|
|
1
|
-
<template>
|
2
|
-
<div :class="['card', `border-${type}`]">
|
3
|
-
<div :class="['card-header', 'fw-bold', `text-bg-${type}`]">{{ title }}</div>
|
4
|
-
<div :class="['card-body', `bg-${type}-subtle`, 'rounded-bottom']">
|
5
|
-
<!-- <h5 class="card-title" v-if="title">{{ title }}</h5> -->
|
6
|
-
<p class="card-text">
|
7
|
-
{{ text }}
|
8
|
-
</p>
|
9
|
-
<a
|
10
|
-
v-if="link"
|
11
|
-
:href="uriFor([link])"
|
12
|
-
:class="['card-link', `text-${type}-emphasis`]"
|
13
|
-
>
|
14
|
-
{{ moreText }}
|
15
|
-
</a>
|
16
|
-
</div>
|
17
|
-
</div>
|
18
|
-
</template>
|
19
|
-
|
20
|
-
<script lang="ts" setup>
|
21
|
-
import { uriFor, typeBgClass } from './utils/uri'
|
22
|
-
import type { Type } from '../types/tag'
|
23
|
-
const type: Type = 'primary'
|
24
|
-
// const promptText = ''
|
25
|
-
const moreText = ''
|
26
|
-
const title = ''
|
27
|
-
const text = ''
|
28
|
-
const link = ''
|
29
|
-
</script>
|
1
|
+
<template>
|
2
|
+
<div :class="['card', `border-${type}`]">
|
3
|
+
<div :class="['card-header', 'fw-bold', `text-bg-${type}`]">{{ title }}</div>
|
4
|
+
<div :class="['card-body', `bg-${type}-subtle`, 'rounded-bottom']">
|
5
|
+
<!-- <h5 class="card-title" v-if="title">{{ title }}</h5> -->
|
6
|
+
<p class="card-text">
|
7
|
+
{{ text }}
|
8
|
+
</p>
|
9
|
+
<a
|
10
|
+
v-if="link"
|
11
|
+
:href="uriFor([link])"
|
12
|
+
:class="['card-link', `text-${type}-emphasis`]"
|
13
|
+
>
|
14
|
+
{{ moreText }}
|
15
|
+
</a>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
</template>
|
19
|
+
|
20
|
+
<script lang="ts" setup>
|
21
|
+
import { uriFor, typeBgClass } from './utils/uri'
|
22
|
+
import type { Type } from '../types/tag'
|
23
|
+
const type: Type = 'primary'
|
24
|
+
// const promptText = ''
|
25
|
+
const moreText = ''
|
26
|
+
const title = ''
|
27
|
+
const text = ''
|
28
|
+
const link = ''
|
29
|
+
</script>
|
package/templates/Tab.vue
CHANGED
@@ -1,40 +1,40 @@
|
|
1
|
-
<template>
|
2
|
-
<nav>
|
3
|
-
<ul
|
4
|
-
class="nav nav-underline mb-3 d-flex flex-nowrap overflow-x-auto text-nowrap border-bottom"
|
5
|
-
role="tablist"
|
6
|
-
>
|
7
|
-
<li class="nav-item" role="presentation" v-for="(item, index) in tabs">
|
8
|
-
<button
|
9
|
-
data-bs-toggle="tab"
|
10
|
-
role="tab"
|
11
|
-
type="button"
|
12
|
-
:aria-selected="index === 0 ? 'true' : 'false'"
|
13
|
-
:class="['nav-link', { active: index === 0 }]"
|
14
|
-
:id="`tab-${key}-${index}`"
|
15
|
-
:data-bs-target="`#nav-${key}-${index}`"
|
16
|
-
:aria-controls="`nav-${key}-${index}`"
|
17
|
-
>
|
18
|
-
{{ item.name }}
|
19
|
-
</button>
|
20
|
-
</li>
|
21
|
-
</ul>
|
22
|
-
<div class="tab-content">
|
23
|
-
<div
|
24
|
-
v-for="(item, index) in tabs"
|
25
|
-
:class="['tab-pane', 'fade', index === 0 && 'show active']"
|
26
|
-
:id="`nav-${key}-${index}`"
|
27
|
-
role="tabpanel"
|
28
|
-
:aria-labelledby="`tab-${key}-${index}`"
|
29
|
-
:tabindex="index"
|
30
|
-
>
|
31
|
-
<div v-html="item.content"></div>
|
32
|
-
</div>
|
33
|
-
</div>
|
34
|
-
</nav>
|
35
|
-
</template>
|
36
|
-
<script lang="ts" setup>
|
37
|
-
import type { Tab } from '../types/tag'
|
38
|
-
const key: string = ''
|
39
|
-
const tabs: Tab[] = []
|
40
|
-
</script>
|
1
|
+
<template>
|
2
|
+
<nav>
|
3
|
+
<ul
|
4
|
+
class="nav nav-underline mb-3 d-flex flex-nowrap overflow-x-auto text-nowrap border-bottom"
|
5
|
+
role="tablist"
|
6
|
+
>
|
7
|
+
<li class="nav-item" role="presentation" v-for="(item, index) in tabs">
|
8
|
+
<button
|
9
|
+
data-bs-toggle="tab"
|
10
|
+
role="tab"
|
11
|
+
type="button"
|
12
|
+
:aria-selected="index === 0 ? 'true' : 'false'"
|
13
|
+
:class="['nav-link', { active: index === 0 }]"
|
14
|
+
:id="`tab-${key}-${index}`"
|
15
|
+
:data-bs-target="`#nav-${key}-${index}`"
|
16
|
+
:aria-controls="`nav-${key}-${index}`"
|
17
|
+
>
|
18
|
+
{{ item.name }}
|
19
|
+
</button>
|
20
|
+
</li>
|
21
|
+
</ul>
|
22
|
+
<div class="tab-content">
|
23
|
+
<div
|
24
|
+
v-for="(item, index) in tabs"
|
25
|
+
:class="['tab-pane', 'fade', index === 0 && 'show active']"
|
26
|
+
:id="`nav-${key}-${index}`"
|
27
|
+
role="tabpanel"
|
28
|
+
:aria-labelledby="`tab-${key}-${index}`"
|
29
|
+
:tabindex="index"
|
30
|
+
>
|
31
|
+
<div v-html="item.content"></div>
|
32
|
+
</div>
|
33
|
+
</div>
|
34
|
+
</nav>
|
35
|
+
</template>
|
36
|
+
<script lang="ts" setup>
|
37
|
+
import type { Tab } from '../types/tag'
|
38
|
+
const key: string = ''
|
39
|
+
const tabs: Tab[] = []
|
40
|
+
</script>
|
package/templates/footer.ejs
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
<footer>
|
2
|
-
<div class="footer-inner">
|
3
|
-
<div class="footer-content">
|
4
|
-
<a href="<%= href %>" rel="nofollow noopener">
|
5
|
-
<%= name %>
|
6
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-heart-fill" viewBox="0 0 16 16">
|
7
|
-
<path fill-rule="evenodd" d="M8 1.314C12.438-3.248 23.534 4.735 8 15-7.534 4.736 3.562-3.248 8 1.314z"/>
|
8
|
-
</svg>
|
9
|
-
<%= version %>
|
10
|
-
</a>
|
11
|
-
</div>
|
12
|
-
</div>
|
1
|
+
<footer>
|
2
|
+
<div class="footer-inner">
|
3
|
+
<div class="footer-content">
|
4
|
+
<a href="<%= href %>" rel="nofollow noopener">
|
5
|
+
<%= name %>
|
6
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-heart-fill" viewBox="0 0 16 16">
|
7
|
+
<path fill-rule="evenodd" d="M8 1.314C12.438-3.248 23.534 4.735 8 15-7.534 4.736 3.562-3.248 8 1.314z"/>
|
8
|
+
</svg>
|
9
|
+
<%= version %>
|
10
|
+
</a>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
13
|
</footer>
|
package/templates/utils/uri.ts
CHANGED
@@ -1,40 +1,40 @@
|
|
1
|
-
import fs from 'fs'
|
2
|
-
import path from 'path'
|
3
|
-
import type { Type } from '../../types/tag'
|
4
|
-
|
5
|
-
function runtimeProjectInfo() {
|
6
|
-
const projectPath = path.resolve(process.cwd(), 'package.json')
|
7
|
-
return JSON.parse(fs.readFileSync(projectPath, 'utf-8'))
|
8
|
-
}
|
9
|
-
|
10
|
-
function linkIsCDN(url: string) {
|
11
|
-
if (/^https*:\/\//.test(url) || /^\/\//.test(url)) {
|
12
|
-
return true
|
13
|
-
}
|
14
|
-
return false
|
15
|
-
}
|
16
|
-
|
17
|
-
/**
|
18
|
-
* @description 图片链接生成
|
19
|
-
* 1. http或https开头的cdn链接,将原样转换回去,且只会返回第一个
|
20
|
-
* 2. 多个链接组合成一个,并在前面添加上当前项目的name
|
21
|
-
* @param {string[]} uris uri组,每一个uri必须带 / 开头,保持和 hexo 图片标签一样
|
22
|
-
* @returns
|
23
|
-
*/
|
24
|
-
export function uriFor(uris: string[]) {
|
25
|
-
if (uris.length === 1 && linkIsCDN(uris[0])) {
|
26
|
-
return uris[0]
|
27
|
-
}
|
28
|
-
const { name } = runtimeProjectInfo()
|
29
|
-
return ['/', name, ...uris].join('')
|
30
|
-
}
|
31
|
-
|
32
|
-
export function typeBgClass(type: Type) {
|
33
|
-
if (['warning', 'info', 'light'].includes(type)) {
|
34
|
-
return 'bg-dark'
|
35
|
-
}
|
36
|
-
if (['dark'].includes(type)) {
|
37
|
-
return 'bg-light'
|
38
|
-
}
|
39
|
-
return ''
|
1
|
+
import fs from 'fs'
|
2
|
+
import path from 'path'
|
3
|
+
import type { Type } from '../../types/tag'
|
4
|
+
|
5
|
+
function runtimeProjectInfo() {
|
6
|
+
const projectPath = path.resolve(process.cwd(), 'package.json')
|
7
|
+
return JSON.parse(fs.readFileSync(projectPath, 'utf-8'))
|
8
|
+
}
|
9
|
+
|
10
|
+
function linkIsCDN(url: string) {
|
11
|
+
if (/^https*:\/\//.test(url) || /^\/\//.test(url)) {
|
12
|
+
return true
|
13
|
+
}
|
14
|
+
return false
|
15
|
+
}
|
16
|
+
|
17
|
+
/**
|
18
|
+
* @description 图片链接生成
|
19
|
+
* 1. http或https开头的cdn链接,将原样转换回去,且只会返回第一个
|
20
|
+
* 2. 多个链接组合成一个,并在前面添加上当前项目的name
|
21
|
+
* @param {string[]} uris uri组,每一个uri必须带 / 开头,保持和 hexo 图片标签一样
|
22
|
+
* @returns
|
23
|
+
*/
|
24
|
+
export function uriFor(uris: string[]) {
|
25
|
+
if (uris.length === 1 && linkIsCDN(uris[0])) {
|
26
|
+
return uris[0]
|
27
|
+
}
|
28
|
+
const { name } = runtimeProjectInfo()
|
29
|
+
return ['/', name, ...uris].join('')
|
30
|
+
}
|
31
|
+
|
32
|
+
export function typeBgClass(type: Type) {
|
33
|
+
if (['warning', 'info', 'light'].includes(type)) {
|
34
|
+
return 'bg-dark'
|
35
|
+
}
|
36
|
+
if (['dark'].includes(type)) {
|
37
|
+
return 'bg-light'
|
38
|
+
}
|
39
|
+
return ''
|
40
40
|
}
|