_header.scss 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. // Header styling
  2. #header {
  3. @extend .default-animation;
  4. @extend .padding-horiz;
  5. position: fixed;
  6. z-index: 10;
  7. width: 100%;
  8. height: $header-height;
  9. background-color: rgba(255,255,255,0.90);
  10. box-shadow: 0 0.05rem 1rem rgba(0,0,0, 0.15);
  11. // scroll based changes
  12. &.scrolled {
  13. height: $header-height - 2rem;
  14. background-color: rgba(255,255,255,0.90) !important;
  15. box-shadow: 0 0.05rem 1rem rgba(0,0,0, 0.15) !important;
  16. #logo h3 {
  17. color: $core-text !important;
  18. font-size: 1.6rem !important;
  19. }
  20. #logo a, #navbar span {
  21. color: $core-text !important;
  22. }
  23. #navbar a {
  24. color: $core-accent !important;
  25. &:hover {
  26. color: darken($core-accent, 20%) !important;
  27. }
  28. }
  29. #navbar a:before, #navbar a:after {
  30. background-color: $core-accent !important;
  31. }
  32. }
  33. // set heights for vertical centering
  34. > .grid, #logo, #navbar {
  35. height: 100%;
  36. }
  37. #logo {
  38. float: left;
  39. h3 {
  40. @extend .default-animation;
  41. @extend %vertical-align;
  42. font-size: 2rem;
  43. line-height: 2rem;
  44. margin: 0;
  45. text-transform: uppercase;
  46. a {
  47. color: $core-text;
  48. }
  49. }
  50. }
  51. #navbar {
  52. font-size: $core-font-size - 0.1rem;
  53. ul {
  54. margin: 0;
  55. padding: 0;
  56. list-style: none;
  57. &.navigation {
  58. @extend %vertical-align;
  59. display: inline-block;
  60. float: right;
  61. li {
  62. float: left;
  63. position: relative;
  64. a {
  65. font-family: $font-family-header;
  66. display: inline-block;
  67. padding: 0.3rem 0.8rem;
  68. &:before, &:after {
  69. content: "";
  70. position: absolute;
  71. width: 100%;
  72. height: 1px;
  73. bottom: 0;
  74. left: 0;
  75. background-color: $core-accent;
  76. visibility: hidden;
  77. @include transform(scaleX(0));
  78. @include transition(all 0.2s ease);
  79. }
  80. &:hover:before {
  81. visibility: visible;
  82. @include transform(scaleX(0.75));
  83. }
  84. &.active:after {
  85. top: 0;
  86. visibility: visible;
  87. @include transform(scaleX(0.75));
  88. }
  89. }
  90. &.active {
  91. a:after {
  92. top: 0;
  93. visibility: visible;
  94. @include transform(scaleX(0.75));
  95. }
  96. }
  97. // Dropdown Menu Styles
  98. ul {
  99. display: none;
  100. padding: 0;
  101. box-shadow: 0 0.05rem 1rem rgba(0,0,0, 0.15) !important;
  102. }
  103. ul ul {
  104. left: 100%;
  105. top: 0;
  106. }
  107. &:hover {
  108. & > ul {
  109. display: block;
  110. position: absolute;
  111. background: rgba($white, 0.9);
  112. width: 10rem;
  113. }
  114. li {
  115. float: none;
  116. margin: 0;
  117. padding: 0;
  118. a {
  119. padding: 0.5rem 0.8rem;
  120. display: block;
  121. &:before, &:after {
  122. display: none;
  123. }
  124. }
  125. &.active {
  126. & > a {
  127. background: $core-accent;
  128. color: $white;
  129. }
  130. }
  131. }
  132. }
  133. }
  134. @include breakpoint(desktop-only) {
  135. display: none;
  136. }
  137. }
  138. }
  139. .panel-activation {
  140. @extend %vertical-align;
  141. padding: 1rem;
  142. display: none;
  143. font-size: 1.8rem;
  144. cursor: pointer;
  145. float: right;
  146. @include breakpoint(desktop-only) {
  147. display: inline-block;
  148. }
  149. }
  150. }
  151. }
  152. // Header Image
  153. .header-image {
  154. &.fullwidth {
  155. #body {
  156. padding-left: 0;
  157. padding-right: 0;
  158. >.listing-row {
  159. padding-left: $padding-horiz;
  160. padding-right: $padding-horiz;
  161. }
  162. }
  163. }
  164. .listing-row:last-child {
  165. margin-bottom: 2rem;
  166. }
  167. #body {
  168. .flush-top {
  169. margin-top: - $header-height - $padding-vert - 1.5rem;
  170. padding-top: $header-height + 4rem;
  171. }
  172. }
  173. #breadcrumbs {
  174. margin-top: 1rem;
  175. }
  176. #header {
  177. background-color: rgba($header-text,0);
  178. box-shadow: none;
  179. #logo h3, #logo a {
  180. color: $header-text;
  181. }
  182. a, .menu-btn {
  183. color: $header-text;
  184. }
  185. a:before, a:after {
  186. background-color: rgba($header-text,0.7) !important;
  187. }
  188. #navbar ul.navigation {
  189. ul li a {
  190. color: $core-accent;
  191. &:hover {
  192. color: darken($core-accent, 20%);
  193. }
  194. }
  195. }
  196. }
  197. }