Skip to content

Commit

Permalink
feat(theme_basic): Navbar is sticky
Browse files Browse the repository at this point in the history
  • Loading branch information
attakei committed Dec 28, 2024
1 parent 9048f4b commit 1c32a6c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/atsphinx/bulma/themes/bulma_basic/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
{% endblock %}

{%- block header %}
<nav class="navbar" role="navigation" aria-label="main navigation">
<nav class="navbar is-sticky" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<a class="navbar-item" href="{{ pathto(root_doc)|e }}">
{{ docstitle }}
Expand Down
19 changes: 6 additions & 13 deletions src/atsphinx/bulma/themes/bulma_basic/static/style.css_t
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,12 @@ body {
min-height: 100vh;
flex-direction: column;
}
main {
flex: 1;
display: flex;
flex-direction: column;
> .section {
display: grid;
{% if theme_sidebar_position == "left" -%}
grid-template-columns: 16em 1fr;
{%- endif %}
{% if theme_sidebar_position == "right" -%}
grid-template-columns: 1fr 16em;
{%- endif %}
}
section[id] {
scroll-margin-top: var(--bulma-navbar-height);
}
.navbar.is-sticky {
position: sticky;
top: 0;
}
footer.footer, div.footer {
margin-top: auto;
Expand Down

0 comments on commit 1c32a6c

Please sign in to comment.