Merge branch 'dev' into module_profiler

This commit is contained in:
Michal Kváček
2017-09-23 00:45:51 +02:00
711 changed files with 14073 additions and 84301 deletions
@@ -1,18 +0,0 @@
<?php
namespace Templates\Base\OnePage\Events;
use App\Models\Content\Content;
use Illuminate\Queue\SerializesModels;
class AddPageIntoHomepage {
use SerializesModels;
/**
* @var Content
*/
public $page;
public function __construct(Content $page)
{
$this->page = $page;
}
}
@@ -1,18 +0,0 @@
<?php
namespace Templates\Base\OnePage\Events;
use App\Models\Content\Content;
use Illuminate\Queue\SerializesModels;
class RemovePageFromHomepage {
use SerializesModels;
/**
* @var Content
*/
public $page;
public function __construct(Content $page)
{
$this->page = $page;
}
}
-188
View File
@@ -1,188 +0,0 @@
<?php
namespace Templates\Base\OnePage\Handlers;
use App\CMS\Contracts\Modules\InstallableModule;
use App\CMS\Contracts\Modules\TemplateHandler;
use App\CMS\Contracts\Repositories\Content as IContent;
use App\CMS\Helpers\CurrentTemplate;
use App\CMS\Helpers\PageRenderer;
use App\CMS\Helpers\Settings;
use App\CMS\Helpers\Template;
use App\Models\ActionLog\ActionLogType;
use App\Models\Content\Content;
use App\Models\Module;
use App\Models\Settings as SettingsModel;
use App\Models\User;
use App\Models\Widgets\Widget;
use App\Models\Widgets\WidgetArea;
use App\Models\Widgets\WidgetInWidgetArea;
use App\Models\Widgets\WidgetType;
use Illuminate\Support\Facades\Auth;
use Templates\Base\OnePage\Widgets\OnePageMenu\OnePageMenu;
abstract class OnePage implements TemplateHandler, InstallableModule
{
/**
* Name of settings key for list of pages used on homepage
*/
const HOMEPAGE_PAGES_SETTINGS_KEY = 'template.onepage.homepagePages';
protected static $homepagePagesInitialized = false;
protected static $homepagePages;
/**
* 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)
{
$menu = \Menu::instance('mainMenu');
// $menu->route('template.setHomepage', trans('template::admin/mainMenu.setHomepage'), [], 1, ['icon' => 'fa fa-fw fa-home']);
}
/**
* Getter for pages displayed on homepage
*
* @return array
*/
public static function getPagesOnHomepage()
{
if (!self::$homepagePagesInitialized) {
$pageIds = (array)json_decode(Settings::get(self::HOMEPAGE_PAGES_SETTINGS_KEY, '[]'));
if (empty($pageIds)) {
return [];
}
// get all available pages
$pages = Content::whereIn('id', $pageIds);
if (Auth::user()) {
$pages = $pages->where('status', '!=', IContent::STATUS_DRAFT);
} else {
$pages = $pages->where('status', IContent::STATUS_PUBLIC);
}
$homepagePages = $pages->get()
->getDictionary();
foreach ($pageIds as $pageId) {
if (!isset($homepagePages[$pageId])) {
continue;
}
self::$homepagePages[] = $homepagePages[$pageId];
}
self::$homepagePagesInitialized = true;
}
return self::$homepagePages;
}
/**
* Prepare Content object to be rendered using Blade template
*
* @param Content $content
*
* @return array
*/
public static function beforeRender(Content & $content)
{
if ($content->isHomepage) {
$pages = self::getPagesOnHomepage();
// create real content from pages
$pagesRaw = $pagesInTemplates = [];
foreach ($pages as $page) {
// save pages as models only
$pagesRaw[$page->url] = $page;
// save rendered pages
try {
$pagesInTemplates[$page->url] = PageRenderer::render($page)
->render();
} catch (\Exception $e) {
if (Auth::user()) {
$pagesInTemplates[$page->url] = view(Template::name('errors.cannotRender'), ['page' => $page])->render();
}
}
}
// return pages into template
return ['pagesHtml' => $pagesInTemplates, 'pagesRaw' => $pagesRaw];
}
return [];
}
/**
* Install module
*/
public static function install()
{
// register action log types
$types = [
[
'string_id' => 'pageRemovedFromHomepage',
'name' => 'template::admin/setHomepage.events.names.removedPage',
'value' => 'template::admin/setHomepage.events.descriptions.removedPage',
],
[
'string_id' => 'pageAddedIntoHomepage',
'name' => 'template::admin/setHomepage.events.names.addedPage',
'value' => 'template::admin/setHomepage.events.descriptions.addedPage',
],
];
foreach ($types as $type) {
ActionLogType::create($type);
}
// try to create onepage menu widget
$widgetName = OnePageMenu::getName();
$widgetDescription = OnePageMenu::getDescription();
CurrentTemplate::reset();
// create row in widget types
WidgetType::create([
'handler' => OnePageMenu::class,
'name' => $widgetName,
'module_id' => null,
'template_id' => CurrentTemplate::get()->id,
'description' => $widgetDescription
]);
$area = WidgetArea::create(['name' => 'Top menu', 'code' => 'topMenu', 'deletable' => 0]);
$widget = Widget::create([
'widget_type_handler' => OnePageMenu::class,
'name' => 'Menu',
'settings' => '{"containerClass": null}',
'deletable' => 0
]);
// bind widget with widget area
WidgetInWidgetArea::create(['widget_id' => $widget->id, 'widget_area_id' => $area->id, 'position' => 1]);
}
/**
* Uninstall template
*
* @param Module $template
*/
public static function uninstall(Module $template)
{
// delete action log types
ActionLogType::whereIn('string_id', ['pageRemovedFromHomepage', 'pageAddedIntoHomepage'])
->delete();
// delete settings with pages on homepage
SettingsModel::where('key', self::HOMEPAGE_PAGES_SETTINGS_KEY)
->delete();
}
}
@@ -1,160 +0,0 @@
<?php
namespace Templates\Base\OnePage\Http\Controllers\Admin;
use App\CMS\Contracts\Repositories\Content as IContent;
use App\CMS\Helpers\Settings;
use App\Http\Controllers\Admin\Controller;
use App\Models\Settings as SettingsModel;
use Illuminate\Support\Facades\Event;
use Mcamara\LaravelLocalization\Facades\LaravelLocalization;
use Templates\Base\OnePage\Events\AddPageIntoHomepage;
use Templates\Base\OnePage\Events\RemovePageFromHomepage;
use Templates\Base\OnePage\Handlers\OnePage;
class SetHomepage extends Controller
{
/**
* @var IContent
*/
private $content;
/**
* SetHomepage constructor.
*
* @param Content $content
*/
public function __construct(IContent $content)
{
parent::__construct();
$this->content = $content;
}
/**
* Display form for organizing pages on homepage
*
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function getPages()
{
// get pages which are assigned as homepage parts
$usedPagesIds = (array)Settings::getJson(OnePage::HOMEPAGE_PAGES_SETTINGS_KEY);
// get all pages - they will be separated for used and not used on next lines
$allPages = $this->content->getOverview()
->get();
// separate pages to used and not used - with help of $usedPAgesIds array defined above
$pages = $used = $notUsed = [];
$homepage = null;
foreach ($allPages as $page) {
if ($page->isHomepage) {
$homepage = $page;
continue;
}
$pages[$page->id] = $page;
if (in_array($page->id, $usedPagesIds)) {
$used[$page->id] = $page;
} else {
$notUsed[$page->id] = $page;
}
}
return view('template::admin/homepage.set', [
'usedPagesIds' => $usedPagesIds,
'allPages' => $pages,
'usedPages' => $used,
'notUsedPages' => $notUsed,
'homepage' => $homepage
]);
}
/**
* Add page into homepage
*
* @param $id
*
* @return \Illuminate\Http\RedirectResponse
*/
public function addPage($id)
{
$page = $this->content->getOne($id);
if ($page->isHomepage) {
return redirect()
->back()
->with('error', trans('template::admin/setHomepage.cannotSetHomepageAsPartOfHomepage'));
}
// try to get page config
$settingsEntry = SettingsModel::where('key', OnePage::HOMEPAGE_PAGES_SETTINGS_KEY)
->where('language', LaravelLocalization::getCurrentLocale())
->first();
if (!$settingsEntry) {
$settingsEntry = new SettingsModel();
$settingsEntry->language = LaravelLocalization::getCurrentLocale();
$settingsEntry->key = OnePage::HOMEPAGE_PAGES_SETTINGS_KEY;
$usedPagesIds = [];
} else {
$usedPagesIds = (array)json_decode($settingsEntry->value);
}
// add page into list of used pages - if not already there
if (!in_array($id, $usedPagesIds)) {
$usedPagesIds[] = $id;
}
$settingsEntry->value = json_encode($usedPagesIds);
$settingsEntry->save();
// inform other application parts about this event
Event::fire(new AddPageIntoHomepage($page));
return redirect()
->back()
->with('success', trans('template::admin/setHomepage.successfullyAdded'));
}
/**
* Remove page from homepage
*
* @param $id
*
* @return \Illuminate\Http\RedirectResponse
*/
public function removePage($id)
{
$pages = (array)Settings::getJson(OnePage::HOMEPAGE_PAGES_SETTINGS_KEY);
$page = $this->content->getOne($id);
if (!in_array($id, $pages)) {
return redirect()
->back()
->with('error', trans('template::admin/setHomepage.invalidPageId'));
} else {
$pagePosition = array_search($id, $pages);
// remove page from config array
unset($pages[$pagePosition]);
$pages = array_values($pages);
// update in database
SettingsModel::where('key', OnePage::HOMEPAGE_PAGES_SETTINGS_KEY)
->where('language', LaravelLocalization::getCurrentLocale())
->update(['value' => json_encode($pages)]);
// inform other application parts about this event
Event::fire(new RemovePageFromHomepage($page));
return redirect()
->back()
->with('success', trans('template::admin/setHomepage.successfullyRemoved'));
}
}
}
-19
View File
@@ -1,19 +0,0 @@
<?php
Route::group([
'middleware' => ['admin'],
'prefix' => \LaravelLocalization::setLocale() . '/admin/template',
'namespace' => 'Templates\Base\OnePage\Http\Controllers\Admin'
], function () {
// display form for selecting pages for homepage
Route::get('homepage', 'SetHomepage@getPages')
->name('template.setHomepage');
// add page into homepage
Route::get('add/{id}', 'SetHomepage@addPage')
->name('template.homepage.addPage');
// delete page from homepage
Route::get('remove/{id}', 'SetHomepage@removePage')
->name('template.homepage.removePage');
});
@@ -1,37 +0,0 @@
<?php
namespace Templates\Base\OnePage\Listeners;
use App\Events\SetHomepage;
use App\CMS\Helpers\Settings;
use App\Models\Settings as SettingsModel;
use Templates\Base\OnePage\Handlers\OnePage;
class HomepageChanged
{
public function handle(SetHomepage $event)
{
$pagesOnHomepage = (array)json_decode(Settings::get(OnePage::HOMEPAGE_PAGES_SETTINGS_KEY, '[]'));
if (empty($pagesOnHomepage)) {
return;
}
if (in_array($event->page->id, $pagesOnHomepage)) {
$position = array_search($event->page->id, $pagesOnHomepage);
unset($pagesOnHomepage[$position]);
$pages = array_values($pagesOnHomepage);
$settings = SettingsModel::where('key', OnePage::HOMEPAGE_PAGES_SETTINGS_KEY)
->where('language', \LaravelLocalization::getCurrentLocale());
// update in database
if (!empty($pages)) {
$settings->update(['value' => json_encode($pages)]);
} else {
$settings->delete();
}
}
}
}
@@ -1,23 +0,0 @@
<?php
namespace Templates\Base\OnePage\Listeners\Loggers;
use App\Listeners\Loggers\Logger;
use Templates\Base\OnePage\Events\AddPageIntoHomepage;
class LogAddingPage extends Logger
{
public function handle(AddPageIntoHomepage $event)
{
$parameters = [
'id' => $event->page->id,
'title' => $event->page->title
];
$this->saveLog($parameters);
}
protected function getName()
{
return 'pageAddedIntoHomepage';
}
}
@@ -1,23 +0,0 @@
<?php
namespace Templates\Base\OnePage\Listeners\Loggers;
use App\Listeners\Loggers\Logger;
use Templates\Base\OnePage\Events\RemovePageFromHomepage;
class LogRemovingPage extends Logger
{
public function handle(RemovePageFromHomepage $event)
{
$parameters = [
'id' => $event->page->id,
'title' => $event->page->title
];
$this->saveLog($parameters);
}
protected function getName()
{
return 'pageRemovedFromHomepage';
}
}
@@ -1,19 +0,0 @@
<?php
namespace Templates\Base\OnePage\Providers;
use App\Events\SetHomepage;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
use Templates\Base\OnePage\Events\AddPageIntoHomepage;
use Templates\Base\OnePage\Events\RemovePageFromHomepage;
use Templates\Base\OnePage\Listeners\HomepageChanged;
use Templates\Base\OnePage\Listeners\Loggers\LogAddingPage;
use Templates\Base\OnePage\Listeners\Loggers\LogRemovingPage;
class EventProvider extends ServiceProvider
{
protected $listen = [
SetHomepage::class => [HomepageChanged::class],
AddPageIntoHomepage::class => [LogAddingPage::class],
RemovePageFromHomepage::class => [LogRemovingPage::class],
];
}
@@ -1,58 +0,0 @@
<?php
namespace Templates\Base\OnePage\Providers;
use Illuminate\Support\ServiceProvider;
use Templates\Base\OnePage\Widgets\OnePageMenu\OnePageMenu;
class OnePageTemplate extends ServiceProvider
{
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->registerTranslations();
}
public function boot()
{
$this->registerViews();
$this->registerWidgets();
// register event service provider for this template
$this->app->register(EventProvider::class);
}
/**
* Register translations used in this base template
*/
private function registerTranslations()
{
// register translations
$this->loadTranslationsFrom(__DIR__ . '/../Resources/lang', 'template');
}
/**
* Register views used in this template - both visitor's and admin's
*/
private function registerViews()
{
// load views
$this->loadViewsFrom(array_merge(array_map(function ($path) {
return $path;
}, \Config::get('view.paths')), [__DIR__ . '/../Resources/views']), 'template');
}
/**
* Register all widgets related to this template
*/
private function registerWidgets()
{
$registrator = $this->app->make('registerWidget');
// register all available widgets
$registrator->register(OnePageMenu::class);
}
}
@@ -1,5 +0,0 @@
<?php
return [
"setHomepage" => "Nastavení hlavní stránky",
"templateName" => "Jednostránkovka",
];
@@ -1,23 +0,0 @@
<?php
return [
"addToHomepage" => "Přidat stránku na homepage",
"cannotSetHomepageAsPartOfHomepage" => "No toto? Jak mám nastavit domovskou stárnku jako podstránku sama sebe?",
"events" => ["descriptions" => ["addedPage" => 'Na domovskou stránku byla přidána stránka #:id s titulkem ":title"',
"removedPage" => 'Z domovské stránky byla odebrána stránka #:id ":title"',
],
"names" => ["addedPage" => "Stránka přidána na titulní stranu.",
"removedPage" => "Stránka odebrána z titulní strany.",
],
],
"invalidPageId" => "Nelze odebrat stránku z titulní strany, neboť uvedené ID neexistuje.",
"noHomepageSet" => "Není nastavena domovská stránka, následující nastavení se nikde neprojeví!",
"noPagesAvailable" => "Žádné stránky k dispozici.",
"noPagesSelected" => "Nebyla vybrána žádná stránka pro zobrazení na titulní straně. Zatím...",
"notUsedPages" => "Nepoužité stránky",
"pageDescription" => "Na této stránce můžete nastavit stránky, které se mají zobrazovat na titulní strane.",
"reallyRemovePage" => "Opravdu chcete odebrat stránku y hlavní stránky?",
"successfullyAdded" => "Stránka úspěšně přidána na úvodní stranu",
"successfullyRemoved" => "Stránka úspěšně odebrána z úvodní stránky.",
"title" => "Nastavení úvodní stránky",
"usedPages" => "Použité stránky",
];
@@ -1,11 +0,0 @@
<?php
return [
"description" => "Jednoduché menu použité pro navigaci v jednostránkovém webu. Pro přechody mezi stránkami používá anchor odkazy na stránky. Ty se generují automaticky ze seznamu stránek přidaných na homepage.",
"form" => ["containerClass" => "HTML třída obalového elementu",
"description" => "Popis",
"name" => "Název menu",
"save" => "Uložit",
],
"name" => "Jednstránkové menu",
"new" => "Vytvořit nové menu",
];
@@ -1,5 +0,0 @@
<?php
return [
'setHomepage' => 'Homepage settings',
'templateName' => 'Onepager'
];
@@ -1,26 +0,0 @@
<?php
return [
'title' => 'Homepage setup',
'pageDescription' => 'On this page you can setup all pages which should appear on homepage. Use drag\'n\'drop feature and organize your pages into your presentation.',
'noPagesSelected' => 'No pages selected for homepage. Yet...',
'noPagesAvailable' => 'There are no pages you could set up for homepage.',
'successfullyAdded' => 'Page successfully added to homepage.',
'successfullyRemoved' => 'Page successfully removed from homepage.',
'invalidPageId' => 'Cannot remove page from homepage, because given ID does not exist.',
'usedPages' => 'Used pages',
'notUsedPages' => 'Not used pages',
'reallyRemovePage' => 'Do you really want to remove this page from homepage?',
'cannotSetHomepageAsPartOfHomepage' => 'Cannot set currently set homepage as one of homepage pages.',
'noHomepageSet' => 'No homepage set, following settings will not take effect!',
'addToHomepage' => 'Add page into homepage',
'events' => [
'names' => [
'removedPage' => 'Removed page from homepage',
'addedPage' => 'Added page into homepage'
],
'descriptions' => [
'removedPage' => 'Removed page #:id ":title" from homepage.',
'addedPage' => 'Added page #:id ":title" into homepage.'
]
]
];
@@ -1,12 +0,0 @@
<?php
return [
'name' => 'One page menu',
'description' => 'Simple menu used for one page templates. This menu navigates using nachor links on page. Links are generated automatically using list of pages on homepage.',
'new' => 'Create new menu',
'form' => [
'name' => 'Menu name',
'description' => 'Description',
'containerClass' => 'HTML class for container element',
'save' => 'Save',
]
];
@@ -1,90 +0,0 @@
@extends('admin.layoutWithNavigation')
@section('pageHeading', trans('template::admin/setHomepage.title'))
@section('pageDescription', trans('template::admin/setHomepage.pageDescription'))
{{--
Improvement: http://www.html5rocks.com/en/tutorials/dnd/basics/
--}}
@section('content')
<div class="row">
<div class="col-lg-8">
@if(isset($homepage))
@include('admin.snippets.card', [
'type' => 'primary',
'title' => $homepage->title.' <small>'.trans($homepage->module_name).'</small>',
'body' => '<p>'.str_limit(strip_tags($homepage->content), 200).'</p>',
'footerClass' => 'text-right',
'footer' => '<a href="'.route('content.edit', ['url' => $homepage->url]).'" class="btn btn-secondary btn-sm"><i class="fa fa-fw fa-pencil"></i></a>'
])
@else
<div class="alert alert-warning">@lang('template::admin/setHomepage.noHomepageSet')</div>
@endif
<h3>@lang('template::admin/setHomepage.usedPages')</h3>
@forelse($usedPagesIds as $pageId)
{{--ignore non-existing pages--}}
@if(!isset($allPages[$pageId]))
@continue
@endif
@include('admin.snippets.card', [
'title' => $allPages[$pageId]->title.' <small>'.trans($allPages[$pageId]->module_name).'</small>',
'body' => '<p>'.str_limit(strip_tags($allPages[$pageId]->content), 200).'</p>',
'footerClass' => 'text-right',
'footer' => '
<a href="'.route('content.edit', ['url' => $allPages[$pageId]->url]).'" class="btn btn-secondary btn-sm"><i class="fa fa-fw fa-pencil"></i></a>
<a href="'.route('template.homepage.removePage', ['id' => $allPages[$pageId]->id]).'" class="btn btn-warning confirm btn-sm" data-message="'.trans('template::admin/setHomepage.reallyRemovePage').'"><i class="fa fa-fw fa-trash confirm"></i></a>
'
])
@empty
<div class="alert alert-info">
@lang('template::admin/setHomepage.noPagesSelected')
</div>
@endforelse
</div>
<div class="col-lg-4">
<h3>@lang('template::admin/setHomepage.notUsedPages')</h3>
@forelse($notUsedPages as $page)
<div class="card card-default">
<div class="card-header">
<div class="header-block">
<p class="title">{{$page->title}}
<small>@lang($page->module_name)</small>
</p>
</div>
</div>
<div class="card-block">
{{str_limit(strip_tags($page->content), 100)}}
</div>
<div class="card-footer text-right">
<a href="{{route('content.edit', ['id' => $page->id])}}"
class="btn btn-secondary btn-sm"><i
class="fa fa-fw fa-pencil"></i></a>
@if(!$page->isHomepage)
<a href="{{route('content.setHomepage', ['id' => $page->id])}}"
class="btn btn-secondary confirm btn-sm"
data-toggle="tooltip" title="@lang('admin/contents.setHomepage')">
<i class="fa fa-home"></i>
</a>
@endif
<a href="{{route('template.homepage.addPage', ['id' => $page->id])}}"
class="btn btn-sm btn-primary" data-toggle="tooltip"
title="@lang('template::admin/setHomepage.addToHomepage')"><i
class="fa green fa-fw fa-plus"></i></a>
</div>
</div>
@empty
<div class="alert alert-info">
@lang('template::admin/setHomepage.noPagesAvailable')
</div>
@endforelse
</div>
</div>
@endsection
@@ -1,15 +0,0 @@
@extends('admin.layoutWithNavigation')
@section('pageHeading', @trans('widgets/htmlCode.edit', ['name' => $widget->name]))
@section('content')
<div class="col-lg-8">
@include('template::admin.widgets.onePageMenu.form', ['action' => route('widgets.postEdit', ['id' => $widget->id])])
</div>
<div class="col-lg-4">
<h3>@lang('widgets/menu.preview')</h3>
@widgetPreview($widget)
</div>
@stop
@@ -1,27 +0,0 @@
<form action="{{$action}}" method="POST">
{!! csrf_field() !!}
<label class="label-control">
@lang('template::widget/menu.form.name')
</label>
<input class="form-control" type="text" name="name" value="{{old('name', $widget->name)}}"
placeholder="@lang('template::widget/menu.form.name')" />
<label class="label-control">
@lang('template::widget/menu.form.description')
</label>
<input class="form-control" type="text" name="description" placeholder="@lang('template::widget/menu.form.description')"
value="{{old('description', $widget->description)}}" />
<label class="label-control">
@lang('template::widget/menu.form.containerClass')
</label>
<input class="form-control" type="text" name="containerClass" placeholder="@lang('template::widget/menu.form.containerClass')"
value="{{old('containerClass', isset($settings->containerClass) ? $settings->containerClass : '')}}" />
<button type="submit" class="btn btn-primary">
@lang('template::widget/menu.form.save')
</button>
</form>
@@ -1,9 +0,0 @@
@extends('admin.layoutWithNavigation')
@section('pageHeading', @trans('template::widget/menu.new'))
@section('pageDescription', @trans($type->description))
@section('content')
@include('template::admin.widgets.onePageMenu.form', ['action' => route('widgets.postNew', ['type' => $type->id])])
@stop
@@ -1,49 +0,0 @@
<?php
namespace Templates\Base\OnePage\Widgets\OnePageMenu;
use App\CMS\Contracts\Widgets\PublicWidget;
use App\CMS\Contracts\Widgets\WidgetRenderer;
use App\Http\Requests\Request;
class OnePageMenu implements PublicWidget
{
/**
* Name getter
*
* @return string
*/
public static function getName()
{
return 'template::widget/menu.name';
}
/**
* Getter for description
*
* @return string
*/
public static function getDescription()
{
return 'template::widget/menu.description';
}
/**
* Getter for presenter/renderer of this widget
*
* @return WidgetRenderer
*/
public static function getPresenter()
{
return Presenter::class;
}
/**
* @param Request $data
*
* @return mixed
*/
public static function save(Request $data)
{
return [];
}
}
@@ -1,65 +0,0 @@
<?php
namespace Templates\Base\OnePage\Widgets\OnePageMenu;
use App\Models\Widgets\Widget;
use App\Models\Widgets\WidgetType;
use App\CMS\Contracts\Widgets\WidgetRenderer;
use Templates\Base\OnePage\Handlers\OnePage;
class Presenter implements WidgetRenderer
{
/**
* @var string path to template
*/
public static $template;
/**
* Method used for displaying widget.
*
* This method renders some HTML code for displaying.
*
* @param Widget $widget
*
* @return mixed
* @throws \ErrorException
*/
public static function render(Widget $widget)
{
if (!self::$template) {
throw new \ErrorException('Cannot render menu without template! Please, set Presenter::$template variable before rendering.');
}
$pages = OnePage::getPagesOnHomepage();
return view(self::$template, ['pages' => $pages, 'widget' => $widget])->render();
}
/**
* Display form for creating new instance of widget
*
* @param WidgetType $type
*
* @return mixed
*/
public static function renderAddForm(WidgetType $type)
{
return view('template::admin.widgets.onePageMenu.new', [
'type' => $type,
'widget' => new Widget(),
'settings' => new \stdClass()
]);
}
/**
* Display form for editing already existing widget
*
* @param Widget $widget
*
* @return mixed
*/
public static function renderEditForm(Widget $widget)
{
$settings = $widget->settings;
return view('template::admin.widgets.onePageMenu.edit', ['widget' => $widget, 'settings' => $settings]);
}
}
-8
View File
@@ -1,8 +0,0 @@
<?php
return [
'providers' => [\Templates\Base\OnePage\Providers\OnePageTemplate::class],
'files' => [__DIR__ . '/Http/routes.php'],
'handler' => null,
'name' => null,
'description' => null,
];
-85
View File
@@ -1,85 +0,0 @@
<?php
namespace Templates\Binarity;
use App\CMS\Contracts\Modules\TemplateHandler;
use App\Models\Content\Content;
use App\Models\Module;
use App\Models\User;
use App\Models\Widgets\WidgetArea;
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'
],
[
'module' => 'ArticleList',
'alias' => 'blog-articlelist',
'templateName' => 'articlelist::module.templatePath'
],
[
'module' => 'Article',
'alias' => 'blog-article',
'templateName' => 'article::module.templatePath'
],
];
}
}
@@ -1,22 +0,0 @@
<?php
namespace Templates\Binarity\Providers;
use Templates\Binarity\Shortcodes\DarkBlock;
use Templates\Binarity\Shortcodes\TechnologiesWrapper;
use Templates\Binarity\Shortcodes\Technology;
use Webwizo\Shortcodes\Facades\Shortcode;
class ServiceProvider extends \Illuminate\Support\ServiceProvider
{
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
Shortcode::register('technologies', TechnologiesWrapper::class);
Shortcode::register('tech', Technology::class);
Shortcode::register('dark', DarkBlock::class);
}
}
File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

