FEATURE: move templates into their own repositories

This commit is contained in:
Michal Kváček
2017-08-24 03:05:30 +02:00
parent 5abd7d9151
commit 862f49771f
249 changed files with 12 additions and 76333 deletions
+6 -1
View File
@@ -31,7 +31,12 @@ class RouteServiceProvider extends ServiceProvider
*/
protected function mapAdminRoutes()
{
Route::namespace($this->namespace.'\\Admin')
// separate route file for Auth::routes()
Route::namespace($this->namespace)
->group(base_path('routes/auth.php'));
// routes for administration
Route::namespace($this->namespace . '\\Admin')
->group(base_path('routes/admin.php'));
}
+6
View File
@@ -0,0 +1,6 @@
<?php
Auth::routes();
// just make logout GET...
$this->get('logout', 'Auth\LoginController@logout')
->name('logout');
-5
View File
@@ -12,11 +12,6 @@ Route::pattern('url', '[0-9\-a-z]+');
/*******************************************************************************/
Route::group(['prefix' => LaravelLocalization::setLocale(), 'middleware' => ['bindings', 'web']], function () {
Auth::routes();
$this->get('logout', 'Auth\LoginController@logout')
->name('logout');
// Homepage
Route::get('/', 'Visitor\Homepage@getIndex')
->name('page.index');
@@ -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,
];
-88
View File
@@ -1,88 +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::where('code', 'mainMenu')
->delete();
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

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