Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix links on darkmode navbar #99

Merged
merged 5 commits into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 1 addition & 2 deletions home/templates/base_main.html
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,7 @@

{% comment %} TODO rewrite star generation so this isn't necessary {% endcomment %}
{% if request.session.color_scheme == "dark" %}
<!-- make sure we're above bootstrap's navbar -->
<canvas id="navbar-canvas" style="z-index: 1100"></canvas>
<canvas id="navbar-canvas"></canvas>
{% endif %}
</div>

Expand Down
18 changes: 17 additions & 1 deletion planetterp/static/css/darktheme.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ i.fas.fa-star.professor-rating:after,

.navbar {
/* necessary to override bootstrap's .bg-primary */
background-color: black !important;
background-color: transparent !important;
}

#page-footer {
Expand Down Expand Up @@ -142,3 +142,19 @@ hr {
.bootstrap-datetimepicker-widget table td span:hover {
background-color: lightblue;
}

/* bootstrap's lg breakpoint */
@media(max-width: 992px) {
#site-navbar {
background-color: black;
/* since we made the navbar transparent, the sides of the site-navbar dropdown
which would normally take on the navbar color now take on the background color (grey).
We'll manually adjust the location of the navbar to align and cover up this space to get
the desired pure black tone. */
margin-left: -1rem;
padding-left: 1rem;
margin-right: -1rem;
padding-bottom: 0.5rem;
margin-top: 0.5rem;
}
}