xref: /template/navigator/navigator/css/topbar_navigador.css (revision 448bae0e7f8fbee3d233094e5c4034b30f5f025b)
1/**
2 * Navigator Theme — Top Bar Navigation System
3 * File: topbar_navigator.css
4 * Version: v20260318
5 *
6 * Purpose:
7 *   Defines the layout, typography, and interaction model for the
8 *   Navigator top bar, including Topics, Sort controls, and the
9 *   optional Custom Link button.
10 *
11 * Notes:
12 *   - Inherits global UI font unless overridden.
13 *   - Uses monospace for Sort group and Custom Link for visual grouping.
14 *   - Uses custom underline system (border-bottom) for hover states.
15 *
16 * License:
17 *   MIT License — see LICENSE.txt in the theme root.
18 */
19
20
21/* =============================================================
22   1. GLOBAL TOP BAR POSITIONING
23   ============================================================= */
24
25/* Ensures top bar does not cover site content */
26body {
27    padding-top: 50.89px;
28}
29
30#dokuwiki__usertools {
31    top: 60px; /* match top bar height */
32    z-index: 21;
33}
34
35#navigator__topbar {
36    position: absolute;
37    top: 0;
38    left: 0;
39    width: 100%;
40    z-index: 21;
41
42    background-color: __topbar_bg__;
43    color: __topbar_text__;
44
45    padding: 0.5em 0;
46    font-size: 1.3em;
47}
48
49
50/* =============================================================
51   2. TOP BAR INNER LAYOUT
52   ============================================================= */
53
54#navigator__topbar .nav-inner {
55    max-width: __site_width__;
56    margin: 0 auto;
57    padding: 0 1em;
58
59    display: flex;
60    align-items: center;
61
62    /* We control spacing manually for perfect rhythm */
63    gap: 0;
64}
65
66#navigator__topbar .nav-item,
67#navigator__topbar a {
68    color: __topbar_text__;
69    text-decoration: none;
70    white-space: nowrap;
71    cursor: pointer;
72}
73
74#navigator__topbar .nav-spacer {
75    flex: 1;
76}
77
78
79/* =============================================================
80   3. TOPICS BUTTON (TRIGGER)
81   ============================================================= */
82
83#navigator__topbar .nav-topics,
84#navigator__topbar .nav-topics:hover {
85    text-decoration: none !important;
86}
87
88#navigator__topbar .nav-topics {
89    cursor: pointer;
90    display: inline-block;
91    padding: 0 0.15em 0.1em;
92    border-bottom: 1px solid transparent;
93    margin-right: 0.35rem; /* NEW: restores spacing rhythm */
94}
95
96#navigator__topbar .nav-topics:hover {
97    border-bottom-color: currentColor;
98}
99
100
101/* =============================================================
102   4. TOPICS DROPDOWN PANEL
103   ============================================================= */
104
105#navigator__topics-panel {
106    display: none;
107    position: absolute;
108    top: 50.89px;
109    left: 0;
110    width: 100%;
111
112    background-color: __topbar_topicbg__;
113    border-bottom: 2px solid black;
114    padding: 0.8em 0;
115    z-index: 30;
116}
117
118#navigator__topics-panel .navigator-topics-list {
119    max-width: var(--site-width);
120    margin: 0 auto;
121    padding: 0 1em;
122    list-style: none;
123}
124
125#navigator__topics-panel .navigator-topics-list li {
126    margin: 0.4em 0;
127}
128
129#navigator__topics-panel .navigator-topics-list a {
130    color: __topbar_topictxt__;
131    text-decoration: none;
132}
133
134#navigator__topics-panel .navigator-topics-list a:hover {
135    text-decoration: underline;
136}
137
138
139/* =============================================================
140   5. SORTING GROUP
141   ============================================================= */
142
143.nav-sort-group {
144    font-family: var(--navigator-mono, monospace);
145    font-size: 0.92em;
146    opacity: 0.70;
147    font-weight: 400;
148
149    /* Manual spacing before Custom Link */
150    margin-right: 0.4rem;
151}
152
153.nav-sort-link,
154.nav-sort-current {
155    display: inline-block;
156    padding: 0 0.15em 0.1em;
157    text-decoration: none;
158    border-bottom: 1px solid transparent;
159}
160
161.nav-sort-link:hover {
162    border-bottom-color: currentColor;
163}
164
165.nav-sort-current {
166    font-weight: bold;
167    opacity: 1;
168}
169
170.nav-sort-sep {
171    display: inline-block;
172    padding: 0 0.25em;
173    margin: 0 0.25rem;
174    opacity: 0.5;
175    pointer-events: none;
176}
177
178
179/* =============================================================
180   6. CUSTOM LINK BUTTON
181   ============================================================= */
182
183.nav-customlink {
184    margin-left: 0.25rem;
185}
186
187.nav-customlink a {
188    font-family: var(--navigator-mono, monospace);
189
190    position: relative;
191    top: -0.7px; /* lift by half a pixel */
192
193
194    font-weight: 400;
195    opacity: 0.75;
196    color: inherit;
197
198    font-size: 0.90em; /* softened presence */
199
200    display: inline-block;
201    padding: 0 0.15em 0.1em;
202
203    border-bottom: 1px solid transparent;
204    text-decoration: none;
205}
206
207.nav-customlink a:hover,
208.nav-customlink a:focus {
209    border-bottom-color: currentColor;
210}
211
212/*--------------- MOBILE "Custom Link" Moved to Topics layout ---------------------------------*/
213
214/* Hide custom link in the top bar */
215@media screen and (max-width: 600px) {
216    .nav-customlink,
217    .nav-sort-sep {
218        display: none;
219    }
220}
221
222/* Style new custom link. Custom Link injection resides in the tpl_function.php file */
223.topics-customlink {
224    margin-top: 1rem;
225    padding-top: 0.5rem;
226    border-top: 1px solid var(--border-color);
227}
228
229.topics-customlink a {
230    font-size: 0.95em;
231    display: block;
232    font-weight: 500;
233}
234
235/* Style the Custom Link inside the Topics panel */
236#navigator__topics-panel .topics-customlink a {
237    color: __custom_link_topics__;
238    text-decoration: none;
239    font-weight: 500;
240    padding-left: 0.8rem;
241}
242
243#navigator__topics-panel .topics-customlink a:hover {
244    text-decoration: underline;
245}