vitepress-theme-element-plus 0.0.10 → 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.
@@ -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,5 +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);
84
+ margin-right: 14px;
79
85
  }
80
86
  </style>
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.10",
4
+ "version": "1.0.0",
5
5
  "description": "A VitePress theme for Element Plus",
6
6
  "author": "Hezhengxu",
7
7
  "license": "MIT",
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;