Skip to content

Commit

Permalink
Fix anchor tags scrolling to the wrong place when fixed navbar is ena…
Browse files Browse the repository at this point in the history
…bled (#82)
  • Loading branch information
ButteredCats authored Apr 7, 2024
1 parent d4a2b3e commit e6b9a2e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,16 @@ pre, form, fieldset, table, th, td, select, input {
font-family: "Inter", sans-serif;
}

html.fixed_navbar {
scroll-padding-top: 50px;
}

@media screen and (max-width: 800px) {
html.fixed_navbar {
scroll-padding-top: 100px;
}
}

body {
background: var(--background);
padding-bottom: var(--footer-height);
Expand Down Expand Up @@ -1729,4 +1739,4 @@ td, th {
.quality-selector option:hover {
background-color: var(--accent);
color: var(--text);
}
}
2 changes: 1 addition & 1 deletion templates/base.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% import "utils.html" as utils %}

<!DOCTYPE html>
<html lang="en">
<html lang="en" class="{% if prefs.fixed_navbar == "on" %}fixed_navbar{% endif %}">
<head>
{% block head %}
<title>{% block title %}Redlib{% endblock %}</title>
Expand Down

0 comments on commit e6b9a2e

Please sign in to comment.