From fed2471e49d5152001e685d34a5eb13b1aefe450 Mon Sep 17 00:00:00 2001 From: stol Date: Mon, 12 Nov 2018 15:43:24 +0200 Subject: [PATCH] move required theme files to theme root folder to fix autoupdater issues: https://github.com/roots/sage-installer/issues/3#issuecomment-337852956 --- config/view.php | 4 ++-- resources/functions.php => functions.php | 20 +++++++++--------- resources/index.php => index.php | 0 resources/screenshot.png => screenshot.png | Bin resources/style.css => style.css | 0 {resources/views => views}/404.blade.php | 0 {resources/views => views}/index.blade.php | 0 .../views => views}/layouts/app.blade.php | 0 {resources/views => views}/page.blade.php | 0 .../partials/comments.blade.php | 0 .../partials/content-page.blade.php | 0 .../partials/content-search.blade.php | 0 .../partials/content-single.blade.php | 0 .../partials/content.blade.php | 0 .../partials/entry-meta.blade.php | 0 .../views => views}/partials/footer.blade.php | 0 .../views => views}/partials/head.blade.php | 0 .../views => views}/partials/header.blade.php | 0 .../partials/page-header.blade.php | 0 .../partials/sidebar.blade.php | 0 {resources/views => views}/search.blade.php | 0 {resources/views => views}/single.blade.php | 0 .../views => views}/template-custom.blade.php | 0 23 files changed, 12 insertions(+), 12 deletions(-) rename resources/functions.php => functions.php (86%) rename resources/index.php => index.php (100%) rename resources/screenshot.png => screenshot.png (100%) rename resources/style.css => style.css (100%) rename {resources/views => views}/404.blade.php (100%) rename {resources/views => views}/index.blade.php (100%) rename {resources/views => views}/layouts/app.blade.php (100%) rename {resources/views => views}/page.blade.php (100%) rename {resources/views => views}/partials/comments.blade.php (100%) rename {resources/views => views}/partials/content-page.blade.php (100%) rename {resources/views => views}/partials/content-search.blade.php (100%) rename {resources/views => views}/partials/content-single.blade.php (100%) rename {resources/views => views}/partials/content.blade.php (100%) rename {resources/views => views}/partials/entry-meta.blade.php (100%) rename {resources/views => views}/partials/footer.blade.php (100%) rename {resources/views => views}/partials/head.blade.php (100%) rename {resources/views => views}/partials/header.blade.php (100%) rename {resources/views => views}/partials/page-header.blade.php (100%) rename {resources/views => views}/partials/sidebar.blade.php (100%) rename {resources/views => views}/search.blade.php (100%) rename {resources/views => views}/single.blade.php (100%) rename {resources/views => views}/template-custom.blade.php (100%) diff --git a/config/view.php b/config/view.php index c00d1b04ca..a01b0dc48d 100644 --- a/config/view.php +++ b/config/view.php @@ -13,8 +13,8 @@ */ 'paths' => [ - get_theme_file_path().'/resources/views', - get_parent_theme_file_path().'/resources/views', + get_theme_file_path().'/views', + get_parent_theme_file_path().'/views', ], diff --git a/resources/functions.php b/functions.php similarity index 86% rename from resources/functions.php rename to functions.php index 53b094fdd6..8a8a37b339 100644 --- a/resources/functions.php +++ b/functions.php @@ -38,7 +38,7 @@ * Ensure dependencies are loaded */ if (!class_exists('Roots\\Sage\\Container')) { - if (!file_exists($composer = __DIR__.'/../vendor/autoload.php')) { + if (!file_exists($composer = __DIR__.'/vendor/autoload.php')) { $sage_error( __('You must run composer install from the Sage directory.', 'sage'), __('Autoloader not found.', 'sage') @@ -54,7 +54,7 @@ * Add or remove files to the array as needed. Supports child theme overrides. */ array_map(function ($file) use ($sage_error) { - $file = "../app/{$file}.php"; + $file = "./app/{$file}.php"; if (!locate_template($file, true, true)) { $sage_error(sprintf(__('Error locating %s for inclusion.', 'sage'), $file), 'File not found'); } @@ -77,16 +77,16 @@ * ├── STYLESHEETPATH -> /srv/www/example.com/current/web/app/themes/sage/resources/views * └── TEMPLATEPATH -> /srv/www/example.com/current/web/app/themes/sage/resources */ -array_map( - 'add_filter', - ['theme_file_path', 'theme_file_uri', 'parent_theme_file_path', 'parent_theme_file_uri'], - array_fill(0, 4, 'dirname') -); +// array_map( +// 'add_filter', +// ['theme_file_path', 'theme_file_uri', 'parent_theme_file_path', 'parent_theme_file_uri'], +// array_fill(0, 4, 'dirname') +// ); Container::getInstance() ->bindIf('config', function () { return new Config([ - 'assets' => require dirname(__DIR__).'/config/assets.php', - 'theme' => require dirname(__DIR__).'/config/theme.php', - 'view' => require dirname(__DIR__).'/config/view.php', + 'assets' => require __DIR__.'/config/assets.php', + 'theme' => require __DIR__.'/config/theme.php', + 'view' => require __DIR__.'/config/view.php', ]); }, true); diff --git a/resources/index.php b/index.php similarity index 100% rename from resources/index.php rename to index.php diff --git a/resources/screenshot.png b/screenshot.png similarity index 100% rename from resources/screenshot.png rename to screenshot.png diff --git a/resources/style.css b/style.css similarity index 100% rename from resources/style.css rename to style.css diff --git a/resources/views/404.blade.php b/views/404.blade.php similarity index 100% rename from resources/views/404.blade.php rename to views/404.blade.php diff --git a/resources/views/index.blade.php b/views/index.blade.php similarity index 100% rename from resources/views/index.blade.php rename to views/index.blade.php diff --git a/resources/views/layouts/app.blade.php b/views/layouts/app.blade.php similarity index 100% rename from resources/views/layouts/app.blade.php rename to views/layouts/app.blade.php diff --git a/resources/views/page.blade.php b/views/page.blade.php similarity index 100% rename from resources/views/page.blade.php rename to views/page.blade.php diff --git a/resources/views/partials/comments.blade.php b/views/partials/comments.blade.php similarity index 100% rename from resources/views/partials/comments.blade.php rename to views/partials/comments.blade.php diff --git a/resources/views/partials/content-page.blade.php b/views/partials/content-page.blade.php similarity index 100% rename from resources/views/partials/content-page.blade.php rename to views/partials/content-page.blade.php diff --git a/resources/views/partials/content-search.blade.php b/views/partials/content-search.blade.php similarity index 100% rename from resources/views/partials/content-search.blade.php rename to views/partials/content-search.blade.php diff --git a/resources/views/partials/content-single.blade.php b/views/partials/content-single.blade.php similarity index 100% rename from resources/views/partials/content-single.blade.php rename to views/partials/content-single.blade.php diff --git a/resources/views/partials/content.blade.php b/views/partials/content.blade.php similarity index 100% rename from resources/views/partials/content.blade.php rename to views/partials/content.blade.php diff --git a/resources/views/partials/entry-meta.blade.php b/views/partials/entry-meta.blade.php similarity index 100% rename from resources/views/partials/entry-meta.blade.php rename to views/partials/entry-meta.blade.php diff --git a/resources/views/partials/footer.blade.php b/views/partials/footer.blade.php similarity index 100% rename from resources/views/partials/footer.blade.php rename to views/partials/footer.blade.php diff --git a/resources/views/partials/head.blade.php b/views/partials/head.blade.php similarity index 100% rename from resources/views/partials/head.blade.php rename to views/partials/head.blade.php diff --git a/resources/views/partials/header.blade.php b/views/partials/header.blade.php similarity index 100% rename from resources/views/partials/header.blade.php rename to views/partials/header.blade.php diff --git a/resources/views/partials/page-header.blade.php b/views/partials/page-header.blade.php similarity index 100% rename from resources/views/partials/page-header.blade.php rename to views/partials/page-header.blade.php diff --git a/resources/views/partials/sidebar.blade.php b/views/partials/sidebar.blade.php similarity index 100% rename from resources/views/partials/sidebar.blade.php rename to views/partials/sidebar.blade.php diff --git a/resources/views/search.blade.php b/views/search.blade.php similarity index 100% rename from resources/views/search.blade.php rename to views/search.blade.php diff --git a/resources/views/single.blade.php b/views/single.blade.php similarity index 100% rename from resources/views/single.blade.php rename to views/single.blade.php diff --git a/resources/views/template-custom.blade.php b/views/template-custom.blade.php similarity index 100% rename from resources/views/template-custom.blade.php rename to views/template-custom.blade.php