diff --git a/app/Http/Controllers/Theming/ThemeController.php b/app/Http/Controllers/Theming/ThemeController.php index 14658c7..4bc0d9e 100644 --- a/app/Http/Controllers/Theming/ThemeController.php +++ b/app/Http/Controllers/Theming/ThemeController.php @@ -7,6 +7,7 @@ use App\Interfaces\PageRepositoryInterface; use App\Services\AuthService; use App\Services\SortingService; use App\Services\AssetService; +use App\Services\ThemeService; class ThemeController extends Controller { @@ -14,17 +15,33 @@ class ThemeController extends Controller protected AuthService $auth; protected AssetService $assets; protected SortingService $sort; + protected ThemeService $themes; public function __construct( PageRepositoryInterface $pageRepository, AuthService $authService, AssetService $assetService, SortingService $sortService, + ThemeService $themeService, ) { $this->pages = $pageRepository; $this->auth = $authService; $this->assets = $assetService; $this->sort = $sortService; + $this->themes = $themeService; + } + + public function start() + { + if ($this->auth::status()) { + return view('theme.start', [ + "status" => $this->auth::status(), + "title" => "Fipamo Theme Kit", + "pages" => $this->themes->getCustomViews('page') + ]); + } else { + return redirect('back.login'); + } } public function getView($view = 'index') @@ -52,6 +69,10 @@ class ThemeController extends Controller $template = $currentTheme . '.archive'; $pageData = $this->sort->archive(); break; + default: + $template = $currentTheme . '.' . $view; + $page = $this->pages->getById('F4429D34-25E7-4CA9-9B0A-742810277505'); + $pageData = $this->sort->page($page); } if ($this->auth::status()) { return view($template, $pageData); diff --git a/content/themes/fipamo-default-v2/page-custom.blade.php b/content/themes/fipamo-default-v2/page-custom.blade.php new file mode 100644 index 0000000..ea663ab --- /dev/null +++ b/content/themes/fipamo-default-v2/page-custom.blade.php @@ -0,0 +1,62 @@ +@extends('fipamo-default-v2.base') + +@section('title', $title) + +@section('main-content') +
+

{{ $title }}

+

{!!$content!!}

+ PAGE CUSTOM +
+
+
+

Files

+ @foreach($files as $file) + @if($file['type'] != 'mp3') + @php + $fileName = explode("/", $file['file']); + @endphp + {{ $fileName[6] }} + @endif + @endforeach +
+
+

Sounds

+ @foreach($files as $file) + @if($file['type'] == 'mp3') + + @endif + @endforeach +
+
+

Info

+ {{ $meta['who'] }} + dropped this + {{ $meta['when'] }}
+ +
+
+

Tags

+ @foreach($tags as $tag) + @if(isset($dynamicRender)) + @if($dynamicRender == 'true') + + {{ $tag['label'] }} + + @else + + {{ $tag['label'] }} + + @endif + @else + + {{ $tag['label'] }} + + @endif + @endforeach +
+
+@endsection diff --git a/public/assets/css/dash/frame.css b/public/assets/css/dash/frame.css index 568a080..2c3f925 100644 --- a/public/assets/css/dash/frame.css +++ b/public/assets/css/dash/frame.css @@ -24,6 +24,13 @@ a { transition: all 0.2s linear; } +a.secondary { + color: var(--secondary); + text-decoration: none; + border-bottom: 0; + transition: all 0.2s linear; +} + img.logo-medium { width: 140px; } diff --git a/public/assets/css/dash/settings.css b/public/assets/css/dash/settings.css index c90e6e0..4973496 100644 --- a/public/assets/css/dash/settings.css +++ b/public/assets/css/dash/settings.css @@ -105,32 +105,37 @@ article[class="settings"] button > span { position: relative; } -section[class="member-settings"] - > div[class="features"] - button[data-enabled="true"] { +section[class="member-settings"] > div[class="features"] button[data-enabled="true"] { color: var(--white); } -section[class="member-settings"] - > div[class="features"] - button[data-enabled="false"] { +section[class="member-settings"] > div[class="features"] button[data-enabled="false"] { color: var(--primary); background: var(--secondary); } -section[class="member-settings"] - > div[class="theme"] - button[data-enabled="true"] { +section[class="member-settings"] > div[class="theme"] button[data-enabled="true"] { color: var(--white); background: var(--secondary-highlight); - display: block; + display: inline-block; border-radius: 3px; padding: 3px; + width: 83%; + margin-right: 5px; } -section[class="member-settings"] - > div[class="theme"] - button[data-enabled="false"] { +section[class="member-settings"] > div[class="theme"] a { + background: var(--secondary-highlight); + display: inline-block; + width: 15%; + border-radius: 3px; + text-align: center; + vertical-align: top; + top: 13px; + position: relative; +} + +section[class="member-settings"] > div[class="theme"] button[data-enabled="false"] { color: var(--primary); background: var(--secondary); display: block; diff --git a/resources/views/back/settings.blade.php b/resources/views/back/settings.blade.php index ecaa985..ad63a07 100644 --- a/resources/views/back/settings.blade.php +++ b/resources/views/back/settings.blade.php @@ -79,7 +79,7 @@ {{ $theme['display-name'] }} - + Edit @else