forked from alanorth/dspace-angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src/themes/cgspace: fix navbar on mobile
This is uglier than I am comfortable with, but we have no choice... The code is a mix of that from the dspace theme and the main app's navbar component SCSS, and the whitespace is horrible. But it fixes the navbar menus on mobile...
- Loading branch information
Showing
1 changed file
with
65 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,65 @@ | ||
@import '../../../dspace/app/navbar/navbar.component'; | ||
nav.navbar { | ||
background-color: var(--ds-navbar-bg); | ||
align-items: baseline; | ||
} | ||
|
||
/** Mobile menu styling **/ | ||
@media screen and (max-width: map-get($grid-breakpoints, md)-0.02) { | ||
.navbar { | ||
width: 100vw; | ||
background-color: var(--bs-white); | ||
position: absolute; | ||
overflow: hidden; | ||
height: 0; | ||
z-index: var(--ds-nav-z-index); | ||
|
||
&.open { | ||
height: auto; | ||
min-height: 100vh; | ||
border-bottom: 5px var(--ds-header-navbar-border-bottom-color) solid; | ||
} | ||
} | ||
} | ||
|
||
@media screen and (min-width: map-get($grid-breakpoints, md)) { | ||
.reset-padding-md { | ||
margin-left: calc(var(--bs-spacer) / -2); | ||
margin-right: calc(var(--bs-spacer) / -2); | ||
} | ||
} | ||
|
||
/* TODO remove when https://github.com/twbs/bootstrap/issues/24726 is fixed */ | ||
.navbar-expand-md.navbar-container { | ||
@media screen and (max-width: map-get($grid-breakpoints, md)-0.02) { | ||
>.navbar-inner-container { | ||
padding: 0 var(--bs-spacer); | ||
|
||
a.navbar-brand { | ||
display: none; | ||
} | ||
|
||
.navbar-collapsed { | ||
display: none; | ||
} | ||
} | ||
|
||
padding: 0; | ||
} | ||
|
||
height: 80px; | ||
} | ||
|
||
a.navbar-brand img { | ||
max-height: var(--ds-header-logo-height); | ||
} | ||
|
||
.navbar-nav { | ||
::ng-deep a.nav-link { | ||
color: var(--ds-navbar-link-color); | ||
|
||
&:hover, | ||
&:focus { | ||
color: var(--ds-navbar-link-color-hover); | ||
} | ||
} | ||
} |