diff --git a/themes/finc/scss/_customVariables.scss b/themes/finc/scss/_customVariables.scss index 934dcb13290519f354d2cf84adaf29f11b5f562c..9cd3d1cb2417d8d09f97e0f8c6f175f915c0b8ed 100644 --- a/themes/finc/scss/_customVariables.scss +++ b/themes/finc/scss/_customVariables.scss @@ -136,6 +136,9 @@ $btn-transparent-border: $border-color !default; $button-title-hover-bg: $brand-secondary !default; +$btn-language-hover-bg: $brand-secondary !default; +$btn-language-active-hover-bg: $steel !default; + // Padding for toolbar buttons in record view/detail view $record-view-toolbar-button-padding: .5rem; @@ -203,7 +206,7 @@ $grid-gutter-width: 30px !default; //// For fixed navbars ('navbar-fixed-top' in 'header.phtml'), the body requires a padding-bottom of the same height as the navbar because of postition.fixed //// When using 'affix' instead of 'navbar-fixed-top', set '$navbar-height', '$navbar-height-xs' and '$navbar-height-sm' to '=0' //// or set the paddings-top under 'body' in compiled.scss to '=0'; see also the comment in header.phtml -$navbar-height: 80px !default; +$navbar-height: 112px !default; // = 7 x 1rem //80px !default; $navbar-height-sm: $navbar-height !default; //// Set navbar-height for small devices, USE px as rem will throw an error in conjunction _variables.scss $navbar-height-xs: $navbar-height + 40px !default; diff --git a/themes/finc/scss/compiled.scss b/themes/finc/scss/compiled.scss index 3c69101d7817a63a682ce1ddeb8ee44b8d170308..c1a2a5bfb8dc0387e7b68c462bc94efb9905b0a0 100644 --- a/themes/finc/scss/compiled.scss +++ b/themes/finc/scss/compiled.scss @@ -96,7 +96,16 @@ body { // make xception for adv. search home &.template-name-advanced { - padding-top: 3.25rem; + @media (max-width: $screen-xs-max) { + padding-top: 3.25rem; + } + } + + // make exception for adv. search results + &.template-name-advanced { + @media (max-width: $screen-xs-max) { + padding-top: 3.25rem; + } } // for tablet @@ -466,6 +475,35 @@ select { //// textarea {} +// Mouse hover for input[type='text'] and select +input[type='text'] { + &:hover { + outline: 1px $black solid; + } + + header, + #searchForm &:focus, + #searchForm &:hover { + box-shadow: none; + outline: 1px $black solid; + outline-offset: -1px; + } +} + +select { + &:hover { + outline: 1px $black solid; + } + + header, + #searchForm &:focus, + #searchForm &:hover { + box-shadow: none; + outline: 1px $black solid; + outline-offset: -1px; + } +} + // FORMS - END // IMAGES @@ -1187,8 +1225,8 @@ header, } } - // Make language dropdown visible, style it and hide active but show selectable language(s) - @media (max-width: $screen-sm-max) { + // Style language dropdown for XS + @media (max-width: $screen-xs-max) { // avoid BG bleed on small .navbar-nav { margin-bottom: 0; @@ -1197,9 +1235,7 @@ header, .language .dropdown-menu { background-color: $navbar-bg-color; border: 0; - display: block; min-width: 4em; - position: relative; li { @@ -1211,16 +1247,24 @@ header, padding-left: 0; padding-right: 0; } - } - - &.active { - display: none; + &.btn:hover { + background-color: $white; + } } } } + .language .dropdown-menu.oneLanguage { + display: block; + position: relative; + } } } +.language .dropdown-menu.oneLanguage { + display: block; + position: relative; +} + .navbar-header { flex: 0 1 auto; @@ -1283,10 +1327,9 @@ header, float: left; padding: ($grid-gutter-width / 4) ($grid-gutter-width / 2) ($grid-gutter-width / 4) 0; - img { - &:hover { - @include outline(1px); - } + &:hover { + @include outline(1px); + outline-offset: -2px; } @media (max-width: $screen-xs-max) { @@ -2359,6 +2402,15 @@ footer ul { // Bookbag - END +// Accessibility +.language .dropdown-menu { + .btn:hover { + background-color: $btn-language-hover-bg; + } +} + +// Accessibility - END + // Translate feature #set-translation-form { margin-top: 2em; @@ -2586,3 +2638,16 @@ input { color: $btn-transparent-active-color; } } + +// Accessibility +.language .dropdown-menu { + .btn:hover { + background-color: $btn-language-hover-bg; + } + + .active .btn:hover { + background-color: $btn-language-active-hover-bg; + } +} + +// Accessibility - END diff --git a/themes/finc/templates/header.phtml b/themes/finc/templates/header.phtml index 2d6436ece011d54fd6e8bcfcae9a0fb21c94f4b5..b0cc6784bbac2454fb06f65f257c7f63c8358c67 100644 --- a/themes/finc/templates/header.phtml +++ b/themes/finc/templates/header.phtml @@ -103,17 +103,21 @@ <form method="post" name="langForm" id="langForm"> <input type="hidden" name="mylang"/> </form> - <a href="#" class="btn dropdown-toggle hidden-xs hidden-sm" data-toggle="dropdown" aria-controls="langmenu" aria-expanded="false"> - <?=$this->transEsc("Language")?> <strong class="caret"></strong> - </a> - <ul id="langmenu" class="dropdown-menu"> + + <a href="#" class="btn dropdown-toggle <?=(count($this->layout()->allLangs) == 2) ? ' hidden-xs hidden-sm hidden-md hidden-lg' : ''?>" data-toggle="dropdown" aria-controls="langmenu" aria-expanded="false"> + <?=$this->transEsc("Language")?> <strong class="caret"></strong> + </a> + + <ul id="langmenu" class="dropdown-menu <?=(count($this->layout()->allLangs) == 2) ? ' oneLanguage' : ''?>"> <?php foreach ($this->layout()->allLangs as $langCode => $langName): ?> - <li <?=$this->layout()->userLang == $langCode ? ' class="active"' : ''?>> - <a class="btn" href="#" onClick="document.langForm.mylang.value='<?=$langCode?>';document.langForm.submit()"><?=$this->displayLanguageOption($langName)?></a> - </li> + <?php if (!(strcmp($langCode, $this->layout()->userLang) == 0)) : ?> + <li> + <a class="btn <?=(count($this->layout()->allLangs) == 2) ? ' btn-secondary' : ''?>" href="#" onClick="document.langForm.mylang.value='<?=$langCode?>';document.langForm.submit()"><?=$this->displayLanguageOption($langName)?></a> + </li> + <?php endif; ?> <?php endforeach; ?> </ul> - </li> + </li> <?php endif; ?> </ul> </nav>