@eox/pages-theme-eox 0.8.0 → 0.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 +1 -1
- package/src/Layout.vue +0 -13
- package/src/components/NavBar.vue +16 -0
- package/src/style.css +1 -0
package/package.json
CHANGED
package/src/Layout.vue
CHANGED
|
@@ -191,19 +191,6 @@ import { trackEvent } from "./helpers";
|
|
|
191
191
|
const { Layout } = DefaultTheme;
|
|
192
192
|
const { frontmatter, page, site, theme } = useData();
|
|
193
193
|
const router = useRouter();
|
|
194
|
-
|
|
195
|
-
if (!import.meta.env.SSR) {
|
|
196
|
-
const scrollListener = () => {
|
|
197
|
-
const nav = document.querySelector(".top-nav");
|
|
198
|
-
|
|
199
|
-
if (window.scrollY > nav.clientHeight) {
|
|
200
|
-
nav.classList.remove("at-top");
|
|
201
|
-
} else {
|
|
202
|
-
nav.classList.add("at-top");
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
window.addEventListener("scroll", scrollListener);
|
|
206
|
-
}
|
|
207
194
|
</script>
|
|
208
195
|
|
|
209
196
|
<style>
|
|
@@ -134,6 +134,19 @@ import { useData, withBase } from "vitepress";
|
|
|
134
134
|
import { trackEvent } from "../helpers";
|
|
135
135
|
|
|
136
136
|
const { site, theme } = useData();
|
|
137
|
+
|
|
138
|
+
if (!import.meta.env.SSR) {
|
|
139
|
+
const scrollListener = () => {
|
|
140
|
+
const nav = document.querySelector(".top-nav");
|
|
141
|
+
|
|
142
|
+
if (window.scrollY > nav.clientHeight) {
|
|
143
|
+
nav.classList.remove("at-top");
|
|
144
|
+
} else {
|
|
145
|
+
nav.classList.add("at-top");
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
window.addEventListener("scroll", scrollListener);
|
|
149
|
+
}
|
|
137
150
|
</script>
|
|
138
151
|
|
|
139
152
|
<style>
|
|
@@ -185,6 +198,9 @@ const { site, theme } = useData();
|
|
|
185
198
|
border-color: #f7f8f855;
|
|
186
199
|
background: none;
|
|
187
200
|
}
|
|
201
|
+
.top-nav.at-top > nav > a:has(.logo.dark) > .logo.dark {
|
|
202
|
+
display: none;
|
|
203
|
+
}
|
|
188
204
|
.Layout.layout-home .top-nav.at-top > nav > a:has(.logo.dark) > .logo.light {
|
|
189
205
|
display: none;
|
|
190
206
|
}
|