Fix anchor tags scrolling to wrong place when fixed header is enabled

This commit is contained in:
Butter Cat 2024-03-31 17:58:31 -04:00
parent e79242c9e7
commit ecfc1d96a4
No known key found for this signature in database
GPG Key ID: FF37BE4FDDB74419
2 changed files with 12 additions and 2 deletions

View File

@ -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);
@ -1729,4 +1739,4 @@ td, th {
.quality-selector option:hover {
background-color: var(--accent);
color: var(--text);
}
}

View File

@ -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>