Skip to content

Commit

Permalink
site navigation update
Browse files Browse the repository at this point in the history
  • Loading branch information
abjarna committed Jun 10, 2024
1 parent 014dcc9 commit 07a656e
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 45 deletions.
26 changes: 26 additions & 0 deletions rit/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,32 @@ nav.bd-links li>a {
padding: .25rem 1rem;
}

/* Setja sama style og er í toctree caption á link í rubik-sidebar-nav-section-top.html s*/
.rubik-sidebar-nav-section-top a {
color: var(--pst-color-text-base);
text-decoration: none;
}
.rubik-sidebar-nav-section-top a:hover {
text-decoration: underline;
text-decoration-thickness: max(3px,.1875rem,.12em);
}






ul.current.nav.bd-sidenav {
display: flex;
flex-direction: column;
}
li.toctree-l1.current.active {
order: -1; /* Moves this item to the top */
border-bottom: 1px solid var(--pst-color-border);
padding-bottom: .5rem;
margin-bottom: .5rem;
}




Expand Down
16 changes: 0 additions & 16 deletions rit/_templates/rubik-sidebar-nav-root-top.html

This file was deleted.

16 changes: 16 additions & 0 deletions rit/_templates/rubik-sidebar-nav-root.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{%- set sidebar_nav_html_top = generate_toctree_html(
"sidebar",
startdepth=0,
show_nav_level=theme_show_nav_level | int,
maxdepth=theme_navigation_depth | int,
collapse=theme_collapse_navigation | tobool,
includehidden=theme_sidebar_includehidden | tobool,
titles_only=True
) -%}

<nav class="bd-docs-nav bd-links" aria-label="{{ _('Section Navigation') }}">
<div class="rubik-sidebar-nav-section-top" role="heading" aria-level="1">{{ _('Section Navigation') }}</div>
<div class="bd-toc-item navbar-nav">
{{ sidebar_nav_html_top }}
</div>
</nav>
20 changes: 0 additions & 20 deletions rit/_templates/rubik-sidebar-nav-section-top.html

This file was deleted.

6 changes: 3 additions & 3 deletions rit/_templates/rubik-sidebar-nav-section.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{%- set sidebar_nav_html = generate_toctree_html(
{%- set sidebar_nav_html_top = generate_toctree_html(
"sidebar",
startdepth=0,
show_nav_level=theme_show_nav_level | int,
maxdepth=theme_navigation_depth | int,
collapse=theme_collapse_navigation | tobool,
Expand All @@ -8,8 +9,7 @@
) -%}

<nav class="bd-docs-nav bd-links" aria-label="{{ _('Section Navigation') }}">
<!-- <p class="bd-links__title" role="heading" aria-level="1">{{ _("Section Navigation") }}</p> -->
<div class="bd-toc-item navbar-nav">
{{ sidebar_nav_html }}
{{ sidebar_nav_html_top }}
</div>
</nav>
9 changes: 4 additions & 5 deletions rit/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def update_config_values(app):
"navbar_align": "content", # "navbar" er left-aligned frá þeim stað sem "content" byrjar
"navigation_depth": 5, # Toc dýpt í left sidebar
"show_toc_level": 5, # Toc dýpt í right sidebar
"header_links_before_dropdown": 3, # Hversu margar síður birtast í header áður en að "More" takkinn tekur við
"header_links_before_dropdown": 2, # Hversu margar síður birtast í header áður en að "More" takkinn tekur við
"header_dropdown_text": "Meira", # Íslenskur texti fyrir "More" takkann
"back_to_top_button": False, # Fjarlægja "Efst á síðu" takkann
# "announcement": "My announcement!", # Tilkynning efst á síðunni
Expand Down Expand Up @@ -261,10 +261,9 @@ def update_config_values(app):
html_css_files = ['custom.css'] # Slóð á CSS skrár
html_static_path = ['_static'] # Slóð á "static" skrár
html_sidebars = {
"**": ["rubik-sidebar-nav-section", "rubik-sidebar-nav-section-top", "rubik-icon-links"],
"index": ["rubik-sidebar-nav-root-top", "rubik-icon-links"],
"genindex": ["rubik-sidebar-nav-root-top", "rubik-icon-links"],
"search": ["rubik-sidebar-nav-root-top", "rubik-icon-links"],
"**": ["rubik-sidebar-nav-section", "rubik-icon-links"],
"index": ["rubik-sidebar-nav-root", "rubik-icon-links"],
"search": ["rubik-sidebar-nav-root", "rubik-icon-links"],
}
html_show_copyright = False # Slökkt á default texta um höfundarrétt í HTML
html_show_sphinx = False # Slökkt á "Created using Sphinx" texta í HTML
Expand Down
1 change: 0 additions & 1 deletion rit/eldhusvaskur/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ Samanber :numref:`stormynd3`, þá er þetta mjög flott.
Samanber :numref:`prufutafla3`, þá er þetta mjög flott tafla.

.. toctree::
:caption: Eldhúsvaskur
:numbered:
:maxdepth: 6

Expand Down

0 comments on commit 07a656e

Please sign in to comment.