]> _ Git - physioassist-wordpress.git/commitdiff
Tidy up of header resizing. WIP #1912 @1.5
authorstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 5 Mar 2018 15:18:08 +0000 (15:18 +0000)
committerstephen@cubedesigners.com <stephen@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Mon, 5 Mar 2018 15:18:08 +0000 (15:18 +0000)
wp-content/themes/physioassist/resources/assets/styles/layouts/header.styl
wp-content/themes/physioassist/resources/views/layouts/app.blade.php
wp-content/themes/physioassist/resources/views/template-custom.blade.php [deleted file]
wp-content/themes/physioassist/resources/views/template-transparent-header.blade.php [new file with mode: 0644]

index b209bb29eeb26075be3c2a6295cba7a1933d44f7..b19883b987502143964253712e867a823dc05898 100644 (file)
@@ -1,11 +1,17 @@
+body.header-compact:not(.template-transparent-header)
+  padding-top: 65px
+
 header.site
   center()
   position: relative
   z-index: 10
   
-  // Mini header style
-  &.header-mini
+  // Mini header style - used for default template and also triggered
+  // on hero-content pages when .header-compact class is added upon scroll
+  .header-compact &
     position: fixed
+    top: 0
+    left: 0
     max-width: none
     width: 100%
     background-color: #003e65
@@ -48,7 +54,7 @@ header.site
 
   // Mini version of header - when this class is applied to a parent,
   // symbol should hide and logo text should scale down smoothly
-  .header-mini &
+  .header-compact header.site &
     max-width: 235px
     margin: 0 10px 15px 4px
     .logo-symbol
@@ -71,10 +77,9 @@ header.site
   &-text
     width: 77.97% // Proportional width of text from original full logo
 
-    // Override text colour when on home page
-    .home &
-      path, rect
-        fill: #fff
+    // Override text colour (previously only for home, now it's white in all uses)
+    path, rect
+      fill: #fff
 
 
 .navigation
index 12ab2533634d4f263dd6b64cb7189177c9443d80..6942b19ab91faf351101d400954e152e78f5743b 100644 (file)
@@ -1,7 +1,8 @@
 <!doctype html>
 <html @php(language_attributes())>
   @include('partials.head')
-  <body @php(body_class())>
+  {{-- When not using the hero image header template the compact header is set --}}
+  <body @php(body_class( is_page_template('views/template-transparent-header.blade.php') ? '' : 'header-compact' ))>
     @php(do_action('get_header'))
     @include('partials.header')
     <div class="wrap container" role="document">
diff --git a/wp-content/themes/physioassist/resources/views/template-custom.blade.php b/wp-content/themes/physioassist/resources/views/template-custom.blade.php
deleted file mode 100644 (file)
index 762a54a..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-{{--
-  Template Name: Custom Template
---}}
-
-@extends('layouts.app')
-
-@section('content')
-  @while(have_posts()) @php(the_post())
-    @include('partials.page-header')
-    @include('partials.content-page')
-  @endwhile
-@endsection
diff --git a/wp-content/themes/physioassist/resources/views/template-transparent-header.blade.php b/wp-content/themes/physioassist/resources/views/template-transparent-header.blade.php
new file mode 100644 (file)
index 0000000..1927350
--- /dev/null
@@ -0,0 +1,12 @@
+{{--
+  Template Name: Transparent Header
+--}}
+
+@extends('layouts.app')
+
+@section('content')
+  @while(have_posts()) @php(the_post())
+    @include('partials.page-header')
+    @include('partials.content-page')
+  @endwhile
+@endsection