This is an automated email from the ASF dual-hosted git repository. janc pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-site.git
commit 54bc1080ab3db7b96afd17ad16e0318274dc5aa5 Author: Wojciech Pietraszewski <[email protected]> AuthorDate: Tue Apr 30 18:41:41 2024 +0200 site/docs/custom-theme: Update navbar Fixes active element in the navbar. Updates the navbar with the new 'CVE' section. --- custom-theme/main.html | 6 +++--- custom-theme/nav.html | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/custom-theme/main.html b/custom-theme/main.html index 0de4ec540f..ae6e8a1d95 100644 --- a/custom-theme/main.html +++ b/custom-theme/main.html @@ -62,7 +62,7 @@ ga("send", "pageview"); {% include "nav.html" %} - {% set full_width_page_titles = [None, 'Home', 'Quick Start', 'About', 'Talks', 'Documentation', 'Download', 'Community', 'Events'] %} + {% set full_width_page_titles = [None, 'Home', 'Quick Start', 'About', 'Talks', 'Documentation', 'Download', 'Community', 'CVE'] %} <div class="container"> {% if page.title == 'Home' %} @@ -81,8 +81,8 @@ ga("send", "pageview"); {% include "download.html" %} {% elif page.title == 'Community' %} {% include "community.html" %} - {% elif page.title == 'Events' %} - {% include "events.html" %} + {% elif page.title == 'CVE' %} + {% include "cve.html" %} {% else %} <div class="row"> <div class="col-md-3 v2-sidebar sidebar-container">{% include "toc.html" %}</div> diff --git a/custom-theme/nav.html b/custom-theme/nav.html index e4fd896f0e..1ee586d255 100644 --- a/custom-theme/nav.html +++ b/custom-theme/nav.html @@ -1,12 +1,12 @@ -{% set not_doc_page_titles = ['Home', 'Quick Start', 'About', 'Talks', 'Download', 'Community', 'Events'] %} +{% set not_doc_page_titles = ['Home', 'Quick Start', 'About', 'Talks', 'Download', 'Community', 'Events', 'CVE'] %} {% macro active_nav(page, title, classes) %} class="{% if (page and page.title == title) or (title == 'Home' and meta and meta.sub_page) %}active {% endif %}{{ classes }}" {% endmacro %} {% macro docs_are_active(page) %} - class="{% if (not page or not page.title in not_doc_page_titles) and (not meta or not meta.sub_page) %}active{% endif %}" + class="{% if (not page or not page.title in not_doc_page_titles) and (not meta or not meta.sub_page) %}active {{ meta }} {% endif %}" {% endmacro %} <nav id="navbar" class="navbar navbar-inverse affix-top" data-spy="affix" data-offset-top="150" role="navigation"> @@ -27,29 +27,29 @@ <div class="navbar-collapse collapse"> <!-- Main navigation --> <ul class="nav navbar-nav navbar-right"> - <li {{ active_nav(current_page, 'Home') }}> + <li {{ active_nav(page, 'Home') }}> <a href="/"><i class="fa fa-home" style="font-size: larger;"></i></a> </li> - <li {{ active_nav(current_page, 'Quick Start', "important") }}> + <li {{ active_nav(page, 'Quick Start', "important") }}> <a href="/quick-start/">Quick Start</a> </li> - <li {{ active_nav(current_page, 'About') }}> + <li {{ active_nav(page, 'About') }}> <a href="/about/">About</a> </li> - <li {{ active_nav(current_page, 'Talks') }}> + <li {{ active_nav(page, 'Talks') }}> <a href="/talks/">Talks</a> </li> - <li {{ docs_are_active(current_page) }}> + <li {{ docs_are_active(page) }}> <a href="/documentation/">Documentation</a> </li> - <li {{ active_nav(current_page, 'Download') }}> + <li {{ active_nav(page, 'Download') }}> <a href="/download/">Download</a> </li> - <li {{ active_nav(current_page, 'Community') }}> + <li {{ active_nav(page, 'Community') }}> <a href="/community/">Community</a> </li> - <li {{ active_nav(current_page, 'Events') }}> - <a href="/events/">Events</a> + <li {{ active_nav(page, 'CVE') }}> + <a href="/cve/">CVE</a> </li> </ul>
