forked from projects/fipamo
added page listing template, fixed sub menu items
moved the page listing template over and made all of the apropriate changes so the CSS lines up as it should there was also a minor issue that was keeping the sub menu for the start pages from displaying so that was fixed
This commit is contained in:
parent
57d47909b9
commit
2b437c0173
5 changed files with 102 additions and 4 deletions
|
@ -24,7 +24,22 @@ class DashController extends Controller
|
|||
return view('back.start', [
|
||||
"status" => $status,
|
||||
"result" => $result,
|
||||
"title" => "Fipamo Dash"
|
||||
"title" => "Start"
|
||||
]);
|
||||
}
|
||||
|
||||
public function book($pageFilter = 'all', $pageNum = '1')
|
||||
{
|
||||
$status = session('handle') !== null ? true : false;
|
||||
$result = [];
|
||||
if ($status) {
|
||||
$result = $this->pages->getPage($pageNum, 4, $pageFilter);
|
||||
}
|
||||
return view('back.book', [
|
||||
"status" => $status,
|
||||
"result" => $result,
|
||||
"currentPage" => $pageNum,
|
||||
"title" => "Pages"
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
78
resources/views/back/book.blade.php
Normal file
78
resources/views/back/book.blade.php
Normal file
|
@ -0,0 +1,78 @@
|
|||
@extends('frame')
|
||||
|
||||
@section('title', 'Pages')
|
||||
|
||||
@section('main-content')
|
||||
<section role="book-index-header">
|
||||
<div role="book-index-header-left">
|
||||
{{ $result['paginate']['sort'] }}
|
||||
Pages
|
||||
</div>
|
||||
<div role="book-index-header-right">
|
||||
<a href="/dashboard/pages/all" title="view all pages">
|
||||
<button>
|
||||
<i class="ti ti-clipboard-list"></i>
|
||||
{{ $result['stats']['all'] }}
|
||||
</button>
|
||||
</a>
|
||||
<a href="/dashboard/pages/published" title="view publised pages">
|
||||
<button>
|
||||
<i class="ti ti-clipboard-check"></i>
|
||||
{{ $result['stats']['published'] }}
|
||||
</button>
|
||||
</a>
|
||||
<a href="/dashboard/pages/deleted" title="view deleted pages">
|
||||
<button>
|
||||
<i class="ti ti-clipboard-off"></i>
|
||||
{{ $result['stats']['deleted'] }}
|
||||
</button>
|
||||
</a>
|
||||
</section>
|
||||
<section role="book-index-pages">
|
||||
@foreach($result['pages'] as $page)
|
||||
@php
|
||||
$type = '';
|
||||
$file = '';
|
||||
isset($page['media'][0]['type']) ? $type = $page['media'][0]['type'] : $type = '';
|
||||
isset($page['media'][0]['file']) ? $file = $page['media'][0]['file'] : $file = '';
|
||||
@endphp
|
||||
@if($type =='mp4')
|
||||
<a href="/dashboard/page/edit/{{ $page['uuid'] }}" id="{{ $page['uuid'] }}" class="page-link">
|
||||
<div class="page-video">
|
||||
<video class="post-video" loop muted autoplay>
|
||||
<source src="{{ $file }}" type="video/mp4">
|
||||
|
||||
Sorry, your browser doesn't support embedded videos.
|
||||
</video>
|
||||
<div id="meta">
|
||||
@include('includes.recent-meta')
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
@else
|
||||
<a href="/dashboard/page/edit/{{ $page['uuid'] }}" id="{{ $page['uuid'] }}" class="page-link">
|
||||
<div class="page-bg" style="background: url({{ $file }}) no-repeat center center / cover #fc6399">
|
||||
<div id="meta">
|
||||
@include('includes.recent-meta')
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
@endif
|
||||
@endforeach
|
||||
@if($result['numOfPages'])
|
||||
<div role="paginate">
|
||||
<a class="page-btns" href="/dashboard/pages/{{ $result['paginate']['sort'] }}/{{ $result['paginate']['prevPage'] }}">
|
||||
<i class="ti ti-square-arrow-left"></i>
|
||||
</a>
|
||||
<span class="count">
|
||||
{{ $currentPage }}
|
||||
of
|
||||
{{ $result['numOfPages'] }}
|
||||
</span>
|
||||
<a class="page-btns" href="/dashboard/pages/{{ $result['paginate']['sort'] }}/{{ $result['paginate']['nextPage'] }}">
|
||||
<i class="ti ti-square-arrow-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
</section>
|
||||
@endsection
|
|
@ -2,7 +2,7 @@
|
|||
@if($title == "Settings" )
|
||||
@include('includes.submenu-settings')
|
||||
@elseif($title == "Start" )
|
||||
@include('includes.submenu-settings')
|
||||
@include('includes.submenu-start')
|
||||
@endif
|
||||
<a id="settings" href="/dashboard/settings" title="settings">
|
||||
<button>
|
||||
|
@ -29,7 +29,7 @@
|
|||
@if($title == "Settings" )
|
||||
@include('includes.submenu-settings')
|
||||
@elseif($title == "Start" )
|
||||
@include('includes.submenu-settings')
|
||||
@include('includes.submenu-start')
|
||||
@endif
|
||||
<a id="settings" href="/dashboard/settings" title="settings">
|
||||
<button>
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
@php
|
||||
$renderOnSave = false;
|
||||
@endphp
|
||||
|
||||
<div class="submenu">
|
||||
<button id="save-toggle" title="save settings">
|
||||
<i class="ti ti-device-floppy"></i>
|
||||
|
@ -5,7 +9,7 @@
|
|||
<button id="publish-pages" title="publish site">
|
||||
<i class="ti ti-world-upload"></i>
|
||||
</button>
|
||||
<button id="render-toggle" title="render on save toggle" data-render="{{ renderOnSave }}">
|
||||
<button id="render-toggle" title="render on save toggle" data-render="{{ $renderOnSave }}">
|
||||
<i class="ti ti-circle-dashed"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -27,5 +27,6 @@ Route::post("/login", [AuthController::class, 'enter']);
|
|||
//back
|
||||
Route::group(['prefix' => 'dashboard'], function () {
|
||||
Route::get("/", [DashController::class, 'start']);
|
||||
Route::get("/pages/{pageFilter?}/{pageNum?}", [DashController::class, 'book']);
|
||||
Route::get("/logout", [AuthController::class, 'exit']);
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue