vitepress-theme-element-plus 0.0.9 → 1.0.0

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.
@@ -136,7 +136,7 @@ appContext.app.component('ApiTyping', ApiTyping)
136
136
 
137
137
  @media screen and (min-width: 1440px) {
138
138
  .VPContent.has-sidebar {
139
- padding-left: calc(var(--vp-sidebar-width-small) + 39px)
139
+ padding-left: calc(var(--vp-sidebar-width-small) + 32px)
140
140
  }
141
141
  }
142
142
 
@@ -14,14 +14,13 @@ const blogroll = theme.value.footer?.blogroll
14
14
  <h4>{{ item.title }}</h4>
15
15
  <ElLink
16
16
  v-for="child of item.children"
17
- :key="child.title"
17
+ :key="child.text"
18
18
  class="footer-main-link"
19
19
  target="_blank"
20
- type="info"
21
- :href="child.href"
20
+ :href="child.link"
22
21
  :underline="false"
23
22
  >
24
- {{ child.title }}
23
+ {{ child.text }}
25
24
  </ElLink>
26
25
  </div>
27
26
  </footer>
@@ -63,6 +62,11 @@ const blogroll = theme.value.footer?.blogroll
63
62
  display: block;
64
63
  margin: 0;
65
64
  line-height: 2;
65
+ color: var(--text-color-light);
66
+
67
+ &:hover {
68
+ color: var(--text-color);
69
+ }
66
70
  }
67
71
  }
68
72
  }
@@ -37,9 +37,9 @@ const target = computed(() =>
37
37
  >
38
38
  <slot name="nav-bar-title-before" />
39
39
  <VPImage v-if="theme.logo" class="logo" :image="theme.logo" />
40
+ <ElTag v-if="theme.version" type="primary" round>{{ theme.version }}</ElTag>
40
41
  <span v-if="theme.siteTitle" v-html="theme.siteTitle" />
41
42
  <span v-else-if="theme.siteTitle === undefined">{{ site.title }}</span>
42
- <ElTag v-if="theme.version" type="primary" round>{{ theme.version }}</ElTag>
43
43
  <slot name="nav-bar-title-after" />
44
44
  </a>
45
45
  </div>
@@ -53,7 +53,6 @@ const target = computed(() =>
53
53
  width: 100%;
54
54
  height: var(--vp-nav-height);
55
55
  font-size: 16px;
56
- font-weight: 600;
57
56
  color: var(--vp-c-text-1);
58
57
  transition: opacity 0.25s;
59
58
  }
@@ -68,6 +67,12 @@ const target = computed(() =>
68
67
  }
69
68
  }
70
69
 
70
+ @media (max-width: 768px) {
71
+ .title span:last-child {
72
+ display: none;
73
+ }
74
+ }
75
+
71
76
  :deep(.logo) {
72
77
  margin-right: 14px;
73
78
  height: var(--vp-nav-logo-height);
@@ -76,8 +81,6 @@ const target = computed(() =>
76
81
  :deep(.el-tag.el-tag--primary) {
77
82
  background-color: var(--bg-brand-color);
78
83
  color: var(--vp-c-brand);
79
- --el-tag-bg-color: var(--vp-c-brand-soft);
80
- --el-tag-border-color: var(--vp-c-brand);
81
- --el-tag-hover-color: var(--vp-c-brand);
84
+ margin-right: 14px;
82
85
  }
83
86
  </style>
@@ -112,7 +112,7 @@ watch(
112
112
  @media screen and (min-width: 1440px) {
113
113
  .VPSidebar {
114
114
  padding: 48px 32px;
115
- width: calc(var(--vp-sidebar-width-small) + 39px)
115
+ width: calc(var(--vp-sidebar-width-small) + 32px)
116
116
  }
117
117
  }
118
118
 
@@ -181,7 +181,7 @@ function onLinkAreaClick(e: MouseEvent) {
181
181
 
182
182
  .text {
183
183
  flex-grow: 1;
184
- line-height: 24px;
184
+ line-height: 20px;
185
185
  transition: color 0.25s;
186
186
  }
187
187
  .text-icon {
@@ -201,7 +201,6 @@ function onLinkAreaClick(e: MouseEvent) {
201
201
  color: var(--vp-c-text-1);
202
202
  font-size: 1rem;
203
203
  font-weight: 700;
204
- margin-bottom: 8px;
205
204
  line-height: 24px;
206
205
  }
207
206
 
package/index.ts CHANGED
@@ -14,13 +14,32 @@ const EPTheme: Theme = {
14
14
  extends: VPTheme,
15
15
  Layout,
16
16
  }
17
+ // #region snippet
18
+ export interface FooterBlogrollLink {
19
+ text: string
20
+ link: string
21
+ }
22
+
23
+ export interface FooterBlogrollSection {
24
+ title: string
25
+ children: FooterBlogrollLink[]
26
+ }
27
+
28
+ export interface EPThemeFooter extends DefaultTheme.Footer {
29
+ /**
30
+ * 友情链接配置
31
+ */
32
+ blogroll?: FooterBlogrollSection[]
33
+ }
17
34
 
18
35
  export interface EPThemeConfig extends DefaultTheme.Config {
19
36
  /**
20
37
  * 文档版本号
21
38
  */
22
39
  version?: string
40
+ footer?: EPThemeFooter
23
41
  }
42
+ // #endregion snippet
24
43
 
25
44
  export { Layout }
26
45
  export default EPTheme
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vitepress-theme-element-plus",
3
3
  "type": "module",
4
- "version": "0.0.9",
4
+ "version": "1.0.0",
5
5
  "description": "A VitePress theme for Element Plus",
6
6
  "author": "Hezhengxu",
7
7
  "license": "MIT",
@@ -35,12 +35,10 @@
35
35
  "styles"
36
36
  ],
37
37
  "scripts": {
38
- "clean": "rimraf dist",
39
38
  "build": "tsdown",
40
39
  "build:watch": "tsdown --watch",
41
- "lint": "eslint ./ --fix",
42
40
  "prepublishOnly": "pnpm run build",
43
- "release": "release-it"
41
+ "release": "pnpm -C ../.. release"
44
42
  },
45
43
  "peerDependencies": {
46
44
  "vitepress": "2.0.0-alpha.12"
@@ -49,15 +47,12 @@
49
47
  "@iconify/vue": "^4"
50
48
  },
51
49
  "devDependencies": {
52
- "@release-it/conventional-changelog": "^10",
53
50
  "@types/glob": "^9.0.0",
54
51
  "@types/markdown-it": "^14.1.0",
55
52
  "@types/node": "^22.17.0",
56
53
  "@vitejs/plugin-vue": "^5.2.4",
57
54
  "@vueuse/core": "^11.3.0",
58
55
  "element-plus": "^2.11.7",
59
- "release-it": "^19",
60
- "rimraf": "^6.0.1",
61
56
  "sass-embedded": "^1.80.3",
62
57
  "tsdown": "0.16.0",
63
58
  "typescript": "^5.9.2",
package/styles/base.scss CHANGED
@@ -48,6 +48,41 @@ textarea {
48
48
  touch-action: manipulation
49
49
  }
50
50
 
51
+ * {
52
+ scrollbar-color: var(--el-scrollbar-bg-color) var(--el-fill-color-light);
53
+ }
54
+
55
+ ::-webkit-scrollbar {
56
+ width: 6px;
57
+ }
58
+
59
+ ::-webkit-scrollbar:horizontal {
60
+ height: 6px
61
+ }
62
+
63
+ ::-webkit-scrollbar-track {
64
+ border-radius: 10px
65
+ }
66
+
67
+ ::-webkit-scrollbar-thumb {
68
+ background-color: #0003;
69
+ border-radius: 10px;
70
+ transition: all .2s ease-in-out
71
+ }
72
+
73
+ ::-webkit-scrollbar-thumb:hover {
74
+ cursor: pointer;
75
+ background-color: #0000004d
76
+ }
77
+
78
+ .dark ::-webkit-scrollbar-thumb {
79
+ background-color: #fff3
80
+ }
81
+
82
+ .dark ::-webkit-scrollbar-thumb:hover {
83
+ background-color: #fff6
84
+ }
85
+
51
86
  ::view-transition-old(root),
52
87
  ::view-transition-new(root) {
53
88
  animation: none;
package/styles/index.scss CHANGED
@@ -8,8 +8,6 @@
8
8
  --vp-nav-logo-height: 28px;
9
9
  --vp-c-brand: var(--el-color-primary);
10
10
  --vp-c-brand-1: var(--vp-c-brand);
11
- --vp-c-brand-2: var(--el-color-primary);
12
- --vp-c-brand-3: var(--el-color-primary);
13
11
  --vp-c-brand-soft: var(--el-color-primary-light-9);
14
12
  --vp-c-bg: var(--el-bg-color);
15
13
  --text-color: var(--el-text-color-primary);