]> _ Git - ccv-wordpress.git/commitdiff
Fix #3532 @5
authorStephen Cameron <stephen@cubedesigners.com>
Mon, 30 Mar 2020 15:59:32 +0000 (17:59 +0200)
committerStephen Cameron <stephen@cubedesigners.com>
Mon, 30 Mar 2020 15:59:32 +0000 (17:59 +0200)
wp-content/themes/CCV/index.php
wp-content/themes/CCV/resources/views/layouts/app.blade.php
wp-content/themes/CCV/resources/views/partials/head.blade.php [deleted file]

index 68725fec297e0e42b650d6c2154671866ae62089..bf7ac5a18c787c93609c89816e598edeb230e749 100644 (file)
@@ -1,7 +1,24 @@
-<?php
+<!doctype html>
+<html <?php language_attributes(); ?>>
+<head>
+    <meta charset="utf-8">
+    <meta http-equiv="x-ua-compatible" content="ie=edge">
+    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
 
-use function Roots\app;
-use function Roots\view;
+    <?php wp_head(); ?>
 
-/** Loads the template hierarchy view file */
-echo view(app('sage.view'), app('sage.data'));
+    <link href="https://fonts.googleapis.com/css?family=Dosis:500|Roboto+Condensed:300,400,700&display=swap" rel="stylesheet">
+</head>
+
+<body <?php body_class('font-body font-light text-dark'); ?>>
+<?php wp_body_open(); ?>
+<?php do_action('get_header'); ?>
+
+<div id="app">
+    <?php echo \Roots\view(\Roots\app('sage.view'), \Roots\app('sage.data'))->render(); ?>
+</div>
+
+<?php do_action('get_footer'); ?>
+<?php wp_footer(); ?>
+</body>
+</html>
index a853f96b303301bd6ef71fc074edf1b559610cc9..ebffaaf1c9e61dacd7fa383df7af2cec72777b81 100644 (file)
@@ -1,30 +1,25 @@
-<!doctype html>
-<html {!! get_language_attributes() !!}>
-  @include('partials.head')
+{{-- See theme root index.php for main wrapper HTML --}}
+{{--
+  Wrapper was moved to index in order to resolve a problem with scripts
+  not enqueuing sometimes.  Manual merge of some changes here:
+  https://github.com/roots/sage/commit/4a7ff33d85048634d37e95d7e472f8bb264e812d
+--}}
 
-  <body @php(body_class('font-body font-light text-dark'))>
+@include('partials.header')
 
-    <div class="wrapper flex flex-col min-h-screen">
-      @php(wp_body_open())
-      @php(do_action('get_header'))
-      @include('partials.header')
+<div class="wrapper flex flex-col min-h-screen">
+  <main class="flex-grow min-h-full bg-white">
+    @yield('content')
+  </main>
 
-      <main class="flex-grow min-h-full bg-white">
-        @yield('content')
-      </main>
+  {{--
+  @hasSection('sidebar')
+    <aside class="sidebar">
+      @yield('sidebar')
+    </aside>
+  @endif
+  --}}
 
-      {{--
-      @hasSection('sidebar')
-        <aside>
-          @yield('sidebar')
-        </aside>
-      @endif
-      --}}
+</div>
 
-      @php(do_action('get_footer'))
-      @include('partials.footer')
-
-      @php(wp_footer())
-    </div>
-  </body>
-</html>
+@include('partials.footer')
diff --git a/wp-content/themes/CCV/resources/views/partials/head.blade.php b/wp-content/themes/CCV/resources/views/partials/head.blade.php
deleted file mode 100644 (file)
index 8e016ac..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<head>
-  <meta charset="utf-8">
-  <meta http-equiv="x-ua-compatible" content="ie=edge">
-  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
-
-  @php(wp_head())
-
-  <link href="https://fonts.googleapis.com/css?family=Dosis:500|Roboto+Condensed:300,400,700&display=swap" rel="stylesheet">
-</head>