JS, code and templates updates. Noticable feature: MapBox CMS fields and MapBox frontend map

This commit is contained in:
Tony Air 2019-09-07 08:39:49 +07:00
parent b34f9c58cc
commit 3c4ce987b3
48 changed files with 662 additions and 385 deletions

View File

@ -1,3 +1,7 @@
---
Name: 'app-captcha'
---
SilverStripe\SpamProtection\Extension\FormSpamProtectionExtension: SilverStripe\SpamProtection\Extension\FormSpamProtectionExtension:
default_spam_protector: UndefinedOffset\NoCaptcha\Forms\NocaptchaProtector default_spam_protector: UndefinedOffset\NoCaptcha\Forms\NocaptchaProtector

View File

@ -1,3 +1,7 @@
---
Name: 'webapp-columns'
---
Site\Extensions\ElementRows: Site\Extensions\ElementRows:
container_max_width: 1140 container_max_width: 1140
column_class: 'col-block col-md-' column_class: 'col-block col-md-'

View File

@ -1,5 +1,5 @@
--- ---
Name: debugbarext Name: 'webapp-debugbar'
After: After:
- 'framework' - 'framework'
- 'debugbar' - 'debugbar'

View File

@ -29,6 +29,7 @@ SilverStripe\CMS\Model\SiteTree:
- DNADesign\ElementalVirtual\Model\ElementVirtual - DNADesign\ElementalVirtual\Model\ElementVirtual
DNADesign\ElementalList\Model\ElementList: DNADesign\ElementalList\Model\ElementList:
inline_editable: false
default_global_elements: false default_global_elements: false
allowed_elements: allowed_elements:
- DNADesign\ElementalList\Model\ElementList - DNADesign\ElementalList\Model\ElementList
@ -46,9 +47,12 @@ DNADesign\ElementalList\Model\ElementList:
noframe: 'No Frame' noframe: 'No Frame'
DNADesign\Elemental\Models\ElementContent: DNADesign\Elemental\Models\ElementContent:
default_global_elements: false
inline_editable: false
extensions: extensions:
- Site\Extensions\ElementContentWidget - Site\Extensions\ElementContentWidget
Dynamic\Elements\Image\Elements\ElementImage: Dynamic\Elements\Image\Elements\ElementImage:
inline_editable: false
extensions: extensions:
- Site\Extensions\ElementImageWidget - Site\Extensions\ElementImageWidget

View File

@ -1,16 +1,20 @@
---
Name: webapp-extensions
---
# Basic extensions
SilverStripe\Admin\LeftAndMain:
extensions:
- Site\Extensions\LeftAndMainExtension
SilverStripe\SiteConfig\SiteConfig: SilverStripe\SiteConfig\SiteConfig:
extensions: extensions:
- Site\Extensions\SiteConfigExtension - Site\Extensions\SiteConfigExtension
- Site\Extensions\SocialExtension
SilverStripe\SiteTree\SiteTree: SilverStripe\CMS\Model\SiteTree:
extensions: extensions:
- Site\Extensions\SiteTreeExtension - Site\Extensions\SiteTreeExtension
SilverStripe\Blog\Model\BlogPost:
extensions:
- Site\Extensions\BlogPostExtension
Sheadawson\Linkable\Models\EmbeddedObject: Sheadawson\Linkable\Models\EmbeddedObject:
extensions: extensions:
- Site\Extensions\EmbeddedObjectExtension - Site\Extensions\EmbeddedObjectExtension
@ -27,7 +31,7 @@ SilverStripe\Core\Injector\Injector:
Sheadawson\Linkable\Forms\EmbeddedObjectField: Sheadawson\Linkable\Forms\EmbeddedObjectField:
class: Site\Extensions\EmbedObjectField class: Site\Extensions\EmbedObjectField
# User Forms # User Forms module
SilverStripe\UserForms\Form\UserForm: SilverStripe\UserForms\Form\UserForm:
extensions: extensions:
- Site\Extensions\PlaceholderFormExtension - Site\Extensions\PlaceholderFormExtension
@ -39,3 +43,12 @@ SilverStripe\UserForms\Model\UserDefinedForm:
DNADesign\ElementalUserForms\Model\ElementForm: DNADesign\ElementalUserForms\Model\ElementForm:
extensions: extensions:
- Site\Extensions\UserDefinedFormExtension - Site\Extensions\UserDefinedFormExtension
# Blog + Widgets module extensions
Page:
extensions:
- SilverStripe\Widgets\Extensions\WidgetPageExtension
SilverStripe\Blog\Model\BlogPost:
extensions:
- Site\Extensions\BlogPostExtension

View File

@ -1,4 +0,0 @@
BetterBrief\GoogleMapField:
default_options:
api_key: 'YOUR_API_KEY'
show_search_box: true

17
app/_config/map.yml Normal file
View File

@ -0,0 +1,17 @@
---
Name: 'webapp-map'
After:
- 'silverstripe-mapboxfield'
- 'addressable'
---
SilverStripe\Core\Injector\Injector:
A2nt\SilverStripeMapboxField\MarkerExtension:
properties:
geocoder: %$Symbiote\Addressable\MapboxGeocodeService
Symbiote\Addressable\GeocodeServiceInterface:
class: Symbiote\Addressable\MapboxGeocodeService
Symbiote\Addressable\MapboxGeocodeService:
mapbox_api_key: ''
A2nt\SilverStripeMapboxField\MapboxField:
map_style: 'mapbox://styles/mapbox/streets-v9' #'mapbox://styles/mapbox/light-v10'

View File

@ -1,5 +1,5 @@
--- ---
Name: payment Name: 'webapp-payment'
--- ---
SilverStripe\Omnipay\Model\Payment: SilverStripe\Omnipay\Model\Payment:
allowed_gateways: allowed_gateways:

View File

@ -1,3 +1,6 @@
---
Name: 'webapp-requirements'
---
Site\Templates\DeferedRequirements: Site\Templates\DeferedRequirements:
nojquery: false nojquery: false
nofontawesome: false nofontawesome: false

View File

@ -1,5 +1,5 @@
--- ---
Name: shop Name: 'webapp-shop'
--- ---
SilverStripe\Core\Injector\Injector: SilverStripe\Core\Injector\Injector:
SilverShop\Checkout\SinglePageCheckoutComponentConfig: SilverShop\Checkout\SinglePageCheckoutComponentConfig:

View File

@ -1,5 +1,5 @@
--- ---
Name: webapp-themes Name: 'webapp-themes'
--- ---
SilverStripe\View\SSViewer: SilverStripe\View\SSViewer:

View File

@ -1,6 +1,8 @@
---
Name: 'webapp-version-truncator'
---
Axllent\VersionTruncator\VersionTruncator: Axllent\VersionTruncator\VersionTruncator:
keep_versions: 4 # how many (published) versions of each page to keep keep_versions: 4 # how many (published) versions of each page to keep
keep_drafts: 2 # how many drafts of each page to keep keep_drafts: 2 # how many drafts of each page to keep
keep_redirects: true # keep page versions that have a different URLSegment (for redirects) keep_redirects: true # keep page versions that have a different URLSegment (for redirects)
keep_old_page_types: false # keep page versions where page type (ClassName) has changed keep_old_page_types: false # keep page versions where page type (ClassName) has changed

