Browse Source

Add custom header image and stub contact form partial.

pull/11/head
Ned Zimmerman 7 years ago
parent
commit
eb2dc5eca3
No known key found for this signature in database
GPG Key ID: FF56334A013120CA
  1. 20
      app/setup.php
  2. BIN
      resources/assets/images/banner-desktop.jpg
  3. BIN
      resources/assets/images/banner-mobile.jpg
  4. BIN
      resources/assets/images/banner-two.jpg
  5. BIN
      resources/assets/images/header.jpg
  6. BIN
      resources/assets/images/pb.png
  7. BIN
      resources/assets/images/pb@2x.png
  8. 10
      resources/assets/styles/layouts/_header.scss
  9. 3
      resources/views/front-page.blade.php
  10. 0
      resources/views/partials/front-page-contact-form.blade.php
  11. 2
      resources/views/partials/header.blade.php

20
app/setup.php

@ -72,6 +72,26 @@ add_action('after_setup_theme', function () {
'network-footer-menu' => __('Network Footer Menu', 'aldine')
]);
/**
* Custom Header
*/
add_theme_support('custom-header', [
'default-image' => asset_path('images/header.jpg'),
'width' => 1650,
'height' => 880,
// 'default-text-color' => '',
// 'header-text' => true,
// 'uploads' => true,
// 'wp-head-callback' => '',
// 'admin-head-callback' => '',
// 'admin-preview-callback' => '',
]);
/**
* Custom Logo
*/
add_theme_support('custom-logo');
/**
* Enable post thumbnails
* @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 MiB

BIN
resources/assets/images/header.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 KiB

BIN
resources/assets/images/pb.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 813 B

BIN
resources/assets/images/pb@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

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

@ -1,6 +1,4 @@
.banner {
background-image: url('../images/banner-mobile.jpg');
.container {
height: 560px;
max-width: 1440px;
@ -56,7 +54,7 @@
width: 109px;
height: 17px;
margin: 30px 0 0 17px;
background-image: url('../images/logo.png');
background-image: url('../images/logo.png'); // TODO
background-size: 109px 17px;
}
@ -105,14 +103,12 @@
}
}
.page .banner .branding {
.page:not(.home) .banner .branding {
display: none;
}
@media #{$breakpoint-large} {
.banner {
background-image: url('../images/banner-desktop.jpg');
.container {
height: 880px;
margin: 0 auto;
@ -122,7 +118,7 @@
width: 265px;
height: 40px;
margin-top: 40px;
background-image: url('../images/logo@2x.png');
background-image: url('../images/logo@2x.png'); // TODO
background-size: 265px 40px;
}

3
resources/views/front-page.blade.php

@ -21,5 +21,8 @@
@if(get_option('pb_front_page_catalog'))
@include('partials.front-page-catalog')
@endif
@if(get_option('pb_front_page_contact_form'))
@include('partials.front-page-contact-form')
@endif
</section>
@endsection

0
resources/views/partials/front-page-contact-form.blade.php

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

@ -1,4 +1,4 @@
<section class="banner bg-bottom cover">
<section class="banner bg-bottom cover" style="background-image: url(@php(header_image()));">
<div class="container flex flex-column justify-between items-center w-100 mw-100">
<a class="toggle-menu db dn-l absolute" href="#primary-navigation">{{ __('Toggle menu', 'aldine') }}<span class="icon db absolute"></span></a>
<a class="brand db self-start self-center-l" href="{{ home_url('/') }}"><span class="clip>"{{ get_bloginfo('name', 'display') }}</a></a>

Loading…
Cancel
Save