| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 1 // This file is part of help.eyeo.com. | 1 // This file is part of help.eyeo.com. |
| 2 // Copyright (C) 2017 Eyeo GmbH | 2 // Copyright (C) 2017 Eyeo GmbH |
| 3 // | 3 // |
| 4 // help.eyeo.com is free software: you can redistribute it and/or modify | 4 // help.eyeo.com is free software: you can redistribute it and/or modify |
| 5 // it under the terms of the GNU General Public License as published by | 5 // it under the terms of the GNU General Public License as published by |
| 6 // the Free Software Foundation, either version 3 of the License, or | 6 // the Free Software Foundation, either version 3 of the License, or |
| 7 // (at your option) any later version. | 7 // (at your option) any later version. |
| 8 // | 8 // |
| 9 // help.eyeo.com is distributed in the hope that it will be useful, | 9 // help.eyeo.com is distributed in the hope that it will be useful, |
| 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 // GNU General Public License for more details. | 12 // GNU General Public License for more details. |
| 13 // | 13 // |
| 14 // You should have received a copy of the GNU General Public License | 14 // You should have received a copy of the GNU General Public License |
| 15 // along with help.eyeo.com. If not, see <http://www.gnu.org/licenses/>. | 15 // along with help.eyeo.com. If not, see <http://www.gnu.org/licenses/>. |
| 16 | 16 |
| 17 /******************************************************************************* | 17 /******************************************************************************* |
| 18 * Navbar component | 18 * Navbar component |
| 19 ******************************************************************************/ | 19 ******************************************************************************/ |
| 20 | 20 |
| 21 .navbar | 21 .navbar |
| 22 { | 22 { |
| 23 padding-top: $small-space; | |
|
juliandoucette
2017/10/31 15:18:38
- This doesn't apply to new abp.org
- This will pr
| |
| 24 padding-bottom: $small-space; | |
| 25 color: $primary-light; | |
|
juliandoucette
2017/10/31 15:18:38
Suggest: we apply a bg utility class in HTML or ex
ire
2017/11/02 11:15:27
Great idea! Done.
| |
| 26 background-color: $primary; | |
| 27 @extend .clearfix; | 23 @extend .clearfix; |
|
juliandoucette
2017/10/31 15:18:38
This may be overkill because the .container within
ire
2017/11/02 11:15:27
.container isn't clearfixed?
| |
| 28 } | 24 } |
| 29 | 25 |
| 30 .navbar a, | 26 /* .navbar .navbar-container |
| 31 .navbar button | 27 ****************************************************************************/ |
|
juliandoucette
2017/10/31 15:18:38
See comment above about background utility classes
ire
2017/11/02 11:15:26
Links are already styled because of the default `c
| |
| 28 | |
| 29 .navbar-container | |
| 32 { | 30 { |
| 33 color: $primary-light; | 31 @if ($add-horizontal-navbar-padding) |
| 32 { | |
| 33 @extend .container; | |
| 34 } | |
| 35 @else | |
| 36 { | |
| 37 @include container($container-width, 0px); | |
| 38 } | |
| 34 } | 39 } |
| 35 | 40 |
| 36 /* .navbar .navbar-branding | 41 /* .navbar .navbar-branding |
| 37 ****************************************************************************/ | 42 ****************************************************************************/ |
| 38 | 43 |
| 39 .navbar-branding | 44 .navbar-branding |
|
juliandoucette
2017/10/31 15:18:37
Perhaps a float utility class or and ID class woul
ire
2017/11/02 11:15:27
Done.
| |
| 40 { | 45 { |
| 41 float: left; | 46 padding-top: $navbar-padding + ($navbar-padding / 4); |
| 47 padding-bottom: $navbar-padding + ($navbar-padding / 4); | |
| 48 line-height: 1; | |
| 49 | |
| 50 @if ($add-horizontal-navbar-padding != true) | |
| 51 { | |
| 52 padding-right: $navbar-padding; | |
| 53 padding-left: $navbar-padding; | |
| 54 } | |
| 42 } | 55 } |
| 43 | 56 |
| 44 [dir="rtl"] .navbar-branding | 57 .navbar-branding img |
| 45 { | 58 { |
| 46 float: right; | 59 height: $navbar-branding-height; |
| 60 vertical-align: text-top; | |
| 47 } | 61 } |
| 48 | 62 |
| 49 /* .navbar .toggle-navbar-collapse | 63 /* .navbar .toggle-navbar-collapse |
| 50 ****************************************************************************/ | 64 ****************************************************************************/ |
| 51 | 65 |
| 52 .toggle-navbar-collapse | 66 .toggle-navbar-collapse |
| 53 { | 67 { |
| 54 display: none; | 68 display: none; |
| 55 float: right; | 69 padding-top: ($navbar-branding-height / 2) + ($navbar-padding / 2); |
| 56 border: 0; | 70 padding-bottom: ($navbar-branding-height / 2) + ($navbar-padding / 2); |
| 57 background-color: transparent; | |
| 58 text-align: right; | |
| 59 cursor: pointer; | |
| 60 } | |
| 61 | 71 |
| 62 [dir="rtl"] .toggle-navbar-collapse | 72 @if ($add-horizontal-navbar-padding != true) |
| 63 { | 73 { |
| 64 float: left; | 74 padding-right: $navbar-padding; |
|
juliandoucette
2017/10/31 15:18:37
What about text-align?
ire
2017/11/02 11:15:26
The other text-align isn't actually needed. So I'm
| |
| 75 padding-left: $navbar-padding; | |
| 76 } | |
| 65 } | 77 } |
| 66 | 78 |
| 67 .js .toggle-navbar-collapse | 79 .js .toggle-navbar-collapse |
| 68 { | 80 { |
| 69 display: block; | 81 display: block; |
| 70 | 82 |
| 71 @media (min-width: $tablet-breakpoint) | 83 @media (min-width: $tablet-breakpoint) |
| 72 { | 84 { |
| 73 display: none; | 85 display: none; |
| 74 } | 86 } |
| 75 } | 87 } |
| 76 | 88 |
| 77 .js .toggle-navbar-collapse .close-label | |
|
juliandoucette
2017/10/31 15:18:38
I think that we will always use an icon; not a lab
ire
2017/11/02 11:15:27
We could have separate icons for open and close?
| |
| 78 { | |
| 79 display: none; | |
| 80 } | |
| 81 | |
| 82 .expanded .toggle-navbar-collapse .open-label | |
| 83 { | |
| 84 display: none; | |
| 85 } | |
| 86 | |
| 87 .expanded .toggle-navbar-collapse .close-label | |
| 88 { | |
| 89 display: inline; | |
| 90 } | |
| 91 | |
| 92 /* .navbar .navbar-collapse | 89 /* .navbar .navbar-collapse |
| 93 ****************************************************************************/ | 90 ****************************************************************************/ |
| 94 | 91 |
| 95 .navbar-collapse | 92 .navbar-collapse |
| 96 { | 93 { |
| 97 display: block; | |
|
juliandoucette
2017/10/31 15:18:37
I think that this may be unnecessary because we ar
ire
2017/11/02 11:15:27
Done.
| |
| 98 clear: both; | 94 clear: both; |
| 99 width: 100%; | |
|
juliandoucette
2017/10/31 15:18:38
I think that this may be unnecessary because this
ire
2017/11/02 11:15:27
Done.
| |
| 100 padding-top: $small-space; | |
|
juliandoucette
2017/10/31 15:18:37
I think that this may be unnecessary because the p
ire
2017/11/02 11:15:26
Done.
| |
| 101 | 95 |
| 102 @media (min-width: $tablet-breakpoint) | 96 @media (min-width: $tablet-breakpoint) |
| 103 { | 97 { |
| 104 float: right; | 98 float: right; |
| 105 clear: none; | 99 clear: none; |
| 106 width: auto; | |
|
juliandoucette
2017/10/31 15:18:38
I think that this will become unnecessary if I am
ire
2017/11/02 11:15:27
Done.
| |
| 107 padding-top: 0; | |
| 108 } | 100 } |
| 109 } | 101 } |
| 110 | 102 |
| 111 [dir="rtl"] .navbar-collapse | 103 [dir="rtl"] .navbar-collapse |
| 112 { | 104 { |
| 113 float: left; | 105 float: left; |
| 114 } | 106 } |
| 115 | 107 |
| 116 .js .navbar-collapse | 108 .js .navbar-collapse |
| 117 { | 109 { |
| 118 display: none; | 110 display: none; |
| 119 | 111 |
| 120 @media (min-width: $tablet-breakpoint) | 112 @media (min-width: $tablet-breakpoint) |
| 121 { | 113 { |
| 122 display: block; | 114 display: block; |
| 123 } | 115 } |
| 124 } | 116 } |
| 125 | 117 |
| 126 .expanded .navbar-collapse | 118 .expanded .navbar-collapse |
|
juliandoucette
2017/10/31 15:18:37
Suggest: Use aria expanded (unless you want to do
ire
2017/11/02 11:15:27
I think I will do that separately when we implemen
| |
| 127 { | 119 { |
| 128 display: block; | 120 display: block; |
| 121 width: 100%; | |
| 122 | |
| 123 @media (min-width: $tablet-breakpoint) | |
| 124 { | |
| 125 width: auto; | |
| 126 } | |
| 129 } | 127 } |
| 128 | |
| 129 /* .navbar .navbar-nav | |
| 130 ****************************************************************************/ | |
| 131 | |
| 132 @if ($add-horizontal-navbar-padding) | |
| 133 { | |
| 134 .navbar .navbar-nav | |
| 135 { | |
| 136 padding-bottom: $navbar-padding / 2; | |
| 137 | |
| 138 @media (min-width: $tablet-breakpoint) | |
| 139 { | |
| 140 margin-right: -($navbar-padding / 2); | |
| 141 margin-left: -($navbar-padding / 2); | |
| 142 padding-bottom: 0; | |
| 143 } | |
| 144 } | |
| 145 } | |
| 146 | |
| 147 .navbar .navbar-nav li | |
| 148 { | |
| 149 @media (min-width: $tablet-breakpoint) | |
| 150 { | |
| 151 display: inline-block; | |
| 152 } | |
| 153 } | |
| 154 | |
| 155 .navbar .navbar-nav a | |
| 156 { | |
| 157 display: block; | |
| 158 padding-top: $navbar-padding / 2; | |
| 159 padding-bottom: $navbar-padding / 2; | |
| 160 | |
| 161 @if ($add-horizontal-navbar-padding != true) | |
| 162 { | |
| 163 padding-right: $navbar-padding; | |
| 164 padding-left: $navbar-padding; | |
| 165 } | |
| 166 | |
| 167 @media (min-width: $tablet-breakpoint) | |
| 168 { | |
| 169 padding-top: ($navbar-branding-height / 2) + ($navbar-padding / 2); | |
| 170 padding-right: $navbar-padding / 2; | |
| 171 padding-bottom: ($navbar-branding-height / 2) + ($navbar-padding / 2); | |
| 172 padding-left: $navbar-padding / 2; | |
| 173 } | |
| 174 } | |
| LEFT | RIGHT |