intergrated the fipamo theme kit
a basic preview engine has been added to ease the process of editing pages. currently it previews all basic templates and custom created pages this is will replace the external fipamo theme kit tool, which will be archived
This commit is contained in:
parent
8bf640ee18
commit
6cb9631a46
8 changed files with 135 additions and 17 deletions
|
@ -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);
|
||||
|
|
62
content/themes/fipamo-default-v2/page-custom.blade.php
Normal file
62
content/themes/fipamo-default-v2/page-custom.blade.php
Normal file
|
@ -0,0 +1,62 @@
|
|||
@extends('fipamo-default-v2.base')
|
||||
|
||||
@section('title', $title)
|
||||
|
||||
@section('main-content')
|
||||
<article>
|
||||
<h1>{{ $title }}</h1>
|
||||
<p>{!!$content!!}</p>
|
||||
PAGE CUSTOM
|
||||
</article>
|
||||
<section class="page-meta">
|
||||
<div>
|
||||
<h2>Files</h2>
|
||||
@foreach($files as $file)
|
||||
@if($file['type'] != 'mp3')
|
||||
@php
|
||||
$fileName = explode("/", $file['file']);
|
||||
@endphp
|
||||
<a href="{{ $file['file'] }}">{{ $fileName[6] }}</a>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
<div>
|
||||
<h2>Sounds</h2>
|
||||
@foreach($files as $file)
|
||||
@if($file['type'] == 'mp3')
|
||||
<audio controls>
|
||||
<source src="{{ $file['file'] }}" type="audio/mpeg">
|
||||
Your browser does not support the audio element.
|
||||
</audio>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
<div>
|
||||
<h2>Info</h2>
|
||||
{{ $meta['who'] }}
|
||||
dropped this
|
||||
{{ $meta['when'] }}<br/>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<h2>Tags</h2>
|
||||
@foreach($tags as $tag)
|
||||
@if(isset($dynamicRender))
|
||||
@if($dynamicRender == 'true')
|
||||
<a href="{{ "/tags/".$tag['slug'] }}">
|
||||
{{ $tag['label'] }}
|
||||
</a>
|
||||
@else
|
||||
<a href="{{ "/tags/".$tag['slug'].".html" }}">
|
||||
{{ $tag['label'] }}
|
||||
</a>
|
||||
@endif
|
||||
@else
|
||||
<a href="{{ "/tags/".$tag['slug'].".html" }}">
|
||||
{{ $tag['label'] }}
|
||||
</a>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</section>
|
||||
@endsection
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
<use id="nav-menu-icon" xlink:href="/assets/images/global/sprite.svg#entypo-palette"/>
|
||||
</svg>
|
||||
<span>{{ $theme['display-name'] }}</span>
|
||||
</button>
|
||||
</button><a target="_blank" href='/theme'>Edit</a>
|
||||
@else
|
||||
<button href="#" id="{{ $theme['name'] }}" class="theme-select" data-enabled="false">
|
||||
<svg id="nav-menu-icon" class="icon">
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script>0</script>
|
||||
<header>
|
||||
@if($status)
|
||||
<nav class="top-nav">
|
||||
|
|
23
resources/views/theme/start.blade.php
Normal file
23
resources/views/theme/start.blade.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
@extends('frame')
|
||||
|
||||
@section('title', 'The Dash | Fipamo Theme Kit')
|
||||
|
||||
@section('main-content')
|
||||
<section class="index-header">
|
||||
<div class="index-header-left">
|
||||
<h1>Templates</h1>
|
||||
<h2>Base</h2>
|
||||
<a class="secondary" href="/theme/view/index">Index</a><br />
|
||||
<a class="secondary" href="/theme/view/page">Page</a><br />
|
||||
<a class="secondary" href="/theme/view/tags">Tags</a><br />
|
||||
<a class="secondary" href="/theme/view/archive">Archive</a><br />
|
||||
<h2>Custom</h2>
|
||||
@foreach($pages as $view)
|
||||
@if($view != 'page')
|
||||
<a href="/theme/view/{{ $view }}" class="secondary" href="">{{ $view }}</a><br />
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
<div class="index-header-right"></div>
|
||||
</section>
|
||||
@endsection
|
|
@ -35,8 +35,8 @@ Route::group(['prefix' => 'dashboard', 'middleware' => 'member.check'], function
|
|||
Route::get("/logout", [AuthController::class, 'exit']);
|
||||
});
|
||||
|
||||
//theming
|
||||
|
||||
//theme kit
|
||||
Route::group(['prefix' => 'theme', 'middleware' => 'member.check'], function () {
|
||||
Route::get("/", [ThemeController::class, 'start']);
|
||||
Route::get("/view/{view?}", [ThemeController::class, 'getView']);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue