Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions theme/static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ html[data-theme="dark"] {
--button-primary-color: white;
}


Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: unnecessary change

Suggested change

/* add a transition to ease into new themes */
/* looks best in Mozilla, text transitions late in Safari/Chrome */
html.transition-theme,
Expand Down Expand Up @@ -377,6 +378,7 @@ img.responsive {
display: block;
border: 0;
padding: 0;
height: 100vh;
}

.navbar .navbar-hamburger-button {
Expand Down Expand Up @@ -404,6 +406,7 @@ img.responsive {
border-bottom: 1px solid var(--border-color-softer);
padding: 2rem;
max-height: unset;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: unnecessary change

Suggested change

}

@media only screen and (min-width: 600px) {
Expand All @@ -425,6 +428,8 @@ img.responsive {
width: 100%;
border: 0;
padding: 0;
/* height: 100vh; */

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: comment cruft

Suggested change
/* height: 100vh; */

}

.navbar-download-button .button {
Expand Down Expand Up @@ -749,3 +754,11 @@ article.news + article.news {
padding: 1em;
margin: 0 0 2em 0;
}



Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: unnecessary spaces

Suggested change

.scroll-lock {
overflow: auto;
position: fixed;
width: 100%;
}
12 changes: 12 additions & 0 deletions theme/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,17 @@
{% include "footer.html" %}
{% endblock %}
</div>

<script>
const navToggle = document.getElementById('navbar-hamburger-button');

navToggle.addEventListener('change', () => {
if (navToggle.checked) {
document.body.classList.add('scroll-lock');
} else {
document.body.classList.remove('scroll-lock');
}
});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#navbar-hamburger-button is a hidden element used to persist the expected state of the menu AFAIU, so that scroll-lock won't have any effect.

</script>
</body>
</html>