123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341 |
- //
- // Misago Navbar
- // --------------------------------------------------
- // Navbar scaffold
- .navbar-spacer {
- margin-bottom: @line-height-computed;
- .navbar-primary {
- .shadow-4dp();
- border-bottom: none;
- margin: 0px;
- padding: @navbar-inner-margin 0px;
- &.affix {
- .shadow-8dp();
- width: 100%;
- top: 0px;
- }
- }
- }
- // Navbar brand
- .navbar-primary {
- .navbar-brand {
- font-size: @font-size-large * 1.2;
- font-weight: @navbar-link-weight;
- img {
- display: inline-block;
- height: @navbar-brand-height;
- margin: ((@navbar-padding-vertical - @navbar-brand-height) / 2) 0px;
- position: relative;
- bottom: 3px;
- }
- }
- }
- // Navbar navs
- .navbar-primary {
- .navbar-nav {
- float: left;
- &>li {
- float: left;
- margin-right: @navbar-link-spacing;
- &:last-child {
- margin-right: 0px;
- }
- &>a {
- // Border radius
- border-radius: @navbar-link-radius;
- // Scale links up
- font-size: @navbar-link-size;
- font-weight: @navbar-link-weight;
- // We don't use .active states in navbar
- &:active, &:focus {
- background-color: @navbar-default-link-active-bg;
- color: @navbar-default-link-active-color;
- }
- }
- &.icon {
- &>a {
- height: @navbar-height;
- padding: (@navbar-height - @navbar-icon-size) / 2 @navbar-padding-horizontal;
- padding-bottom: 0px;
- &>.material-icons {
- .opacity(1);
- font-size: @navbar-icon-size;
- line-height: @navbar-icon-size;
- }
- // Align badges to glyhps
- &>.badge {
- vertical-align: top;
- position: relative;
- bottom: (@navbar-icon-size - (6px + @font-size-small)) / -2;
- }
- }
- }
- }
- }
- }
- // User Menu
- .navbar-primary {
- .navbar-user-nav {
- float: right;
- }
- .btn-start-thread {
- background: @navbar-start-thread-bg;
- height: @navbar-height;
- padding: (@navbar-height - @navbar-icon-size) / 2;
- padding-bottom: 0px;
- color: @navbar-start-thread-color;
- .material-icons {
- top: -1px;
- font-size: @navbar-icon-size;
- line-height: @navbar-icon-size;
- }
- &:hover, &:focus {
- background: @navbar-start-thread-hover-bg;
- color: @navbar-start-thread-hover-color;
- }
- &:active {
- background: @navbar-start-thread-active-bg;
- color: @navbar-start-thread-active-color;
- }
- }
- .user-menu {
- .dropdown-toggle {
- height: @navbar-height;
- padding: (@navbar-height - @navbar-avatar-height) / 2;
- padding-bottom: 0px;
- line-height: 0px;
- img {
- border-radius: @avatar-radius-small;
- width: @navbar-avatar-height;
- height: @navbar-avatar-height;
- }
- &:hover, &:focus {
- img {
- .shadow-2dp();
- }
- }
- }
- }
- }
- // Guest Menu
- .navbar-primary {
- .navbar-guest-nav {
- float: right;
- .btn-sign-in, .btn-join {
- margin-left: @navbar-link-spacing;
- }
- .btn-sign-in {
- background: @navbar-sign-in-bg;
- color: @navbar-sign-in-color;
- &:hover, &:focus {
- background: @navbar-sign-in-hover-bg;
- color: @navbar-sign-in-hover-color;
- }
- &:active {
- background: @navbar-sign-in-active-bg;
- color: @navbar-sign-in-active-color;
- }
- }
- .btn-join {
- background: @navbar-join-bg;
- color: @navbar-join-color;
- &:hover, &:focus {
- background: @navbar-join-hover-bg;
- color: @navbar-join-hover-color;
- }
- &:active {
- background: @navbar-join-active-bg;
- color: @navbar-join-active-color;
- }
- }
- }
- }
- // Navbar Buttons
- .navbar-primary {
- .navbar-btn {
- .btn-reset-styles();
- margin-top: 0px;
- margin-bottom: 0px;
- padding-top: 11px;
- padding-bottom: 11px;
- font-size: @navbar-link-size;
- &, &:hover, &:focus, &:active {
- border-color: transparent;
- }
- }
- }
- // Icons in buttons
- .navbar-primary {
- &>.navbar-btn {
- .material-icons {
- font-size: @font-size-large;
- }
- }
- }
- // Dropdowns
- .navbar-static-top {
- & .navbar-nav > li > .dropdown-menu {
- border-radius: @dropdown-border-radius;
- }
- }
- // Compact nav
- @media (max-width: @screen-sm-max) {
- .navbar-primary {
- min-height: @navbar-compact-height;
- }
- }
- .navbar-primary {
- .navbar-compact-nav {
- margin: 0px;
- float: none;
- width: 100%;
- &>li {
- margin: 0px;
- &>a, &>.dropdown-toggle {
- padding: 0px;
- padding-top: (@navbar-compact-height - @navbar-compact-item-height) / 2;
- height: @navbar-compact-height;
- text-align: center;
- // Align images
- img {
- width: @navbar-compact-item-height;
- height: @navbar-compact-item-height;
- position: static;
- }
- // Align and de-opac icons
- .material-icons {
- .opacity(1);
- font-size: @navbar-compact-item-height;
- line-height: @navbar-compact-item-height;
- }
- // Custom touched style
- &:active {
- background-color: @navbar-compact-link-active-bg;
- color: @navbar-compact-link-active-color;
- }
- }
- }
- // Even widths
- &.with-4-links {
- &>li {
- width: 25%;
- }
- }
- &.with-5-links {
- &>li {
- width: 20%;
- }
- }
- &.with-6-links {
- &>li {
- width: 16%;
- &:first-child, &:last-child {
- width: 18%;
- }
- }
- }
- &.with-7-links {
- &>li {
- width: 14%;
- &:first-child, &:last-child {
- width: 15%;
- }
- }
- }
- }
- }
- // Compact dropdown
- .compact-navbar-dropdown {
- margin-top: @line-height-computed * -1;
- margin-bottom: @line-height-computed;
- .dropdown-menu {
- border-radius: 0px;
- display: block;
- position: static;
- width: 100%;
- .shadow-6dp();
- }
- }
|