Derick Montague | a2988f4 | 2020-01-17 13:46:30 -0600 | [diff] [blame] | 1 | <template> |
| 2 | <div> |
Derick Montague | 75b4832 | 2019-12-06 01:24:41 -0600 | [diff] [blame] | 3 | <header id="page-header"> |
Derick Montague | 6859203 | 2020-04-04 14:02:34 -0500 | [diff] [blame] | 4 | <a role="link" class="link-skip-nav btn btn-light" href="#main-content"> |
| 5 | {{ $t('appHeader.skipToContent') }} |
| 6 | </a> |
| 7 | |
Mateusz Gapski | 21d6de0 | 2020-07-29 14:28:23 +0200 | [diff] [blame] | 8 | <b-navbar type="dark" :aria-label="$t('appHeader.applicationHeader')"> |
Yoshie Muranaka | dc04feb | 2019-12-04 08:41:22 -0800 | [diff] [blame] | 9 | <!-- Left aligned nav items --> |
Yoshie Muranaka | 74f8687 | 2020-02-10 12:28:37 -0800 | [diff] [blame] | 10 | <b-button |
Derick Montague | 6859203 | 2020-04-04 14:02:34 -0500 | [diff] [blame] | 11 | id="app-header-trigger" |
Yoshie Muranaka | 74f8687 | 2020-02-10 12:28:37 -0800 | [diff] [blame] | 12 | class="nav-trigger" |
| 13 | aria-hidden="true" |
Yoshie Muranaka | 74f8687 | 2020-02-10 12:28:37 -0800 | [diff] [blame] | 14 | type="button" |
| 15 | variant="link" |
SurenNeware | 057232b | 2020-06-08 20:53:26 +0530 | [diff] [blame] | 16 | :class="{ open: isNavigationOpen }" |
Yoshie Muranaka | 74f8687 | 2020-02-10 12:28:37 -0800 | [diff] [blame] | 17 | @click="toggleNavigation" |
| 18 | > |
SurenNeware | a5cbc44 | 2020-10-12 15:26:39 +0530 | [diff] [blame] | 19 | <icon-close |
| 20 | v-if="isNavigationOpen" |
| 21 | :title="$t('appHeader.titleHideNavigation')" |
| 22 | /> |
| 23 | <icon-menu |
| 24 | v-if="!isNavigationOpen" |
| 25 | :title="$t('appHeader.titleShowNavigation')" |
| 26 | /> |
Yoshie Muranaka | 74f8687 | 2020-02-10 12:28:37 -0800 | [diff] [blame] | 27 | </b-button> |
Yoshie Muranaka | dc04feb | 2019-12-04 08:41:22 -0800 | [diff] [blame] | 28 | <b-navbar-nav> |
SurenNeware | 1f8117f | 2020-09-22 19:28:56 +0530 | [diff] [blame^] | 29 | <b-navbar-brand to="/" data-test-id="appHeader-container-overview"> |
Dixsie Wolmers | 76ccbbc | 2020-08-24 21:25:57 -0500 | [diff] [blame] | 30 | <img |
| 31 | class="header-logo" |
| 32 | src="@/assets/images/logo-header.svg" |
| 33 | :alt="altLogo" |
| 34 | /> |
SurenNeware | 1f8117f | 2020-09-22 19:28:56 +0530 | [diff] [blame^] | 35 | </b-navbar-brand> |
Yoshie Muranaka | b8b6f79 | 2019-12-03 14:47:32 -0800 | [diff] [blame] | 36 | </b-navbar-nav> |
Yoshie Muranaka | dc04feb | 2019-12-04 08:41:22 -0800 | [diff] [blame] | 37 | <!-- Right aligned nav items --> |
SurenNeware | 057232b | 2020-06-08 20:53:26 +0530 | [diff] [blame] | 38 | <b-navbar-nav class="ml-auto helper-menu"> |
Derick Montague | 965cf67 | 2020-07-23 17:24:39 -0500 | [diff] [blame] | 39 | <b-nav-item |
| 40 | to="/health/event-logs" |
| 41 | data-test-id="appHeader-container-health" |
| 42 | > |
Derick Montague | 6859203 | 2020-04-04 14:02:34 -0500 | [diff] [blame] | 43 | <status-icon :status="healthStatusIcon" /> |
SurenNeware | 057232b | 2020-06-08 20:53:26 +0530 | [diff] [blame] | 44 | {{ $t('appHeader.health') }} |
Derick Montague | 6859203 | 2020-04-04 14:02:34 -0500 | [diff] [blame] | 45 | </b-nav-item> |
Derick Montague | 965cf67 | 2020-07-23 17:24:39 -0500 | [diff] [blame] | 46 | <b-nav-item |
| 47 | to="/control/server-power-operations" |
| 48 | data-test-id="appHeader-container-power" |
| 49 | > |
Derick Montague | 6859203 | 2020-04-04 14:02:34 -0500 | [diff] [blame] | 50 | <status-icon :status="hostStatusIcon" /> |
SurenNeware | 057232b | 2020-06-08 20:53:26 +0530 | [diff] [blame] | 51 | {{ $t('appHeader.power') }} |
Derick Montague | 6859203 | 2020-04-04 14:02:34 -0500 | [diff] [blame] | 52 | </b-nav-item> |
| 53 | <!-- Using LI elements instead of b-nav-item to support semantic button elements --> |
| 54 | <li class="nav-item"> |
Derick Montague | 965cf67 | 2020-07-23 17:24:39 -0500 | [diff] [blame] | 55 | <b-button |
| 56 | id="app-header-refresh" |
| 57 | variant="link" |
| 58 | data-test-id="appHeader-button-refresh" |
| 59 | @click="refresh" |
| 60 | > |
SurenNeware | a5cbc44 | 2020-10-12 15:26:39 +0530 | [diff] [blame] | 61 | <icon-renew :title="$t('appHeader.titleRefresh')" /> |
SurenNeware | 057232b | 2020-06-08 20:53:26 +0530 | [diff] [blame] | 62 | <span class="responsive-text">{{ $t('appHeader.refresh') }}</span> |
Derick Montague | 6859203 | 2020-04-04 14:02:34 -0500 | [diff] [blame] | 63 | </b-button> |
| 64 | </li> |
Sukanya Pandey | b1f559f | 2020-04-28 20:18:28 +0530 | [diff] [blame] | 65 | <li class="nav-item"> |
Derick Montague | 965cf67 | 2020-07-23 17:24:39 -0500 | [diff] [blame] | 66 | <b-dropdown |
| 67 | id="app-header-user" |
| 68 | variant="link" |
| 69 | right |
| 70 | data-test-id="appHeader-container-user" |
| 71 | > |
Sukanya Pandey | b1f559f | 2020-04-28 20:18:28 +0530 | [diff] [blame] | 72 | <template v-slot:button-content> |
SurenNeware | a5cbc44 | 2020-10-12 15:26:39 +0530 | [diff] [blame] | 73 | <icon-avatar :title="$t('appHeader.titleProfile')" /> |
SurenNeware | 057232b | 2020-06-08 20:53:26 +0530 | [diff] [blame] | 74 | <span class="responsive-text">{{ username }}</span> |
Sukanya Pandey | b1f559f | 2020-04-28 20:18:28 +0530 | [diff] [blame] | 75 | </template> |
Derick Montague | 965cf67 | 2020-07-23 17:24:39 -0500 | [diff] [blame] | 76 | <b-dropdown-item |
| 77 | to="/profile-settings" |
| 78 | data-test-id="appHeader-link-profile" |
Sukanya Pandey | b1f559f | 2020-04-28 20:18:28 +0530 | [diff] [blame] | 79 | >{{ $t('appHeader.profileSettings') }} |
| 80 | </b-dropdown-item> |
Derick Montague | 965cf67 | 2020-07-23 17:24:39 -0500 | [diff] [blame] | 81 | <b-dropdown-item |
| 82 | data-test-id="appHeader-link-logout" |
| 83 | @click="logout" |
| 84 | > |
| 85 | {{ $t('appHeader.logOut') }} |
| 86 | </b-dropdown-item> |
Sukanya Pandey | b1f559f | 2020-04-28 20:18:28 +0530 | [diff] [blame] | 87 | </b-dropdown> |
Derick Montague | 6859203 | 2020-04-04 14:02:34 -0500 | [diff] [blame] | 88 | </li> |
Yoshie Muranaka | b8b6f79 | 2019-12-03 14:47:32 -0800 | [diff] [blame] | 89 | </b-navbar-nav> |
Derick Montague | a2988f4 | 2020-01-17 13:46:30 -0600 | [diff] [blame] | 90 | </b-navbar> |
| 91 | </header> |
Yoshie Muranaka | 3be801a | 2020-04-21 11:34:56 -0700 | [diff] [blame] | 92 | <loading-bar /> |
Derick Montague | a2988f4 | 2020-01-17 13:46:30 -0600 | [diff] [blame] | 93 | </div> |
| 94 | </template> |
| 95 | |
| 96 | <script> |
Sukanya Pandey | dd6aa0a | 2020-10-08 20:47:39 +0530 | [diff] [blame] | 97 | import BVToastMixin from '@/components/Mixins/BVToastMixin'; |
Derick Montague | e2fd156 | 2019-12-20 13:26:53 -0600 | [diff] [blame] | 98 | import IconAvatar from '@carbon/icons-vue/es/user--avatar/20'; |
Yoshie Muranaka | 74f8687 | 2020-02-10 12:28:37 -0800 | [diff] [blame] | 99 | import IconClose from '@carbon/icons-vue/es/close/20'; |
| 100 | import IconMenu from '@carbon/icons-vue/es/menu/20'; |
Derick Montague | e2fd156 | 2019-12-20 13:26:53 -0600 | [diff] [blame] | 101 | import IconRenew from '@carbon/icons-vue/es/renew/20'; |
SurenNeware | 6185909 | 2020-10-01 09:37:32 +0530 | [diff] [blame] | 102 | import StatusIcon from '@/components/Global/StatusIcon'; |
| 103 | import LoadingBar from '@/components/Global/LoadingBar'; |
Yoshie Muranaka | 74f8687 | 2020-02-10 12:28:37 -0800 | [diff] [blame] | 104 | |
Derick Montague | a2988f4 | 2020-01-17 13:46:30 -0600 | [diff] [blame] | 105 | export default { |
Derick Montague | e2fd156 | 2019-12-20 13:26:53 -0600 | [diff] [blame] | 106 | name: 'AppHeader', |
Yoshie Muranaka | 3be801a | 2020-04-21 11:34:56 -0700 | [diff] [blame] | 107 | components: { |
| 108 | IconAvatar, |
| 109 | IconClose, |
| 110 | IconMenu, |
| 111 | IconRenew, |
| 112 | StatusIcon, |
| 113 | LoadingBar |
| 114 | }, |
Sukanya Pandey | dd6aa0a | 2020-10-08 20:47:39 +0530 | [diff] [blame] | 115 | mixins: [BVToastMixin], |
Yoshie Muranaka | 74f8687 | 2020-02-10 12:28:37 -0800 | [diff] [blame] | 116 | data() { |
| 117 | return { |
Mateusz Gapski | 0350591 | 2020-06-25 08:16:51 +0200 | [diff] [blame] | 118 | isNavigationOpen: false, |
| 119 | altLogo: `${process.env.VUE_APP_COMPANY_NAME} logo` |
Yoshie Muranaka | 74f8687 | 2020-02-10 12:28:37 -0800 | [diff] [blame] | 120 | }; |
| 121 | }, |
Yoshie Muranaka | b8b6f79 | 2019-12-03 14:47:32 -0800 | [diff] [blame] | 122 | computed: { |
Sukanya Pandey | dd6aa0a | 2020-10-08 20:47:39 +0530 | [diff] [blame] | 123 | isAuthorized() { |
| 124 | return this.$store.getters['global/isAuthorized']; |
| 125 | }, |
Yoshie Muranaka | b8b6f79 | 2019-12-03 14:47:32 -0800 | [diff] [blame] | 126 | hostStatus() { |
Derick Montague | e2fd156 | 2019-12-20 13:26:53 -0600 | [diff] [blame] | 127 | return this.$store.getters['global/hostStatus']; |
Yoshie Muranaka | dc04feb | 2019-12-04 08:41:22 -0800 | [diff] [blame] | 128 | }, |
Yoshie Muranaka | 1ace1d9 | 2020-02-06 13:47:28 -0800 | [diff] [blame] | 129 | healthStatus() { |
| 130 | return this.$store.getters['eventLog/healthStatus']; |
| 131 | }, |
Yoshie Muranaka | dc04feb | 2019-12-04 08:41:22 -0800 | [diff] [blame] | 132 | hostStatusIcon() { |
| 133 | switch (this.hostStatus) { |
Derick Montague | e2fd156 | 2019-12-20 13:26:53 -0600 | [diff] [blame] | 134 | case 'on': |
| 135 | return 'success'; |
| 136 | case 'error': |
| 137 | return 'danger'; |
Yoshie Muranaka | a3cbc65 | 2020-05-13 12:55:48 -0700 | [diff] [blame] | 138 | case 'diagnosticMode': |
| 139 | return 'warning'; |
Derick Montague | e2fd156 | 2019-12-20 13:26:53 -0600 | [diff] [blame] | 140 | case 'off': |
Yoshie Muranaka | dc04feb | 2019-12-04 08:41:22 -0800 | [diff] [blame] | 141 | default: |
Derick Montague | e2fd156 | 2019-12-20 13:26:53 -0600 | [diff] [blame] | 142 | return 'secondary'; |
Yoshie Muranaka | dc04feb | 2019-12-04 08:41:22 -0800 | [diff] [blame] | 143 | } |
Yoshie Muranaka | 1ace1d9 | 2020-02-06 13:47:28 -0800 | [diff] [blame] | 144 | }, |
| 145 | healthStatusIcon() { |
| 146 | switch (this.healthStatus) { |
Yoshie Muranaka | ce9a3ef | 2020-05-06 14:33:22 -0700 | [diff] [blame] | 147 | case 'OK': |
Yoshie Muranaka | 1ace1d9 | 2020-02-06 13:47:28 -0800 | [diff] [blame] | 148 | return 'success'; |
Yoshie Muranaka | ce9a3ef | 2020-05-06 14:33:22 -0700 | [diff] [blame] | 149 | case 'Warning': |
Yoshie Muranaka | 1ace1d9 | 2020-02-06 13:47:28 -0800 | [diff] [blame] | 150 | return 'warning'; |
Yoshie Muranaka | ce9a3ef | 2020-05-06 14:33:22 -0700 | [diff] [blame] | 151 | case 'Critical': |
Yoshie Muranaka | 1ace1d9 | 2020-02-06 13:47:28 -0800 | [diff] [blame] | 152 | return 'danger'; |
| 153 | default: |
| 154 | return 'secondary'; |
| 155 | } |
Sukanya Pandey | b1f559f | 2020-04-28 20:18:28 +0530 | [diff] [blame] | 156 | }, |
| 157 | username() { |
| 158 | return this.$store.getters['global/username']; |
Yoshie Muranaka | b8b6f79 | 2019-12-03 14:47:32 -0800 | [diff] [blame] | 159 | } |
| 160 | }, |
Sukanya Pandey | dd6aa0a | 2020-10-08 20:47:39 +0530 | [diff] [blame] | 161 | watch: { |
| 162 | isAuthorized(value) { |
| 163 | if (value === false) { |
| 164 | this.errorToast( |
| 165 | this.$t('global.toast.unAuthDescription'), |
| 166 | this.$t('global.toast.unAuthTitle') |
| 167 | ); |
| 168 | } |
| 169 | } |
| 170 | }, |
Derick Montague | 09e45cd | 2020-01-23 15:45:57 -0600 | [diff] [blame] | 171 | created() { |
Yoshie Muranaka | d624dae | 2020-09-21 14:35:58 -0700 | [diff] [blame] | 172 | // Reset auth state to check if user is authenticated based |
| 173 | // on available browser cookies |
| 174 | this.$store.dispatch('authentication/resetStoreState'); |
Derick Montague | 09e45cd | 2020-01-23 15:45:57 -0600 | [diff] [blame] | 175 | this.getHostInfo(); |
Yoshie Muranaka | 1ace1d9 | 2020-02-06 13:47:28 -0800 | [diff] [blame] | 176 | this.getEvents(); |
Derick Montague | 09e45cd | 2020-01-23 15:45:57 -0600 | [diff] [blame] | 177 | }, |
Yoshie Muranaka | 74f8687 | 2020-02-10 12:28:37 -0800 | [diff] [blame] | 178 | mounted() { |
| 179 | this.$root.$on( |
| 180 | 'change:isNavigationOpen', |
| 181 | isNavigationOpen => (this.isNavigationOpen = isNavigationOpen) |
| 182 | ); |
| 183 | }, |
Yoshie Muranaka | b8b6f79 | 2019-12-03 14:47:32 -0800 | [diff] [blame] | 184 | methods: { |
| 185 | getHostInfo() { |
Derick Montague | e2fd156 | 2019-12-20 13:26:53 -0600 | [diff] [blame] | 186 | this.$store.dispatch('global/getHostStatus'); |
Derick Montague | e080a1a | 2019-12-04 16:30:08 -0600 | [diff] [blame] | 187 | }, |
Yoshie Muranaka | 1ace1d9 | 2020-02-06 13:47:28 -0800 | [diff] [blame] | 188 | getEvents() { |
| 189 | this.$store.dispatch('eventLog/getEventLogData'); |
| 190 | }, |
Yoshie Muranaka | eb154bb | 2020-02-07 12:18:45 -0800 | [diff] [blame] | 191 | refresh() { |
| 192 | this.$emit('refresh'); |
| 193 | }, |
Derick Montague | e080a1a | 2019-12-04 16:30:08 -0600 | [diff] [blame] | 194 | logout() { |
Derick Montague | c031b69 | 2020-02-12 15:55:42 -0600 | [diff] [blame] | 195 | this.$store.dispatch('authentication/logout'); |
Yoshie Muranaka | 74f8687 | 2020-02-10 12:28:37 -0800 | [diff] [blame] | 196 | }, |
| 197 | toggleNavigation() { |
| 198 | this.$root.$emit('toggle:navigation'); |
Yoshie Muranaka | b8b6f79 | 2019-12-03 14:47:32 -0800 | [diff] [blame] | 199 | } |
Derick Montague | a2988f4 | 2020-01-17 13:46:30 -0600 | [diff] [blame] | 200 | } |
| 201 | }; |
| 202 | </script> |
| 203 | |
Sukanya Pandey | b1f559f | 2020-04-28 20:18:28 +0530 | [diff] [blame] | 204 | <style lang="scss"> |
Sukanya Pandey | b1f559f | 2020-04-28 20:18:28 +0530 | [diff] [blame] | 205 | .app-header { |
| 206 | .link-skip-nav { |
| 207 | position: absolute; |
| 208 | top: -60px; |
| 209 | left: 0.5rem; |
| 210 | z-index: $zindex-popover; |
| 211 | transition: $duration--moderate-01 $exit-easing--expressive; |
| 212 | &:focus { |
| 213 | top: 0.5rem; |
| 214 | transition-timing-function: $entrance-easing--expressive; |
| 215 | } |
Derick Montague | 75b4832 | 2019-12-06 01:24:41 -0600 | [diff] [blame] | 216 | } |
SurenNeware | 1f8117f | 2020-09-22 19:28:56 +0530 | [diff] [blame^] | 217 | .navbar-text, |
| 218 | .nav-link, |
| 219 | .btn-link { |
| 220 | color: color('white') !important; |
| 221 | fill: currentColor; |
| 222 | padding: 0.68rem 1rem !important; |
| 223 | |
| 224 | &:hover { |
| 225 | background-color: theme-color-level(light, 10); |
| 226 | } |
| 227 | &:active { |
| 228 | background-color: theme-color-level(light, 9); |
| 229 | } |
| 230 | &:focus { |
| 231 | box-shadow: inset 0 0 0 3px $navbar-color, inset 0 0 0 5px color('white'); |
Sukanya Pandey | b1f559f | 2020-04-28 20:18:28 +0530 | [diff] [blame] | 232 | } |
Yoshie Muranaka | 74f8687 | 2020-02-10 12:28:37 -0800 | [diff] [blame] | 233 | } |
| 234 | |
Sukanya Pandey | b1f559f | 2020-04-28 20:18:28 +0530 | [diff] [blame] | 235 | .nav-item { |
Yoshie Muranaka | 01da818 | 2020-07-08 15:46:43 -0700 | [diff] [blame] | 236 | fill: theme-color('light'); |
Yoshie Muranaka | 74f8687 | 2020-02-10 12:28:37 -0800 | [diff] [blame] | 237 | } |
| 238 | |
Sukanya Pandey | b1f559f | 2020-04-28 20:18:28 +0530 | [diff] [blame] | 239 | .navbar { |
| 240 | padding: 0; |
Mateusz Gapski | 21d6de0 | 2020-07-29 14:28:23 +0200 | [diff] [blame] | 241 | background-color: $navbar-color; |
SurenNeware | 057232b | 2020-06-08 20:53:26 +0530 | [diff] [blame] | 242 | @include media-breakpoint-up($responsive-layout-bp) { |
| 243 | height: $header-height; |
| 244 | } |
Sukanya Pandey | b1f559f | 2020-04-28 20:18:28 +0530 | [diff] [blame] | 245 | |
SurenNeware | 1f8117f | 2020-09-22 19:28:56 +0530 | [diff] [blame^] | 246 | &:focus { |
| 247 | outline: 0; |
Mateusz Gapski | 0350591 | 2020-06-25 08:16:51 +0200 | [diff] [blame] | 248 | } |
| 249 | |
SurenNeware | 057232b | 2020-06-08 20:53:26 +0530 | [diff] [blame] | 250 | .helper-menu { |
| 251 | @include media-breakpoint-down(sm) { |
Yoshie Muranaka | 01da818 | 2020-07-08 15:46:43 -0700 | [diff] [blame] | 252 | background-color: gray('800'); |
SurenNeware | 057232b | 2020-06-08 20:53:26 +0530 | [diff] [blame] | 253 | width: 100%; |
| 254 | justify-content: flex-end; |
| 255 | |
| 256 | .nav-link, |
| 257 | .btn { |
| 258 | padding: $spacer / 1.125 $spacer / 2; |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | .responsive-text { |
| 263 | @include media-breakpoint-down(xs) { |
| 264 | display: none; |
| 265 | } |
| 266 | } |
| 267 | } |
Sukanya Pandey | b1f559f | 2020-04-28 20:18:28 +0530 | [diff] [blame] | 268 | } |
| 269 | |
| 270 | .navbar-nav { |
| 271 | padding: 0 $spacer; |
SurenNeware | 1f8117f | 2020-09-22 19:28:56 +0530 | [diff] [blame^] | 272 | align-items: center; |
| 273 | |
| 274 | .navbar-brand, |
| 275 | .nav-link { |
| 276 | transition: $focus-transition; |
| 277 | } |
| 278 | &:focus { |
| 279 | outline: 0; |
| 280 | } |
Sukanya Pandey | b1f559f | 2020-04-28 20:18:28 +0530 | [diff] [blame] | 281 | } |
| 282 | |
| 283 | .nav-trigger { |
Yoshie Muranaka | 01da818 | 2020-07-08 15:46:43 -0700 | [diff] [blame] | 284 | fill: theme-color('light'); |
Sukanya Pandey | b1f559f | 2020-04-28 20:18:28 +0530 | [diff] [blame] | 285 | width: $header-height; |
| 286 | height: $header-height; |
| 287 | transition: none; |
SurenNeware | 1f8117f | 2020-09-22 19:28:56 +0530 | [diff] [blame^] | 288 | display: inline-flex; |
| 289 | flex: 0 0 20px; |
| 290 | align-items: center; |
Sukanya Pandey | b1f559f | 2020-04-28 20:18:28 +0530 | [diff] [blame] | 291 | |
| 292 | svg { |
| 293 | margin: 0; |
| 294 | } |
| 295 | |
| 296 | &:hover { |
Yoshie Muranaka | 01da818 | 2020-07-08 15:46:43 -0700 | [diff] [blame] | 297 | fill: theme-color('light'); |
SurenNeware | 1f8117f | 2020-09-22 19:28:56 +0530 | [diff] [blame^] | 298 | background-color: theme-color-level(light, 10); |
Sukanya Pandey | b1f559f | 2020-04-28 20:18:28 +0530 | [diff] [blame] | 299 | } |
| 300 | |
SurenNeware | 057232b | 2020-06-08 20:53:26 +0530 | [diff] [blame] | 301 | &.open { |
Yoshie Muranaka | 01da818 | 2020-07-08 15:46:43 -0700 | [diff] [blame] | 302 | background-color: gray('800'); |
SurenNeware | 057232b | 2020-06-08 20:53:26 +0530 | [diff] [blame] | 303 | } |
| 304 | |
Sukanya Pandey | b1f559f | 2020-04-28 20:18:28 +0530 | [diff] [blame] | 305 | @include media-breakpoint-up($responsive-layout-bp) { |
| 306 | display: none; |
| 307 | } |
| 308 | } |
| 309 | |
SurenNeware | 1f8117f | 2020-09-22 19:28:56 +0530 | [diff] [blame^] | 310 | .dropdown-menu { |
| 311 | margin-top: 0; |
| 312 | |
| 313 | @include media-breakpoint-only(md) { |
| 314 | margin-top: 4px; |
SurenNeware | 057232b | 2020-06-08 20:53:26 +0530 | [diff] [blame] | 315 | } |
| 316 | } |
| 317 | |
| 318 | .navbar-expand { |
| 319 | @include media-breakpoint-down(sm) { |
| 320 | flex-flow: wrap; |
Sukanya Pandey | b1f559f | 2020-04-28 20:18:28 +0530 | [diff] [blame] | 321 | } |
Yoshie Muranaka | dc04feb | 2019-12-04 08:41:22 -0800 | [diff] [blame] | 322 | } |
| 323 | } |
SurenNeware | 1f8117f | 2020-09-22 19:28:56 +0530 | [diff] [blame^] | 324 | |
| 325 | .navbar-brand { |
| 326 | padding: $spacer/2; |
| 327 | height: $header-height; |
| 328 | line-height: 1; |
| 329 | &:focus { |
| 330 | box-shadow: inset 0 0 0 3px $navbar-color, inset 0 0 0 5px color('white'); |
| 331 | outline: 0; |
| 332 | } |
| 333 | } |
Yoshie Muranaka | b8b6f79 | 2019-12-03 14:47:32 -0800 | [diff] [blame] | 334 | </style> |