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