From 21701b499fe74e42eea384babfe7ae89ce08822a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedikt=20R=C3=B6tsch?= Date: Fri, 18 May 2018 00:38:34 +0200 Subject: [PATCH] feat(header): responsive and adaptive header --- src/components/hero.module.css | 12 ++++++------ src/components/navigation.module.css | 14 ++++++++++---- src/layouts/base.css | 3 ++- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/components/hero.module.css b/src/components/hero.module.css index bd79e4d..2fa4344 100644 --- a/src/components/hero.module.css +++ b/src/components/hero.module.css @@ -3,21 +3,21 @@ background: #000; color: #fff; text-align: center; - height: 30em; } .heroImage { - height: 100%; - width: auto; - margin: 0 auto; + height: 61.8vh; + max-height: 80vw; } .heroDetails { position: absolute; background: rgba(0, 0, 0, .7); - top: 60%; left: 50%; + bottom: 0; transform: translate(-50%, 0); + font-size: calc(0.4em + 1vw); + padding: 0 0.5em; } .heroHeadline { @@ -28,4 +28,4 @@ margin: 0; font-size: 1.125em; font-weight: bold; -} \ No newline at end of file +} diff --git a/src/components/navigation.module.css b/src/components/navigation.module.css index 275a2fa..0991da7 100644 --- a/src/components/navigation.module.css +++ b/src/components/navigation.module.css @@ -2,13 +2,19 @@ display: flex; justify-content: center; list-style: none; - padding: 1em; + padding: 0; + margin: 0; + height: 20vh; + max-height: 100px; font-size: 1.25em; } .navigationItem { + display: inline-flex; + align-items: center; margin: 0 1em; } - .navigationItem a { - color: currentColor; - } \ No newline at end of file + +.navigationItem a { + color: currentColor; +} diff --git a/src/layouts/base.css b/src/layouts/base.css index 1578470..9d34fd4 100644 --- a/src/layouts/base.css +++ b/src/layouts/base.css @@ -12,6 +12,7 @@ body { line-height: 1.65; color: #373F49; background: #eee; + margin: 0; } img { @@ -72,4 +73,4 @@ a { .list-inline li { display: inline-block; - } \ No newline at end of file + }