forked from projects/fipamo
converted index template to blade
started the front end template conversion with the index page
This commit is contained in:
parent
a5583debbd
commit
ba2e75b186
4 changed files with 90 additions and 21 deletions
|
@ -94,18 +94,30 @@ class ThemeController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getView($view)
|
public function getView($view = 'index')
|
||||||
{
|
{
|
||||||
|
$template = 'fipamo-default-v2.index';
|
||||||
|
switch ($view) {
|
||||||
|
case "page":
|
||||||
|
$template = 'fipamo-default-v2.page';
|
||||||
|
break;
|
||||||
|
}
|
||||||
if ($this->auth::status()) {
|
if ($this->auth::status()) {
|
||||||
$page = $this->pages->getById('09E5A362-BA31-4AE2-9DEE-C93DFBE005C3')->first();
|
$page = $this->pages->getById('58E3D3DA-E7E4-4396-B4E5-0C30781C2F19')->first();
|
||||||
$options = $this->sort->page($page);
|
$data = $this->sort->page($page);
|
||||||
return view('fipamo-default-v2.base', [
|
return view($template, [
|
||||||
"debug" => "true",
|
"debug" => "true",
|
||||||
"theme" => 'fipamo-default-v2',
|
"theme" => 'fipamo-default-v2',
|
||||||
"status" => $this->auth::status(),
|
"status" => $this->auth::status(),
|
||||||
"title" => "THEME PAGE",
|
"title" => "THEME PAGE",
|
||||||
|
"menu" => $data['menu'],
|
||||||
"page" => $page,
|
"page" => $page,
|
||||||
"info" => $options['info'],
|
"info" => $data['info'],
|
||||||
|
"media" => $data['media'],
|
||||||
|
"content" => $data['content'],
|
||||||
|
"recent" => $data['recent'],
|
||||||
|
"feature" => $data['featured'],
|
||||||
|
"dynamicRender" => $data['dynamicRender'],
|
||||||
]);
|
]);
|
||||||
} else {
|
} else {
|
||||||
return redirect('dashboard/start');
|
return redirect('dashboard/start');
|
||||||
|
|
|
@ -163,7 +163,7 @@ class SortingService
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//TODO: get rid of if statement and always return recent and featured
|
||||||
if ($page['layout'] == 'index') {
|
if ($page['layout'] == 'index') {
|
||||||
$recent = [];
|
$recent = [];
|
||||||
$featured = [];
|
$featured = [];
|
||||||
|
@ -223,7 +223,6 @@ class SortingService
|
||||||
'files' => $page['docs'],
|
'files' => $page['docs'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
//var_dump($pageOptions);
|
|
||||||
return $pageOptions;
|
return $pageOptions;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,18 +41,18 @@
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@else
|
@else
|
||||||
@if($page['media'] != '')
|
@if($media != '')
|
||||||
@if($page['media']['type'] == "mp4")
|
@if($media[0]['type'] == "mp4")
|
||||||
<div id="0" role="slide">
|
<div id="0" role="slide">
|
||||||
<video controls autoplay muted>
|
<video controls autoplay muted>
|
||||||
|
|
||||||
<source src="{{$page['media'][0]['file']}}" type="video/mp4">
|
<source src="{{$media[0]['file']}}" type="video/mp4">
|
||||||
|
|
||||||
Please get a better browser. They're free.
|
Please get a better browser. They're free.
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
@else
|
@else
|
||||||
<div id="0" role="slide" style="background: url({{ $page['media'][0]['file'] }}) no-repeat center center / cover"></div>
|
<div id="0" role="slide" style="background: url({{ $media[0]['file'] }}) no-repeat center center / cover"></div>
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
@endif
|
@endif
|
||||||
|
@ -65,15 +65,15 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="right">
|
<div class="right">
|
||||||
@if(isset($menu))
|
@if(isset($menu))
|
||||||
@foreach($media as $link)
|
@foreach($menu as $link)
|
||||||
@if(isset($dynamicRender))
|
@if(isset($dynamicRender))
|
||||||
@if($dynamicRender == 'true')
|
@if($dynamicRender == 'true')
|
||||||
<a href="{{"/".$link['slug']}}" class="menu-link">{{link['title']}}</a><br/>
|
<a href="{{"/".$link['slug']}}" class="menu-link">{{$link['title']}}</a><br/>
|
||||||
@else
|
@else
|
||||||
<a href="{{"/".$link['slug'].".html"}}" class="menu-link">{{link['link']}}</a><br/>
|
<a href="{{"/".$link['slug'].".html"}}" class="menu-link">{{$link['title']}}</a><br/>
|
||||||
@endif
|
@endif
|
||||||
@else
|
@else
|
||||||
<a href="{{"/".$link['slug'].".html"}}" class="menu-link">{{link['tilte']}}</a><br/>
|
<a href="{{"/".$link['slug'].".html"}}" class="menu-link">{{$link['title']}}</a><br/>
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
@endif
|
@endif
|
||||||
|
@ -81,7 +81,10 @@
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
<div id="main-content" class="container">
|
<div id="main-content" class="container">
|
||||||
CONTAINTER BOY BOY
|
@spaceless
|
||||||
|
@section('main-content')
|
||||||
|
@show
|
||||||
|
@endspaceless
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
|
|
55
content/themes/fipamo-default-v2/index.blade.php
Normal file
55
content/themes/fipamo-default-v2/index.blade.php
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
@extends('fipamo-default-v2.base')
|
||||||
|
|
||||||
|
@section('title', $title)
|
||||||
|
|
||||||
|
@section('main-content')
|
||||||
|
<article>
|
||||||
|
<h1>{{ $title }}</h1>
|
||||||
|
<p>{!!$content!!}</p>
|
||||||
|
</article>
|
||||||
|
<section role="page-meta">
|
||||||
|
<div>
|
||||||
|
<h2>RECENT</h2>
|
||||||
|
@foreach($recent as $item)
|
||||||
|
@if(isset($dynamicRender))
|
||||||
|
@if($dynamicRender == 'true')
|
||||||
|
<a href="{{ "/".$item['path']."/".$item['slug'] }}">
|
||||||
|
{{ $item['title'] }}
|
||||||
|
</a><br/>
|
||||||
|
@else
|
||||||
|
<a href="{{ "/".$item['path']."/".$item['slug'].".html" }}">
|
||||||
|
{{ $item['title'] }}
|
||||||
|
</a><br/>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@else
|
||||||
|
<a href="{{ "/".$item['path']."/".$item['slug'].".html" }}">
|
||||||
|
{{ $item['title'] }}
|
||||||
|
</a><br/>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<h2>FEATURED</h2>
|
||||||
|
@foreach($feature as $item)
|
||||||
|
@if(isset($dynamicRender))
|
||||||
|
@if($dynamicRender == 'true')
|
||||||
|
<a href="{{ "/".$item['path']."/".$item['slug'] }}">
|
||||||
|
{{ $item['title'] }}
|
||||||
|
</a><br/>
|
||||||
|
@else
|
||||||
|
<a href="{{ "/".$item['path']."/".$item['slug'].".html" }}">
|
||||||
|
{{ $item['title'] }}
|
||||||
|
</a><br/>
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@else
|
||||||
|
<a href="{{ "/".$item['path']."/".$item['slug'].".html" }}">
|
||||||
|
{{ $item['title'] }}
|
||||||
|
</a><br/>
|
||||||
|
@endif
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
@endsection
|
Loading…
Reference in a new issue