diff --git a/assets/stylesheets/global/header.css b/assets/stylesheets/global/header.css index 4f7132f..44aa08c 100644 --- a/assets/stylesheets/global/header.css +++ b/assets/stylesheets/global/header.css @@ -8,7 +8,7 @@ @element upper-wrapper { background: var(--color-palette-blue-dark); padding: calc(var(--grid-gutter) / 2) 0; - color: var(--color-text-dark-bg); + color: var(--color-header-upper-text-secondary); } @element upper { @@ -24,6 +24,42 @@ } } + @element upper-first { + display: flex; + + @media (--breakpoint-desktop) { + & div + div { + margin-left: var(--grid-gutter); + } + } + } + + @element upper-second { + display: flex; + + @media (--breakpoint-desktop) { + & div + div { + margin-left: var(--grid-gutter); + } + } + } + + @element upper-link { + display: inline-flex; + align-items: center; + } + + @element upper-copy { + display: inline-flex; + } + + @element upper-icon { + display: inline-block; + width: 20px; + height: 20px; + margin-right: calc(var(--grid-gutter) / 4); + } + @element lower-wrapper { } @@ -41,6 +77,7 @@ font-family: var(--font-regular); letter-spacing: 3px; text-transform: uppercase; + color: var(--color-header-upper-text-primary); & img { display: inline-block; @@ -71,6 +108,7 @@ flex: 0 0 100%; flex-direction: column; justify-content: space-around; + color: var(--color-header-upper-text-primary); @media (--breakpoint-desktop) { flex: 0 0 auto; diff --git a/assets/stylesheets/layout/layout-centered.css b/assets/stylesheets/layout/layout-centered.css index 9aef39b..325c844 100644 --- a/assets/stylesheets/layout/layout-centered.css +++ b/assets/stylesheets/layout/layout-centered.css @@ -1,4 +1,5 @@ @block layout-centered { + box-sizing: border-box; width: 100%; max-width: var(--content-max-width); margin: 0 auto; @@ -6,6 +7,7 @@ } @block layout-centered-small { + box-sizing: border-box; width: 100%; max-width: calc(var(--content-max-width) - 360px); margin: 0 auto; diff --git a/assets/stylesheets/variables.css b/assets/stylesheets/variables.css index 706bd17..b0098b8 100644 --- a/assets/stylesheets/variables.css +++ b/assets/stylesheets/variables.css @@ -44,6 +44,9 @@ --color-input-bg: #fff; --color-input-border: #d3dce0; + --color-header-upper-text-primary: #fff; + --color-header-upper-text-secondary: #abc6e5; + --layout-sidebar-sidebar-width: 228px; --layout-sidebar-content-width: 732px; diff --git a/public/images/icon-github.svg b/public/images/icon-github.svg new file mode 100644 index 0000000..8b1c000 --- /dev/null +++ b/public/images/icon-github.svg @@ -0,0 +1,3 @@ + + + diff --git a/public/stylesheets/style.css b/public/stylesheets/style.css index 06954bb..b897eab 100644 --- a/public/stylesheets/style.css +++ b/public/stylesheets/style.css @@ -828,6 +828,8 @@ input[type="reset"]:focus, } .layout-centered { + -webkit-box-sizing: border-box; + box-sizing: border-box; width: 100%; max-width: 980px; margin: 0 auto; @@ -835,6 +837,8 @@ input[type="reset"]:focus, } .layout-centered-small { + -webkit-box-sizing: border-box; + box-sizing: border-box; width: 100%; max-width: 620px; margin: 0 auto; @@ -948,7 +952,7 @@ display: flex; .header__upper-wrapper { background: #3072be; padding: 11px 0; - color: #fff; + color: #abc6e5; } .header__upper { @@ -976,6 +980,54 @@ display: flex; } } +.header__upper-first { + display: -webkit-box; + display: -ms-flexbox; + display: flex; +} + +@media (min-width: 700px) { + + .header__upper-first div + div { + margin-left: 22px; + } +} + +.header__upper-second { + display: -webkit-box; + display: -ms-flexbox; + display: flex; +} + +@media (min-width: 700px) { + + .header__upper-second div + div { + margin-left: 22px; + } +} + +.header__upper-link { + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: inline-flex; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + +.header__upper-copy { + display: -webkit-inline-box; + display: -ms-inline-flexbox; + display: inline-flex; +} + +.header__upper-icon { + display: inline-block; + width: 20px; + height: 20px; + margin-right: 5.5px; +} + .header__lower-wrapper {} .header__lower { @@ -1001,6 +1053,7 @@ display: flex; font-family: 'roboto', Helvetica, sans-serif; letter-spacing: 3px; text-transform: uppercase; + color: #fff; } .header__title img { @@ -1050,6 +1103,7 @@ display: flex; flex-direction: column; -ms-flex-pack: distribute; justify-content: space-around; + color: #fff; } @media (min-width: 700px) { diff --git a/views/layout.pug b/views/layout.pug index 2abd03c..4db8c2c 100644 --- a/views/layout.pug +++ b/views/layout.pug @@ -9,22 +9,30 @@ html header.header .header__upper-wrapper .header__upper.layout-centered - .header__title - img(src='/images/icon-info.svg') - span Example Application - div Malin is still thinking about this part - .header__controls - form(action="" method="get") - .group - label(for='api') API type: - select(name='api' onChange='this.form.submit()') - option(value='cda' selected=query.api === 'cda') Delivery API - option(value='cpa' selected=query.api === 'cpa') Preview API - .group - label(for='locale') Locale: - select(name='locale' onChange='this.form.submit()') - option(value='en-US' selected=query.locale === 'en-US') English - option(value='de-DE' selected=query.locale === 'de-DE') German + .header__upper-first + .header__title + img(src='/images/icon-info.svg') + span Example Application + .header__upper-copy + a(href='#todo' target='_blank' rel='noopener') What is this? + .header__upper-second + .header__upper-copy + a.header__upper-link(href='https://github.com/contentful/example-contentful-university-js' target='_blank' rel='noopener') + img.header__upper-icon(src='/images/icon-github.svg') + | View on Github + + .header__controls + form(action="" method="get") + .group + label(for='api') API type: + select(name='api' onChange='this.form.submit()') + option(value='cda' selected=query.api === 'cda') Delivery API + option(value='cpa' selected=query.api === 'cpa') Preview API + .group + label(for='locale') Locale: + select(name='locale' onChange='this.form.submit()') + option(value='en-US' selected=query.locale === 'en-US') English + option(value='de-DE' selected=query.locale === 'de-DE') German .header__lower-wrapper .header__lower.layout-centered .header__logo @@ -69,13 +77,13 @@ html img.footer__disclaimer-logo(src='/images/contentful-logo.svg') p.footer__disclaimer-text | This website and the materials found on it are for demo purposes using Contentful. You can use this to preview the content created on your Contentful account.  - a(href='#todo') View on Github + a(href='https://github.com/contentful/example-contentful-university-js' target='_blank' rel='noopener') View on Github | . .footer__social p - a(href='https://www.facebook.com/contentful/' target='_blank') + a(href='https://www.facebook.com/contentful/' target='_blank' rel='noopener') img(src='/images/icon-facebook.svg' alt='Our Facebook profile') - a(href='https://twitter.com/contentful' target='_blank') + a(href='https://twitter.com/contentful' target='_blank' rel='noopener') img(src='/images/icon-twitter.svg' alt='Our Twitter profile') script(src='/scripts/highlight.pack.js') script hljs.initHighlightingOnLoad();