Skip to content

Commit

Permalink
Merge pull request #99 from kandasamyc/dark_navbar
Browse files Browse the repository at this point in the history
Fix links on darkmode navbar
  • Loading branch information
tybug authored Mar 15, 2023
2 parents 2e66d70 + 8584868 commit c40e890
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
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;
}
}

0 comments on commit c40e890

Please sign in to comment.