Commit 8f267fde16

8f267fde166636c35ed80edfc8fdaa54079fe78d

parent: 6d6b0b16ef

Unsigned

Duck <57977673+woducku@users.noreply.github.com> · 2026-07-07 08:37 UTC

nav

Layout: unified · split

docs/.vitepress/theme/components/NavActions.vue +43 −35
@@ -1,5 +1,5 @@
11<script setup lang="ts">
2import { Moon, Search, Sun } from 'lucide-vue-next'
2import { Moon, Search, Settings, Sun } from 'lucide-vue-next'
33import { useData } from 'vitepress'
44// @ts-ignore
55import VPSocialLink from 'vitepress/dist/client/theme-default/components/VPSocialLink.vue'
@@ -17,13 +17,15 @@ const { isDark } = useData()
1717const toggleAppearance = inject<() => void>('toggle-appearance', () => {
1818 isDark.value = !isDark.value
1919})
20
21// Opens the full-screen nav menu (the flyout's phone equivalent).
22function openScreenMenu() {
23 document.querySelector<HTMLElement>('.VPNavBarHamburger')?.click()
24}
2025</script>
2126
2227<template>
2328 <div class="nav-actions-container">
24 <div class="nav-bookmark-mobile">
25 <BookmarksPanel />
26 </div>
2729 <div class="nav-actions" role="group" aria-label="Site actions">
2830 <template v-for="(action, i) in navActions" :key="i">
2931 <div class="nav-action" :class="`nav-action--${action.type}`">
@@ -57,7 +59,17 @@ const toggleAppearance = inject<() => void>('toggle-appearance', () => {
5759 :me="false"
5860 />
5961
60 <NolebaseEnhancedReadabilitiesMenu v-else-if="action.type === 'settings'" />
62 <template v-else-if="action.type === 'settings'">
63 <NolebaseEnhancedReadabilitiesMenu />
64 <button
65 type="button"
66 class="nav-action-btn nav-settings-mobile"
67 aria-label="Settings"
68 @click="openScreenMenu()"
69 >
70 <Settings :size="ICON_SIZE" :stroke-width="ICON_STROKE" />
71 </button>
72 </template>
6173 <BookmarksPanel v-else-if="action.type === 'bookmarks'" />
6274 </div>
6375 </template>
@@ -71,31 +83,8 @@ const toggleAppearance = inject<() => void>('toggle-appearance', () => {
7183 align-items: center;
7284}
7385
74.nav-bookmark-mobile {
75 display: flex;
76 align-items: center;
77 justify-content: center;
78 width: 36px;
79 height: var(--vp-nav-height);
80}
81
82.nav-bookmark-mobile :deep(.bookmarks-btn) {
83 color: var(--vp-c-text-2);
84 opacity: 1;
85}
86
87.nav-bookmark-mobile :deep(.bookmarks-btn svg) {
88 stroke-width: 1.5;
89}
90
91@media (min-width: 768px) {
92 .nav-bookmark-mobile {
93 display: none;
94 }
95}
96
9786.nav-actions {
98 display: none;
87 display: flex;
9988 align-items: center;
10089 gap: var(--nav-pill-gap);
10190 height: var(--nav-pill-height);
@@ -108,12 +97,6 @@ const toggleAppearance = inject<() => void>('toggle-appearance', () => {
10897 transition: background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
10998}
11099
111@media (min-width: 768px) {
112 .nav-actions {
113 display: flex;
114 }
115}
116
117100.nav-action {
118101 flex: none;
119102 width: var(--nav-pill-item-size);
@@ -123,6 +106,24 @@ const toggleAppearance = inject<() => void>('toggle-appearance', () => {
123106 justify-content: center;
124107}
125108
109/* Social links move to the full-screen menu on phones. */
110.nav-action--link {
111 display: none;
112}
113
114@media (min-width: 768px) {
115 .nav-action--link {
116 display: flex;
117 }
118}
119
120/* Doubled class outranks the later `.nav-action-btn { display: flex }`. */
121@media (min-width: 768px) {
122 .nav-action-btn.nav-settings-mobile {
123 display: none;
124 }
125}
126
126127.nav-action-btn {
127128 display: flex;
128129 align-items: center;
@@ -170,6 +171,13 @@ const toggleAppearance = inject<() => void>('toggle-appearance', () => {
170171 -webkit-backdrop-filter: none !important;
171172}
172173
174/* Phones use the full-screen gear instead of the flyout. */
175@media (max-width: 767.9px) {
176 .nav-action--settings :deep(.VPNolebaseEnhancedReadabilitiesMenuFlyout) {
177 display: none !important;
178 }
179}
180
173181.nav-action--settings :deep(.VPNolebaseEnhancedReadabilitiesMenuFlyout .button) {
174182 width: 100% !important;
175183 height: 100% !important;
docs/.vitepress/theme/components/settings/ScreenMenu.vue −2
@@ -5,7 +5,6 @@ import VPSocialLinks from 'vitepress/dist/client/theme-default/components/VPSoci
55
66import AccentColor from './AccentColor.vue'
77import Effects from './Effects.vue'
8import ScreenAppearance from './ScreenAppearance.vue'
98
109const mounted = useMounted()
1110const { theme } = useData()
@@ -14,7 +13,6 @@ const { theme } = useData()
1413<template>
1514 <div v-if="mounted" space-y-2 class="VPNolebaseEnhancedReadabilitiesMenu">
1615 <Effects />
17 <ScreenAppearance />
1816 <AccentColor />
1917 <VPSocialLinks
2018 v-if="theme.socialLinks"
docs/.vitepress/theme/styles/style.scss +8 −4
@@ -1350,10 +1350,14 @@ table tr:nth-child(odd) {
13501350 @apply ml-2 pl-0!;
13511351}
13521352
1353@media (min-width: 768px) {
1354 #local-search {
1355 @apply hidden!;
1356 }
1353// Search lives in the nav pill, which now shows on phones too.
1354#local-search {
1355 @apply hidden!;
1356}
1357
1358// Hidden but kept in the DOM; the pill's settings gear clicks it to open the menu.
1359.VPNavBarHamburger {
1360 display: none !important;
13571361}
13581362
13591363%thin-scrollbar {