FEATURE #2351 @10m: add template for photo as background on homepage

This commit is contained in:
Michal Kváček
2017-03-03 00:16:10 +01:00
parent 2a15f3eab5
commit 0007425c86
5 changed files with 82 additions and 10 deletions
+5 -2
View File
@@ -4,8 +4,11 @@ body {
font-family: Ubuntu;
text-align: justify;
background: #EEF4D4 url("./images/bg.png");
/*background: url("./images/clay-bg.jpg") no-repeat fixed;*/
/*background-size: cover;*/
}
body.photo-bg {
background: url("./images/clay-bg.jpg") no-repeat fixed;
background-size: cover;
}
h1, h2, h3, h4 {
@@ -1,4 +1,4 @@
@extendVisitor('defaultLayout', ['test' => 1])
@extendVisitor('defaultLayout')
@section('topMenu')
<h1 class="text-center">
@@ -0,0 +1,71 @@
@extendVisitor('defaultLayout')
@section('bodyClass', 'photo-bg')
@section('topMenu')
<h1 class="text-center">
<a href="{{route('page.index')}}">
<img class="logo" src="@asset('visitor/images/logo.png')" alt="">
{{setting('pageName')}}
</a>
</h1>
<div class="title-bar text-right" data-responsive-toggle="main-menu" data-hide-for="medium">
<button class="menu-icon" type="button" data-toggle></button>
</div>
<header class="hide-for-small hide-for-medium hide-for-large top-bar centered text-center">
<div id="main-menu">
@widgetArea('mainMenu')
</div>
</header>
@endsection
@section('content')
@php $images = $page->files()->where('mime_type', 'like', 'image%')->get(); @endphp
@if(count($images) > 0)
<div class="orbit" role="region" data-orbit
data-options="animationDuration:3000; animInFromLeft:fade-in; animInFromRight:fade-in; animOutToLeft:fade-out; animOutToRight:fade-out;">
<ul class="orbit-container">
@foreach($images as $i => $image)
<li class="orbit-slide slow @if($i == 0) is-active @endif">
<img class="orbit-image" src="@upload($image->filename)" alt="" />
</li>
@endforeach
</ul>
<nav class="orbit-bullets">
@foreach($images as $i => $image)
<button @if($i == 0) class="is-active" @endif data-slide="{{$i}}"></button>
@endforeach
</nav>
</div>
<header class="hide-for-small-only top-bar centered text-center">
@widgetArea('mainMenu')
</header>
@endif
<div class="row content-container">
{!! $page->pageContent !!}
<div class="text-center trainee-team">
<h2>{{$page->traineeTeamCategory->name}}</h2>
@foreach($page->traineeTeamCategory->content as $i => $subpage)
<div class="column text-center small-12 medium-{{ceil(12/count($page->traineeTeamCategory->content))}}"
data-equalizer-watch>
<a href="{{route('page.content', ['url' => $subpage->url])}}">
@if(empty($subpage->titlePhoto))
<img class="thumbnail" src="@asset('visitor/images/avatar.png')" alt="{{$subpage->title}}">
@else
<img class="thumbnail" src="@upload($subpage->titlePhoto)" alt="{{$subpage->title}}">
@endif
<h4>{{$subpage->title}}</h4>
</a>
</div>
@endforeach
</div>
</div>
@endsection
@@ -1,19 +1,17 @@
@extendVisitor('defaultLayout')
@section('topMenu')
@include(\App\CMS\Helpers\Template::name('commonHeader'))
@endsection
@section('content')
<div class="row content-container">
<div class="text-center">
<img src="@upload($page->titlePhoto)" class="rounded trainer" alt="">
<h2>{{$page->title}}</h2>
</div>
{!! $page->pageContent !!}
</div>
@endsection
@@ -34,7 +34,7 @@
@include('visitor.metaInformation')
</head>
<body>
<body class="@yield('bodyClass')">
<header class="top-bar">
@yield('topMenu')