View File

@ -1,11 +1,11 @@
'use strict'; 'use strict';
import $ from 'jquery'; import $ from 'jquery';
import Events from "../_events"; import Events from '../_events';
import mapBoxGL from "mapbox-gl"; import mapBoxGL from 'mapbox-gl';
//import "./mapStorage"; //import "./mapStorage";
import "../../scss/_components/_ui.map.scss"; import '../../scss/_components/_ui.map.scss';
const W = window; const W = window;
@ -21,41 +21,45 @@ const MapAPI = (($) => {
class MapAPI { class MapAPI {
// Constructor // Constructor
constructor(element) { constructor(el) {
this._element = element; this._el = el;
const $element = $(this._element); const $el = $(this._el);
const geojson = $element.data('geojson'); const config = $el.data();
const center = [ const center = [
($element.data('lng') ? $element.data('lng') : $BODY.data('default-lng')), (config['lng'] ? config['lng'] : $BODY.data('default-lng')),
($element.data('lat') ? $element.data('lat') : $BODY.data('default-lat')), (config['lat'] ? config['lat'] : $BODY.data('default-lat')),
]; ];
const popup = new mapboxgl.Popup({ const popup = new mapBoxGL.Popup({
closeOnClick: false, closeOnClick: false,
className: 'popup', className: 'popup',
}); });
currentStyle = this.getStyle();
mapBoxGL.accessToken = $element.data('key');
currentStyle = this.getStyle();
mapBoxGL.accessToken = $el.data('key');
Map = new mapBoxGL.Map({ Map = new mapBoxGL.Map({
'container': $element.find('.mapAPI-map')[0], 'container': $el.find('.mapAPI-map')[0],
center, 'center': center,
//hash: true, //hash: true,
'style': currentStyle, 'style': currentStyle,
//localIdeographFontFamily: $BODY.css('font-family'), 'localIdeographFontFamily': $BODY.css('font-family'),
'zoom': ($element.data('map-zoom') ? $element.data('map-zoom') : 10), 'zoom': (config['mapZoom'] ? config['mapZoom'] : 10),
'attributionControl': false, 'attributionControl': false,
/*transformRequest: (url, resourceType)=> { 'antialias': true,
if(resourceType === 'Source' && url.startsWith('http://myHost')) { /*'pitch': 45,
return { 'bearing': -17.6*/
url: url.replace('http', 'https'),
headers: { 'my-custom-header': true}, /*transformRequest: (url, resourceType)=> {
credentials: 'include' // Include cookies for cross-origin requests if(resourceType === 'Source' && url.startsWith('http://myHost')) {
} return {
} url: url.replace('http', 'https'),
}*/ headers: { 'my-custom-header': true},
}) credentials: 'include' // Include cookies for cross-origin requests
}
}
}*/
})
.addControl(new mapBoxGL.AttributionControl({ .addControl(new mapBoxGL.AttributionControl({
compact: true, compact: true,
})) }))
@ -66,34 +70,107 @@ const MapAPI = (($) => {
}, },
trackUserLocation: true, trackUserLocation: true,
}), 'bottom-right') }), 'bottom-right')
.addControl(new mapboxgl.ScaleControl({ .addControl(new mapBoxGL.ScaleControl({
maxWidth: 80, maxWidth: 80,
unit: 'metric', unit: 'metric',
}), 'top-left'); }), 'top-left')
.addControl(new mapboxgl.FullscreenControl());
$el.data('Map', Map);
$el.data('Popup', popup);
// event.target // event.target
Map.on('load', (e) => { Map.on('load', (e) => {
// Insert the layer beneath any symbol layer.
if (config['3d']) {
const layers = Map.getStyle().layers;
let labelLayerId;
for (let i = 0; i < layers.length; i++) {
if (layers[i].type === 'symbol' && layers[i].layout['text-field']) {
labelLayerId = layers[i].id;
break;
}
}
Map.addLayer({
'id': '3d-buildings',
'source': 'composite',
'source-layer': 'building',
'filter': ['==', 'extrude', 'true'],
'type': 'fill-extrusion',
'minzoom': 15,
'paint': {
'fill-extrusion-color': '#aaa',
// use an 'interpolate' expression to add a smooth transition effect to the
// buildings as the user zooms in
'fill-extrusion-height': [
"interpolate", ["linear"],
["zoom"],
15, 0,
15.05, ["get", "height"]
],
'fill-extrusion-base': [
"interpolate", ["linear"],
["zoom"],
15, 0,
15.05, ["get", "min_height"]
],
'fill-extrusion-opacity': .6
}
}, labelLayerId);
}
const firstMarker = config['geojson'].features[0].geometry.coordinates;
//Map.setCenter(firstMarker);
const bounds = new mapBoxGL.LngLatBounds(firstMarker, firstMarker);
// add markers to map // add markers to map
geojson.features.forEach((marker) => { config['geojson'].features.forEach((marker) => {
// create a DOM element for the marker const id = marker.id;
const $el = $(`<div class="marker">${ marker.icon }</div>`); const crds = marker.geometry.coordinates;
const content = marker.properties.content;
// create a DOM el for the marker
const $el = $(`<div id="Marker${ id }" data-id="${ id }" class="marker">${ marker.icon }</div>`);
$el.on('click', () => { $el.on('click', () => {
console.log('Marker click'); popup.setLngLat(crds)
const coordinates = marker.geometry.coordinates;
const content = marker.properties.content;
console.log(popup);
popup.setLngLat(coordinates)
.setHTML(content) .setHTML(content)
.addTo(Map); .addTo(Map);
if (config['flyToMarker']) {
Map.flyTo({
center: crds,
zoom: 17,
});
}
$el.trigger(Events.MAPMARKERCLICK);
}); });
// add marker to map // add marker to map
new mapboxgl.Marker($el[0]) new mapBoxGL.Marker($el[0])
.setLngLat(marker.geometry.coordinates) .setLngLat(crds)
.addTo(Map); .addTo(Map);
bounds.extend(crds);
}); });
Map.fitBounds(bounds, {
padding: 30,
});
popup.on('close', (e) => {
if (config['flyToBounds']) {
Map.fitBounds(bounds, {
padding: 30,
});
}
$el.trigger(Events.MAPPOPUPCLOSE);
});
$el.trigger(Events.MAPLOADED);
$(W).trigger(Events.MAPLOADED);
console.log('Map is loaded'); console.log('Map is loaded');
}); });
@ -124,7 +201,7 @@ const MapAPI = (($) => {
}, 36000); }, 36000);
$element.addClass(`${NAME}-active`); $el.addClass(`${NAME}-active`);
} }
// Public methods // Public methods
@ -133,36 +210,37 @@ const MapAPI = (($) => {
} }
getStyle() { getStyle() {
const $el = $(this._el);
return $el.data('map-style');
return 'mapbox://styles/mapbox/streets-v9'; return 'mapbox://styles/mapbox/streets-v9';
const hour = new Date().getHours(); const hour = new Date().getHours();
if (hour < 6 || hour > 18) { if (hour < 6 || hour > 18) {
// night // night
//return 'mapbox://styles/mapbox/streets-v7'; //return 'mapbox://styles/mapbox/streets-v7';
return 'mapbox://styles/tony-air/cjeacwih92iu42rpd8tcmuyb2'; return 'mapbox://styles/tony-air/cjeacwih92iu42rpd8tcmuyb2';
} else {
// day
return 'mapbox://styles/mapbox/streets-v9';
} }
// day
return 'mapbox://styles/mapbox/streets-v9';
} }
dispose() { dispose() {
const $element = $(this._element); const $el = $(this._el);
$element.removeClass(`${NAME}-active`); $el.removeClass(`${NAME}-active`);
$.removeData(this._element, DATA_KEY); $.removeData(this._el, DATA_KEY);
this._element = null; this._el = null;
} }
static _jQueryInterface() { static _jQueryInterface() {
if (typeof W.localStorage !== 'undefined') { if (typeof W.localStorage !== 'undefined') {
return this.each(function() { return this.each(function() {
// attach functionality to element // attach functionality to el
const $element = $(this); const $el = $(this);
let data = $element.data(DATA_KEY); let data = $el.data(DATA_KEY);
if (!data) { if (!data) {
data = new MapAPI(this); data = new MapAPI(this);
$element.data(DATA_KEY, data); $el.data(DATA_KEY, data);
} }
}); });
} }

View File

@ -7,37 +7,37 @@ const SlidingMenu = (($) => {
class SlidingMenu { class SlidingMenu {
// Constructor // Constructor
constructor(element) { constructor(el) {
this._element = element; const $el = $(this._el);
const $element = $(this._element); this.$el = $el;
$element.addClass(`${NAME}-active`); $el.addClass(`${NAME}-active`);
// esc button // esc button
$(window).on('keyup',((e) => { $(window).on('keyup', ((e) => {
if (e.which === 27) { if (e.which === 27) {
$element.find('.is-open[data-toggle="offcanvas"]').click(); $el.find('.is-open[data-toggle="offcanvas"]').click();
} }
})); }));
} }
// Public methods // Public methods
dispose() { dispose() {
console.log(`Disposing: ${NAME} elements`); console.log(`Disposing: ${NAME} els`);
$(this._element).removeClass(`${NAME}-active`); this.$el.removeClass(`${NAME}-active`);
$.removeData(this._element, DATA_KEY); $.removeData(this.$el, DATA_KEY);
this._element = null; this.$el = null;
} }
static _jQueryInterface() { static _jQueryInterface() {
return this.each(function () { return this.each(function() {
// attach functionality to element // attach functionality to el
const $element = $(this); const $el = $(this);
let data = $element.data(DATA_KEY); let data = $el.data(DATA_KEY);
if (!data) { if (!data) {
data = new SlidingMenu(this); data = new SlidingMenu(this);
$element.data(DATA_KEY, data); $el.data(DATA_KEY, data);
} }
}); });
} }
@ -46,7 +46,7 @@ const SlidingMenu = (($) => {
// jQuery interface // jQuery interface
$.fn[NAME] = SlidingMenu._jQueryInterface; $.fn[NAME] = SlidingMenu._jQueryInterface;
$.fn[NAME].Constructor = SlidingMenu; $.fn[NAME].Constructor = SlidingMenu;
$.fn[NAME].noConflict = function () { $.fn[NAME].noConflict = function() {
$.fn[NAME] = JQUERY_NO_CONFLICT; $.fn[NAME] = JQUERY_NO_CONFLICT;
return SlidingMenu._jQueryInterface; return SlidingMenu._jQueryInterface;
}; };

View File

@ -5,6 +5,9 @@
module.exports = { module.exports = {
AJAX: 'ajax-load', AJAX: 'ajax-load',
LOADED: 'load', LOADED: 'load',
MAPLOADED: 'map-loaded',
MAPMARKERCLICK: 'map-marker-click',
MAPPOPUPCLOSE: 'map-popup-close',
SET_TARGET_UPDATE: 'set-target-update', SET_TARGET_UPDATE: 'set-target-update',
RESTORE_FIELD: 'restore-field', RESTORE_FIELD: 'restore-field',
FORM_INIT_BASICS: 'form-basics', FORM_INIT_BASICS: 'form-basics',

View File

@ -15,20 +15,40 @@ import './_components/routes/index';
import Events from './_events'; import Events from './_events';
import Spinner from './_components/_ui.spinner'; import Spinner from './_components/_ui.spinner';
// youtube video preview image
import './_components/_ui.video.preview'; import './_components/_ui.video.preview';
import './_components/_ui.carousel'; import './_components/_ui.carousel';
import './_components/_ui.menu'; import './_components/_ui.menu';
// Bootstrap hover menu
import './_components/_ui.hover';
import FormBasics from './_components/_ui.form.basics'; import FormBasics from './_components/_ui.form.basics';
// Toggle bootstrap form fields
//import FormToggleUI from './_components/_ui.form.fields.toggle'; //import FormToggleUI from './_components/_ui.form.fields.toggle';
// Bootstrap Date & Time fields
//import FormDatetime from './_components/_ui.form.datetime'; //import FormDatetime from './_components/_ui.form.datetime';
import FormStepped from './_components/_ui.form.stepped';
// Stepped forms functionality
//import FormStepped from './_components/_ui.form.stepped';
// Forms validation functionality
import FormValidate from './_components/_ui.form.validate'; import FormValidate from './_components/_ui.form.validate';
// Store forms data into localStorage
import FormStorage from './_components/_ui.form.storage'; import FormStorage from './_components/_ui.form.storage';
// client-side images cropping
//import FormCroppie from './_components/_ui.form.croppie'; //import FormCroppie from './_components/_ui.form.croppie';
// AJAX functionality
import AjaxUI from './_components/_ui.ajax'; import AjaxUI from './_components/_ui.ajax';
// Google NoCaptcha fields
import NoCaptcha from './_components/_ui.nocaptcha'; import NoCaptcha from './_components/_ui.nocaptcha';
import SmoothScroll from 'smooth-scroll'; import SmoothScroll from 'smooth-scroll';

View File

@ -1,92 +0,0 @@
import $ from 'jquery';
const TypePage = (($) => {
// Constants
const NAME = 'TypePage';
// const DATA_KEY = "pageUI." + NAME;
const Events = require('./_events');
class TypePage {
// Static methods
static init() {
console.log(`Initializing: ${NAME}`);
}
static destroy() {
console.log(`Destroying: ${NAME}`);
}
/**
* jQuery extension functions
// Constructor
constructor(element) {
console.log("Constructing: " + NAME + " elements");
this._element = element;
}
// Public methods
dispose() {
console.log("Disposing: " + NAME + " elements");
$.removeData(this._element, DATA_KEY);
this._element = null;
}
static _jQueryInterface() {
return this.each(function () {
// attach functionality to element
const $element = $(this);
let data = $element.data(DATA_KEY);
if (!data) {
data = new TypePage(this);
$element.data(DATA_KEY, data);
}
})
}
*/
}
$(window).on(`${Events.AJAX} ${Events.LOADED}`, () => {
TypePage.init();
});
// JQuery extension functions
/*
$.fn[NAME] = TypePage._jQueryInterface;
$.fn[NAME].Constructor = TypePage;
$.fn[NAME].noConflict = function () {
$.fn[NAME] = JQUERY_NO_CONFLICT;
return TypePage._jQueryInterface;
};
// auto-apply
$(".ui." + NAME).ready(function(){
$(".ui." + NAME).TypePage();
}); */
return TypePage;
})($);
export default TypePage;
/*
import $ from 'jquery';
(function (G) {
G.initPulsePage = function () {
G.destroyPulsePage();
};
G.destroyPulsePage = function () {};
$(window).on("ajax-content-loaded", function () {
G.initPulsePage();
});
$(document).ready(function () {
G.initPulsePage();
});
}(this)); */

View File

@ -7,10 +7,7 @@ import 'bootstrap/js/dist/alert';
import 'bootstrap/js/dist/button'; import 'bootstrap/js/dist/button';
import 'bootstrap/js/dist/carousel'; import 'bootstrap/js/dist/carousel';
import 'bootstrap/js/dist/collapse'; import 'bootstrap/js/dist/collapse';
// conflicting with bootstrap-select/dist/js/bootstrap-select
import 'bootstrap/js/dist/dropdown'; import 'bootstrap/js/dist/dropdown';
import 'bootstrap/js/dist/modal'; import 'bootstrap/js/dist/modal';
import 'bootstrap/js/dist/tooltip'; import 'bootstrap/js/dist/tooltip';
import 'bootstrap/js/dist/popover'; import 'bootstrap/js/dist/popover';
@ -18,14 +15,12 @@ import 'bootstrap/js/dist/scrollspy';
import 'bootstrap/js/dist/tab'; import 'bootstrap/js/dist/tab';
// //
//import Vue from 'vue/dist/vue.esm.js';
// import Bootstrap-Vue
/*import { Carousel } from 'bootstrap-vue/es/components';
Vue.use(Carousel);*/
// Offcanvas menu
import 'offcanvas-bootstrap/dist/js/bootstrap.offcanvas'; import 'offcanvas-bootstrap/dist/js/bootstrap.offcanvas';
import 'jquery-zoom/jquery.zoom';
// Uncomment it to enable meta-lightbox zooming on hover
//import 'jquery-zoom/jquery.zoom';
import 'meta-lightbox/meta-lightbox'; import 'meta-lightbox/meta-lightbox';
import './_main'; import './_main';

View File

@ -146,22 +146,36 @@ button, input, optgroup, select, textarea,
} }
// dropdown hover // dropdown hover
/*
.dropdown.show {
.dropdown {
&:hover,
&:focus {
.dropdown-menu {
display: block;
}
}
}
}
@media only screen and (min-width: map-get($grid-breakpoints, "md")) { @media only screen and (min-width: map-get($grid-breakpoints, "md")) {
.dropdown-hover .collapse ul li { .dropdown-hover ul li {
position: relative; position: relative;
} }
.dropdown-hover .collapse ul li:hover { .dropdown-hover ul li {
> .dropdown-toggle::after { &:hover,
transform: rotate(-90deg); &:focus {
} > .dropdown-toggle::after {
transform: rotate(-90deg);
}
> ul { > ul {
display: block; display: block;
}
} }
} }
.dropdown-hover .collapse ul ul { .dropdown-hover ul ul {
position: absolute; position: absolute;
top: 100%; top: 100%;
left: 0; left: 0;
@ -169,16 +183,20 @@ button, input, optgroup, select, textarea,
display: none; display: none;
} }
/*******/ .dropdown-hover ul ul li {
.dropdown-hover .collapse ul ul li {
position: relative; position: relative;
} }
.dropdown-hover .collapse ul ul li:hover > ul { .dropdown-hover ul ul li {
display: block; &:hover,
&:focus {
> ul {
display: block;
}
}
} }
.dropdown-hover .collapse ul ul ul { .dropdown-hover ul ul ul {
position: absolute; position: absolute;
top: 0; top: 0;
left: 100%; left: 100%;
@ -186,16 +204,20 @@ button, input, optgroup, select, textarea,
display: none; display: none;
} }
/*******/ .dropdown-hover ul ul ul li {
.dropdown-hover .collapse ul ul ul li {
position: relative; position: relative;
} }
.dropdown-hover .collapse ul ul ul li:hover ul { .dropdown-hover ul ul ul li {
display: block; &:hover,
&:focus {
ul {
display: block;
}
}
} }
.dropdown-hover .collapse ul ul ul ul { .dropdown-hover ul ul ul ul {
position: absolute; position: absolute;
top: 0; top: 0;
left: -100%; left: -100%;
@ -203,9 +225,28 @@ button, input, optgroup, select, textarea,
display: none; display: none;
z-index: 1; z-index: 1;
} }
} }*/
// dark dropdowns // dark dropdowns
.navbar-dark {
.nav-link {
@include hover-focus {
background: $navbar-dark-hover-background;
}
}
.active > .nav-link,
.nav-link.active {
background: $navbar-dark-active-background;
}
.nav-link.show,
.navbar-nav .show > .nav-link {
background: $navbar-dark-show-background;
color: $navbar-dark-show-color;
}
}
.dropdown-menu.bg-dark { .dropdown-menu.bg-dark {
border-color: $dark; border-color: $dark;
@ -231,8 +272,37 @@ button, input, optgroup, select, textarea,
.dropdown-item { .dropdown-item {
@include hover-focus { @include hover-focus {
color: $navbar-dark-brand-hover-color; color: $navbar-dark-hover-color;
background: $dark; background: $navbar-dark-hover-background;
}
&.active,
&:active {
background: $navbar-dark-active-background;
}
.nav-link {
background: none;
} }
} }
} }
// pulse
.pulse {
animation: pulse 0.8s linear infinite;
}
@keyframes pulse {
0% {
transform: scale(1);
}
50% {
transform: scale(0.8);
}
100% {
transform: scale(1);
}
}

View File

@ -6,10 +6,30 @@
margin-bottom: 1rem; margin-bottom: 1rem;
} }
.mapboxgl-popup-content {
box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.4);
.mapboxgl-popup-close-button {
font-size: 2rem;
padding: .5rem;
&:hover,
&:focus {
background: $primary;
color: $white;
}
}
}
.mapboxgl-marker { .mapboxgl-marker {
width: 30px; width: 30px;
height: 30px; height: 30px;
font-size: 30px; font-size: 30px;
cursor: pointer; cursor: pointer;
text-align: center; text-align: center;
color: $primary;
.fas {
animation: pulse 0.8s linear infinite;
}
} }

View File

@ -55,6 +55,10 @@ body.shrink {}
} }
} }
&.dynamic__elements__image__elements__elementimage {
text-align: center;
}
&.site__elements__accordion { &.site__elements__accordion {
.card { .card {
padding-left: 0; padding-left: 0;

View File

@ -4,14 +4,16 @@ h1, h2, h3, h4, h5, h6,
} }
.bg-dark { .bg-dark {
h1, h2, h3, h4, h5, h6, h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6, .h1, .h2, .h3, .h4, .h5, .h6,
.typography, .typography,
a { a {
color: $white; color: $white;
} }
} }
.typography { .typography {
@include clearfix;
@import "./types/editor"; @import "./types/editor";
} }

View File

@ -8,7 +8,6 @@
namespace Site\Extensions; namespace Site\Extensions;
use Sheadawson\Linkable\Forms\LinkField; use Sheadawson\Linkable\Forms\LinkField;
use Sheadawson\Linkable\Models\Link; use Sheadawson\Linkable\Models\Link;
use SilverStripe\FontAwesome\FontAwesomeField; use SilverStripe\FontAwesome\FontAwesomeField;
@ -29,13 +28,9 @@ class ElementContentWidget extends DataExtension
{ {
parent::updateCMSFields($fields); parent::updateCMSFields($fields);
$tab = $fields->findOrMakeTab('Root.Main'); $fields->addFieldsToTab('Root.Main', [
$tab->push( FontAwesomeField::create('BlockIcon'),
FontAwesomeField::create('BlockIcon') LinkField::create('BlockLinkID', 'Link'),
); ]);
$tab->push(
LinkField::create('BlockLinkID', 'Link')
);
} }
} }

