Skip to content

Commit 30a032d

Browse files
committed
update: 113 files modified
1 parent 2f6b860 commit 30a032d

File tree

111 files changed

+7128
-2857
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+7128
-2857
lines changed

.gitattributes

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# 自动检测文本文件并进行行尾符规范化
2+
* text=auto
3+
4+
# Markdown 文件统一使用 LF
5+
*.md text eol=lf
6+
7+
# 源代码文件统一使用 LF
8+
*.ts text eol=lf
9+
*.js text eol=lf
10+
*.tsx text eol=lf
11+
*.jsx text eol=lf
12+
*.vue text eol=lf
13+
*.css text eol=lf
14+
*.scss text eol=lf
15+
*.json text eol=lf
16+
*.yml text eol=lf
17+
*.yaml text eol=lf
18+
19+
# 配置文件统一使用 LF
20+
.gitignore text eol=lf
21+
.gitattributes text eol=lf
22+
23+
# 二进制文件不进行行尾符转换
24+
*.png binary
25+
*.jpg binary
26+
*.jpeg binary
27+
*.gif binary
28+
*.ico binary
29+
*.pdf binary
30+
*.zip binary

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,5 +88,7 @@ tmp/
8888
*.min.css
8989
*.map
9090

91+
92+
9193
# 忽略词典数据解析后生成的文件
9294
results
Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<iframe
3-
style="width: 100%; aspect-ratio: 16/9; margin: 1rem 0;"
3+
style="width: 100%; aspect-ratio: 16/9; margin: 1rem 0"
44
:src="'//player.bilibili.com/player.html?isOutside=true&bvid=' + id"
55
scrolling="no"
66
border="0"
@@ -14,10 +14,7 @@
1414
defineProps({
1515
id: {
1616
type: String,
17-
required: true
18-
}
19-
});
17+
required: true,
18+
},
19+
})
2020
</script>
21-
22-
<style scoped>
23-
</style>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
.idBox {
2+
text-align: right;
3+
font-style: italic;
4+
font-size: 0.7rem;
5+
padding: 1rem 0;
6+
color: var(--vp-c-text-2);
7+
}
8+
9+
/* #region:same as vitepress theme */
10+
/* .vp-doc h2 */
11+
.h2 {
12+
margin: 48px 0 16px;
13+
border-top: 1px solid var(--vp-c-divider);
14+
padding-top: 24px;
15+
letter-spacing: -0.02em;
16+
line-height: 32px;
17+
font-size: 24px;
18+
}
19+
20+
/* .vp-doc p */
21+
.p {
22+
line-height: 28px;
23+
}
24+
/* #endregion:same as vitepress theme */

.vitepress/components/Discussions/Discussions.vue

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import { useData } from 'vitepress'
2+
import { useData } from 'vitepress/client'
33
import { onMounted, watch } from 'vue'
44
55
const props = defineProps({
@@ -89,35 +89,9 @@ watch(isDark, (newVal) => {
8989
</script>
9090

9191
<template>
92-
<h2>🫧 Discussions</h2>
92+
<h2 :class="$style.h2">🫧 Discussions</h2>
9393
<div id="giscus-comments"></div>
94-
<p class="id-box" title="留言版 ID">{{ id }}</p>
94+
<p :class="$style.idBox" title="留言版 ID">{{ id }}</p>
9595
</template>
9696

97-
<style scoped>
98-
.id-box {
99-
text-align: right;
100-
font-style: italic;
101-
font-size: 0.7rem;
102-
padding: 1rem 0;
103-
color: var(--vp-c-text-2);
104-
}
105-
106-
/* #region:same as vitepress theme */
107-
/* .vp-doc h2 */
108-
h2 {
109-
margin: 48px 0 16px;
110-
border-top: 1px solid var(--vp-c-divider);
111-
padding-top: 24px;
112-
letter-spacing: -0.02em;
113-
line-height: 32px;
114-
font-size: 24px;
115-
}
116-
117-
/* .vp-doc p */
118-
p {
119-
line-height: 28px;
120-
}
121-
122-
/* #endregion:same as vitepress theme */
123-
</style>
97+
<style module src="./Discussions.module.scss"></style>
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
/**
2+
* .vitepress/components/EnWordList/EnWordList.module.scss
3+
*
4+
* EnWordList 组件样式
5+
*/
6+
7+
.enWordList {
8+
// Checkbox 样式
9+
input[type='checkbox'] {
10+
margin: 8px;
11+
transform: scale(1.3);
12+
cursor: pointer;
13+
}
14+
15+
// 链接样式
16+
a {
17+
text-decoration: none;
18+
color: #4fc3f7;
19+
20+
&:hover {
21+
text-decoration: underline !important;
22+
}
23+
24+
&.lineThrough {
25+
color: #999;
26+
text-decoration: line-through;
27+
}
28+
29+
&.textRed {
30+
color: #f40 !important;
31+
}
32+
}
33+
34+
// 单词列表样式
35+
ol {
36+
list-style-type: decimal;
37+
padding-left: 20px;
38+
39+
li {
40+
display: flex;
41+
align-items: center;
42+
margin-bottom: 8px;
43+
transition: all 0.3s ease;
44+
45+
&.pronounced {
46+
background-color: rgba(255, 255, 0, 0.1);
47+
}
48+
}
49+
}
50+
51+
// 序号样式
52+
.index {
53+
margin-right: 10px;
54+
color: #aaa;
55+
}
56+
}
57+
58+
// 单词卡片样式(🌑 暗色悬浮卡片)
59+
.wordCard {
60+
position: fixed;
61+
z-index: 9999;
62+
background: #1e1e1e;
63+
border: 1px solid #333;
64+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
65+
padding: 12px 16px;
66+
max-width: 600px;
67+
min-width: 200px;
68+
min-height: 100px;
69+
font-size: 14px;
70+
line-height: 1.4;
71+
border-radius: 8px;
72+
color: #eee;
73+
pointer-events: auto;
74+
font-family: sans-serif;
75+
cursor: move;
76+
77+
// 关闭按钮
78+
.closeBtn {
79+
position: absolute;
80+
right: 5px;
81+
top: 5px;
82+
background: none;
83+
border: none;
84+
font-size: 16px;
85+
cursor: pointer;
86+
color: #ccc;
87+
88+
&:hover {
89+
color: white;
90+
}
91+
}
92+
}
93+
94+
// 卡片内容包裹器
95+
.wordCardContentWrapper {
96+
width: 100%;
97+
height: 100%;
98+
overflow: auto;
99+
}
100+
101+
// 卡片内容样式
102+
.wordCardContent {
103+
:deep(ul) {
104+
margin: 0.5rem 0;
105+
padding-left: 1rem;
106+
}
107+
}
108+
109+
// 调整大小手柄
110+
.resizeHandle {
111+
position: absolute;
112+
right: 0;
113+
bottom: 0;
114+
width: 12px;
115+
height: 12px;
116+
background-color: #666;
117+
cursor: nwse-resize;
118+
z-index: 2;
119+
border-radius: 50%;
120+
121+
&:hover {
122+
background-color: #aaa;
123+
}
124+
}

0 commit comments

Comments
 (0)