@@ -1,289 +0,0 @@
/**
* 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(true);
});
return BLightBox;
};
// If autorun is requested, create instance.
if(autorun !== undefined && autorun === true) {
return this.init();
} else {
return this;
}
}
@@ -1,86 +0,0 @@
$(document).foundation();
new CookiePolicy();
window.addEventListener('load', function() {
var lightbox = new BLightBox({
invoker: '.b-invo',
close_text: 'Zavřít'
}, true);
var gallery_links = document.querySelectorAll('.b-invo'),
gallery_links_i = gallery_links.length;
});
function switchResponsiveMenu() {
var menuHolder = document.getElementById('responsive-menu');
if(menuHolder.style.width == "100%") {
hideResponsiveMenu();
} else {
showResponsiveMenu();
}
}
function showResponsiveMenu() {
var menuHolder = document.getElementById('responsive-menu'),
titleBar = document.getElementsByClassName('title-bar')[0],
titleBarCS = window.getComputedStyle(titleBar);
menuHolder.style.display="block";
menuHolder.style.height = document.documentElement.clientHeight + 'px';
menuHolder.style.height = window.innerHeight + 'px';
menuHolder.style.left = "0";
menuHolder.style.width = "100%";
menuHolder.style.zIndex = 1000;
menuHolder.style.top = titleBarCS.height;
menuHolder.style.height = '100%;';
titleBar.style.position = 'fixed';
}
function hideResponsiveMenu() {
var menuHolder = document.getElementById('responsive-menu'),
titleBar = document.getElementsByClassName('title-bar')[0];
menuHolder.style.display = "none";
menuHolder.style.width = "250px";
titleBar.style.position = 'initial';
document.body.style.paddingTop = '0';
}
window.addEventListener('resize', function() {
var menuHolder = document.getElementById('responsive-menu');
hideResponsiveMenu();
if(window.innerWidth >= 1023) {
menuHolder.style.display="block";
menuHolder.style.height = "auto";
menuHolder.style.top = "0";
}
});
var flippers = document.querySelectorAll ('.hover-on-start'),
flipi = flippers.length;
while (flipi--) {
(function (flipi) {
setTimeout (function () {
flippers[flipi].classList.toggle ('hover');
}, flipi * 200);
}) (flipi);
}
$('.flip-container.hover-on-start').bind('touchstart', function (e) {
e.preventDefault();
$(this).toggleClass('hover');
});
function showMoreReferences(evt) {
$ (evt).parent ().remove ();
$ ('.more-references').fadeIn (200);
}
window.addEventListener ('load', function () {
$ ('.reference-item').mouseenter (function () {
$ (this).find ('.item-data').animate ({opacity: 1}, 300, 'swing');
}).mouseleave (function () {
$ (this).find ('.item-data').animate ({opacity: 0}, 300, 'swing');
});
});
@@ -1,150 +0,0 @@
/**
* Cookie handling mini framework &
* EU Cookie policy information layer
*
* created by binarity s.r.o
* www.binarity.cz
*
* @returns {*}
* @constructor
*/
var Cookies = {
read: function(sKey) {
return !sKey ? null : decodeURIComponent(document.cookie.replace(new RegExp("(?:(?:^|.*;)\\s*" + encodeURIComponent(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=\\s*([^;]*).*$)|^.*$"), "$1")) || null;
},
set: function(sKey, sValue, vEnd, sPath, sDomain, bSecure) {
if (!sKey || /^(?:expires|max\-age|path|domain|secure)$/i.test(sKey)) { return false; }
var sExpires = "";
if (vEnd) {
switch (vEnd.constructor) {
case Number:
sExpires = vEnd === Infinity ? "; expires=Fri, 31 Dec 9999 23:59:59 GMT" : "; max-age=" + vEnd;
break;
case String:
sExpires = "; expires=" + vEnd;
break;
case Date:
sExpires = "; expires=" + vEnd.toUTCString();
break;
}
}
document.cookie = encodeURIComponent(sKey) + "=" + encodeURIComponent(sValue) + sExpires + (sDomain ? "; domain=" + sDomain : "") + (sPath ? "; path=" + sPath : "") + (bSecure ? "; secure" : "");
return true;
},
remove: function (sKey, sPath, sDomain) {
if (!this.has(sKey)) { return false; }
document.cookie = encodeURIComponent(sKey) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT" + (sDomain ? "; domain=" + sDomain : "") + (sPath ? "; path=" + sPath : "");
return true;
},
has: function (sKey) {
if (!sKey) { return false; }
return (new RegExp("(?:^|;\\s*)" + encodeURIComponent(sKey).replace(/[\-\.\+\*]/g, "\\$&") + "\\s*\\=")).test(document.cookie);
},
keys: function () {
var aKeys = document.cookie.replace(/((?:^|\s*;)[^\=]+)(?=;|$)|^\s*|\s*(?:\=[^;]*)?(?:\1|$)/g, "").split(/\s*(?:\=[^;]*)?;\s*/);
for (var nLen = aKeys.length, nIdx = 0; nIdx < nLen; nIdx++) { aKeys[nIdx] = decodeURIComponent(aKeys[nIdx]); }
return aKeys;
}
};
function CookiePolicy(sPrefix, sText, sMore, sMoreURL, sUnderstand, sCookieName) {
'use strict';
var prefix = sPrefix || 'bineucookie_',
cookieName = sCookieName || 'allowed_eu',
text = sText || 'Tyto webové stránky používají k poskytování služeb, personalizaci reklam a analýze návštěvnosti soubory cookie. Informace o tom, jak tyto webové stránky používáte, jsou sdíleny se společností Google. Používáním těchto webových stránek souhlasíte s použitím souborů cookie.',
more = sMore || 'Další informace',
more_url = sMoreURL || 'https://www.google.com/policies/technologies/cookies/',
understand = sUnderstand || 'Rozumím',
// DOM
layerHolder = document.createElement('div'),
textElement = document.createElement('p'),
moreInfoButton = document.createElement('a'),
okButton = document.createElement('a');
/**
* This method checks whether cookie about cookies was set or not.
* If it was set, this method additionally checks for its validity.
*/
this.isValidCookie = function(sKey) {
return Cookies.has(prefix + sKey);
};
/**
* This method just adds custom styles to page header so it does not need to be all inline/
*/
this.addStyle = function() {
var styleElement = document.createElement('style');
styleElement.id = prefix + 'style';
styleElement.innerHTML += '#bin_eu_cookie_layer {opacity:1; position:fixed; padding:16px; left:0; top:0; width:100%; display:block; color:#f4f4f4; background-color:rgba(0,0,0,0.8); z-index:1000;}\r\n';
styleElement.innerHTML += '#bin_eu_cookie_layer #bin-cookie-text {width:80%; float:left; display:inline-block;}\r\n';
styleElement.innerHTML += '#bin_eu_cookie_layer .bin-button {padding: 8px; float:right;}\r\n';
// Responsive version
styleElement.innerHTML += '@media screen and (max-width:980px) {\r\n';
styleElement.innerHTML += '\t#bin_eu_cookie_layer #bin-cookie-text {width:100%;}';
styleElement.innerHTML += '}\r\n';
document.head.appendChild(styleElement);
};
/**
* This method accepts eu cookie policy by setting up a cookie that will inform the script next time that the policy
* was already accepted.
*/
this.acceptCookiePolicy = function() {
var date = new Date();
date.setFullYear(date.getFullYear() + 25);
Cookies.set(prefix + cookieName, 1, date.toGMTString(), '/');
layerHolder.parentNode.removeChild(layerHolder);
};
/**
* This method adds necessary elements to the DOM
*/
this.addElements = function() {
layerHolder.id = "bin_eu_cookie_layer";
textElement.id = "bin-cookie-text";
textElement.textContent = text;
moreInfoButton.className = 'bin-button';
moreInfoButton.textContent = more;
moreInfoButton.href = more_url;
moreInfoButton.target = '_blank';
okButton.id = 'bin-cookie-ok';
okButton.className = 'bin-button';
okButton.textContent = understand;
okButton.href = 'javascript:void(0);';
layerHolder.appendChild(textElement);
layerHolder.appendChild(moreInfoButton);
layerHolder.appendChild(okButton);
document.body.appendChild(layerHolder);
okButton.addEventListener('click', this.acceptCookiePolicy);
};
/**
* Method for adding complete DOM layer to the DOM.
*/
this.addDOMLayer = function() {
this.addStyle();
this.addElements();
};
/**
* This method initializes the whole process of drawing eu cookie policy layer.
*/
this.init = function() {
if(!this.isValidCookie(cookieName)) {
this.addDOMLayer();
}
};
return this.init(); // Auto-run on setup.
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,110 +0,0 @@
@extendVisitor('layout')
@include(\App\CMS\Helpers\Template::name('metaInformation'))
@section('content')
<div class="row article-list-item">
<aside class="column text-right large-1">
<div class="date">
<span class="date day big">@customDate('j', $page->publishedFrom ?: $page->created_at)</span>
<span class="date uppercase month">@monthName($page->publishedFrom ?: $page->created_at)</span>
</div>
<div class="m-t-25 author">
<img class="gravatar" src="@gravatar($page->author->email, 50)" alt="">
<small>{{$page->author->name}}</small>
</div>
@if($page->category)
<div class="m-t-25 text-center">
<a href="./blog?category={{$page->category->url}}"><i
class="fa fa-tag"></i> {{$page->category->name}}</a>
</div>
@endif
@if(isset($page->moduleSettings['allowComments']) && $page->moduleSettings['allowComments'] != 0)
<div class="m-t-35">
<a href="#comments">{{count($page->comments)}} <i class="fa fa-comments"></i></a>
</div>
@endif
</aside>
<div class="column large-11">
<article class="text-justify">
<h1>{{$page->title}}</h1>
{!! $page->pageContent !!}
</article>
</div>
</div>
@if(isset($page->moduleSettings['allowComments']) && $page->moduleSettings['allowComments'] != 0)
<div class="row m-t-50">
<a name="comments"></a>
<h2 class="column large-11" style="float: right;">Komentáře</h2>
@foreach($page->comments as $comment)
<div class="row m-t-25 comment">
<aside style="border-right: solid 1px #7CAD2A" class="column text-center large-1">
<img src="@gravatar($comment->author->email, 30)" class="gravatar" alt="">
<br />
<small>
@date($comment->created_at, false)
</small>
</aside>
<div class="column large-11">
<header>
<a name="{{$comment->id}}"></a>
<h6><a href="#{{$comment->id}}">{{$comment->author->name}}</a></h6>
</header>
<article>
{{$comment->ontent}}
</article>
</div>
<div class="clearfix"></div>
</div>
@endforeach
<?php
$loggedUser = \Auth::user();
?>
<div class="large-11 pull-right m-t-25 comments-form">
<div class="column large-1">
@if($loggedUser)
<img src="@gravatar($loggedUser->email)" class="gravatar" alt="">
@endif
</div>
<div class="column large-11">
@if(session('success'))
<div class="callout succes">
Komentář úspěšně uložen. @if (!$loggedUser) Po schválení se zde objeví. @endif
</div>
@endif
<form method="post" action="{{route('comments.new', ['article' => $page])}}">
{!! csrf_field() !!}
@if(!$loggedUser)
<div class="row">
<div class="column medium-6">
<input type="text" name="name" required placeholder="Jméno">
</div>
<div class="column medium-6">
<input type="email" name="email" required placeholder="E-mail">
</div>
</div>
@endif
<div class="row">
<div class="column medium-12">
<textarea name="message" required>{{old('message')}}</textarea>
<button type="submit" class="button success pull-right">Uložit</button>
</div>
</div>
</form>
</div>
</div>
@endif
</div>
@endsection
@@ -1,62 +0,0 @@
@extendVisitor('layout')
@include(\App\CMS\Helpers\Template::name('metaInformation'))
@section('content')
{{--<h1 class="text-center uppercase m-b-25">{{$page->title}}</h1>--}}
{{--<div class="row">--}}
{{--{!! $page->content !!}--}}
{{--</div>--}}
@foreach($page->articles as $article)
<div class="column large-6 article-list-item">
<div class="row">
<aside class="column text-right large-3">
<div class="date">
<span class="date day big">@customDate('j', $article->publishedFrom ?: $article->created_at)</span>
<br>
<span class="date uppercase month">@monthName($article->publishedFrom ?: $article->created_at)</span>
</div>
<div class="m-t-15 author">
{{--<small>{{str_limit($article->author->name, 15)}}</small>--}}
<img class="gravatar" src="@gravatar($article->author->email, 35)" alt="">
</div>
</aside>
<header>
<h3 class="m-t-5">
<a href="{{route('page.content', ['url' => $article->url])}}">
{{$article->title}}
</a>
</h3>
</header>
<article class="p-0 column text-justify large-9">
{{str_limit($article->metaDescription, 250)}}
<a href="{{route('page.content', ['url' => $article->url])}}">více</a>
</article>
@if(isset($article->moduleSettings['allowComments']) && $article->moduleSettings['allowComments'] != 0 || $article->category)
<footer class="text-right">
@if($article->category)
<a href="./blog?category={{$article->category->url}}"><i
class="fa fa-tag"></i> {{$article->category->name}}</a>
@endif
<a href="{{route('page.content', ['url' => $article->url])}}#comments">
<i class="fa fa-fw fa-comments"></i> {{$article->comments->count()}}
</a>
</footer>
@endif
</div>
</div>
@if (!is_null($page->articles))
<div class="paginate">
{{$page->articles->render()}}
</div>
@endif
@endforeach
@endsection
@@ -1,110 +0,0 @@
@extendVisitor('layout')
@include(\App\CMS\Helpers\Template::name('metaInformation'))
@section('content')
<h1 class="text-center uppercase m-b-25">{{$page->title}}</h1>
<div class="row small-11 medium-11 large-11 xlarge-11 m-t-25">
<div class="clearfix"></div>
<div class="medium-12 large-7 xlarge-8 columns float-right">
<div class="small-12 medium-12 float-right">
@if(session('success'))
<div class="callout success">
Děkujeme za zprávu, ozveme se na uvedený e-mail hned jak to bude možné!
</div>
@endif
@if(session('error'))
<div class="callout alert">
Zprávu bohužel nebylo možné odeslat, zkuste nám napsat na {{$page->moduleSettings['contactEmail']}}.
</div>
@endif
<form action="{{route('email.send', ['id' => $page->id])}}" method="post">
{!! csrf_field() !!}
<label>
<input type="text" name="name" required placeholder="Jméno a přijmení">
</label>
<label>
<input type="text" name="email" required placeholder="E-mail">
</label>
<label>
<textarea placeholder="Zpráva" required name="message"></textarea>
</label>
<input type="submit" class="button success uppercase button-medium-centered" value="Odeslat">
</form>
</div>
</div>
<div class="medium-12 large-5 xlarge-4 columns member-list float-left">
<div class="small-11 rounded large contact-address">
<div class="small-4 column">
</div>
<div class="small-8 column">
<p><strong>{{$page->moduleSettings['companyName']}}</strong></p>
<p>
{!! nl2br($page->moduleSettings['address']) !!}
</p>
<p><br></p>
<p><a class="underline"
href="mailto:{{$page->moduleSettings['email']}}">{{$page->moduleSettings['email']}}</a></p>
<p><a class="thin"
href="tel:{{str_replace(' ', '', $page->moduleSettings['phone'])}}">{{$page->moduleSettings['phone']}}</a>
</p>
</div>
<div class="clearfix m-0"></div>
</div>
<div class="m-t-25 small-11 members">
<?php
$members = [
[
'avatar' => 'avatar_peter_hexa_75.png',
'name' => 'Peter Hrdlica',
'position' => 'Jednatel',
'email' => 'peter@binarity.cz',
'phone' => '+420 775 323 455'
],
[
'avatar' => 'avatar_michal_hexa_75.png',
'name' => 'Michal Kváček',
'position' => 'Hlavní vývojář',
'email' => 'michal@binarity.cz',
'phone' => '+420 775 553 552'
],
[
'avatar' => 'avatar_kristyna_hexa_75.png',
'name' => 'Kristýna Kunstová Mirvaldová',
'position' => 'Obchodní zástupkyně',
'email' => 'obchod@binarity.cz',
'phone' => '+420 775 710 455'
],
];
?>
@foreach($members as $member)
<div class="member">
<div class="member-tile">
<div class="column small-4 p-lr-0">
<img src="{{asset_path('visitor/images/'.$member['avatar'])}}" class="avatar-image"
alt="{{$member['name']}}">
</div>
<div class="small-8 column float-right">
<p class="member-name green-text bolder">{{$member['name']}}</p>
<p>{{$member['position']}}</p>
<p><a href="mailto:{{$member['email']}}" class="underline">{{$member['email']}}</a></p>
<p><a href="tel:{{ str_replace(' ', '', $member['phone'])}}">{{$member['phone']}}</a>
</p>
</div>
<div class="clearfix"></div>
</div>
</div>
@endforeach
</div>
@endsection
@@ -1,11 +0,0 @@
@extendVisitor('layout')
@include(\App\CMS\Helpers\Template::name('metaInformation'))
@section('content')
<h1 class="text-center uppercase m-b-25">{{$page->title}}</h1>
<div class="row">
{!! $page->pageContent !!}
</div>
@endsection
@@ -1,136 +0,0 @@
@extendVisitor('layout')
@include(\App\CMS\Helpers\Template::name('metaInformation'))
@section('content')
<div class="services-pos outline-holder">
<div class="flip-container hover">
<div class="flipper">
<div class="outline">
</div>
</div>
</div>
</div>
<div class="services-pos service-holder">
<div class="flip-container hover hover-on-start">
<div class="flipper">
<div class="front">
Vyvíjíme webové<br>aplikace
</div>
<div class="back">
Webové <br>aplikace a prezentace<br> na míru
</div>
</div>
</div>
</div>
<div class="services-pos outline-holder">
<div class="flip-container hover">
<div class="flip-container hover">
<div class="flipper">
<div class="outline">
</div>
</div>
</div>
</div>
</div>
<div class="services-pos service-holder">
<div class="flip-container hover hover-on-start">
<div class="flipper">
<div class="front">
<p>Nabízíme <br> konzultace</p>
</div>
<div class="back">
Nevíte si <br>rady s webem?<br> Poradíme!
</div>
</div>
</div>
</div>
<div class="services-pos outline-holder">
<div class="flip-container hover">
<div class="flip-container hover">
<div class="flipper">
<div class="outline-grey">
</div>
</div>
</div>
</div>
</div>
<div class="services-pos service-holder">
<div class="flip-container hover hover-on-start">
<div class="flipper">
<div class="front">
Vytváříme<br>informační<br> systémy
</div>
<div class="back">
Přehledně, <br>zodpovědně<br>lidsky
</div>
</div>
</div>
</div>
<div class="services-pos service-holder">
<div class="flip-container hover hover-on-start">
<div class="flipper">
<div class="front">
Poskytujeme hosting
</div>
<div class="back">
Nákup domény<br>Hosting<br>SSL<br>...
</div>
</div>
</div>
</div>
<div class="services-pos service-holder">
<div class="flip-container hover hover-on-start">
<div class="flipper">
<div class="front">
SEO, Facebook<br>a další
</div>
<div class="back">
Zanalyzujeme<br>Návrhneme<br>Implementujeme
</div>
</div>
</div>
</div>
<div class="services-pos outline-holder">
<div class="flip-container hover">
<div class="flipper">
<div class="outline">
</div>
</div>
</div>
</div>
<div class="services-pos service-holder">
<div class="flip-container hover hover-on-start">
<div class="flipper">
<div class="front">
<p>Testujeme</p>
</div>
<div class="back">
Unit testy<br>End-to-end testy<br />...
</div>
</div>
</div>
</div>
<div class="services-pos outline-holder">
<div class="flip-container hover">
<div class="flipper">
<div class="outline-grey">
</div>
</div>
</div>
</div>
<div class="services-pos service-holder">
<div class="flip-container hover">
<div class="flipper">
<div class="back">
<a href="kontakt" class="white-text uppercase large-text">
Zaslat<br>poptávku
</a>
</div>
</div>
</div>
</div>
<div class="clearfix m-t-50"></div>
@endsection
@@ -1,40 +0,0 @@
@extendVisitor('layout')
@include(\App\CMS\Helpers\Template::name('metaInformation'))
@section('content')
<div class="row small-11 medium-11 large-11 xlarge-11 m-t-25 reference-gallery">
<div class="row">
<div class="ref-scr column xlarge-8 large-8 medium-4 m-b-25 p-lr-0 b-invo" data-img="" data-label="">
<img class="thumbnail pointer" src="@upload($page->titlePhoto)" alt="{{$page->title}}">
</div>
@foreach($page->files as $file)
@if(!\Illuminate\Support\Str::startsWith($file->mime_type, 'image'))
@continue;
@endif
<div class="ref-scr b-invo column xlarge-4 large-4 medium-4 small-6"
data-img="@upload($page->titlePhoto)"
data-label="{{$file->description}}">
<img class="thumbnail pointer m-b-26" src="@upload($file->filename)"
alt="{{$file->name}}">
</div>
@endforeach
</div>
<div class="clearfix"></div>
<div class="m-b-25 detail-info">
<div id="detail-text">
<h2>{{$page->title}}</h2>
{!! $page->pageContent !!}
</div>
</div>
<div class="detail-buttons">
<a href="javascript:window.history.go(-1);" class="button secondary long">Zpět</a>
<a href="{{route('page.content', ['url' => 'kontakt'])}}" class="m-l-25 button success long">Poptat
podobný
web</a>
</div>
@endsection
@@ -1,42 +0,0 @@
@extendVisitor('layout')
@include(\App\CMS\Helpers\Template::name('metaInformation'))
@section('content')
<h1 class="text-center uppercase m-b-25">{{$page->title}}</h1>
<div class="row text-center">
{!! $page->pageContent !!}
</div>
<div class="row nochange small-up-2 medium-up-3 large-up-3 xlarge-up-4" data-equalizer>
<?php
$counter = 0;
$subpages = $page->subpages()->orderBy('created_at', 'DESC')->get();
?>
@foreach($subpages as $reference)
<?php $counter++; ?>
<div class="column reference-item @if($counter > 8) more-references @endif">
<div class="holder">
<img class="thumbnail" data-equalizer-watch src="@thumbnail($reference->titlePhoto)">
<div class="item-data">
<h4>{{$reference->title}}</h4>
<p>{{$reference->meta_description}}</p>
<a class="button success rounded small"
href="{{route('page.content', ['url' => $reference->url])}}">Více zde!</a>
</div>
</div>
</div>
@if($counter == 8)
<p class="text-center more-refs">
<a class="text-center" href="javascript:void(0);" onclick="showMoreReferences(this);">
Zobrazit více referencí
<br>
<i class="fa fa-fw fa-lg fa-chevron-circle-down"></i>
</a>
</p>
@endif
@endforeach
</div>
@endsection
@@ -1,8 +0,0 @@
@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
@@ -1,6 +0,0 @@
@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
@@ -1,6 +0,0 @@
@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
@@ -1,100 +0,0 @@
<!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="binarity-logo-menu" alt="binarity 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>
@@ -1,158 +0,0 @@
<!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" />
<meta name="description" content="@yield('pageDescription')">
<meta name="keywords" content="@yield('pageKeywords')">
<meta name="author" content="{{setting('author')}}">
<meta name="robots" content="index,follow">
<meta property="og:url" content="{{$currentUrl}}">
<meta property="og:type" content="website">
<meta property="og:title" content="@yield('pageTitle')">
<meta property="og:description" content="@yield('pageDescription')">
<meta property="og:image" content="@yield('pageTitleImage')">
<title>@yield('pageTitle') | {{setting('pageName')}}</title>
@if(!empty(setting('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', '{{setting('googleAnalyticsCode')}}', 'auto');
ga ('send', 'pageview');
</script>
@endif
</head>
<body>
<div class="off-canvas-wrapper">
<div class="title-bar hide-for-large">
<a class="float-right m-r-25" id="responsive-menu-button" href="javascript:switchResponsiveMenu()">
MENU <i class="fa fa-fw fa-lg fa-bars"></i>
</a>
<span class="title-bar-title m-l-25">
<img src="{{asset_path('visitor/images/menu_logo.png')}}" class="binarity-logo-menu" alt="binarity s.r.o.">
</span>
</div>
<div class="off-canvas-wrapper-inner" data-off-canvas-wrapper>
<div id="responsive-menu" class="off-canvas position-left reveal-for-large" data-off-canvas
data-position="left">
<div class="row column">
<a href="./" id="logo-href" class="hide-for-medium-only hide-for-small-only">
<img src="{{asset_path('visitor/images/menu_logo.png')}}" class="binarity-logo-menu"
alt="binarity s.r.o.">
</a>
@widgetArea('mainMenu')
<ul class="social-icons menu hide-for-medium-only hide-for-small-only">
@if (!empty(setting('facebookProfile')))
<li>
<a href="{{setting('facebookProfile')}}" target="_blank">
<i class="fa fa-fw fa-2x fa-facebook-official fb-color"></i>
</a>
</li>
@endif
@if (!empty(setting('linkedInProfile')))
<li>
<a href="{{setting('linkedInProfile')}}" target="_blank">
<i class="fa fa-fw fa-2x fa-linkedin in-color"></i>
</a>
</li>
@endif
@if(!empty(setting('gplusProfile')))
<li>
<a href="{{setting('gplusProfile')}}" target="_blank">
<i class="fa fa-fw fa-2x fa-google-plus gp-color"></i>
</a>
</li>
@endif
</ul>
<div class=" clearfix"></div>
<ul class="binarity-info menu vertical hide-for-medium-only hide-for-small-only">
<li>binarity s.r.o</li>
<li class="email-li"><a
href="mailto:hello@binarity.cz?Subject=Pozdrav%20z%20webu">hello@binarity
.cz</a></li>
<li class="phone-li"><a href="tel:00420775553552">+420 775 553 552</a></li>
<li><br></li>
<li>&copy; {{date('Y')}} binarity s.r.o.</li>
</ul>
</div>
</div>
<div class="off-canvas-content" data-off-canvas-content>
@yield('content')
<footer id="footer" class="hide-for-large">
<ul class="social-icons menu">
@if (!empty(setting('facebookProfile')))
<li>
<a href="{{setting('facebookProfile')}}" target="_blank">
<i class="fa fa-fw fa-2x fa-facebook-official fb-color"></i>
</a>
</li>
@endif
@if (!empty(setting('linkedInProfile')))
<li>
<a href="{{setting('linkedInProfile')}}" target="_blank">
<i class="fa fa-fw fa-2x fa-linkedin in-color"></i>
</a>
</li>
@endif
@if(!empty(setting('gplusProfile')))
<li>
<a href="{{setting('gplusProfile')}}" target="_blank">
<i class="fa fa-fw fa-2x fa-google-plus gp-color"></i>
</a>
</li>
@endif
</ul>
<div class=" clearfix"></div>
<ul class="binarity-info menu vertical">
<li>binarity s.r.o</li>
<li class="email-li"><a
href="mailto:hello@binarity.cz?Subject=Hello%20from%20your%20website">hello@binarity
.cz</a></li>
<li class="phone-li"><a href="tel:00420775323455">+420 775 323 455</a></li>
<li><br></li>
<li>&copy; {{date('Y')}} binarity s.r.o.</li>
</ul>
<div class="clearfix"></div>
</footer>
</div>
</div>
</div>
<script src="{{asset_path('visitor/js/jquery.min.js')}}" type="text/javascript"></script>
<script src="{{asset_path('visitor/js/foundation.min.js')}}" type="text/javascript"></script>
<script src="{{asset_path('visitor/js/cookies.js')}}" type="text/javascript"></script>
<script src="{{asset_path('visitor/js/BLightBox.js')}}" type="text/javascript"></script>
<script src="{{asset_path('visitor/js/app.js')}}" type="text/javascript"></script>
@yield('javascripts')
</body>
</html>
@@ -1,9 +0,0 @@
@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
@@ -1,18 +0,0 @@
<?php
namespace Templates\Binarity\Shortcodes;
class DarkBlock
{
public function register($shortcode, $content, $compiler, $name)
{
$content = str_replace('<div>', '', $content);
$content = str_replace('</div>', '', $content);
$code = '<div class="clearfix m-t-50"></div>
<div class="dark-background">
' . $content . '
</div>';
return $code;
}
}
@@ -1,11 +0,0 @@
<?php
namespace Templates\Binarity\Shortcodes;
class TechnologiesWrapper {
public function register($shortcode, $content, $compiler, $name)
{
$content = str_replace('<div>', '', $content);
$content = str_replace('</div>', '', $content);
return '<div class="what-we-know-holder">'.$content.'</div>';
}
}
@@ -1,21 +0,0 @@
<?php
namespace Templates\Binarity\Shortcodes;
class Technology
{
public function register($shortcode, $content, $compiler, $name)
{
$code = '<span class="what-we-know" title="' . $shortcode->title . '">';
if ($shortcode->img) {
$code .= '<img src="' . asset_path($shortcode->img) . '" alt="' . $shortcode->title . '">';
}
if ($content) {
$code .= '<small style="position: absolute; top: 41%; left: 30%;">' . $content . '</small>';
}
$code .= '</span>';
return $code;
}
}
-9
View File
@@ -1,9 +0,0 @@
<?php
return [
'providers' => [\Templates\Binarity\Providers\ServiceProvider::class],
'files' => [],
'handler' => \Templates\Binarity\Handler::class,
'name' => 'binarity s.r.o.',
'alias' => 'binarity-template',
'description' => '',
];
-82
View File
@@ -1,82 +0,0 @@
<?php
namespace Templates\DobrotyZPece;
use App\Http\Requests\Request;
use App\Models\Content\Content;
use App\Models\Module;
use App\Models\WidgetArea;
use Illuminate\Support\Facades\Artisan;
use Templates\Base\OnePage\Handlers\OnePage;
class Handler extends OnePage
{
/**
* Modify input data into format which can be understood by edit template
*
* @param Content $content
*/
public static function beforePopulatingEditForm(Content & $content)
{
// nothing to do
}
/**
* 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 $request
*/
public static function beforeSave(Content & $content, $request)
{
// nothing to do
}
/**
* Install template
*/
public static function install()
{
parent::install();
try {
Artisan::call('install-module', ['name' => 'StaticPages']);
Artisan::call('install-module', ['name' => 'ContactForm']);
} catch (\Exception $e) {
// ignore message about these modules being installed
}
}
/**
* 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'
]
];
}
public static function uninstall(Module $template)
{
parent::uninstall($template);
}
}
@@ -1,30 +0,0 @@
<?php
namespace Templates\DobrotyZPece\Providers;
use App\CMS\Helpers\Template;
use Illuminate\Support\Facades\App;
use Modules\ContactForm\Widgets\Form\Presenter as ContactFormWidgetPresenter;
use Templates\Base\OnePage\Widgets\OnePageMenu\Presenter;
use Templates\DobrotyZPece\Shortcodes\Column;
use Webwizo\Shortcodes\Facades\Shortcode;
class ServiceProvider extends \Illuminate\Support\ServiceProvider {
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
}
public function boot() {
if (App::runningInConsole())
return;
Shortcode::register('column', Column::class);
Presenter::$template = Template::name('snippets.menu');
ContactFormWidgetPresenter::$template = Template::name('snippets.widgets.contactForm');
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 502 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 501 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 500 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 502 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 MiB

File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
-204
View File
@@ -1,204 +0,0 @@
body * {
font-family: 'Open Sans', Helvetica, sans-serif;
font-weight: 300;
}
nav {
position: absolute;
z-index: 1000;
box-shadow: none;
padding-top: 15px;
}
nav ul:not(.nav-mobile) a {
color: #FFF;
font-weight: 700;
text-shadow: 1px 1px 1px #000;
font-size: 1.5rem;
margin-left: 3px;
}
nav ul a:hover, .slider .indicators .indicator-item.active {
background-color: #FE9205;
}
#slider-overlay-header {
text-align: center;
position: relative;
top: 20%;
z-index: 500;
display: block;
font-size: 8rem;
font-weight: 700;
letter-spacing: -0.5rem;
}
#slider-overlay-header span {
text-transform: uppercase;
display: block;
clear: both;
color: #FE9205;
margin-top: -1.5rem;
font-weight: 300;
}
img {
max-width: 100%;
}
p {
line-height: 2rem;
font-size: 1.1rem;
color: rgb(19, 15, 14);
}
h2 {
font-size: 4rem;
color: rgb(19, 15, 14);
}
h3 {
font-size: 2.7rem;
color: rgb(19, 15, 14);
}
.bold {
font-weight: 700;
}
.italic {
font-style: italic;
}
.m-b-3rem {
margin-bottom: 3rem;
}
.m-b-5rem {
margin-bottom: 5rem;
}
.m-t-3rem {
margin-top: 3rem;
}
.m-tb-3rem {
margin-top: 3rem;
margin-bottom: 3rem;
}
.p-1-5rem {
padding: 1.5rem !important;
}
.m-0 {
margin: 0;
}
.button-collapse {
color: #FE9205;
}
.parallax-container {
min-height: 380px;
line-height: 0;
color: rgba(255, 255, 255, .9);
}
#index-banner {
height: 100vh;
}
.parallax-container .section {
width: 100%;
}
/* label color */
.input-field label {
color: #000;
}
/* label focus color */
.input-field input[type=text]:focus + label,
.input-field input[type=email]:focus + label,
textarea.materialize-textarea:focus:not([readonly]) + label {
color: #FE9205;
}
/* label underline focus color */
.input-field input[type=text]:focus,
.input-field input[type=email]:focus,
textarea.materialize-textarea:focus:not([readonly]) {
border-bottom: 1px solid #FE9205;
box-shadow: 0 1px 0 0 #FE9205;
}
/* valid color */
.input-field input[type=text].valid,
.input-field input[type=email].valid,
textarea.materialize-textarea.valid:not([readonly]) {
border-bottom: 1px solid #FE9205;
box-shadow: 0 1px 0 0 #FE9205;
}
/* invalid color */
.input-field input[type=text].invalid {
border-bottom: 1px solid #F00;
box-shadow: 0 1px 0 0 #F00;
}
@media only screen and (max-width: 992px) {
.parallax-container .section {
position: absolute;
top: 40%;
}
#index-banner .section {
top: 10%;
}
}
@media only screen and (max-width: 600px) {
#index-banner .section {
top: 0;
}
.parallax-container .section {
position: absolute;
top: 20%;
}
.contact-form-widget {
margin-bottom: 25px;
}
.company-data {
text-align: center;
}
.company-data span {
display: block;
}
.section .row div.col.s12 img {
display: block;
margin: 15px auto;
}
}
.section .row > div {
font-size: 1.4em;
margin-bottom: 20px;
}
.icon-block {
padding: 0 15px;
}
.icon-block .material-icons {
font-size: inherit;
}
footer.page-footer {
margin: 0;
}
@@ -1,428 +0,0 @@
https://github.com/google/material-design-icons/blob/master/LICENSE
https://github.com/FezVrasta/bootstrap-material-design/blob/master/fonts/LICENSE.txt
Attribution-ShareAlike 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More_considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution-ShareAlike 4.0 International Public
License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution-ShareAlike 4.0 International Public License ("Public
License"). To the extent this Public License may be interpreted as a
contract, You are granted the Licensed Rights in consideration of Your
acceptance of these terms and conditions, and the Licensor grants You
such rights in consideration of benefits the Licensor receives from
making the Licensed Material available under these terms and
conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. BY-SA Compatible License means a license listed at
creativecommons.org/compatiblelicenses, approved by Creative
Commons as essentially the equivalent of this Public License.
d. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
e. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
f. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
g. License Elements means the license attributes listed in the name
of a Creative Commons Public License. The License Elements of this
Public License are Attribution and ShareAlike.
h. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
i. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
j. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
k. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
l. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
m. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part; and
b. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. Additional offer from the Licensor -- Adapted Material.
Every recipient of Adapted Material from You
automatically receives an offer from the Licensor to
exercise the Licensed Rights in the Adapted Material
under the conditions of the Adapter's License You apply.
c. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
b. ShareAlike.
In addition to the conditions in Section 3(a), if You Share
Adapted Material You produce, the following conditions also apply.
1. The Adapter's License You apply must be a Creative Commons
license with the same License Elements, this version or
later, or a BY-SA Compatible License.
2. You must include the text of, or the URI or hyperlink to, the
Adapter's License You apply. You may satisfy this condition
in any reasonable manner based on the medium, means, and
context in which You Share Adapted Material.
3. You may not offer or impose any additional or different terms
or conditions on, or apply any Effective Technological
Measures to, Adapted Material that restrict exercise of the
rights granted under the Adapter's License You apply.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material,
including for purposes of Section 3(b); and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public licenses.
Notwithstanding, Creative Commons may elect to apply one of its public
licenses to material it publishes and in those instances will be
considered the "Licensor." Except for the limited purpose of indicating
that material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the public
licenses.
Creative Commons may be contacted at creativecommons.org.

Some files were not shown because too many files have changed in this diff Show More