diff --git a/site/layouts/partials/blocks.html b/site/layouts/partials/blocks.html deleted file mode 100644 index 9262f1e..0000000 --- a/site/layouts/partials/blocks.html +++ /dev/null @@ -1,22 +0,0 @@ -
-
-
- -
-
-
- -
-
-
- -
-
- -
-
-
- -
-
-
diff --git a/site/layouts/partials/hero.html b/site/layouts/partials/hero.html index 5bcf11d..04006d3 100644 --- a/site/layouts/partials/hero.html +++ b/site/layouts/partials/hero.html @@ -3,10 +3,40 @@

How Can We Help You?

-

Lorem itaque a nesciunt neque porro! Hic at expedita dignissimos nostrum omnis.

+

Lorem itaque a nesciunt neque porro! Hic at expedita dignissimos nostrum omnis.

- {{ partial "blocks.html" }} +
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
diff --git a/src/css/imports/components/block.scss b/src/css/imports/components/block.scss index ed1b631..346bf8d 100644 --- a/src/css/imports/components/block.scss +++ b/src/css/imports/components/block.scss @@ -6,7 +6,7 @@ $transition-img-out: opacity $duration $delay ease-out, transform $duration; @mixin img-in { transition: $transition-img-in; - opacity: 0.5; + opacity: 1; transform: none; } @@ -115,6 +115,59 @@ $transition-img-out: opacity $duration $delay ease-out, transform $duration; } .c-block--3 { + &::before { + transform-origin: 100% 100%; + + @at-root .state-0 & { + transform: scale(1, 1); + } + + @at-root .state-1 & { + transform: scale(0.5, 1); + } + + @at-root .state-2 & { + transform: scale(0.5, 0.5); + } + } + + // > .c-block__img { + // transform-origin: 0 100%; + // + // @at-root .state-0 & { + // @include img-in; + // } + // + // @at-root .state-1 & { + // @include img-out; + // transform: translate(66.6%, 0) scale(1.3); + // } + // + // @at-root .state-2 & { + // transform: translate(66.6%, 66.6%) scale(2); + // } + // } +} + +.c-block--4 { + &::before { + transform-origin: 100% 0; + + @at-root .state-0 & { + transform: scale(0.33, 1); + } + + @at-root .state-1 & { + transform: scale(0.33, 0.25); + } + + @at-root .state-2 & { + transform: scale(1, 1); + } + } +} + +.c-block--5 { &::before { transform-origin: 100% 0; @@ -149,42 +202,77 @@ $transition-img-out: opacity $duration $delay ease-out, transform $duration; } } -.c-block--4 { +.c-block--6 { &::before { transform-origin: 100% 0; @at-root .state-0 & { - transform: scale(0.33, 1); + transform: scale(1.333, 0.666); } @at-root .state-1 & { - transform: scale(0.33, 0.25); + transform: scale(0.5, 0.666); } @at-root .state-2 & { + transform: scale(0.5, 0.5); + } + } + + // > .c-block__img { + // transform-origin: 0 100%; + // + // @at-root .state-0 & { + // @include img-in; + // } + // + // @at-root .state-1 & { + // @include img-out; + // transform: translate(66.6%, 0) scale(1.3); + // } + // + // @at-root .state-2 & { + // transform: translate(66.6%, 66.6%) scale(2); + // } + // } +} + +.c-block--7 { + &::before { + transform-origin: 100% 100%; + + @at-root .state-0 & { transform: scale(1, 1); } + + @at-root .state-1 & { + transform: scale(0.5, 1); + } + + @at-root .state-2 & { + transform: scale(0.5, 0.5); + } } > .c-block__img { transform-origin: 0 100%; @at-root .state-0 & { + @include img-in; + } + + @at-root .state-1 & { @include img-out; transform: translate(66.6%, 0) scale(1.3); } - @at-root .state-1 & { - transform: translate(66.6%, 66.6%) scale(2); - } - @at-root .state-2 & { - @include img-in; + transform: translate(66.6%, 66.6%) scale(2); } } } -.c-block--5 { +.c-block--8 { &::before { transform-origin: 100% 100%; @@ -201,7 +289,40 @@ $transition-img-out: opacity $duration $delay ease-out, transform $duration; } } } -// -// -// + +.c-block--9 { + &::before { + transform-origin: 100% 100%; + + @at-root .state-0 & { + transform: scale(1, 1); + } + + @at-root .state-1 & { + transform: scale(0.375, 1); + } + + @at-root .state-2 & { + transform: scale(0.375, 0.375); + } + } + + > .c-block__img { + transform-origin: 0 100%; + + @at-root .state-0 & { + @include img-in; + } + + @at-root .state-1 & { + @include img-out; + transform: translate(66.6%, 0) scale(1.3); + } + + @at-root .state-2 & { + transform: translate(66.6%, 66.6%) scale(2); + } + } +} + // vim:set filetype=scss: diff --git a/src/css/imports/hero.scss b/src/css/imports/hero.scss index 392b654..ebcba0e 100644 --- a/src/css/imports/hero.scss +++ b/src/css/imports/hero.scss @@ -50,31 +50,173 @@ } } +.hero-title, +.hero-sub-title { + color: #fff; +} + .hero-title { margin-bottom: 1.25rem; + + @media (max-width: $bp-hero) { + font-size: 1.4em; + } +} + +.hero-sub-title { + margin-bottom: 1.25rem; + + @media (max-width: $bp-hero) { + font-size: 1.2em; + } } .hero__body { - background-color: rgba(yellow, 0.2); } .hero__aside { - background-color: red; } .block-grid { display: grid; - grid-template-rows: 1fr 1fr 1fr; - grid-template-columns: 1fr 1fr 1fr; - .c-block-tr { - grid-column: 3/4; - grid-row: 1/3; + @media (max-width: $bp-hero) { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr; + grid-template-rows: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + + @media (max-width: $bp-hero) and (orientation: landscape) { + grid-template-columns: 1fr 1fr 1fr; + grid-template-rows: 1fr 1fr; + } } - .c-block-br { - grid-column: 2/4; - grid-row: 3/3; + @media (min-width: $bp-hero) { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + grid-template-rows: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr; + } +} + +.c-block { + outline: 1px dotted red; + opacity: 0.8; +} + +@media (max-width: $bp-hero) { + .hero-block-1 { + display: none; + } + + .hero-block-2 { + display: none; + } + + .hero-block-3 { + display: none; + } + + .hero-block-4 { + display: none; + } + + .hero-block-5 { + display: none; + } + + .hero-block-6 { + display: none; + } + + .hero-block-7 { + display: none; + } + + .hero-block-8 { + display: none; + } + + .hero-block-9 { + display: none; + } +} + +@media (max-width: $bp-hero) and (orientation: landscape) { + .hero-block-1 { + } + + .hero-block-2 { + } + + .hero-block-3 { + } + + .hero-block-4 { + } + + .hero-block-5 { + } + + .hero-block-6 { + } + + .hero-block-7, + .hero-block-8, + .hero-block-9 { + @media (max-width: $bp-hero) { + display: none; + } + } +} + +@media (min-width: $bp-hero) { + // row 1 + //////// + .hero-block-1 { + grid-column: 1/4; + grid-row: 1/4; + } + + .hero-block-2 { + grid-column: 4/7; + grid-row: 1/4; + } + + .hero-block-3 { + grid-column: 7/10; + grid-row: 1/4; + } + + // row 2 + //////// + .hero-block-4 { + grid-column: 1/4; + grid-row: 4/7; + } + + .hero-block-5 { + grid-column: 4/7; + grid-row: 4/7; + } + + .hero-block-6 { + grid-column: 7/10; + grid-row: 4/7; + } + + // row 3 + //////// + .hero-block-7 { + grid-column: 1/4; + grid-row: 7/10; + } + + .hero-block-8 { + grid-column: 4/7; + grid-row: 7/10; + } + + .hero-block-9 { + grid-column: 6/10; + grid-row: 6/10; } }