Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
rendering of navbar through default.volt
« previous
next »
Print
Pages: [
1
]
Author
Topic: rendering of navbar through default.volt (Read 3533 times)
mihak
Jr. Member
Posts: 70
Karma: 5
rendering of navbar through default.volt
«
on:
April 21, 2021, 07:51:57 pm »
Help me understand how does the rendering of navbar header work...
- I created a <span> entry as a last <li> item within <header> of mvc/app/views/layouts/default.volt:
<li><span class="navbar-text" id="theme_toggle">toggle</span></li>
This <span> appears very inconsistently - it is visible on some pages (License, Reporting, Firewall) but missing on others (Dashboard, System, Interfaces). You can see the screenshots of the top right corner on the License page and on the dashboard below - one has a "toggle" addition, the other one doesn't...
Perhaps default.volt is not the right place to add modifications to the Navbar?
Rendered with a toggle:
https://i.imgur.com/gqS6zZ3.png
Rendered without it:
https://i.imgur.com/EAKEUwk.png
«
Last Edit: April 21, 2021, 07:53:57 pm by mihak
»
Logged
franco
Administrator
Hero Member
Posts: 17680
Karma: 1613
Re: rendering of navbar through default.volt
«
Reply #1 on:
April 21, 2021, 08:19:15 pm »
The static pages like the dashboard have a separate file for this. See this example commit to both:
https://github.com/opnsense/core/commit/6d0bb082f0
Barely caught this info from the cropped screenshot... Make sure to give all the relevant information in an obvious fashion to avoid non-responses.
Cheers,
Franco
Logged
mihak
Jr. Member
Posts: 70
Karma: 5
Re: rendering of navbar through default.volt
«
Reply #2 on:
April 21, 2021, 08:56:27 pm »
oh wow, and we need to maintain consistency between both fbegin.inc and default.volt?
If I would add a theme toggle (dark/light) there, how should I implement it to persist upgrades?
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
Development and Code Review
(Moderator:
fabian
) »
rendering of navbar through default.volt