From: Vincent Vanwaelscappel Date: Mon, 25 Feb 2019 14:51:21 +0000 (+0100) Subject: wip #2609 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=9d0ea124867c2a272cc39733640c82b2fbb37f1e;p=cubist_cms-front.git wip #2609 --- diff --git a/resources/config/cubist-front.php b/resources/config/cubist-front.php new file mode 100644 index 0000000..a1b26e6 --- /dev/null +++ b/resources/config/cubist-front.php @@ -0,0 +1,2 @@ + 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 index 0000000..37743c0 --- /dev/null +++ b/resources/views/body/begin.blade.php @@ -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 index 0000000..f73fc45 --- /dev/null +++ b/resources/views/body/end.blade.php @@ -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 index 0000000..52ef30c --- /dev/null +++ b/resources/views/head/head.blade.php @@ -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 index 0000000..1428635 --- /dev/null +++ b/resources/views/head/htmldeclaration.blade.php @@ -0,0 +1,2 @@ + + \ 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 index 0000000..e69de29 diff --git a/resources/views/head/meta.blade.php b/resources/views/head/meta.blade.php new file mode 100644 index 0000000..23fa13a --- /dev/null +++ b/resources/views/head/meta.blade.php @@ -0,0 +1,6 @@ +{{$page->meta_title}} + + + + +@stack('head.meta') \ No newline at end of file diff --git a/src/FrontServiceProvider.php b/src/FrontServiceProvider.php index f90ce2b..e8285f9 100644 --- a/src/FrontServiceProvider.php +++ b/src/FrontServiceProvider.php @@ -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 index a1b26e6..0000000 --- a/src/config/cubist-front.php +++ /dev/null @@ -1,2 +0,0 @@ - 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 index 37743c0..0000000 --- a/src/resources/views/body/begin.blade.php +++ /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 index f73fc45..0000000 --- a/src/resources/views/body/end.blade.php +++ /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 index 52ef30c..0000000 --- a/src/resources/views/head/head.blade.php +++ /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 index 1428635..0000000 --- a/src/resources/views/head/htmldeclaration.blade.php +++ /dev/null @@ -1,2 +0,0 @@ - - \ 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 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 index 23fa13a..0000000 --- a/src/resources/views/head/meta.blade.php +++ /dev/null @@ -1,6 +0,0 @@ -{{$page->meta_title}} - - - - -@stack('head.meta') \ No newline at end of file