File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 110110 background : var (--gradient-accent );
111111}
112112
113+ /* Browse menu entry is a destination pill (not a utility icon button). */
114+ .nav__link--browse {
115+ display : inline-flex;
116+ align-items : center;
117+ height : 2.25rem ;
118+ padding : 0 0.95rem ;
119+ border : 1px solid var (--color-border-strong );
120+ border-radius : 999px ;
121+ color : var (--color-ink );
122+ font-weight : 600 ;
123+ line-height : 1 ;
124+ }
125+ .nav__link--browse : hover {
126+ color : var (--color-accent-text );
127+ border-color : var (--color-accent );
128+ }
129+ .nav__link--browse .is-active ::after {
130+ content : none;
131+ }
132+ .nav__link--browse .is-active {
133+ color : var (--color-accent-text );
134+ border-color : var (--color-accent );
135+ background : color-mix (in oklab, var (--color-accent ) 8% , transparent);
136+ }
137+
113138/* ---- Language switcher ---- */
114139.lang-switch {
115140 position : relative;
Original file line number Diff line number Diff line change 1717
1818 < nav class ="nav " aria-label ="Primary ">
1919 {{- range site.Menus.main }}
20+ {{- $classes := slice "nav__link" -}}
21+ {{- if $.IsMenuCurrent "main" . -}}
22+ {{- $classes = $classes | append "is-active" -}}
23+ {{- end -}}
24+ {{- with .Page -}}
25+ {{- if eq .Layout "browse" -}}
26+ {{- $classes = $classes | append "nav__link--browse" -}}
27+ {{- end -}}
28+ {{- end -}}
2029 {{- /* Page-backed menu entries (added via `[menu.main]` in a page's
2130 front matter) report .URL as the page's RelPermalink, which
2231 is already an absolute path INCLUDING baseURL prefix and
2332 language subdir. Passing that through site-href would
2433 relLangURL it a second time and produce a doubled URL
2534 (`/repo/en/repo/en/foo/`). Use .Page.RelPermalink directly
2635 in that case and only run site-href on URL-only entries. */ -}}
27- < a class ="nav__link {{ if $.IsMenuCurrent " main " . }}is-active{{ end }}" href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ partial "site-href.html " .URL }}{{ end }}"> {{ .Name }}</ a >
36+ < a class ="{{ delimit $classes " " }}" href="{{ with .Page }}{{ .RelPermalink }}{{ else }}{{ partial "site-href.html" .URL }}{{ end }}"> {{ .Name }}</ a >
2837 {{- end }}
2938 < button class ="site-search-trigger " type ="button " data-search-trigger aria-label ="{{ i18n "searchTrigger " }}" aria-haspopup="dialog ">
3039 < svg viewBox ="0 0 24 24 " fill ="none " stroke ="currentColor " stroke-width ="2.2 " stroke-linecap ="round " stroke-linejoin ="round " aria-hidden ="true "> < circle cx ="11 " cy ="11 " r ="8 "/> < line x1 ="21 " y1 ="21 " x2 ="16.65 " y2 ="16.65 "/> </ svg >
You can’t perform that action at this time.
0 commit comments