hero.sass 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. // Main container
  2. .hero
  3. align-items: stretch
  4. display: flex
  5. flex-direction: column
  6. justify-content: space-between
  7. .navbar
  8. background: none
  9. .tabs
  10. ul
  11. border-bottom: none
  12. // Colors
  13. @each $name, $pair in $colors
  14. $color: nth($pair, 1)
  15. $color-invert: nth($pair, 2)
  16. &.is-#{$name}
  17. background-color: $color
  18. color: $color-invert
  19. a:not(.button),
  20. strong
  21. color: inherit
  22. .title
  23. color: $color-invert
  24. .subtitle
  25. color: rgba($color-invert, 0.9)
  26. a:not(.button),
  27. strong
  28. color: $color-invert
  29. .navbar-menu
  30. +touch
  31. background-color: $color
  32. .navbar-item,
  33. .navbar-link
  34. color: rgba($color-invert, 0.7)
  35. a.navbar-item,
  36. .navbar-link
  37. &:hover,
  38. &.is-active
  39. background-color: darken($color, 5%)
  40. color: $color-invert
  41. .tabs
  42. a
  43. color: $color-invert
  44. opacity: 0.9
  45. &:hover
  46. opacity: 1
  47. li
  48. &.is-active a
  49. opacity: 1
  50. &.is-boxed,
  51. &.is-toggle
  52. a
  53. color: $color-invert
  54. &:hover
  55. background-color: rgba($black, 0.1)
  56. li.is-active a
  57. &,
  58. &:hover
  59. background-color: $color-invert
  60. border-color: $color-invert
  61. color: $color
  62. // Modifiers
  63. &.is-bold
  64. $gradient-top-left: darken(saturate(adjust-hue($color, -10deg), 10%), 10%)
  65. $gradient-bottom-right: lighten(saturate(adjust-hue($color, 10deg), 5%), 5%)
  66. background-image: linear-gradient(141deg, $gradient-top-left 0%, $color 71%, $gradient-bottom-right 100%)
  67. +mobile
  68. .navbar-menu
  69. background-image: linear-gradient(141deg, $gradient-top-left 0%, $color 71%, $gradient-bottom-right 100%)
  70. // Responsiveness
  71. // +mobile
  72. // .nav-toggle
  73. // span
  74. // background-color: $color-invert
  75. // &:hover
  76. // background-color: rgba($black, 0.1)
  77. // &.is-active
  78. // span
  79. // background-color: $color-invert
  80. // .nav-menu
  81. // .nav-item
  82. // border-top-color: rgba($color-invert, 0.2)
  83. // Sizes
  84. &.is-small
  85. .hero-body
  86. padding-bottom: 1.5rem
  87. padding-top: 1.5rem
  88. &.is-medium
  89. +tablet
  90. .hero-body
  91. padding-bottom: 9rem
  92. padding-top: 9rem
  93. &.is-large
  94. +tablet
  95. .hero-body
  96. padding-bottom: 18rem
  97. padding-top: 18rem
  98. &.is-halfheight,
  99. &.is-fullheight
  100. .hero-body
  101. align-items: center
  102. display: flex
  103. & > .container
  104. flex-grow: 1
  105. flex-shrink: 1
  106. &.is-halfheight
  107. min-height: 50vh
  108. &.is-fullheight
  109. min-height: 100vh
  110. // Components
  111. .hero-video
  112. +overlay
  113. overflow: hidden
  114. video
  115. left: 50%
  116. min-height: 100%
  117. min-width: 100%
  118. position: absolute
  119. top: 50%
  120. transform: translate3d(-50%, -50%, 0)
  121. // Modifiers
  122. &.is-transparent
  123. opacity: 0.3
  124. // Responsiveness
  125. +mobile
  126. display: none
  127. .hero-buttons
  128. margin-top: 1.5rem
  129. // Responsiveness
  130. +mobile
  131. .button
  132. display: flex
  133. &:not(:last-child)
  134. margin-bottom: 0.75rem
  135. +tablet
  136. display: flex
  137. justify-content: center
  138. .button:not(:last-child)
  139. margin-right: 1.5rem
  140. // Containers
  141. .hero-head,
  142. .hero-foot
  143. flex-grow: 0
  144. flex-shrink: 0
  145. .hero-body
  146. flex-grow: 1
  147. flex-shrink: 0
  148. padding: 3rem 1.5rem