]> _ Git - cubist_cms-front.git/commitdiff
wip #2609
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 25 Feb 2019 14:51:21 +0000 (15:51 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 25 Feb 2019 14:51:21 +0000 (15:51 +0100)
17 files changed:
resources/config/cubist-front.php [new file with mode: 0644]
resources/config/googletagmanager.php [new file with mode: 0644]
resources/views/body/begin.blade.php [new file with mode: 0644]
resources/views/body/end.blade.php [new file with mode: 0644]
resources/views/head/head.blade.php [new file with mode: 0644]
resources/views/head/htmldeclaration.blade.php [new file with mode: 0644]
resources/views/head/link.blade.php [new file with mode: 0644]
resources/views/head/meta.blade.php [new file with mode: 0644]
src/FrontServiceProvider.php
src/config/cubist-front.php [deleted file]
src/config/googletagmanager.php [deleted file]
src/resources/views/body/begin.blade.php [deleted file]
src/resources/views/body/end.blade.php [deleted file]
src/resources/views/head/head.blade.php [deleted file]
src/resources/views/head/htmldeclaration.blade.php [deleted file]
src/resources/views/head/link.blade.php [deleted file]
src/resources/views/head/meta.blade.php [deleted file]

diff --git a/resources/config/cubist-front.php b/resources/config/cubist-front.php
new file mode 100644 (file)
index 0000000..a1b26e6
--- /dev/null
@@ -0,0 +1,2 @@
+<?php
+return [];
\ No newline at end of file
diff --git a/resources/config/googletagmanager.php b/resources/config/googletagmanager.php
new file mode 100644 (file)
index 0000000..3bead62
--- /dev/null
@@ -0,0 +1,27 @@
+<?php
+
+return [
+
+    /*
+     * The Google Tag Manager id, should be a code that looks something like "gtm-xxxx".
+     */
+    'id' => env('GOOGLE_TAGMANAGER_ID', ''),
+
+    /*
+     * Enable or disable script rendering. Useful for local development.
+     */
+    'enabled' => env('GOOGLE_TAGMANAGER_ID', '') != '',
+
+    /*
+     * If you want to use some macro's you 'll probably store them
+     * in a dedicated file. You can optionally define the path
+     * to that file here and we will load it for you.
+     */
+    'macroPath' => '',
+
+    /*
+     * The key under which data is saved to the session with flash.
+     */
+    'sessionKey' => '_googleTagManager',
+
+];
diff --git a/resources/views/body/begin.blade.php b/resources/views/body/begin.blade.php
new file mode 100644 (file)
index 0000000..37743c0
--- /dev/null
@@ -0,0 +1,2 @@
+@include('googletagmanager::body')
+@include('gtag::body')
\ No newline at end of file
diff --git a/resources/views/body/end.blade.php b/resources/views/body/end.blade.php
new file mode 100644 (file)
index 0000000..f73fc45
--- /dev/null
@@ -0,0 +1 @@
+@stack('scripts')
\ No newline at end of file
diff --git a/resources/views/head/head.blade.php b/resources/views/head/head.blade.php
new file mode 100644 (file)
index 0000000..52ef30c
--- /dev/null
@@ -0,0 +1,5 @@
+@include('cubist::head.meta')
+@include('cubist::head.link')
+@stack('stylesheets')
+@include('googletagmanager::head')
+@include('gtag::head')
\ No newline at end of file
diff --git a/resources/views/head/htmldeclaration.blade.php b/resources/views/head/htmldeclaration.blade.php
new file mode 100644 (file)
index 0000000..1428635
--- /dev/null
@@ -0,0 +1,2 @@
+<!doctype html>
+<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
\ No newline at end of file
diff --git a/resources/views/head/link.blade.php b/resources/views/head/link.blade.php
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/resources/views/head/meta.blade.php b/resources/views/head/meta.blade.php
new file mode 100644 (file)
index 0000000..23fa13a
--- /dev/null
@@ -0,0 +1,6 @@
+<title>{{$page->meta_title}}</title>
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<meta name="description" content="{{$page->meta_description}}">
+<meta name="robots" content="{{$page->robots=='1'?'index,follow':'noindex,nofollow'}}">
+@stack('head.meta')
\ No newline at end of file
index f90ce2bcfdbbf66e44daeb9090741c23039dd4db..e8285f9180a5cbbd6e5f9334b74294229b9414f2 100644 (file)
@@ -14,6 +14,8 @@ class FrontServiceProvider extends ServiceProvider
      */
     public function boot()
     {
+        $resourcesDir = __DIR__ . '/../resources';
+
         // LOAD THE VIEWS
         // - first the published/overwritten views (in case they have any changes)
         $customViewsFolder = resource_path('views/vendor/cubist/front');
@@ -22,12 +24,12 @@ class FrontServiceProvider extends ServiceProvider
             $this->loadViewsFrom($customViewsFolder, 'cubist');
         }
         // - then the stock views that come with the package, in case a published view might be missing
-        $this->loadViewsFrom(realpath(__DIR__ . '/resources/views'), 'cubist');
+        $this->loadViewsFrom(realpath($resourcesDir . '/views'), 'cubist');
 
         // publish config file
-        $this->publishes([__DIR__ . '/config/cubist-front.php' => config_path('cubist-front.php')], 'config');
-        $this->publishes([__DIR__ . '/config/googletagmanager.php' => config_path('googletagmanager.php')], 'config');
+        $this->publishes([$resourcesDir . '/config/cubist-front.php' => config_path('cubist-front.php')], 'config');
+        $this->publishes([$resourcesDir . '/config/googletagmanager.php' => config_path('googletagmanager.php')], 'config');
         // publish the views
-        $this->publishes([__DIR__ . '/resources/views' => resource_path('views/vendor/cubist/front')], 'views');
+        $this->publishes([$resourcesDir . '/views' => resource_path('views/vendor/cubist/front')], 'views');
     }
 }
