_header.scss 5.3 KB

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