Implemented a way for the developer to define a custom background color for the pages they are building through the config file 'pagebuilder.php'
This commit is contained in:
parent
2977468159
commit
3dd0c6080f
@ -3,6 +3,7 @@
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
use Inertia\Inertia;
|
||||
|
||||
use App\Helpers\PageSettingsHelper;
|
||||
@ -27,6 +28,9 @@ class AppServiceProvider extends ServiceProvider
|
||||
'siteName' => function () {
|
||||
return config('app.name');
|
||||
},
|
||||
'canvas' => function () {
|
||||
return config('pagebuilder.canvas');
|
||||
}
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
11
config/pagebuilder.php
Normal file
11
config/pagebuilder.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PageBuilder specific settings
|
||||
* =============================
|
||||
*
|
||||
*/
|
||||
|
||||
return [
|
||||
'canvas' => 'bg-black' // The main background color of the pagebuilder canvas (the background color of the pages you want to build)
|
||||
];
|
@ -39,6 +39,7 @@
|
||||
const showMainMenu = ref(false);
|
||||
const page = usePage();
|
||||
const pageRef = ref();
|
||||
const canvasClass = page.props.canvas || 'bg-black'; // fallback to bg-black
|
||||
|
||||
/** Get a node value from json */
|
||||
|
||||
@ -70,7 +71,7 @@
|
||||
<template>
|
||||
<Head :title="revision.title" />
|
||||
|
||||
<div ref="pageRef" class="min-h-screen w-full bg-black">
|
||||
<div ref="pageRef" class="min-h-screen w-full" :class="canvasClass">
|
||||
<!-- Komponentrendring -->
|
||||
<component
|
||||
v-for="block in revision.content"
|
||||
|
Loading…
Reference in New Issue
Block a user