View File

@ -12,6 +12,7 @@ use Dynamic\Elements\Image\Elements\ElementImage;
use Sheadawson\Linkable\Forms\LinkField; use Sheadawson\Linkable\Forms\LinkField;
use Sheadawson\Linkable\Models\Link; use Sheadawson\Linkable\Models\Link;
use SilverStripe\Core\Config\Config; use SilverStripe\Core\Config\Config;
use SilverStripe\Forms\CheckboxField;
use SilverStripe\Forms\DropdownField; use SilverStripe\Forms\DropdownField;
use SilverStripe\Forms\FieldList; use SilverStripe\Forms\FieldList;
use SilverStripe\ORM\DataExtension; use SilverStripe\ORM\DataExtension;
@ -25,6 +26,7 @@ class ElementImageWidget extends DataExtension
]; ];
private static $db = [ private static $db = [
'Resize' => 'Boolean(1)',
'ImageHeight' => 'Float', 'ImageHeight' => 'Float',
'Content' => 'HTMLText', 'Content' => 'HTMLText',
]; ];
@ -45,6 +47,12 @@ class ElementImageWidget extends DataExtension
$this->owner->ImageHeight = $this->getHeight(); $this->owner->ImageHeight = $this->getHeight();
$heights = Config::inst()->get(__CLASS__, 'available_heights'); $heights = Config::inst()->get(__CLASS__, 'available_heights');
$fields->replaceField('Resize', CheckboxField::create(
'Resize',
'Would you like to scale image?'
));
if (count($heights)) { if (count($heights)) {
$fields->replaceField( $fields->replaceField(
'ImageHeight', 'ImageHeight',
@ -53,7 +61,9 @@ class ElementImageWidget extends DataExtension
'Image Height', 'Image Height',
$heights, $heights,
$this->getHeight() $this->getHeight()
)->setEmptyString('(unspecified)') )
->setEmptyString('(unspecified)')
->displayIf('Resize')->isChecked()->end()
); );
} else { } else {
$fields->dataFieldByName('ImageHeight') $fields->dataFieldByName('ImageHeight')
@ -64,6 +74,11 @@ class ElementImageWidget extends DataExtension
public function ImageResized() public function ImageResized()
{ {
$image = $this->owner->Image(); $image = $this->owner->Image();
if (!$this->owner->Resize) {
return $image;
}
$width = $this->getWidth(); $width = $this->getWidth();
$height = $this->getHeight(); $height = $this->getHeight();

View File

@ -0,0 +1,13 @@
<?php
namespace Site\Extensions;
use SilverStripe\Core\Extension;
class LeftAndMainExtension extends Extension
{
public function init()
{
}
}

View File

@ -13,16 +13,17 @@ use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\Forms\FieldList; use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\TreeMultiselectField; use SilverStripe\Forms\TreeMultiselectField;
use SilverStripe\Forms\DropdownField; use SilverStripe\Forms\DropdownField;
use BetterBrief\GoogleMapField; //use BetterBrief\GoogleMapField;
use Bigfork\SilverStripeMapboxField\MapboxField;
class SiteConfigExtension extends DataExtension class SiteConfigExtension extends DataExtension
{ {
private static $db = [ private static $db = [
'ExtraCode' => 'Text', 'ExtraCode' => 'Text',
'Longitude' => 'Varchar(255)', 'Longitude' => 'Decimal(10, 8)',
'Latitude' => 'Varchar(255)', 'Latitude' => 'Decimal(11, 8)',
'MapZoom' => 'Int', 'MapZoom' => 'Int',
'MapAPIKey' => 'Varchar(255)', //'MapAPIKey' => 'Varchar(255)',
'Description' => 'Varchar(255)', 'Description' => 'Varchar(255)',
]; ];
@ -37,40 +38,49 @@ class SiteConfigExtension extends DataExtension
public function updateCMSFields(FieldList $fields) public function updateCMSFields(FieldList $fields)
{ {
$tab = $fields->findOrMakeTab('Root.Main'); $fields->addFieldsToTab('Root.Main', [
TreeMultiselectField::create(
'Navigation',
'Navigation',
SiteTree::class
),
TextareaField::create('Description', 'Website Description'),
TextareaField::create('ExtraCode', 'Extra site-wide HTML code'),
DropdownField::create(
'PrivacyPolicyID',
'Privacy Policy Page',
SiteTree::get()->map()->toArray()
),
DropdownField::create(
'SitemapID',
'Sitemap Page',
SitemapPage::get()->map()->toArray()
),
]);
$tab->push(TreeMultiselectField::create( $mapTab = $fields->findOrMakeTab('Root.Maps');
'Navigation', $fields->addFieldsToTab('Root.Maps', [
'Navigation', //TextField::create('MapAPIKey'),
SiteTree::class TextField::create('MapZoom'),
)); MapboxField::create('Map', 'Choose a location', 'Latitude', 'Longitude'),
]);
$tab->push(TextareaField::create('ExtraCode', 'Extra site-wide HTML code')); /*GoogleMapField::create(
$tab->push(DropdownField::create(
'PrivacyPolicyID',
'Privacy Policy Page',
SiteTree::get()->map()->toArray()
));
$tab->push(DropdownField::create(
'SitemapID',
'Sitemap Page',
SitemapPage::get()->map()->toArray()
));
$tab->push(TextareaField::create('Description', 'Website Description'));
$mapTab = $fields->findOrMakeTab('Root.GoogleMaps');
$mapTab->push(TextField::create('MapAPIKey'));
$mapTab->push(TextField::create('MapZoom'));
$mapTab->push(GoogleMapField::create(
$this->owner, $this->owner,
'Location', 'Location',
[ [
'show_search_box' => true, 'show_search_box' => true,
] ]
)); )*/
}
public function MapAPIKey()
{
return MapboxField::config()->get('access_token');
}
public function MapStyle()
{
return MapboxField::config()->get('map_style');
} }
public function getGeoJSON() public function getGeoJSON()

View File

@ -18,11 +18,11 @@ class SiteTreeExtension extends DataExtension
public function updateCMSFields(FieldList $fields) public function updateCMSFields(FieldList $fields)
{ {
$tab = $fields->findOrMakeTab('Root.Settings'); $fields->addFieldsToTab('Root.Settings', [
TextareaField::create(
$tab->push(Textarea::create( 'ExtraCode',
'ExtraCode', 'Extra page specific HTML code'
'Extra page specific HTML code' ),
)); ]);
} }
} }

View File

@ -38,4 +38,9 @@ class Page extends SiteTree
return false; return false;
} }
public function CSSClass()
{
return str_replace(['\\'], '-', $this->getField('ClassName'));
}
} }

