From 5d22616050dc2745aafd8dbf2c5ef50ffaa742ba Mon Sep 17 00:00:00 2001 From: Maciej Matuszewski Date: Thu, 11 Jan 2018 19:36:53 +0100 Subject: [PATCH] Add styling for desktop --- src/hbs/partials/components/project.hbs | 58 +++++++++--------- src/styles/base/_settings.scss | 2 +- src/styles/components/_project.scss | 80 +++++++++++++++++++++++-- 3 files changed, 107 insertions(+), 33 deletions(-) diff --git a/src/hbs/partials/components/project.hbs b/src/hbs/partials/components/project.hbs index 08a4348..eb73948 100644 --- a/src/hbs/partials/components/project.hbs +++ b/src/hbs/partials/components/project.hbs @@ -1,39 +1,43 @@
- {{> components/heading - text=project.header - class="project__header" - }} +
-
-
-
{{ project.subheader }}
+ {{> components/heading + text=project.header + class="project__header" + }} + +
+
+
{{ project.subheader }}
+ + {{#each project.content as |paragraph|}} +

{{ paragraph }}

+ {{/each}} + + {{> components/button + class="project__button" + backgroundColor="#ff5301" + label=project.button.label + icon=(svg project.button.icon) + }} +
+ +
+ {{#each project.images as |imageSrc|}} + + {{/each}} +
- {{#each project.content as |paragraph|}} -

{{ paragraph }}

- {{/each}} - {{> components/button - class="project__button" - backgroundColor="#ff5301" - label=project.button.label - icon=(svg project.button.icon) - }}
-
- {{#each project.images as |imageSrc|}} - - {{/each}} +
{{ project.counterText }}
+ + + {{ project.nextSectionLink }}
- -
- -
{{ project.counterText }}
- -
- {{ project.nextSectionLink }}
diff --git a/src/styles/base/_settings.scss b/src/styles/base/_settings.scss index ac4b17b..2fb2005 100644 --- a/src/styles/base/_settings.scss +++ b/src/styles/base/_settings.scss @@ -23,7 +23,7 @@ $screen-lg: 'only screen and (min-width: #{$lg})'; $screen-xlg: 'only screen and (min-width: #{$xlg})'; $screen-only-xs: 'only screen and (max-width: #{$xs - 1})'; -$screen-only-sm: 'only screen and (min-width: #{$xs}) and (max-width: #{$md - 1})'; +$screen-only-sm: 'only screen and (min-width: #{$sm}) and (max-width: #{$md - 1})'; $screen-only-md: 'only screen and (min-width: #{$md}) and (max-width: #{$lg - 1})'; $screen-only-lg: 'only screen and (min-width: #{$lg})'; diff --git a/src/styles/components/_project.scss b/src/styles/components/_project.scss index 57aec47..c336035 100644 --- a/src/styles/components/_project.scss +++ b/src/styles/components/_project.scss @@ -1,14 +1,31 @@ .project { position: relative; + min-height: calc(100vh - #{$header-height--desktop}); padding: 25px; color: $color-white; background-color: $color-orange; + &__container { + @media #{$screen-md} { + @include container; + + display: flex; + align-items: center; + flex-direction: column; + justify-content: center; + } + + @media #{$screen-xlg} { + position: relative; + } + } + &__header { @media #{$screen-md} { position: absolute; bottom: 100px; left: 40px; + z-index: 2; } } @@ -26,11 +43,15 @@ padding-right: 0; padding-left: 50px; } + + @media #{$screen-lg} { + font-size: 24px; + } } &__content, &__images { - @media #{$screen-sm} { + @media #{$screen-only-sm} { width: 50%; } } @@ -50,6 +71,8 @@ } @media #{$screen-md} { + flex-direction: column-reverse; + justify-content: center; width: 40%; margin-top: 0; } @@ -73,6 +96,32 @@ margin-left: 10px; } } + + @media #{$screen-md} { + max-width: initial; + + &--0 { + position: relative; + z-index: 1; + width: 50%; + margin: 0; + margin-top: -35%; + margin-left: -40%; + } + + &--1 { + position: relative; + width: 60%; + margin: 0; + margin-top: -25%; + margin-left: 50%; + } + + &--2 { + width: 70%; + margin: 0; + } + } } &__button { @@ -80,8 +129,9 @@ @media #{$screen-md} { position: absolute; - top: 55%; - left: 20%; + top: 50%; + left: 15%; + z-index: 2; } } @@ -103,6 +153,10 @@ bottom: 20px; transform-origin: right center; } + + @media #{$screen-xlg} { + right: -20px; + } } &__link { @@ -110,6 +164,16 @@ margin-top: 20px; font-size: 12px; text-transform: uppercase; + + @media #{$screen-md} { + position: absolute; + bottom: 30px; + left: 50px; + } + + @media #{$screen-xlg} { + bottom: -40px; + } } &__wrapper { @@ -123,10 +187,16 @@ } @media #{$screen-md} { - padding: 50px; + padding: 50px 0; } @media #{$screen-lg} { - padding: 80px; + // padding: 80px; + } + + @media #{$screen-xlg} { + display: flex; + align-items: center; + justify-content: center; } }