Skip to content

Commit

Permalink
v73.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gammamatrix committed Mar 17, 2024
1 parent 846f961 commit 392b257
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 50 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The Playground Blade package for [Laravel](https://laravel.com/docs/11.x) applic

This package provides Blade UI handling.

Read more on using Playground Blade [at the Read the Docs for Playground.](https://gammamatrix-playground.readthedocs.io/)
Read more on using [Playground Blade at Read the Docs: Playground Documentation.](https://gammamatrix-playground.readthedocs.io/en/latest/playground/blade.html)

## Installation

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"playground",
"playground-blade"
],
"homepage": "https://gammamatrix-playground.readthedocs.io/",
"homepage": "https://gammamatrix-playground.readthedocs.io/en/latest/playground/blade.html",
"license": "MIT",
"authors": [
{
Expand Down
94 changes: 47 additions & 47 deletions config/playground-blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
'themes' => [
'default' => [
'bsTheme' => '',
'enable' => (bool) env('PLAYGROUND_BLADE_THEME_DEFAULT_ENABLE', true),
'enable' => (bool) env('PLAYGROUND_BLADE_THEME_DEFAULT_ENABLE', false),
'label' => 'Default Theme',
'key' => 'default',
'icon' => 'fa-solid fa-square',
Expand All @@ -45,6 +45,52 @@
// ],
// ],
],
'dark' => [
'bsTheme' => 'dark',
'enable' => (bool) env('PLAYGROUND_BLADE_THEME_DARK_ENABLE', true),
'label' => 'Dark Theme',
'key' => 'dark',
'icon' => 'fa-solid fa-moon',
'provider' => 'bootstrap',
'session' => true,
'background' => [
'image' => '/vendor/playground/backgrounds/oval-dark.svg',
// 'image' => '/vendor/playground/backgrounds/spiral-dark.svg',
'repeat' => 'no-repeat',
],
'head' => [
'ckeditor-bootstrap' => [
'rel' => 'stylesheet',
'asset' => 'stylesheet',
'href' => '/vendor/playground/ckeditor/bootstrap-dark.css',
'version' => '41.2.0',
'always' => true,
],
],
],
'light' => [
'bsTheme' => 'light',
'enable' => (bool) env('PLAYGROUND_BLADE_THEME_LIGHT_ENABLE', true),
'label' => 'Light Theme',
'key' => 'light',
'icon' => 'fa-solid fa-sun',
'provider' => 'bootstrap',
'session' => true,
'background' => [
'image' => '/vendor/playground/backgrounds/oval-dark.svg',
// 'image' => '/vendor/playground/backgrounds/spiral-dark.svg',
'repeat' => 'no-repeat',
],
'head' => [
'ckeditor-bootstrap' => [
'rel' => 'stylesheet',
'asset' => 'stylesheet',
'href' => '/vendor/playground/ckeditor/bootstrap-light.css',
'version' => '41.2.0',
'always' => true,
],
],
],
'blue' => [
'bsTheme' => 'blue',
'enable' => (bool) env('PLAYGROUND_BLADE_THEME_BLUE_ENABLE', true),
Expand Down Expand Up @@ -343,52 +389,6 @@
],
],
],
'dark' => [
'bsTheme' => 'dark',
'enable' => (bool) env('PLAYGROUND_BLADE_THEME_DARK_ENABLE', true),
'label' => 'Dark Theme',
'key' => 'dark',
'icon' => 'fa-solid fa-moon',
'provider' => 'bootstrap',
'session' => true,
'background' => [
'image' => '/vendor/playground/backgrounds/oval-dark.svg',
// 'image' => '/vendor/playground/backgrounds/spiral-dark.svg',
'repeat' => 'no-repeat',
],
'head' => [
'ckeditor-bootstrap' => [
'rel' => 'stylesheet',
'asset' => 'stylesheet',
'href' => '/vendor/playground/ckeditor/bootstrap-dark.css',
'version' => '41.2.0',
'always' => true,
],
],
],
'light' => [
'bsTheme' => 'light',
'enable' => (bool) env('PLAYGROUND_BLADE_THEME_LIGHT_ENABLE', true),
'label' => 'Light Theme',
'key' => 'light',
'icon' => 'fa-solid fa-sun',
'provider' => 'bootstrap',
'session' => true,
'background' => [
'image' => '/vendor/playground/backgrounds/oval-dark.svg',
// 'image' => '/vendor/playground/backgrounds/spiral-dark.svg',
'repeat' => 'no-repeat',
],
'head' => [
'ckeditor-bootstrap' => [
'rel' => 'stylesheet',
'asset' => 'stylesheet',
'href' => '/vendor/playground/ckeditor/bootstrap-light.css',
'version' => '41.2.0',
'always' => true,
],
],
],
],
/*
|--------------------------------------------------------------------------
Expand Down
7 changes: 6 additions & 1 deletion src/Concerns/WithThemes.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,14 @@ public function initThemes(): self
/**
* @param array<string, mixed> $themes
*/
public function loadThemes(array $themes = []): self
public function loadThemes(array $themes = [], bool $enabled = true): self
{
foreach ($themes as $key => $meta) {
if ($enabled) {
if (! is_array($meta) || empty($meta['enable'])) {
continue;
}
}
// Only Bootstrap themes are supported for now.
if ($key && is_string($key)) {

Expand Down

0 comments on commit 392b257

Please sign in to comment.