Merge branch 'praguetenniscamp.cz' into dev

This commit is contained in:
Michal Kváček
2017-03-08 19:54:50 +01:00
15 changed files with 288 additions and 141 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ class Widget
$widget->name = $data['name'];
$widget->description = $data['description'];
$widget->container_class = $data['containerClass'];
$widget->container_id = $data['containerId'];
$widget->container_id = empty($data['containerId']) ? null : $data['containerId'];
$widget->settings = json_encode(call_user_func([$widgetType->handler, 'save'], $request));
// save into database
+1 -2
View File
@@ -2,7 +2,7 @@
namespace App\Events;
use App\Models\WidgetArea;
use App\Models\Widgets\WidgetArea;
use Illuminate\Queue\SerializesModels;
class DeleteWidgetArea extends Event
@@ -20,7 +20,6 @@ class DeleteWidgetArea extends Event
*/
public function __construct(WidgetArea $widgetArea)
{
//
$this->widgetArea = $widgetArea;
}
}
@@ -24,15 +24,15 @@ class Presenter implements WidgetRenderer
if (!$form)
return null;
$formData = json_decode($form->moduleSettings);
$formData = $form->moduleSettings;
$code = '<div class="address-widget ' . e($widget->container_class) . '"';
if ($widget->container_id) {
$code .= ' id="' . e($widget->container_id).'"';
}
$code .= '>';
$code .= "<p class='name'>".e($formData->companyName).'</p>';
$code .= nl2br($formData->address);
$code .= "<p class='name'>".e($formData['companyName']).'</p>';
$code .= nl2br($formData['address']);
$code .= "</div>";
return $code;
+2 -2
View File
@@ -80,12 +80,12 @@ class Handler implements TemplateHandler
*/
public static function beforeRender(Content & $content)
{
if ($content->isHomepage) {
// if ($content->isHomepage) {
$category = Category::where('url', 'trenersky-tym')
->first();
$content->traineeTeamCategory = $category;
}
// }
}
/**
+85 -32
View File
@@ -3,16 +3,44 @@
body {
font-family: Ubuntu;
text-align: justify;
background: #eef4d4 url("./images/bg.png");
background: #EEF4D4 url("./images/bg.png");
}
body.photo-bg {
background: url("./images/clay-bg.jpg") no-repeat fixed;
background-size: cover;
}
h1, h2, h3, h4 {
font-family: Comfortaa;
color: #FF7F11;
}
a {
color: #FF7F11;
}
a:hover {
color: #983628;
}
/** HEADER **/
header.top-bar {
background: #3f3f37;
background: #3F3F37;
padding: 0;
border-bottom: solid 1px #FF7F11;
}
header.top-bar h1 {
font-size: 100%;
font-size: 130%;
line-height: 38px;
margin-top: 0;
margin-bottom: 0;
text-align: center;
}
header.top-bar.centered .menu li {
display: inline-block;
}
header.top-bar ul {
@@ -23,59 +51,57 @@ header.top-bar a {
color: white;
}
header.top-bar h1 a {
color: #FF7F11;
}
.menu .active > a {
background: #ff7f11;
background: #FF7F11;
}
.menu a:hover {
background: #983628;
transition: background 400ms linear;
}
.logo {
max-height: 35px;
max-height: 25px;
margin: 0 15px;
}
h1, h2, h3, h4 {
font-family: Comfortaa;
color: #ff7f11;
}
/** END HEADER **/
.stripe {
padding: 50px;
margin: 50px 0;
width: 100%;
}
.stripe.light {
background: rgba(0, 0, 0, 0.1);
}
.stripe h1 {
color: white;
font-size: 270%;
}
.stripe p {
padding-left: 150px;
background: rgba(0, 0, 0, 0.3);
}
.content-container.row {
margin-top: 1em;
line-height: 170%;
padding: 1em;
background: #FFFEF0;
background: #F8FEF0;
box-shadow: 0 0 10px #CBCBCB;
border-radius: 5px 5px 0 0;
}
.orbit {
position: relative;
overflow: hidden;
background: silver;
}
.orbit-bullets {
margin-top: -54px;
padding-bottom: 11px;
margin-top: -100px;
padding-bottom: 20px;
}
.orbit .stripe {
height: 20px;
background: rgba(255,255,255, 0.2);
background: rgba(255, 127, 17, 0.3);
position: absolute;
left: 0;
right: 0;
@@ -89,26 +115,53 @@ h1, h2, h3, h4 {
.orbit-bottom {
bottom: 0;
border-bottom: solid 1px #3F3F37;
}
.slow {
transition-duration: 4500ms !important;
transition-duration: 3500ms !important;
}
.trainee-team {
margin-top: 2em;
}
.trainee-team .thumbnail {
max-height: 150px;
}
#footer {
margin-top: 10em;
}
.rounded {
border-radius: 50%;
}
.title-photo img {
border-radius: 0 0 5px 5px;
}
.trainer {
max-width: 25%;
padding: 3px;
border: solid 1px #CCC;
}
#footer {
margin-bottom: 150px;
}
#footer-widgets {
border-top: solid 2px #FF7F11;
background: #3F3F37;
padding: 1em;
border-radius: 0 0 5px 5px;
color: #EEF4D4;
}
#binarity {
margin-top: 2em;
}
@media screen and (max-width: 639px) {
.menu > li {
display: block !important;
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 616 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 115 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

@@ -1,13 +1,28 @@
<form action="{{route('email.send', ['formId' => $page->id])}}" method="post">
{!! csrf_field() !!}
<div class="column medium-6">
<div class="column medium-4">
<input class="large" placeholder="jméno a příjmení" name="name" type="text">
</div>
<div class="column medium-6">
<div class="column medium-4">
<input class="large" placeholder="telefon" name="phone" type="text">
</div>
<div class="column medium-12">
<div class="column medium-4">
<input class="large" placeholder="e-mail" name="email" type="text">
</div>
<div class="column medium-4">
<input class="large" placeholder="počet osob" name="personCount" type="text">
</div>
<div class="column medium-4">
<input class="large" placeholder="termín od" name="from" type="text">
</div>
<div class="column medium-4">
<input class="large" placeholder="termín do" name="to" type="text">
</div>
<div class="column medium-12">
<textarea class="large" placeholder="zpráva" name="message"></textarea>
</div>
<div class="column medium-6 right">
@@ -1,61 +1,35 @@
@extendVisitor('defaultLayout')
@section('topMenu')
@include(\App\CMS\Helpers\Template::name('commonHeader'))
@endsection
@section('content')
<div class="content-container">
<div class="row content-container">
<div class="column text-center m-b-25 show-for-large">
<h2>Kontakt</h2>
</div>
<div class="large-12 column columns p-lr-0 contact-detail">
<div class="column text-right large-4">
<h2 class="hide-for-large">Kontakt</h2>
<p class="contact-p green-text"><b>{{$page->moduleSettings['companyName']}}</b></p>
<p class="contact-p">
{!! nl2br($page->moduleSettings['address']) !!}
<br>
-<br>
tel.: {{$page->moduleSettings['phone']}}<br>
e-mail: <a href="mailto:{{$page->moduleSettings['email']}}">{{$page->moduleSettings['email']}}</a>
</p>
<br>
</div>
<div id="map" class="column large-8" style="height: 250px;"></div>
</div>
</div>
<div class="column text-center large-4">
<h2 class="hide-for-large">Kontakt</h2>
<div class="large-12 column stripe light" id="contact-form">
<div class="column large-12 medium-8 small-12 medium-centered p-lr-0 p-lr-15-sm">
<h4 class="text-center uppercase m-b-25 bold">Napište nám</h4>
<h4>{{$page->moduleSettings['companyName']}}</h4>
<p>
{!! nl2br($page->moduleSettings['address']) !!}
</p>
<p>
tel.: {{$page->moduleSettings['phone']}}<br>
e-mail: <a href="mailto:{{$page->moduleSettings['email']}}">{{$page->moduleSettings['email']}}</a>
</p>
</div>
<div class="column large-8" id="contact-form">
@include('modules.contactform._partials.form')
</div>
</div>
@endsection
@section('javascripts')
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCjADMGOysqt0ibo9mD5Cr8rs47ZQF8rKQ&callback=initMap"
async defer></script>
<script type="text/javascript">
function initMap() {
var myLatLng = {
lat: parseFloat ('{{$page->moduleSettings['gpsLat']}}'),
lng: parseFloat ('{{$page->moduleSettings['gpsLng']}}')
};
// Create a map object and specify the DOM element for display.
var map = new google.maps.Map (document.getElementById ('map'), {
center: myLatLng,
scrollwheel: false,
zoom: 18
});
// Create a marker and set its position.
var marker = new google.maps.Marker ({
map: map,
position: myLatLng,
title: '{{$page->moduleSettings['companyName']}}'
});
}
</script>
@endsection
@@ -1,14 +1,19 @@
@extendVisitor('defaultLayout')
@section('topMenu')
@include(\App\CMS\Helpers\Template::name('commonHeader'))
@endsection
@section('content')
@if (!empty($page->titlePhoto))
<div class="row title-photo">
<img src="@upload($page->titlePhoto)" alt="">
</div>
@endif
<div class="row content-container">
<h1>{{$page->title}}</h1>
{!! $page->pageContent !!}
</div>
@endsection
@@ -1,5 +1,25 @@
@extendVisitor('defaultLayout')
@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)
@@ -18,21 +38,21 @@
<button @if($i == 0) class="is-active" @endif data-slide="{{$i}}"></button>
@endforeach
</nav>
<div class="stripe orbit-top"></div>
<div class="stripe orbit-bottom"></div>
</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 stripe light trainee-team">
<div class="text-center trainee-team">
<h2>{{$page->traineeTeamCategory->name}}</h2>
@foreach($page->traineeTeamCategory->content as $i => $subpage)
<div class="column text-center small-6 medium-{{ceil(12/count($page->traineeTeamCategory->content))}}"
<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))
@@ -44,7 +64,6 @@
</a>
</div>
@endforeach
<div class="clearfix"></div>
</div>
</div>
@endsection
@@ -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
@@ -0,0 +1,19 @@
<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>
<div id="main-menu">
<div class="top-bar-left hide-for-medium-only hide-for-small-only">
<h1 class="text-center">
<a href="{{route('page.index')}}">
<img class="logo" src="@asset('visitor/images/logo.png')" alt="">
{{setting('pageName')}}
</a>
</h1>
</div>
<div class="top-bar-right">
@widgetArea('mainMenu')
</div>
</div>
@@ -12,49 +12,43 @@
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/motion-ui/1.1.1/motion-ui.min.css" />
<link rel="stylesheet" href="@asset('visitor/css/app.css')" />
@if (!empty($googleAnalyticsCode))
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push (arguments)
}, i[r].l = 1 * new Date ();
a = s.createElement (o),
m = s.getElementsByTagName (o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore (a, m)
}) (window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
ga ('create', '{{$googleAnalyticsCode}}', 'auto');
ga ('send', 'pageview');
</script>
@endif
@include('visitor.metaInformation')
</head>
<body>
@if (!empty($googleAnalyticsCode))
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push (arguments)
}, i[r].l = 1 * new Date ();
a = s.createElement (o),
m = s.getElementsByTagName (o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore (a, m)
}) (window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
<body class="@yield('bodyClass')">
ga ('create', '{{$googleAnalyticsCode}}', 'auto');
ga ('send', 'pageview');
</script>
@endif
<header class="top-bar">
<div class="top-bar-left hide-for-small-only">
<h1>
<a href="{{route('page.index')}}">
{{setting('pageName')}}
</a>
</h1>
</div>
<div class="top-bar-right">
@widgetArea('mainMenu')
</div>
@yield('topMenu')
</header>
@yield('content')
<div class="clearfix"></div>
<footer id="footer" class="stripe light">
<div id="footer-widgets">
@widgetArea('footer')
</div>
<footer class="row" id="footer">
<div id="footer-widgets" class=" text-center">
@widgetArea('footer')
</div>
<div id="binarity" class="text-right">
<a target="_blank" href="https://www.binarity.cz/"> binarity s.r.o.</a>
</div>