FEATURE #2341 @4h: add basics for template

This commit is contained in:
Michal Kváček
2017-02-23 18:22:33 +01:00
parent 5132278ee1
commit 507e186713
30 changed files with 23157 additions and 0 deletions
+111
View File
@@ -0,0 +1,111 @@
<?php
namespace Templates\PragueTennisCamp;
use App\CMS\Contracts\Modules\TemplateHandler;
use App\Models\Content\Content;
use App\Models\Module;
use App\Models\User;
use App\Models\Widgets\WidgetArea;
use Modules\Categories\Entities\Category;
class Handler implements TemplateHandler
{
/**
* Register admin menu (or multiple ones)
*
* This cannot be in ServiceProvider because Session is started at middleware. And ServiceProvider is called before
* starting any middleware..
*
* @param User $user model of logged user
*/
public static function registerAdminMenu(User $user)
{
}
/**
* Install module.
*
* This method is called after inserting info about module into database. It can be called only using Artisan in
* CLI.
*/
public static function install()
{
WidgetArea::create(['deletable' => 0, 'code' => 'mainMenu', 'name' => 'Menu']);
}
/**
* Uninstall template
*
* Delete some items in database, delete files etc.
*
* @param Module $template
*/
public static function uninstall(Module $template)
{
WidgetArea::where('code', 'mainMenu')
->delete();
}
/**
* Get list of registered templates and supported modules.
*
* Returned array is expected to be array of arrays with following items: module, namespace and templateName.
* Example:
* return [
* ['module' => 'Article', 'templateName' => 'article::template.name']
* ];
*
* When no "namespace" is specified, value strtolower(module) is used instaed.
*
* @return array
*/
public static function getPublicTemplatePaths()
{
return [
[
'module' => 'StaticPages',
'templateName' => 'staticpages::admin.templatePath'
],
[
'module' => 'ContactForm',
'templateName' => 'contactform::admin/adminMenu.templatePath'
],
];
}
/**
* Prepare Content object to be rendered using Blade template
*
* @param Content $content
*/
public static function beforeRender(Content & $content)
{
if ($content->isHomepage) {
$category = Category::where('url', 'trenersky-tym')
->first();
$content->traineeTeamCategory = $category;
}
}
/**
* Modify input data into format which can be understood by edit template
*
* @param Content $content
*/
public static function beforePopulatingEditForm(Content & $content)
{
}
/**
* Slightly modify Content object before saving into database.
*
* This way we can do almost whatever we want - even in template
*
* @param Content $content
* @param $request
*/
public static function beforeSave(Content & $content, $inputData)
{
}
}
@@ -0,0 +1,24 @@
<?php
namespace Templates\PragueTennisCamp\Providers;
use App\CMS\Helpers\Template;
use Modules\ContactForm\Widgets\Form\Presenter;
class ServiceProvider extends \Illuminate\Support\ServiceProvider {
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
}
public function boot() {
if (\App::runningInConsole())
return;
Presenter::$template = Template::name('widgets.contact.form');
}
}
+83
View File
@@ -0,0 +1,83 @@
body {
font-family: Ubuntu;
text-align: justify;
background: url("./images/bg.png");
}
header.top-bar {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 100;
background: rgba(0, 0, 0, 0.8);
}
header.top-bar ul {
background: none;
}
header.top-bar a {
color: white;
}
.logo {
max-height: 35px;
}
h1, h2, h3, h4 {
font-family: Comfortaa;
color: rgb(81, 81, 81);
}
.over-slider-stripe {
position: absolute;
top: 25%;
font-size: 230%;
font-family: Comfortaa;
background: rgba(0, 0, 0, 0.8);
color: white;
}
.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;
}
.content-container {
margin-top: 70px;
line-height: 170%;
}
.trainee-team .thumbnail {
max-height: 150px;
}
#footer {
margin-top: 10em;
}
.rounded {
border-radius: 50%;
}
.trainer {
max-width: 25%;
padding: 3px;
border: solid 1px #CCC;
}
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

