Browse Source

Navigation bar.

pull/3/head
Ned Zimmerman 7 years ago
parent
commit
9b0849f99b
No known key found for this signature in database
GPG Key ID: FF56334A013120CA
  1. 9
      dist/assets.json
  2. 0
      dist/images/banner-desktop_bcd1d61f.jpg
  3. BIN
      dist/images/banner-mobile_f655d839.jpg
  4. 0
      dist/scripts/customizer_66c3aaba.js
  5. 0
      dist/scripts/main_66c3aaba.js
  6. 2
      dist/styles/main_66c3aaba.css
  7. 0
      resources/assets/images/banner-desktop.jpg
  8. BIN
      resources/assets/images/banner-mobile.jpg
  9. 131
      resources/assets/styles/layouts/_header.scss
  10. 26
      resources/assets/styles/layouts/_pages.scss
  11. 13
      resources/views/partials/header.blade.php

9
dist/assets.json vendored

@ -1,5 +1,6 @@
{
"images/banner-one.jpg": "images/banner-one_bcd1d61f.jpg",
"images/banner-desktop.jpg": "images/banner-desktop_bcd1d61f.jpg",
"images/banner-mobile.jpg": "images/banner-mobile_f655d839.jpg",
"images/banner-two.jpg": "images/banner-two_a620635c.jpg",
"images/logo.png": "images/logo_10675684.png",
"images/logo@2x.png": "images/logo@2x_7d05144c.png",
@ -9,7 +10,7 @@
"vendor/fontawesome-webfont.ttf?v=4.7.0": "vendor/fontawesome-webfont_b06871f2.ttf",
"vendor/fontawesome-webfont.woff2?v=4.7.0": "vendor/fontawesome-webfont_af7ae505.woff2",
"vendor/fontawesome-webfont.woff?v=4.7.0": "vendor/fontawesome-webfont_fee66e71.woff",
"scripts/customizer.js": "scripts/customizer_1001ca05.js",
"styles/main.css": "styles/main_1001ca05.css",
"scripts/main.js": "scripts/main_1001ca05.js"
"scripts/customizer.js": "scripts/customizer_66c3aaba.js",
"styles/main.css": "styles/main_66c3aaba.css",
"scripts/main.js": "scripts/main_66c3aaba.js"
}

0
dist/images/banner-one_bcd1d61f.jpg → dist/images/banner-desktop_bcd1d61f.jpg vendored

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 111 KiB

BIN
dist/images/banner-mobile_f655d839.jpg vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

0
dist/scripts/customizer_1001ca05.js → dist/scripts/customizer_66c3aaba.js vendored

0
dist/scripts/main_1001ca05.js → dist/scripts/main_66c3aaba.js vendored

2
dist/styles/main_1001ca05.css → dist/styles/main_66c3aaba.css vendored

File diff suppressed because one or more lines are too long

0
resources/assets/images/banner-one.jpg → resources/assets/images/banner-desktop.jpg

Before

Width:  |  Height:  |  Size: 568 KiB

After

Width:  |  Height:  |  Size: 568 KiB

BIN
resources/assets/images/banner-mobile.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

131
resources/assets/styles/layouts/_header.scss

@ -1,6 +1,8 @@
.banner {
background: url('../images/banner-one.jpg');
background: url('../images/banner-mobile.jpg');
background-size: cover;
background-repeat: no-repeat;
background-position: bottom center;
.container {
display: flex;
@ -8,7 +10,7 @@
justify-content: space-between;
align-items: center;
width: 100%;
max-width: 1435px;
max-width: 1440px;
height: 560px;
}
@ -61,13 +63,29 @@
}
}
.brand {
display: block;
width: 109px;
height: 17px;
margin: 30px 0 0 17px;
align-self: flex-start;
background-image: url('../images/logo.png');
background-size: 109px 17px;
text-indent: -9999em;
}
.primary-navigation {
position: absolute;
display: flex;
flex-direction: column;
align-items: flex-start;
top: 0;
width: 100%;
margin-top: 30px;
height: 560px;
margin: 0 0 0 -100%;
padding: 0 17px;
background: transparent;
transition: background 0.5s;
a {
font-family: Karla, sans-serif;
@ -77,26 +95,17 @@
line-height: 80px;
text-decoration: none;
display: none;
}
&.brand {
display: block;
width: 109px;
height: 17px;
align-self: flex-start;
background-image: url('../images/logo.png');
background-size: 109px 17px;
text-indent: -9999em;
}
.sep {
display: none;
}
&.is-visible {
position: absolute;
z-index: 1;
background: $brand-primary;
justify-content: center;
height: 560px;
top: 0;
margin-top: 0;
margin: 0;
padding: 0 52px;
a {
@ -137,33 +146,79 @@
}
@media (min-width: $medium) {
.banner nav {
width: auto;
display: flex;
.banner {
background-image: url('../images/banner-desktop.jpg');
a {
font-size: 18px;
.container {
margin: 0 auto;
height: 880px;
}
}
.banner .catalog-navigation {
justify-content: flex-start;
}
.toggle-menu {
display: none;
}
.banner .meta-navigation {
justify-content: flex-end;
}
.brand {
align-self: center;
margin-top: 40px;
width: 247px;
height: 38px;
background-size: 247px 38px;
}
.banner h1 {
font-size: 72px;
letter-spacing: 1.8px;
line-height: 40px;
margin-bottom: 0.5em;
}
.primary-navigation {
position: absolute;
width: 100%;
max-width: 1440px;
height: 38px;
top: 40px;
margin: 0;
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: center;
a {
font-size: 18px;
display: inline-block;
line-height: normal;
color: $black;
&:hover,
&:focus {
color: $brand-primary;
}
&.catalog {
margin-right: auto;
}
.banner h2 {
font-size: 30px;
letter-spacing: 0.75px;
line-height: 40px;
&.contact {
margin: 0 1em 0 auto;
}
}
.sep {
display: inline-block;
margin: 0 0.5em;
}
}
.branding {
height: 576px;
}
h1 {
font-size: 72px;
letter-spacing: 1.8px;
line-height: 40px;
margin-bottom: 0.5em;
}
h2 {
font-size: 30px;
letter-spacing: 0.75px;
line-height: 40px;
}
}
}

26
resources/assets/styles/layouts/_pages.scss

@ -18,10 +18,12 @@
margin: 0;
&::before {
content: "";
display: block;
margin: 0 auto 1em;
width: 46px;
height: 5px;
color: $brand-primary;
background-color: $brand-secondary;
}
}
@ -41,6 +43,15 @@
flex-direction: column;
}
.block.two {
color: $white;
background: $brand-secondary;
h3::before {
background-color: $white;
}
}
.block.one,
.block.two,
.block.three,
@ -52,6 +63,10 @@
@media (min-width: $medium) {
.home {
.wrap {
margin-top: -366px;
}
.block {
width: 775px;
margin-bottom: 119px;
@ -60,6 +75,10 @@
h3 {
font-size: 48px;
line-height: 56px;
&::before {
width: 74px;
}
}
p {
@ -105,11 +124,6 @@
}
}
.block.two {
color: $white;
background: $brand-secondary;
}
.block.three {
width: 100%;
}

13
resources/views/partials/header.blade.php

@ -1,12 +1,15 @@
<header class="banner">
<div class="container">
<a class="toggle-menu" href="#primary-navigation">Toggle menu<span class="icon"></span></a>
<a class="brand" href="{{ home_url('/') }}">{{ get_bloginfo('name', 'display') }}</a>
<nav id="primary-navigation" class="primary-navigation">
<a class="brand" href="{{ home_url('/') }}">{{ get_bloginfo('name', 'display') }}</a>
<a href="{{ home_url('/catalog') }}">Catalog</a>
<a href="#contact">Contact</a>
<a href="{{ wp_login_url() }}">{{ __('Sign in') }}</a>
<a href="{{ network_home_url('/wp-signup.php') }}">{{ __('Sign up') }}</a>
<a class="catalog" href="{{ home_url('/catalog') }}">Catalog</a>
<a class="contact" href="#contact">Contact</a>
@if(!is_user_logged_in())
<a class="signin" href="{{ wp_login_url() }}">{{ __('Sign in', 'pressbooks-aldine') }}</a>
<span class="sep">/</span>
@endif
<a class="signup" href="{{ network_home_url('/wp-signup.php') }}">{{ __('Sign up', 'pressbooks-aldine') }}</a>
</nav>
<div class="branding">
<h1><a href="{{ home_url('/') }}">{{ get_bloginfo('name', 'display') }}</a></h1>

Loading…
Cancel
Save