View File

@ -1,16 +1,21 @@
<% if $Pages %> <% if $Pages %>
<nav class="breadcrumbs"><ul> <nav class="breadcrumbs $DefaultContainer" aria-label="breadcrumb">
<li> <ol class="breadcrumb">
<a href="/">Home</a> <li class="breadcrumb-item">
$Delimiter.RAW <a href="/">Home</a>
</li> <%-- $Delimiter.RAW --%>
<% loop $Pages %>
<li<% if $Last %> class="current"<% end_if %>>
<% if not Up.Unlinked %><a href="$Link" class="breadcrumb-$Pos"><% end_if %>
$MenuTitle.XML
<% if not Up.Unlinked %></a><% end_if %>
$Up.Delimiter.RAW
</li> </li>
<% end_loop %> <% loop $Pages %>
</ul></nav> <li
class="breadcrumb-item<% if $Last %> current active<% end_if %>"
<% if $Last %> aria-current="page"<% end_if %>
>
<% if not Up.Unlinked %><a href="$Link" class="breadcrumb-$Pos"><% end_if %>
$MenuTitle.XML
<% if not Up.Unlinked %></a><% end_if %>
<%-- if not $Last %>$Up.Delimiter.RAW<% end_if --%>
</li>
<% end_loop %>
</ol>
</nav>
<% end_if %> <% end_if %>