\ No newline at end of file
diff --git a/src/config/cubist-front.php b/src/config/cubist-front.php
deleted file mode 100644 (file)
index a1b26e6..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-<?php
-return [];
\ No newline at end of file
diff --git a/src/config/googletagmanager.php b/src/config/googletagmanager.php
deleted file mode 100644 (file)
index 3bead62..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-return [
-
-    /*
-     * The Google Tag Manager id, should be a code that looks something like "gtm-xxxx".
-     */
-    'id' => env('GOOGLE_TAGMANAGER_ID', ''),
-
-    /*
-     * Enable or disable script rendering. Useful for local development.
-     */
-    'enabled' => env('GOOGLE_TAGMANAGER_ID', '') != '',
-
-    /*
-     * If you want to use some macro's you 'll probably store them
-     * in a dedicated file. You can optionally define the path
-     * to that file here and we will load it for you.
-     */
-    'macroPath' => '',
-
-    /*
-     * The key under which data is saved to the session with flash.
-     */
-    'sessionKey' => '_googleTagManager',
-
-];
diff --git a/src/resources/views/body/begin.blade.php b/src/resources/views/body/begin.blade.php
deleted file mode 100644 (file)
index 37743c0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-@include('googletagmanager::body')
-@include('gtag::body')
\ No newline at end of file
diff --git a/src/resources/views/body/end.blade.php b/src/resources/views/body/end.blade.php
deleted file mode 100644 (file)
index f73fc45..0000000
+++ /dev/null
@@ -1 +0,0 @@
-@stack('scripts')
\ No newline at end of file
diff --git a/src/resources/views/head/head.blade.php b/src/resources/views/head/head.blade.php
deleted file mode 100644 (file)
index 52ef30c..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-@include('cubist::head.meta')
-@include('cubist::head.link')
-@stack('stylesheets')
-@include('googletagmanager::head')
-@include('gtag::head')
\ No newline at end of file
diff --git a/src/resources/views/head/htmldeclaration.blade.php b/src/resources/views/head/htmldeclaration.blade.php
deleted file mode 100644 (file)
index 1428635..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-<!doctype html>
-<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
\ No newline at end of file
diff --git a/src/resources/views/head/link.blade.php b/src/resources/views/head/link.blade.php
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/src/resources/views/head/meta.blade.php b/src/resources/views/head/meta.blade.php
deleted file mode 100644 (file)
index 23fa13a..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<title>{{$page->meta_title}}</title>
-<meta charset="utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1">
-<meta name="description" content="{{$page->meta_description}}">
-<meta name="robots" content="{{$page->robots=='1'?'index,follow':'noindex,nofollow'}}">
-@stack('head.meta')
\ No newline at end of file