@voidzero-dev/vitepress-theme 4.8.1 → 4.8.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voidzero-dev/vitepress-theme",
3
- "version": "4.8.1",
3
+ "version": "4.8.2",
4
4
  "description": "Shared VitePress theme for VoidZero projects",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",
@@ -98,4 +98,4 @@ const getSocialLabel = (social: SocialLink): string => {
98
98
  </div>
99
99
  </section>
100
100
  </div>
101
- </template>
101
+ </template>
@@ -9,7 +9,7 @@ import TopBanner from '@components/oss/TopBanner.vue'
9
9
  import VPSidebar from './VPSidebar.vue'
10
10
  import VPSkipLink from './VPSkipLink.vue'
11
11
  import { useData } from '@vp-composables/data'
12
- import { layoutInfoInjectionKey, registerWatchers } from '@vp-composables/layout'
12
+ import { layoutInfoInjectionKey, registerWatchers, useLayout } from '@vp-composables/layout'
13
13
  import { useSidebarControl } from '@vp-composables/sidebar'
14
14
 
15
15
  const {
@@ -21,6 +21,7 @@ const {
21
21
  registerWatchers({ closeSidebar })
22
22
 
23
23
  const { frontmatter } = useData()
24
+ const { hasSidebar } = useLayout()
24
25
 
25
26
  const slots = useSlots()
26
27
  const heroImageSlotExists = computed(() => !!slots['home-hero-image'])
@@ -41,7 +42,7 @@ provide(layoutInfoInjectionKey, { heroImageSlotExists })
41
42
 
42
43
  <div class="flex flex-col min-h-screen">
43
44
  <!-- Content wrapper with borders -->
44
- <div class="content-wrapper flex-1">
45
+ <div class="content-wrapper flex-1" :class="{ 'has-sidebar': hasSidebar }">
45
46
  <VPLocalNav :open="isSidebarOpen" @open-menu="openSidebar" />
46
47
 
47
48
  <VPSidebar :open="isSidebarOpen">
@@ -176,4 +177,12 @@ provide(layoutInfoInjectionKey, { heroImageSlotExists })
176
177
  max-width: 90rem;
177
178
  }
178
179
  }
180
+
181
+ @media (min-width: 1024px) {
182
+ .content-wrapper.has-sidebar {
183
+ display: grid;
184
+ grid-template-columns: var(--vp-sidebar-width) minmax(0, 1fr);
185
+ grid-template-rows: auto 1fr;
186
+ }
187
+ }
179
188
  </style>
@@ -82,14 +82,9 @@ const { isHome, hasSidebar } = useLayout()
82
82
 
83
83
  .VPContent.has-sidebar {
84
84
  margin: var(--vp-layout-top-height, 0px) 0 0;
85
- padding-left: var(--vp-sidebar-width);
86
- }
87
- }
88
-
89
- @media (min-width: 1440px) {
90
- .VPContent.has-sidebar {
91
- padding-right: calc((100% - var(--vp-layout-max-width)) / 2);
92
- padding-left: calc((100% - var(--vp-layout-max-width)) / 2 + var(--vp-sidebar-width));
85
+ grid-column: 2;
86
+ grid-row: 2;
87
+ min-width: 0;
93
88
  }
94
89
  }
95
90
  </style>
