FEATURE: directory separator for static pages provider

This commit is contained in:
peter
2016-04-04 11:01:49 +02:00
parent 08cb40b004
commit 1f3cc2eebb
6 changed files with 14 additions and 31 deletions
-20
View File
@@ -1,20 +0,0 @@
APP_ENV=testing
APP_DEBUG=true
APP_KEY=
DB_HOST=localhost
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
MAIL_USERNAME=@binarity.cz
MAIL_PASSWORD=
SITE_URL=/
UPLOAD_URL=/public/uploads
THUMBNAILS_URL=/uploads/thumbnails
THEME=
+6 -5
View File
@@ -12,15 +12,16 @@ class Homepage extends ContentPage
$page = $this->content->getHomepage();
// test if we have any homepage
if (!$page) {
/*if (!$page) {
return view('errors.homepageNotAvailable');
}
}*/
// render page
try {
return $this->renderPage($page);
/* try {
} catch (\Exception $e) {
return view('errors.homepageNotAvailable');
}
}*/
return $this->renderPage($page);
}
}
@@ -57,7 +57,7 @@ class StaticPagesServiceProvider extends ServiceProvider
*/
protected function registerConfig()
{
$config = __DIR__ . '/../Config/config.php';
$config = __DIR__ . '\..\Config\config.php';
$this->publishes([$config => config_path('staticpages.php')]);
$this->mergeConfigFrom($config, 'staticpages');
}
@@ -69,8 +69,10 @@ class StaticPagesServiceProvider extends ServiceProvider
*/
public function registerViews()
{
$viewPath = base_path('resources/views/modules/staticpages');
$sourcePath = __DIR__ . '/../Resources/views';
$viewPath = base_path('resources'.DIRECTORY_SEPARATOR.'views'.DIRECTORY_SEPARATOR.'modules'.DIRECTORY_SEPARATOR.'gallery');
$sourcePath = __DIR__ . DIRECTORY_SEPARATOR .'..'.DIRECTORY_SEPARATOR.'Resources'.DIRECTORY_SEPARATOR.'views';
echo $viewPath;
$this->publishes([$sourcePath => $viewPath]);
@@ -84,7 +86,7 @@ class StaticPagesServiceProvider extends ServiceProvider
$registrator = $this->app->make('registerTemplateDir');
try {
// setup some global variables
$registrator->setBaseDirectory('resources/views/modules/staticpages/visitor');
$registrator->setBaseDirectory('resources'.DIRECTORY_SEPARATOR.'views'.DIRECTORY_SEPARATOR.'modules'.DIRECTORY_SEPARATOR.'staticpages'.DIRECTORY_SEPARATOR.'visitor');
$registrator->setNamespace('staticpages');
$registrator->setModuleId(call_user_func([config('staticpages.handler'), 'getModuleId']));
@@ -102,6 +104,6 @@ class StaticPagesServiceProvider extends ServiceProvider
*/
public function registerTranslations()
{
$this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'staticpages');
$this->loadTranslationsFrom(__DIR__ . DIRECTORY_SEPARATOR. '..'.DIRECTORY_SEPARATOR.'Resources'.DIRECTORY_SEPARATOR.'lang', 'staticpages');
}
}

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

+1 -1
View File
@@ -81,7 +81,7 @@ hr {border-bottom: 0;width: 5%; margin: 0 auto; position: relative; top: -15px;
.grey-wrapper {background-color: #f1f1f1; padding: 50px 0; display: block;}
.green-wrapper {background-color: #46c1be; padding: 50px 0; display: block;}
.white-wrapper {background-color: #ffffff; padding: 50px 0; display: block;}
.backgrounded {background-image: url(images/background_o_nás._white.jpg); background-size: cover; background-position: center center; }
.backgrounded {background-image: url(images/background_o_nas._white.jpg); background-size: cover; background-position: center center; }
.assortment-h5 {text-align: center; text-transform: uppercase; font-weight: 500; font-size: 1.1rem;}
.assortment-p {font-size: 0.8rem; text-align: center; margin: 15px auto 10px; width: 50%;}