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 navbar shadow for small screen widths #20

Merged
merged 3 commits into from
Sep 27, 2022
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
8 changes: 8 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
## Release 0.4.0 (development release)

### Bug fixes

* Fixes a bug where the navbar would incorrectly display a drop shadow
with small screen widths when the global TOC was active.
[#20](https://github.com/XanaduAI/xanadu-sphinx-theme/pull/20)

### Contributors

This release contains contributions from (in alphabetical order):

[Josh Izaac](https://github.com/josh146)

# Release 0.3.0

### Improvements
Expand Down
182 changes: 93 additions & 89 deletions xanadu_sphinx_theme/static/xanadu.css_t
Original file line number Diff line number Diff line change
Expand Up @@ -1662,6 +1662,95 @@ footer.page-footer .footer-copyright {

}

/* Navigation Bar
----------------------------------------------------------------------------- */

.section::before {
content: "";
display: block;
height: 50px;
margin: -70px 0 0;
}

.navbar {
background-color: white;
z-index: 10000;
box-shadow: -1px 14px 30px -20px rgba(0, 0, 0, 0.3) !important;
}

.navbar li.dropdown {
list-style-type: none;
}

.navbar li:hover>.dropdown-menu {
display: block;
}

.navbar-brand {
padding: 0px;
}

.navbar-nav {
padding-bottom: 1px;
padding-left: 30px;
}

.navbar .navbar-nav>li {
transition-duration: 0s;
margin-left: 20px;
font-size: initial;
color: black;
font-family: 'Quicksand', 'Roboto', sans-serif !important;
margin-bottom: -9px;
border-bottom: 3px solid;
border-bottom-color: white;
font-weight: 500;
}

.nav-item:hover,
.nav-item.active {
position: relative;
}

.nav-item:hover:after,
.nav-item.active:after {
border-bottom: 3px solid;
content: "";
border-bottom-color: {{ theme_border_colour }} !important;
position: absolute;
bottom: -3px;
width: 80%;
left: 10%;
}

.navbar.navbar-light .breadcrumb .nav-item .nav-link, .navbar.navbar-light .navbar-nav .nav-item .nav-link {
color: #000;
transition: 0s;
}

.nav-link:hover {
color: rgba(0, 0, 0, .7) !important;
}

.navbar.navbar-light .breadcrumb .nav-item.active>.nav-link, .navbar.navbar-light .navbar-nav .nav-item.active>.nav-link {
background-color: inherit !important;
}

.card {
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .05), 0 2px 25px 2px rgba(0, 0, 0, .05) !important;
border: 0;
border-radius: 10px !important;
transition-duration: 0.4s;
background-color: white;
}

.card:hover {
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .05), 0 2px 25px 2px rgba(0, 0, 0, .2) !important;
border: 0;
transition-duration: 0.4s;
border-radius: 10px !important;
}

/* Small Screen Styles
----------------------------------------------------------------------------- */

Expand Down Expand Up @@ -1856,10 +1945,12 @@ footer.page-footer .footer-copyright {
}

@media screen and (max-width: 968px) {
{% if theme_toc_global %}
.navbar {
box-shadow: none !important;
border-bottom: 1px #ddd solid;
}
{% endif %}

.nav-item.active {
font-weight: bold;
Expand Down Expand Up @@ -1926,10 +2017,12 @@ footer.page-footer .footer-copyright {
display: none;
}

{% if theme_toc_global %}
.navbar {
box-shadow: none !important;
border-bottom: 1px #ddd solid;
}
{% endif %}

#left-column {
box-shadow: none !important;
Expand Down Expand Up @@ -1997,95 +2090,6 @@ footer.page-footer .footer-copyright {
color: {{ theme_text_accent_colour }};
}

/* Navigation Bar
----------------------------------------------------------------------------- */

.section::before {
content: "";
display: block;
height: 50px;
margin: -70px 0 0;
}

.navbar {
background-color: white;
z-index: 10000;
box-shadow: -1px 14px 30px -20px rgba(0, 0, 0, 0.3) !important;
}

.navbar li.dropdown {
list-style-type: none;
}

.navbar li:hover>.dropdown-menu {
display: block;
}

.navbar-brand {
padding: 0px;
}

.navbar-nav {
padding-bottom: 1px;
padding-left: 30px;
}

.navbar .navbar-nav>li {
transition-duration: 0s;
margin-left: 20px;
font-size: initial;
color: black;
font-family: 'Quicksand', 'Roboto', sans-serif !important;
margin-bottom: -9px;
border-bottom: 3px solid;
border-bottom-color: white;
font-weight: 500;
}

.nav-item:hover,
.nav-item.active {
position: relative;
}

.nav-item:hover:after,
.nav-item.active:after {
border-bottom: 3px solid;
content: "";
border-bottom-color: {{ theme_border_colour }} !important;
position: absolute;
bottom: -3px;
width: 80%;
left: 10%;
}

.navbar.navbar-light .breadcrumb .nav-item .nav-link, .navbar.navbar-light .navbar-nav .nav-item .nav-link {
color: #000;
transition: 0s;
}

.nav-link:hover {
color: rgba(0, 0, 0, .7) !important;
}

.navbar.navbar-light .breadcrumb .nav-item.active>.nav-link, .navbar.navbar-light .navbar-nav .nav-item.active>.nav-link {
background-color: inherit !important;
}

.card {
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .05), 0 2px 25px 2px rgba(0, 0, 0, .05) !important;
border: 0;
border-radius: 10px !important;
transition-duration: 0.4s;
background-color: white;
}

.card:hover {
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .05), 0 2px 25px 2px rgba(0, 0, 0, .2) !important;
border: 0;
transition-duration: 0.4s;
border-radius: 10px !important;
}


/* Main cards */
/*----------------------------------------------------------------------------*/
Expand Down