_header.scss 5.0 KB

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