View File

@ -1,11 +1,12 @@
<% if $ImageResized %> <% if $ImageResized %>
<div class="image-element__image<% if $Height %> height{$Height}<% end_if %><% if $Width %> width{$Width}<% end_if %>"> <div class="image-element__image<% if $Resize %><% if $Height %> height{$Height}<% end_if %><% if $Width %> width{$Width}<% end_if %><% end_if %>">
<% if $ImageLink %><a href="$ImageLink.URL"><% end_if %> <% if $ImageLink %><a href="$ImageLink.URL"><% end_if %>
<img src="$ImageResized.URL" class="img-responsive" alt="$Title.ATT"> <img src="$ImageResized.URL" class="img-responsive" alt="$Title.ATT" />
<% if $ImageLink %></a><% end_if %> <% if $ImageLink %></a><% end_if %>
</div> </div>
<% end_if %> <% end_if %>
<% if $ShowTitle || $Content || $ImageLink %>
<div class="image-element__caption img-content"> <div class="image-element__caption img-content">
<div class="container"> <div class="container">
<% if $ShowTitle %><h3 class="image-element__title title">$Title</h3><% end_if %> <% if $ShowTitle %><h3 class="image-element__title title">$Title</h3><% end_if %>
@ -22,3 +23,4 @@
<% end_if %> <% end_if %>
</div> </div>
</div> </div>
<% end_if %>

