Skip to content

Commit 02cbe34

Browse files
committed
navbar: Tweak layout to work better with Hextra
**Summary** 1. Remove link to Home page Having it causes the Hextra mobile sidebar to do weird things. The logo already acts as a link to the home page, and this pattern is pretty common in websites. 2. Move all "community" links to their own section This frees up a lot of space, especially in the icons section of the navbar. 3. Enable the theme toggle switch We used to put it in manually, but with the rest of the changes, there is no need. Quite the opposite, actually; we need it to show for it to appear in the mobile sidebar. 4. Add search widget I've been wanting to add a search bar for some time, and this is the best place to do it, I think. Signed-off-by: Evan Maddock <maddock.evan@vivaldi.net>
1 parent 15ed6ce commit 02cbe34

3 files changed

Lines changed: 70 additions & 44 deletions

File tree

assets/css/custom.css

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@
4545
*******************************************************************/
4646

4747
@media (width < 48rem) {
48-
.hextra-nav-container a:not(:first-child) {
49-
display: none;
50-
}
51-
5248
.hextra-nav-container button.hextra-theme-toggle {
5349
display: none;
5450
}
@@ -65,6 +61,14 @@
6561
color: #f5f5f5;
6662
}
6763

64+
/**
65+
* Hide the first div of the footer, where the theme switch
66+
* usually goes. We already have it in the navbar.
67+
*/
68+
.hextra-footer > div:first-child {
69+
display: none;
70+
}
71+
6872
.content h1,
6973
.content h2 {
7074
color: var(--color-primary-500);

content/_index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,5 @@ toc: false
127127
>}}
128128
</div>
129129
{{</ section >}}
130+
131+
<a class="hidden" href="https://floss.social/@getsolus" rel="noreferrer me"></a>

hugo.yaml

Lines changed: 60 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -30,61 +30,74 @@ enableInlineShortcodes: true
3030

3131
menus:
3232
main:
33-
- name: Home
34-
pageRef: /
35-
weight: 1
36-
- name: Download
33+
- identifier: download
34+
name: Download
3735
pageRef: /download
36+
weight: 1
37+
- identifier: blog
38+
name: Blog
39+
pageRef: /blog
3840
weight: 2
3941
- identifier: about
4042
name: About
4143
weight: 3
44+
- identifier: community
45+
name: Community
46+
weight: 4
47+
- identifier: help
48+
name: Help ↗
49+
url: "https://help.getsol.us"
50+
weight: 5
51+
- identifier: donate
52+
name: Donate ↗
53+
url: "https://opencollective.com/getsolus"
54+
weight: 6
55+
- identifier: search
56+
name: Search
57+
weight: 7
58+
params:
59+
type: search
60+
- identifier: github
61+
name: Github ↗
62+
url: "https://github.com/getsolus/"
63+
weight: 8
64+
params:
65+
icon: github
66+
- identifier: themetoggle
67+
name: Theme Toggle
68+
weight: 9
4269
params:
43-
type: section
44-
- name: Organization
70+
type: theme-toggle
71+
- identifier: organization
72+
name: Organization
4573
pageRef: /about/organization
4674
parent: about
4775
weight: 1
48-
- name: Team
76+
- identifier: team
77+
name: Team
4978
pageRef: /about/team
5079
parent: about
5180
weight: 2
52-
- name: Blog
53-
pageRef: /blog
54-
weight: 4
55-
- name: Forums ↗
81+
- identifier: forums
82+
name: Forums ↗
5683
url: "https://discuss.getsol.us"
57-
weight: 5
58-
- name: Help ↗
59-
url: "https://help.getsol.us"
60-
weight: 6
61-
- name: Donate ↗
62-
url: "https://opencollective.com/getsolus"
63-
weight: 7
64-
- name: Matrix ↗
84+
parent: community
85+
weight: 1
86+
- identifier: matrix
87+
name: Matrix ↗
6588
url: "https://matrix.to/#/#solus:matrix.org"
66-
params:
67-
icon: chat
68-
weight: 8
69-
- name: Github ↗
70-
url: "https://github.com/getsolus/"
71-
weight: 9
72-
params:
73-
icon: github
74-
- name: Mastodon ↗
89+
parent: community
90+
weight: 2
91+
- identifier: mastodon
92+
name: Mastodon ↗
7593
url: https://floss.social/@getsolus
76-
weight: 10
77-
params:
78-
icon: mastodon
79-
- name: Bluesky ↗
94+
parent: community
95+
weight: 3
96+
- identifier: bluesky
97+
name: Bluesky ↗
8098
url: https://bsky.app/profile/getsolus.bsky.social
81-
weight: 11
82-
params:
83-
icon: bluesky
84-
- name: Theme Toggle
85-
weight: 12
86-
params:
87-
type: theme-toggle
99+
parent: community
100+
weight: 4
88101

89102
params:
90103
copyright: 2026
@@ -119,6 +132,13 @@ params:
119132
- identifier: technology
120133
name: Technology
121134
pageRef: /technology
135+
search:
136+
enable: true
137+
type: flexsearch
138+
139+
flexsearch:
140+
index: content
141+
tokenize: forward
122142
theme:
123143
default: system
124-
displayToggle: false # We do this ourselves
144+
displayToggle: true

0 commit comments

Comments
 (0)