@@ -0,0 +1,289 @@
/**
* Lightbox library created by binarity s.r.o.
* www.binarity.cz
* version 1.0.0
*
* Vanilla JavaScript lightbox plugin.
*
* Can use custom invoker passed as first argument or uses a default one - .b-lightbox.
* This allows to have more lightbox instances on one site to categorize items.
*
* Default behaviour:
* - Hides on escape keydown event - settable (options.allow_escape).
* - Hides on background click - settable (options.allow_backgroundclick).
* - Hide button in top right corner - settable (options.close_text).
* - Allows usage of arrow keys (left/right) to navigate through images - settable (option.allow_arrows).
*
* @param options
* @param autorun
* @constructor
*/
function BLightBox(options, autorun) {
// Instance and instance variables.
var BLightBox = this,
escape_key_allowed = (!(options !== undefined && options.allow_escape === false)),
hide_on_holder_allowed = (!(options !== undefined && options.allow_backgroundclick === false)),
arrows_allowed = (!(options !== undefined && options.allow_arrows === false)),
close_text = (options !== undefined && options.close_text !== undefined) ? options.close_text : 'Close',
// DOM
lightbox_holder = document.createElement('div'),
invoker_string = (options !== undefined && options.invoker !== undefined) ? options.invoker : '.b-lightbox',
invokers = document.querySelectorAll(invoker_string),
invokers_length = invokers.length,
lightbox_image = document.createElement('img'),
close_label = document.createElement('a'),
previous_button = document.createElement('a'),
next_button = document.createElement('a'),
lightbox_label = document.createElement('span');
// BLightBox DOM default settings.
lightbox_holder.className = 'b-lightbox-holder';
lightbox_image.className = 'b-lightbox-image';
close_label.className = 'b-lightbox-close-button';
close_label.textContent = close_text;
previous_button.className = 'b-lightbox-direction previous';
previous_button.innerHTML = '&lsaquo;';
next_button.className = 'b-lightbox-direction next';
next_button.innerHTML = '&rsaquo;';
lightbox_label.className = 'b-lightbox-label';
/**
* Show new image according to data-newindex attribute on directional button
*/
this.loadNewImage = function(event) {
event.stopPropagation();
var index = event.target.getAttribute('data-newindex'),
label = invokers[index].getAttribute('data-label');
if(invokers[index]) {
lightbox_image.style.display = 'none';
this.decideFromLoad(invokers[index]);
lightbox_image.style.display = 'block';
if(label != '') {
lightbox_label.innerHTML = label;
}
}
this.lightboxImageCenter(label != ''); // Center image.
// Change indexes to be opened.
previous_button.setAttribute('data-newindex', this.getPreviousIndex(index));
next_button.setAttribute('data-newindex', this.getNextIndex(index));
};
/**
* Returns first next index possible, or return very first index to allow rotation.
* @param index
* @returns {number}
*/
this.getNextIndex = function(index) {
// Skip to last image if we are on the first.
return (index == invokers_length - 1) ? 0 : parseInt(index) + 1;
};
/**
* Returns first previous index possible, or returns last array index to allow rotation.
* @param index
* @returns {number}
*/
this.getPreviousIndex = function(index) {
// Skip to last image if we are on the first.
return (index == 0) ? invokers_length - 1 : index - 1;
};
/**
* Reset ivokers_length variable for re-use.
*/
this.resetInvokersLength = function() {
invokers_length = invokers.length;
};
/**
* Provides code for closing a lightbox and hiding images.
*/
this.listenActionClose = function(event) {
lightbox_holder.style.display = 'none';
lightbox_image.style.display = 'none';
};
/**
* Adds src to lightbox image from element's style background-image.
* Removes url() par of the string.
* @param el
*/
this.loadImageFromBackgroundImage = function(el) {
lightbox_image.src = el.style.backgroundImage.replace(/url\("?(.*[^"])"?\)/, '$1');
};
/**
* Adds src to lightbox image from element's child img tag.
* @param el
*/
this.loadImageFromChildImg = function(el) {
var img = el.querySelector('img');
if(img) {
lightbox_image.src = img.src;
}
};
/**
* Move lightbox image to the center of screen.
*/
this.lightboxImageCenter = function(bool_label) {
// Image
lightbox_image.style.left = ((lightbox_holder.offsetWidth - lightbox_image.offsetWidth) / 2) + 'px';
lightbox_image.style.top = ((lightbox_holder.offsetHeight - lightbox_image.offsetHeight) / 2) + 'px';
// Image label.
if(bool_label === true) {
lightbox_label.style.width = lightbox_image.offsetWidth + 'px';
lightbox_label.style.left = ((lightbox_holder.offsetWidth - lightbox_image.offsetWidth) / 2) + 'px';
lightbox_label.style.display = 'block';
lightbox_label.style.top = (lightbox_image.offsetTop + lightbox_image.offsetHeight - lightbox_label.offsetHeight) + 'px';
}
};
/**
* Returns index in invokers array or false on unsuccessful attempt to find the element.
* @param el
* @returns {*}
*/
this.getIndexInInvokers = function(el) {
var inv_length = invokers_length;
while(inv_length--) {
if(invokers[inv_length].isEqualNode(el)) {
return inv_length;
}
}
return false;
};
/**
* This method decides from where to load src attribute into lightbox_image.
* @param el
*/
this.decideFromLoad = function(el) {
// Decide from which source to get image url.
if(el.hasAttribute('data-background')) {
this.loadImageFromBackgroundImage(el);
} else if(el.hasAttribute('data-img')) {
this.loadImageFromChildImg(el);
}
lightbox_label.style.display = 'none';
lightbox_label.innerHTML = '';
};
/**
* Provides code for opening a lightbox and displaying images.
*/
this.listenActionOpen = function(el, app, event) {
var label = el.getAttribute('data-label');
event.stopPropagation();
event.preventDefault(); // If element is a-tag, prevent from href requesting.
app.decideFromLoad(el); // Load image into lightbox_image.
// Change indexes to be opened.
previous_button.setAttribute('data-newindex', app.getPreviousIndex(app.getIndexInInvokers(el)));
next_button.setAttribute('data-newindex', app.getNextIndex(app.getIndexInInvokers(el)));
// Show lightbox and image.
lightbox_holder.style.display = 'block';
lightbox_image.style.display = 'block';
if(label != '') {
lightbox_label.innerHTML = label;
}
// Center lightbox within the screen.
app.lightboxImageCenter(label != '');
};
/**
* Add lightbox closing method listener to given element.
* @param el
*/
this.addCloseListenerFor = function(el) {
el.addEventListener('click', this.listenActionClose.bind(this));
};
/**
* Add lightbox opening method listener to given element.
* @param el
*/
this.addOpenListenerFor = function(el) {
var app = this;
el.addEventListener('click', app.listenActionOpen.bind(app, el, this), true);
};
/**
* Initializes all possible listeners at once on class instance creation.
*/
this.initiateListeners = function() {
// Open Listeners.
while(invokers_length--) {
this.addOpenListenerFor(invokers[invokers_length]);
}
this.resetInvokersLength();
// Close Listeners.
// On background click.
if(hide_on_holder_allowed){
this.addCloseListenerFor(lightbox_holder);
}
// On escape key hit, if requested.
if(escape_key_allowed) {
window.addEventListener('keydown', function (event) {
if(event.keyCode === 27) {
BLightBox.listenActionClose();
}
});
}
// Directional buttons.
previous_button.addEventListener('click',this.loadNewImage.bind(this));
next_button.addEventListener('click',this.loadNewImage.bind(this));
// Allow directing with arrows when enabled.
if(arrows_allowed) {
window.addEventListener('keydown', function arrowDirections(event) {
if(event.keyCode === 37) {
previous_button.click();
} else if(event.keyCode === 39) {
next_button.click();
}
});
}
};
/**
* Initialization method that starts BLightBox instance.
* @returns {*}
*/
this.init = function() {
// Append lightbox background.
document.body.appendChild(lightbox_holder);
lightbox_holder.appendChild(previous_button);
lightbox_holder.appendChild(lightbox_image);
lightbox_holder.appendChild(next_button);
lightbox_holder.appendChild(close_label);
lightbox_holder.appendChild(lightbox_label);
// Add event listeners for invokers.
this.initiateListeners();
// Auto centering on window.resize;
window.addEventListener('resize', function() {
BLightBox.lightboxImageCenter();
});
return BLightBox;
};
// If autorun is requested, create instance.
if(autorun !== undefined && autorun === true) {
return this.init();
} else {
return this;
}
}
@@ -0,0 +1,21 @@
$(document).foundation()
$ ('#formSend').click (function () {
$ (this).value = 'Odesílám...';
var form = $(this).closest('form');
$.ajax ({
url: form.attr('action'),
method: 'post',
data: form.serialize ()
}).done (function (resp) {
if (resp.status == 'success') {
alert ('Zpráva úspěšně odeslána. Odpovíme co nejdříve!');
window.top.location.reload ();
} else {
alert (resp.message);
}
$ (this).value = "ODESLAT";
});
});
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,335 @@
/**
* what-input - A global utility for tracking the current input method (mouse, keyboard or touch).
* @version v4.0.4
* @link https://github.com/ten1seven/what-input
* @license MIT
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define("whatInput", [], factory);
else if(typeof exports === 'object')
exports["whatInput"] = factory();
else
root["whatInput"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports) {
module.exports = (function() {
/*
---------------
Variables
---------------
*/
// cache document.documentElement
var docElem = document.documentElement;
// last used input type
var currentInput = 'initial';
// last used input intent
var currentIntent = null;
// form input types
var formInputs = [
'input',
'select',
'textarea'
];
// list of modifier keys commonly used with the mouse and
// can be safely ignored to prevent false keyboard detection
var ignoreMap = [
16, // shift
17, // control
18, // alt
91, // Windows key / left Apple cmd
93 // Windows menu / right Apple cmd
];
// mapping of events to input types
var inputMap = {
'keyup': 'keyboard',
'mousedown': 'mouse',
'mousemove': 'mouse',
'MSPointerDown': 'pointer',
'MSPointerMove': 'pointer',
'pointerdown': 'pointer',
'pointermove': 'pointer',
'touchstart': 'touch'
};
// array of all used input types
var inputTypes = [];
// boolean: true if touch buffer timer is running
var isBuffering = false;
// map of IE 10 pointer events
var pointerMap = {
2: 'touch',
3: 'touch', // treat pen like touch
4: 'mouse'
};
// touch buffer timer
var touchTimer = null;
/*
---------------
Set up
---------------
*/
var setUp = function() {
// add correct mouse wheel event mapping to `inputMap`
inputMap[detectWheel()] = 'mouse';
addListeners();
setInput();
};
/*
---------------
Events
---------------
*/
var addListeners = function() {
// `pointermove`, `MSPointerMove`, `mousemove` and mouse wheel event binding
// can only demonstrate potential, but not actual, interaction
// and are treated separately
// pointer events (mouse, pen, touch)
if (window.PointerEvent) {
docElem.addEventListener('pointerdown', updateInput);
docElem.addEventListener('pointermove', setIntent);
} else if (window.MSPointerEvent) {
docElem.addEventListener('MSPointerDown', updateInput);
docElem.addEventListener('MSPointerMove', setIntent);
} else {
// mouse events
docElem.addEventListener('mousedown', updateInput);
docElem.addEventListener('mousemove', setIntent);
// touch events
if ('ontouchstart' in window) {
docElem.addEventListener('touchstart', touchBuffer);
}
}
// mouse wheel
docElem.addEventListener(detectWheel(), setIntent);
// keyboard events
docElem.addEventListener('keydown', updateInput);
docElem.addEventListener('keyup', updateInput);
};
// checks conditions before updating new input
var updateInput = function(event) {
// only execute if the touch buffer timer isn't running
if (!isBuffering) {
var eventKey = event.which;
var value = inputMap[event.type];
if (value === 'pointer') value = pointerType(event);
if (
currentInput !== value ||
currentIntent !== value
) {
var activeInput = (
document.activeElement &&
formInputs.indexOf(document.activeElement.nodeName.toLowerCase()) === -1
) ? true : false;
if (
value === 'touch' ||
// ignore mouse modifier keys
(value === 'mouse' && ignoreMap.indexOf(eventKey) === -1) ||
// don't switch if the current element is a form input
(value === 'keyboard' && activeInput)
) {
// set the current and catch-all variable
currentInput = currentIntent = value;
setInput();
}
}
}
};
// updates the doc and `inputTypes` array with new input
var setInput = function() {
docElem.setAttribute('data-whatinput', currentInput);
docElem.setAttribute('data-whatintent', currentInput);
if (inputTypes.indexOf(currentInput) === -1) {
inputTypes.push(currentInput);
docElem.className += ' whatinput-types-' + currentInput;
}
};
// updates input intent for `mousemove` and `pointermove`
var setIntent = function(event) {
// only execute if the touch buffer timer isn't running
if (!isBuffering) {
var value = inputMap[event.type];
if (value === 'pointer') value = pointerType(event);
if (currentIntent !== value) {
currentIntent = value;
docElem.setAttribute('data-whatintent', currentIntent);
}
}
};
// buffers touch events because they frequently also fire mouse events
var touchBuffer = function(event) {
// clear the timer if it happens to be running
window.clearTimeout(touchTimer);
// set the current input
updateInput(event);
// set the isBuffering to `true`
isBuffering = true;
// run the timer
touchTimer = window.setTimeout(function() {
// if the timer runs out, set isBuffering back to `false`
isBuffering = false;
}, 200);
};
/*
---------------
Utilities
---------------
*/
var pointerType = function(event) {
if (typeof event.pointerType === 'number') {
return pointerMap[event.pointerType];
} else {
return (event.pointerType === 'pen') ? 'touch' : event.pointerType; // treat pen like touch
}
};
// detect version of mouse wheel event to use
// via https://developer.mozilla.org/en-US/docs/Web/Events/wheel
var detectWheel = function() {
return 'onwheel' in document.createElement('div') ?
'wheel' : // Modern browsers support "wheel"
document.onmousewheel !== undefined ?
'mousewheel' : // Webkit and IE support at least "mousewheel"
'DOMMouseScroll'; // let's assume that remaining browsers are older Firefox
};
/*
---------------
Init
don't start script unless browser cuts the mustard
(also passes if polyfills are used)
---------------
*/
if (
'addEventListener' in window &&
Array.prototype.indexOf
) {
setUp();
}
/*
---------------
API
---------------
*/
return {
// returns string: the current input type
// opt: 'loose'|'strict'
// 'strict' (default): returns the same value as the `data-whatinput` attribute
// 'loose': includes `data-whatintent` value if it's more current than `data-whatinput`
ask: function(opt) { return (opt === 'loose') ? currentIntent : currentInput; },
// returns array: all the detected input types
types: function() { return inputTypes; }
};
}());
/***/ }
/******/ ])
});
;
@@ -0,0 +1 @@
!function(e,t){"function"==typeof define&&define.amd?define([],function(){return t()}):"object"==typeof exports?module.exports=t():e.whatInput=t()}(this,function(){"use strict";function e(e){clearTimeout(s),n(e),f=!0,s=setTimeout(function(){f=!1},1e3)}function t(e){f||n(e)}function n(e){var t=o(e),n=r(e),d=w[e.type];"pointer"===d&&(d=i(e)),p!==d&&(!y&&p&&"keyboard"===d&&"tab"!==v[t]&&m.indexOf(n.nodeName.toLowerCase())>=0||(p=d,a.setAttribute("data-whatinput",p),-1===h.indexOf(p)&&h.push(p))),"keyboard"===d&&u(t)}function o(e){return e.keyCode?e.keyCode:e.which}function r(e){return e.target||e.srcElement}function i(e){return"number"==typeof e.pointerType?b[e.pointerType]:e.pointerType}function u(e){-1===c.indexOf(v[e])&&v[e]&&c.push(v[e])}function d(e){var t=o(e),n=c.indexOf(v[t]);-1!==n&&c.splice(n,1)}var s,c=[],a=document.body,f=!1,p=null,m=["input","select","textarea"],y=a.hasAttribute("data-whatinput-formtyping"),w={keydown:"keyboard",mousedown:"mouse",mouseenter:"mouse",touchstart:"touch",pointerdown:"pointer",MSPointerDown:"pointer"},h=[],v={9:"tab",13:"enter",16:"shift",27:"esc",32:"space",37:"left",38:"up",39:"right",40:"down"},b={2:"touch",3:"touch",4:"mouse"};return function(){var n="mousedown";window.PointerEvent?n="pointerdown":window.MSPointerEvent&&(n="MSPointerDown"),a.addEventListener(n,t),a.addEventListener("mouseenter",t),"ontouchstart"in document.documentElement&&a.addEventListener("touchstart",e),a.addEventListener("keydown",t),a.addEventListener("keyup",d)}(),{ask:function(){return p},keys:function(){return c},types:function(){return h},set:n}});
@@ -0,0 +1,16 @@
<form action="{{route('email.send', ['formId' => $page->id])}}" method="post">
{!! csrf_field() !!}
<div class="column medium-6">
<input class="large" placeholder="jméno a příjmení" name="name" type="text">
</div>
<div class="column medium-6">
<input class="large" placeholder="telefon" name="phone" type="text">
</div>
<div class="column medium-12">
<input class="large" placeholder="e-mail" name="email" type="text">
<textarea class="large" placeholder="zpráva" name="message"></textarea>
</div>
<div class="column medium-6 right">
<a href="#" class="button expanded long secondary" id="formSend">ODESLAT</a>
</div>
</form>
@@ -0,0 +1,61 @@
@extendVisitor('defaultLayout')
@section('content')
<div class="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="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>
@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
@@ -0,0 +1,14 @@
@extendVisitor('defaultLayout')
@section('content')
<div class="row content-container">
<h1>{{$page->title}}</h1>
{!! $page->pageContent !!}
</div>
@endsection
@@ -0,0 +1,50 @@
@extendVisitor('defaultLayout')
@section('content')
@if(count($page->files) > 0)
<div class="orbit" role="region" data-orbit
data-options="animInFromLeft:fade-in; animInFromRight:fade-in; animOutToLeft:fade-out; animOutToRight:fade-out;">
<ul class="orbit-container">
@foreach($page->files()->where('mime_type', 'like', 'image%')->get() as $i => $image)
<li class="orbit-slide @if($i == 0) is-active @endif">
<img class="orbit-image" src="@upload($image->filename)" alt="" />
</li>
@endforeach
</ul>
</div>
@endif
<div class="over-slider-stripe stripe">
<h1>{{$page->title}}</h1>
<p>{{$page->metaDescription}}</p>
</div>
<div class="row content-container">
{!! $page->pageContent !!}
</div>
<div class="text-center stripe light 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))}}"
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 class="clearfix"></div>
</div>
@widgetArea('belowHomepage')
@endsection
@@ -0,0 +1,19 @@
@extendVisitor('defaultLayout')
@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,68 @@
<!doctype html>
<html>
<head>
<title>{{$page->title}} | {{setting('pageName')}}</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
<link href='https://fonts.googleapis.com/css?family=Ubuntu:400,300,500,700&subset=latin-ext,latin' rel='stylesheet'
type='text/css'>
<link href="https://fonts.googleapis.com/css?family=Comfortaa&amp;subset=latin-ext" rel="stylesheet">
<link href="@asset('visitor/css/foundation.css')" type="text/css" rel="stylesheet">
<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')" />
@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');
ga ('create', '{{$googleAnalyticsCode}}', 'auto');
ga ('send', 'pageview');
</script>
@endif
<header class="top-bar">
<div class="top-bar-left">
<a href="{{route('page.index')}}">
<img src="@asset('visitor/images/logo.png')" class="logo" alt="">
</a>
</div>
<div class="top-bar-right">
@widgetArea('mainMenu')
</div>
</header>
@yield('content')
<div class="clearfix"></div>
<footer id="footer" class="stripe light">
<div id="footer-widgets">
@widgetArea('footer')
</div>
<div id="binarity" class="text-right">
<a target="_blank" href="https://www.binarity.cz/"> binarity s.r.o.</a>
</div>
</footer>
<script src="@asset('visitor/js/vendor/jquery.min.js')" type="text/javascript"></script>
<script src="@asset('visitor/js/vendor/foundation.min.js')" type="text/javascript"></script>
<script src="@asset('visitor/js/BLightBox.js')" type="text/javascript"></script>
<script src="@asset('visitor/js/app.js')" type="text/javascript"></script>
@yield('javascripts')
</body>
</html>
@@ -0,0 +1,8 @@
@extendVisitor('errors.layout')
@section('pageTitle', 'Stránka nenalezena')
@section('content')
Nějakým způsobem se stalo, že tato stránka neexistuje. Zkuste se podívat na <a href="{{route("page.index")}}">hlavní
stránku</a>, případně nás
<a href="{{route("page.content", ['url' => 'kontakt'])}}">kontaktujte</a> a dejte nám vědět, co je špatně.
@endsection
@@ -0,0 +1,6 @@
@extendVisitor('errors.layout')
@section('pageTitle', 'Probíhá údržba stránek')
@section('content')
Právě na stránkách provádíme úpravy, vše bude v pořádku za několik málo okamžiků.
@endsection
@@ -0,0 +1,6 @@
@extendVisitor('errors.layout')
@section('pageTitle', 'Domovská stránka neexistuje')
@section('content')
V systému nikdo zatím nenastavil domovskou stránku, proto vidíte tuto obrazovku. Určitě se jedná o nějakou drobnou chybu, která bude velmi brzo opravena.
@endsection
@@ -0,0 +1,100 @@
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link href='https://fonts.googleapis.com/css?family=Hind+Siliguri:400,500,700,300&amp;subset=latin,latin-ext'
rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="{{asset_path('visitor/css/app.css')}}">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@yield('pageTitle') | {{setting('pageName')}}</title>
<style>
body {
font-size: 150%;
line-height: 150%;
position: relative;
}
h1 {
font-size: 4em;
font-weight: 100;
padding-top: 30px;
}
header {
background: #7cad2a;
padding: 30px 0;
}
footer {
position: absolute;
bottom: 0;
padding: 5px 0;
}
footer a {
color: white;
}
</style>
</head>
<body class="text-center">
<header>
<a href="{{route('page.index')}}">
<img src="{{asset_path('visitor/images/menu_logo.png')}}" class="PragueTennisCamp-logo-menu" alt="PragueTennisCamp s.r.o.">
</a>
</header>
<h1>@yield('pageTitle')</h1>
<div class="row">
@yield('content')
</div>
<footer id="footer">
@if (!empty(setting('facebookProfile')))
<a href="{{setting('facebookProfile')}}" target="_blank">
<i class="fa fa-fw fa-facebook-official fb-color"></i>
</a>
@endif
@if (!empty(setting('linkedInProfile')))
<a href="{{setting('linkedInProfile')}}" target="_blank">
<i class="fa fa-fw fa-linkedin in-color"></i>
</a>
@endif
@if(!empty(setting('gplusProfile')))
<a href="{{setting('gplusProfile')}}" target="_blank">
<i class="fa fa-fw fa-google-plus gp-color"></i>
</a>
@endif
</footer>
{{--<ul class="social-icons menu">--}}
{{--<a href="{{setting('facebookProfile')}}" target="_blank">--}}
{{--<i class="fa fa-fw fa-2x fa-facebook-official fb-color"></i>--}}
{{--</a>--}}
{{--<li>--}}
{{--<a href="{{setting('linkedInProfile')}}" target="_blank">--}}
{{--<i class="fa fa-fw fa-2x fa-linkedin in-color"></i>--}}
{{--</a>--}}
{{--</li>--}}
{{--<li>--}}
{{--<a href="{{setting('gplusProfile')}}" target="_blank">--}}
{{--<i class="fa fa-fw fa-2x fa-google-plus gp-color"></i>--}}
{{--</a>--}}
{{--</li>--}}
{{--</ul>--}}
</body>
</html>
@@ -0,0 +1,9 @@
@if(isset($page))
@section('pageTitle', $page->title)
@section('pageDescription', $page->meta_description)
@section('pageKeywords', $page->meta_keywords)
@section('pageTitleImage')
@if (!empty($page->titlePhoto) && \App\CMS\Helpers\Path::upload($page->titlePhoto))@upload($page->titlePhoto)
@else{{asset_path('visitor/images/social-cover.png')}}@endif
@endsection
@endif
@@ -0,0 +1,8 @@
<div class="row">
<h3 class="text-center">{{$widget->name}}</h3>
<div class="column small-centered large-8">
@include('modules.contactform._partials.form', ['page' => $form ])
</div>
</div>
+9
View File
@@ -0,0 +1,9 @@
<?php
return [
'providers' => [\Templates\PragueTennisCamp\Providers\ServiceProvider::class],
'files' => [],
'handler' => \Templates\PragueTennisCamp\Handler::class,
'name' => 'PragueTennisCamp s.r.o.',
'alias' => 'PragueTennisCamp-template',
'description' => '',
];