View File

@ -1,5 +1,5 @@
<div class="page-content"> <div class="page-content">
<h1 class="page-header container<% if $ElementalArea.Elements.Count < 1 %> no-elements<% end_if %>">$Title</h1> <h1 class="page-header $DefaultContainer<% if $ElementalArea.Elements.Count < 1 %> no-elements<% end_if %>">$Title</h1>
<div class="page-content"> <div class="page-content">
<% if $CurrentElement %> <% if $CurrentElement %>

View File

@ -1,5 +1,5 @@
<% if $Children %> <% if $Children %>
<li class="nav-item dropdown<% if $isCurrent || $isSection %> active <% end_if %>{$ExtraClass}"> <li class="nav-item dropdown<% if $isCurrent || $isSection %> active <% end_if %> {$CSSClass} {$ExtraClass}">
<a <a
class="nav-link dropdown-toggle" class="nav-link dropdown-toggle"
id="NavItem{$ID}" id="NavItem{$ID}"
@ -21,7 +21,7 @@
</ul> </ul>
</li> </li>
<% else %> <% else %>
<li class="nav-item $ExtraClass <% if $isCurrent || $isSection %> active<% end_if %>"> <li class="nav-item {$CSSClass} $ExtraClass <% if $isCurrent || $isSection %> active<% end_if %>">
<a class="nav-link" href="{$Link}" title="$Title.XML"> <a class="nav-link" href="{$Link}" title="$Title.XML">
$MenuTitle.XML $MenuTitle.XML
<% if $isCurrent || $isSection %><i class="sr-only">(current)</i><% end_if %> <% if $isCurrent || $isSection %><i class="sr-only">(current)</i><% end_if %>

View File