@@ -76,7 +76,7 @@ const pageName = computed(() =>
76
76
 
77
77
  @media (min-width: 1024px) {
78
78
  .VPDoc {
79
- padding: 48px 32px 0;
79
+ padding: 0 32px 0;
80
80
  }
81
81
 
82
82
  .VPDoc:not(.has-sidebar) .container {
@@ -133,34 +133,28 @@ const pageName = computed(() =>
133
133
  }
134
134
 
135
135
  .aside-container {
136
- position: fixed;
137
- top: var(--vp-nav-height);
136
+ position: sticky;
137
+ top: calc(var(--vp-nav-height) + var(--vp-banner-height, 0px) - 1px);
138
138
  padding-top: 20px;
139
139
  padding-left: 32px;
140
140
  width: 224px;
141
- height: calc(100vh - var(--vp-nav-height));
141
+ height: calc(100vh - var(--vp-nav-height) - var(--vp-banner-height, 0px) + 1px);
142
142
  overflow-x: hidden;
143
143
  overflow-y: auto;
144
144
  scrollbar-width: none;
145
145
  border-left: 1px solid var(--vp-c-divider);
146
146
  }
147
147
 
148
- @media (min-width: 1024px) {
149
- .aside-container {
150
- top: calc(var(--vp-nav-height) + var(--vp-banner-height, 0px));
151
- height: calc(100vh - var(--vp-nav-height) - var(--vp-banner-height, 0px));
152
- }
153
- }
154
-
155
148
  .aside-container::-webkit-scrollbar {
156
149
  display: none;
157
150
  }
158
151
 
159
152
  .aside-curtain {
160
- position: fixed;
153
+ position: absolute;
161
154
  bottom: 0;
155
+ left: 0;
162
156
  z-index: 10;
163
- width: 224px;
157
+ width: 100%;
164
158
  height: 32px;
165
159
  background: linear-gradient(transparent, var(--vp-c-bg) 70%);
166
160
  pointer-events: none;
@@ -181,7 +175,7 @@ const pageName = computed(() =>
181
175
 
182
176
  @media (min-width: 1024px) {
183
177
  .content {
184
- padding: 0 32px 128px;
178
+ padding: 48px 32px 128px;
185
179
  }
186
180
  }
187
181
 
@@ -84,11 +84,13 @@ const classes = computed(() => {
84
84
 
85
85
  @media (min-width: 1024px) {
86
86
  .VPLocalNav {
87
- top: calc(var(--vp-nav-height) + var(--vp-banner-height, 0px));
87
+ top: calc(var(--vp-nav-height) + var(--vp-banner-height, 0px) - 1px);
88
88
  }
89
89
 
90
90
  .VPLocalNav.has-sidebar {
91
- padding-left: var(--vp-sidebar-width);
91
+ grid-column: 2;
92
+ grid-row: 1;
93
+ padding-left: 0;
92
94
  border-bottom: none;
93
95
  }
94
96
 
@@ -121,6 +121,11 @@ function scrollToTop() {
121
121
  }
122
122
 
123
123
  @media (min-width: 960px) {
124
+ .VPLocalNavOutlineDropdown {
125
+ position: relative;
126
+ width: fit-content;
127
+ }
128
+
124
129
  .VPLocalNavOutlineDropdown button {
125
130
  font-size: 14px;
126
131
  }
@@ -152,12 +157,19 @@ function scrollToTop() {
152
157
 
153
158
  @media (min-width: 960px) {
154
159
  .items {
155
- right: auto;
156
- left: calc(var(--vp-sidebar-width) + 32px);
160
+ left: auto;
161
+ right: 32px;
157
162
  width: 320px;
158
163
  }
159
164
  }
160
165
 
166
+ @media (min-width: 1024px) {
167
+ .items {
168
+ left: 32px;
169
+ right: auto;
170
+ }
171
+ }
172
+
161
173
  .header {
162
174
  background-color: var(--vp-c-bg-soft);
163
175
  }
@@ -92,16 +92,23 @@ watch(
92
92
 
93
93
  @media (min-width: 1024px) {
94
94
  .VPSidebar {
95
- top: calc(var(--vp-nav-height) + var(--vp-banner-height, 0px));
95
+ position: sticky;
96
+ top: calc(var(--vp-nav-height) + var(--vp-banner-height, 0px) - 1px);
97
+ bottom: unset;
96
98
  left: unset;
97
99
  padding-left: 32px;
98
100
  width: var(--vp-sidebar-width);
99
101
  max-width: 100%;
102
+ height: calc(100vh - var(--vp-nav-height) - var(--vp-banner-height, 0px) + 1px);
100
103
  background-color: transparent;
101
104
  opacity: 1;
102
105
  visibility: visible;
103
106
  box-shadow: none;
104
107
  transform: translateX(0);
108
+ z-index: auto;
109
+ grid-column: 1;
110
+ grid-row: 2;
111
+ align-self: start;
105
112
  }
106
113
  }
107
114
 
@@ -240,13 +240,16 @@ const itemIcon = useIcon(() => (props.item as any).icon)
240
240
  transform: rotate(0)/*rtl:rotate(180deg)*/;
241
241
  }
242
242
 
243
- .VPSidebarItem.level-0.has-icon > .items,
243
+ .VPSidebarItem.level-0.has-icon .items {
244
+ border-left: 1px solid var(--vp-c-divider);
245
+ }
246
+
247
+ .VPSidebarItem.level-0 .items,
244
248
  .VPSidebarItem.level-1 .items,
245
249
  .VPSidebarItem.level-2 .items,
246
250
  .VPSidebarItem.level-3 .items,
247
251
  .VPSidebarItem.level-4 .items,
248
252
  .VPSidebarItem.level-5 .items {
249
- border-left: 1px solid var(--vp-c-divider);
250
253
  padding-left: 16px;
251
254
  }
252
255
 
@@ -269,6 +272,6 @@ const itemIcon = useIcon(() => (props.item as any).icon)
269
272
  }
270
273
 
271
274
  .VPSidebarItem.level-0.has-icon > .items {
272
- margin-left: 6px;
275
+ margin-left: 8px;
273
276
  }
274
277
  </style>
package/src/index.ts CHANGED
@@ -82,6 +82,7 @@ export { default as VPTeamPageSection } from "@vp-default/VPTeamPageSection.vue"
82
82
  export { default as VPTeamPageTitle } from "@vp-default/VPTeamPageTitle.vue";
83
83
 
84
84
  // Export custom layouts and components
85
+ export { default as FooterNav } from "@components/oss/FooterNav.vue";
85
86
  export { VoidZeroTheme };
86
87
  export default VoidZeroTheme;
87
88
 
@@ -82,11 +82,13 @@
82
82
  border-left: 5px solid transparent;
83
83
  }
84
84
 
85
- [data-theme=dark] .wrapper--ticks::before, [data-theme=dark] .tick-left::before {
85
+ [data-theme=dark] .wrapper--ticks::before, [data-theme=dark] .tick-left::before,
86
+ .dark:not([data-theme]) .wrapper--ticks::before, .dark:not([data-theme]) .tick-left::before {
86
87
  border-left-color: var(--color-nickel);
87
88
  }
88
89
 
89
- [data-theme=dark] .wrapper--ticks::after, [data-theme=dark] .tick-right::after {
90
+ [data-theme=dark] .wrapper--ticks::after, [data-theme=dark] .tick-right::after,
91
+ .dark:not([data-theme]) .wrapper--ticks::after, .dark:not([data-theme]) .tick-right::after {
90
92
  border-right-color: var(--color-nickel);
91
93
  }
92
94