@ -1,4 +1,4 @@
<style> <style>
body,html{font-size:14px;margin:0;padding:0;background:#fff;color:#333}#PageLoading{position:fixed;left:0;top:0;margin:0;width:100%!important;height:100%!important;background:rgba(255,255,255,.9);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:9999}.main-bn{position:fixed;top:0;left:0;width:100%;z-index:99999999;padding:0.5rem 1rem;text-align:center;color:#fff;background:#FF0000}.loading-spinner{text-align:center} body,html{font-size:14px;margin:0;padding:0;background:#fff;color:#333}#PageLoading{position:fixed;left:0;top:0;margin:0;width:100%!important;height:100%!important;background:rgba(255,255,255,.9);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;z-index:9999}.main-bn{position:fixed;top:0;left:0;width:100%;z-index:99999999;padding:0.5rem 1rem;text-align:center;color:#fff;background:#FF0000}img,iframe{max-width:100%}.loading-spinner{text-align:center}
.lds-ellipsis{display:inline-block;position:relative;width:64px;height:64px}.lds-ellipsis div{position:absolute;top:27px;width:11px;height:11px;border-radius:50%;background:#888;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis div:nth-child(1){left:6px;animation:lds-ellipsis1 0.6s infinite}.lds-ellipsis div:nth-child(2){left:6px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(3){left:26px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(4){left:45px;animation:lds-ellipsis3 0.6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(19px, 0)}} .lds-ellipsis{display:inline-block;position:relative;width:64px;height:64px}.lds-ellipsis div{position:absolute;top:27px;width:11px;height:11px;border-radius:50%;background:#888;animation-timing-function:cubic-bezier(0, 1, 1, 0)}.lds-ellipsis div:nth-child(1){left:6px;animation:lds-ellipsis1 0.6s infinite}.lds-ellipsis div:nth-child(2){left:6px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(3){left:26px;animation:lds-ellipsis2 0.6s infinite}.lds-ellipsis div:nth-child(4){left:45px;animation:lds-ellipsis3 0.6s infinite}@keyframes lds-ellipsis1{0%{transform:scale(0)}100%{transform:scale(1)}}@keyframes lds-ellipsis3{0%{transform:scale(1)}100%{transform:scale(0)}}@keyframes lds-ellipsis2{0%{transform:translate(0, 0)}100%{transform:translate(19px, 0)}}
</style> </style>

View File

@ -1,3 +1,3 @@
<div id="PageContainer" class="page{$ClassName} action{$Action}"> <div id="PageContainer" class="page{$CSSClass} action{$Action}">
<% include Content %> <% include Content %>
</div> </div>

View File

@ -1,5 +1,5 @@
<% with $SearchResults %> <% with $SearchResults %>
<div id="PageContainer" class="page action{$Action}"> <div id="PageContainer" class="page{$CSSClass} pageSearch action{$Action}">
<div class="page-content"> <div class="page-content">
<h1 class="page-header container no-elements">$Title</h1> <h1 class="page-header container no-elements">$Title</h1>

View File

@ -1,7 +1,11 @@
<div class="mapAPI-map-container" data-map-zoom="$MapZoom" data-key="$MapAPIKey" data-geojson="$GeoJSON.XML"> <div
class="mapAPI-map-container"
data-map-zoom="$MapZoom"
data-key="<% if $MapAPIKey %>$MapAPIKey<% else %>$SiteConfig.MapAPIKey<% end_if %>"
data-map-style="<% if $MapStyle %>$MapStyle<% else %>$SiteConfig.MapStyle<% end_if %>"
data-geojson="$GeoJSON.XML"
data-fly-to-marker="true"
data-fly-to-bounds="false"
>
<div class="mapAPI-map"></div> <div class="mapAPI-map"></div>
<div class="text-right">
$DirectionsLink.RAW
</div>
</div> </div>

View File

@ -14,7 +14,30 @@
</header> </header>
<main id="MainContent" data-ajax-region="LayoutAjax"> <main id="MainContent" data-ajax-region="LayoutAjax">
$Layout <% if $ParentID %>
$Breadcrumbs
<% end_if %>
<% if $SideBarView || $Parent.SideBarView %>
<div class="$DefaultContainer">
<div class="row">
<div class="col-md-8">
$Layout
</div>
<div class="col-md-4">
<div class="page-content">
<% if $SideBarView %>
$SideBarView
<% else %>
$Parent.SideBarView
<% end_if %>
</div>
</div>
</div>
</div>
<% else %>
$Layout
<% end_if %>
</main> </main>
</div> </div>

View File

@ -1,4 +1,4 @@
<div id="PageContainer" class="page{$ClassName} action{$Action}"> <div id="PageContainer" class="page{$CSSClass} action{$Action}">
<% include Content %> <% include Content %>
<div class="page-content"> <div class="page-content">
@ -23,7 +23,7 @@
<% if $PaginatedList.Exists %> <% if $PaginatedList.Exists %>
<div class="row"> <div class="row">
<% loop $PaginatedList %> <% loop $PaginatedList %>
<div class="col-sm-4"> <div class="col-sm-3 col-md-3">
<% include BlogPostInfo %> <% include BlogPostInfo %>
</div> </div>
<% end_loop %> <% end_loop %>
@ -42,4 +42,4 @@
</div> </div>
</div> </div>
<% include SilverStripe\\Blog\\BlogSideBar %> <%-- include SilverStripe\\Blog\\BlogSideBar --%>

View File

@ -1,4 +1,4 @@
<div id="PageContainer" class="page{$ClassName} action{$Action}"> <div id="PageContainer" class="page{$CSSClass} action{$Action}">
<article class="blog-entry"> <article class="blog-entry">
<% if $FeaturedImage %> <% if $FeaturedImage %>
@ -31,4 +31,4 @@
<% end_if %> <% end_if %>
</div> </div>
<% include SilverStripe\\Blog\\BlogSideBar %> <%-- include SilverStripe\\Blog\\BlogSideBar --%>

View File

@ -0,0 +1,11 @@
<% if $Categories %>
<ul class="list-unstyled list-inline">
<% loop $Categories %>
<li class="list-inline-item">
<a href="$Link" title="$Title" class="btn btn-secondary">
<span class="text">$Title</span>
</a>
</li>
<% end_loop %>
</ul>
<% end_if %>

View File

@ -0,0 +1,11 @@
<% if $Posts %>
<ul class="list-unstyled">
<% loop $Posts %>
<li>
<a href="$Link" title="$Title">
<span class="text">$Title</span>
</a>
</li>
<% end_loop %>
</ul>
<% end_if %>

View File

@ -0,0 +1,11 @@
<% if $Tags %>
<ul class="list-unstyled list-inline">
<% loop $Tags %>
<li class="list-inline-item">
<a href="$Link" title="$Title" class="btn btn-secondary">
<span class="text">$Title</span>
</a>
</li>
<% end_loop %>
</ul>
<% end_if %>

View File

@ -1,5 +1,12 @@
<% if $ShowTitle %> <% if $ShowTitle || $Content %>
<h2 class="slider-element__title text-center">$Title</h2> <div class="slider-caption">
<% if $ShowTitle %>
<h2 class="slider-element__title text-center">$Title</h2>
<% end_if %>
<% if $Content %>
<div class="slider-element__content typography text-center">$Content</div>
<% end_if %>
</div>
<% end_if %> <% end_if %>
<% if $SlideShow %> <% if $SlideShow %>

View File

@ -0,0 +1,4 @@
<nav class="secondary element">
<% if $Title %><h2 class="widget-title">$Title</h2><% end_if %>
$Content
</nav>

View File

@ -1,71 +1,74 @@
{ {
"name": "silverstripe/installer", "name": "silverstripe/installer",
"type": "silverstripe-recipe", "type": "silverstripe-recipe",
"description": "The SilverStripe Framework Installer", "description": "The SilverStripe Framework Installer",
"require": { "require": {
"php": ">=7.1.0", "php": ">=7.1.0",
"silverstripe/recipe-cms": "^4", "ext-json": "*",
"wilr/silverstripe-googlesitemaps": "*", "silverstripe/recipe-cms": "^4",
"silverstripe/userforms": "*", "wilr/silverstripe-googlesitemaps": "*",
"undefinedoffset/sortablegridfield": "*", "silverstripe/userforms": "*",
"silverstripe/spamprotection": "*", "undefinedoffset/sortablegridfield": "*",
"silverstripe/recaptcha": "*", "silverstripe/spamprotection": "*",
"jonom/silverstripe-betternavigator": "*", "silverstripe/recaptcha": "*",
"silverstripe/externallinks": "*", "jonom/silverstripe-betternavigator": "*",
"symbiote/silverstripe-gridfieldextensions": "*", "silverstripe/externallinks": "*",
"colymba/gridfield-bulk-editing-tools": "^3", "symbiote/silverstripe-gridfieldextensions": "*",
"dnadesign/silverstripe-elemental-list": "*", "colymba/gridfield-bulk-editing-tools": "^3",
"dnadesign/silverstripe-elemental-virtual": "*", "dnadesign/silverstripe-elemental-list": "*",
"dnadesign/silverstripe-elemental-userforms": "*", "dnadesign/silverstripe-elemental-virtual": "*",
"dynamic/silverstripe-elemental-blocks": "*", "dnadesign/silverstripe-elemental-userforms": "*",
"drmartingonzo/ss-tinymce-charcount": "*", "dynamic/silverstripe-elemental-blocks": "*",
"axllent/silverstripe-version-truncator": "*", "drmartingonzo/ss-tinymce-charcount": "*",
"firesphere/googlemapsfield": "*", "axllent/silverstripe-version-truncator": "*",
"gorriecoe/silverstripe-dataobjecthistory": "*", "gorriecoe/silverstripe-dataobjecthistory": "*",
"axllent/silverstripe-bootstrap-forms": "*", "axllent/silverstripe-bootstrap-forms": "*",
"silverstripe/redirectedurls": "*", "silverstripe/redirectedurls": "*",
"undefinedoffset/silverstripe-nocaptcha": "*", "undefinedoffset/silverstripe-nocaptcha": "*",
"a2nt/silverstripe-font-awesome-field": "dev-master", "stevie-mayhew/silverstripe-svg": "*",
"stevie-mayhew/silverstripe-svg": "*", "betterbrief/silverstripe-googlemapfield": "*",
"betterbrief/silverstripe-googlemapfield": "*", "innoweb/silverstripe-sitemap": "*",
"innoweb/silverstripe-sitemap": "*", "silverstripe/multiuser-editing-alert": "*",
"silverstripe/multiuser-editing-alert": "*", "gorriecoe/silverstripe-link": "*",
"gorriecoe/silverstripe-link": "*", "gorriecoe/silverstripe-linkfield": "*",
"gorriecoe/silverstripe-linkfield": "*", "silverstripe/environmentcheck": "*",
"silverstripe/environmentcheck": "*" "silverstripe/widgets": "^2.0",
}, "a2nt/silverstripe-font-awesome-field": "dev-master",
"require-dev": { "a2nt/silverstripe-mapboxfield": "dev-master"
"phpunit/phpunit": "^5.7", },
"lekoala/silverstripe-debugbar": "dev-master" "require-dev": {
}, "phpunit/phpunit": "^5.7",
"repositories": [ "lekoala/silverstripe-debugbar": "dev-master"
{ },
"type": "vcs", "repositories": [{
"url": "https://github.com/a2nt/silverstripe-font-awesome" "type": "vcs",
} "url": "https://github.com/a2nt/silverstripe-font-awesome"
}, {
"type": "vcs",
"url": "https://github.com/a2nt/silverstripe-mapboxfield"
}],
"extra": {
"expose": [
"app/client/dist"
], ],
"extra": { "project-files-installed": [
"expose": [ "app/.htaccess",
"app/client/dist" "app/_config.php",
], "app/_config/mysite.yml",
"project-files-installed": [ "app/src/Page.php",
"app/.htaccess", "app/src/PageController.php"
"app/_config.php", ],
"app/_config/mysite.yml", "public-files-installed": [
"app/src/Page.php", ".htaccess",
"app/src/PageController.php" "index.php",
], "install-frameworkmissing.html",
"public-files-installed": [ "install.php",
".htaccess", "web.config"
"index.php", ]
"install-frameworkmissing.html", },
"install.php", "config": {
"web.config" "process-timeout": 600
] },
}, "prefer-stable": true,
"config": { "minimum-stability": "dev"
"process-timeout": 600
},
"prefer-stable": true,
"minimum-stability": "dev"
} }

View File

@ -42,6 +42,7 @@
"jquery-zoom": "^1.7.21", "jquery-zoom": "^1.7.21",
"jquery.appear": "^1.0.1", "jquery.appear": "^1.0.1",
"jquery.inputmask": "^3.3.4", "jquery.inputmask": "^3.3.4",
"jquery-hoverintent": "*",
"mapbox-gl": "^1.2.1", "mapbox-gl": "^1.2.1",
"meta-lightbox": "^1.0.0", "meta-lightbox": "^1.0.0",
"offcanvas-bootstrap": "^2.5.2", "offcanvas-bootstrap": "^2.5.2",

View File

@ -0,0 +1 @@
DELETE themes folder in case u don't have any themes

View File

@ -6,17 +6,7 @@
</head> </head>
<body oncontextmenu="return false;"<% with $SiteConfig %> data-default-lng="$Longitude" data-default-lat="$Latitude"<% end_with %>> <body oncontextmenu="return false;"<% with $SiteConfig %> data-default-lng="$Longitude" data-default-lat="$Latitude"<% end_with %>>
<%-- Upgrade your Browser notice --%> <% include First %>
<!--[if lt IE 10]><div class="main-bn"><a href="https://www.google.com/chrome/browser/desktop/" title="<%t Page.UPGRADEBROWSER 'Upgrade your browser' %>"><%t Page.OUTDATEDBROWSER 'You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today.' %></a></div><![endif]-->
<%-- No JS enabled notice --%>
<noscript><div class="main-bn"><%t Page.JAVASCRIPTREQUIRED 'Please, enable javascript.' %></div></noscript>
<%-- Loading Spinner --%>
<div id="PageLoading"><div class="loading-spinner"><div class="bubblingG"><i id="bubblingG_1"></i><i id="bubblingG_2"></i><i id="bubblingG_3"></i></div><br/><%t Page.LOADINGTEXT 'LOADING ..' %></div></div>
<%-- Site Wide Alert Message --%>
<% include SiteWideMessage %>
<div class="wrapper"> <div class="wrapper">
<header id="Header" class="container"> <header id="Header" class="container">
@ -24,11 +14,34 @@
</header> </header>
<main id="MainContent" data-ajax-region="LayoutAjax"> <main id="MainContent" data-ajax-region="LayoutAjax">
$Layout <% if $ParentID %>
$Breadcrumbs
<% end_if %>
<% if $SideBarView || $Parent.SideBarView %>
<div class="$DefaultContainer">
<div class="row">
<div class="col-md-8">
$Layout
</div>
<div class="col-md-4">
<div class="page-content">
<% if $SideBarView %>
$SideBarView
<% else %>
$Parent.SideBarView
<% end_if %>
</div>
</div>
</div>
</div>
<% else %>
$Layout
<% end_if %>
</main> </main>
</div> </div>
<footer id="Footer" class="site-footer"> <footer id="Footer" class="site-footer footer">
<% include Footer %> <% include Footer %>
</footer> </footer>
@ -37,13 +50,13 @@
</div> </div>
<%-- Require CSS+JS from /public/resourses/[js,css]/[ClassName].[js,css] --%> <%-- Require CSS+JS from /public/resourses/[js,css]/[ClassName].[js,css] --%>
$AutoRequirements($ClassName).RAW $AutoRequirements($ClassName).RAW
<%-- Mapbox --%> <%-- Mapbox --%>
<script src="https://api.tiles.mapbox.com/mapbox-gl-js/v0.48.0/mapbox-gl.js"></script> <script src="https://api.tiles.mapbox.com/mapbox-gl-js/v0.48.0/mapbox-gl.js"></script>
<link href="https://api.tiles.mapbox.com/mapbox-gl-js/v0.48.0/mapbox-gl.css" rel="stylesheet" /> <link href="https://api.tiles.mapbox.com/mapbox-gl-js/v0.48.0/mapbox-gl.css" rel="stylesheet" />
<%-- place extra requirements after this line --%> <%-- place extra requirements after this line --%>
<div class="extra-code extra-code-site"> <div class="extra-code extra-code-site">
$SiteConfig.ExtraCode $SiteConfig.ExtraCode
</div> </div>