Compare commits
179 Commits
Author | SHA1 | Date |
---|---|---|
Tony Air | f95cffdceb | |
Tony Air | 00469c0b1e | |
Tony Air | bce9a07e8b | |
Tony Air | 17d1037233 | |
Tony Air | e72a46d759 | |
Tony Air | fc442dbc46 | |
Tony Air | 594a2c4faa | |
Tony Air | 50d3ef9ba5 | |
Tony Air | be335742fc | |
Tony Air | e2c5390d89 | |
Tony Air | a37673f6d5 | |
Tony Air | e62118f173 | |
Tony Air | 6959a77507 | |
Tony Air | 4be4dafdd6 | |
Tony Air | 73a227fafd | |
Tony Air | c9a4f40725 | |
Tony Air | c36b321d91 | |
Tony Air | 0cbc125872 | |
Tony Air | 990cf8ffbe | |
Tony Air | 488cd66be0 | |
Tony Air | 1953c9ff56 | |
Tony Air | 630672e87e | |
Tony Air | 473b406f8a | |
Tony Air | 22fa556fc3 | |
Tony Air | 9a9f6bc79e | |
Tony Air | f161cd9c7f | |
Tony Air | ddcdb1218c | |
Tony Air | ba000bcb4e | |
Tony Air | a7a6cd08ab | |
Tony Air | ef13e48857 | |
Tony Air | f6fabfe367 | |
Tony Air | 414d5c7cbb | |
Tony Air | 2d7359b650 | |
Tony Air | f806dfdabf | |
Tony Air | 38090f14c1 | |
Tony Air | 273c4e805c | |
Tony Air | e0410c5667 | |
Tony Air | e82650327b | |
Tony Air | 3fd711afd3 | |
Tony Air | de2bd98792 | |
Tony Air | 4be4002e02 | |
Tony Air | 83952d4c83 | |
Tony Air | c710fb02ff | |
Tony Air | 46fa25a04d | |
Tony Air | a4e2f12b71 | |
Tony Air | 051a126624 | |
Tony Air | 3e5c6af1fb | |
Tony Air | 306bc5e7dd | |
Tony Air | 2a07cf6763 | |
Tony Air | 5f10b0ae92 | |
Tony Air | d2fb354b10 | |
Tony Air | 6a73a98464 | |
Tony Air | 2ebbfba1ce | |
Tony Air | 485545093b | |
Tony Air | fd91380d89 | |
Tony Air | 101ef17c90 | |
Tony Air | 05c741fdfe | |
Tony Air | c4c49c15be | |
Tony Air | 8e5d69f35f | |
Tony Air | 0e70a5c690 | |
Tony Air | 56a58e3d6c | |
Tony Air | e41d1a5b45 | |
Tony Air | 00d7c12dfb | |
Tony Air | e2120d5753 | |
Tony Air | 16dc06832b | |
Tony Air | f2a51a8993 | |
Tony Air | 36d72210f7 | |
Tony Air | 4c3fb3cf73 | |
Tony Air | cc43b7dca6 | |
Tony Air | c72e1f3bb2 | |
Tony Air | 5d0862f92a | |
Tony Air | d7783504f1 | |
Tony Air | 9d7c555af0 | |
Tony Air | 12b2ff19d5 | |
Tony Air | aa698660ec | |
Tony Air | b7c0418cff | |
Tony Air | ca56eb441f | |
Tony Air | 0fc3d88a20 | |
Tony Air | b1a4dfd6ee | |
Tony Air | 2796ec97aa | |
Tony Air | 7ddaafe26c | |
Tony Air | 4b111ef30e | |
Tony Air | fc0b5f74d1 | |
Tony Air | c1ff57a410 | |
Tony Air | 14362e0f99 | |
Tony Air | 7fd9645b44 | |
Tony Air | f9afd356bd | |
Tony Air | 6db6cf0583 | |
Tony Air | 9684f37a98 | |
Tony Air | 2e36f2f048 | |
Tony Air | f249be4f4a | |
Tony Air | ea81d42bd4 | |
Tony Air | 86a71bbb4e | |
Tony Air | 6dae2f685d | |
Tony Air | a1bfc6f947 | |
Tony Air | f5e5e2cc10 | |
Tony Air | f9fa8024ed | |
Tony Air | f07bd6ea76 | |
Tony Air | e8dd41bb80 | |
Tony Air | e7c4b036b1 | |
Tony Air | 7ebf9a41f6 | |
Tony Air | a9b29257ac | |
Tony Air | dc82ef55de | |
Tony Air | f7daf87039 | |
Tony Air | 6ab0448fbb | |
Tony Air | ef55b711fc | |
Tony Air | 6856299447 | |
Tony Air | 7735b38cd5 | |
Tony Air | a4d78ac8a2 | |
Tony Air | 85d193d941 | |
Tony Air | 7d937035a6 | |
Tony Air | 36785f3a14 | |
Tony Air | e43e13479f | |
Tony Air | 007b37c1c9 | |
Tony Air | 2746049546 | |
Tony Air | 471c113cba | |
Tony Air | 62c92d6f2e | |
Tony Air | fa79e230da | |
Tony Air | 2242f30153 | |
Tony Air | 97d4ffca26 | |
Tony Air | 7a9e0870c9 | |
Tony Air | 1b691fd397 | |
Tony Air | d191748fe2 | |
Tony Air | fecdd8b1d5 | |
Tony Air | f9961c04cd | |
Tony Air | 7ab7fe8a39 | |
Tony Air | 9cb8bb9486 | |
Tony Air | 52f8ab5fa9 | |
Tony Air | 65d40cd47d | |
Tony Air | 170447ae98 | |
Tony Air | 035e5ec434 | |
Tony Air | 0d0dbb2ff9 | |
Tony Air | 3d96ae7b2a | |
Tony Air | ef91cbe8e0 | |
Tony Air | caeb433397 | |
Tony Air | 5ff57c0f59 | |
Tony Air | 63ea995d66 | |
Tony Air | f39a6ddcd6 | |
Tony Air | 619c7bd525 | |
Tony Air | 2d03770420 | |
Tony Air | 2f07ae6bf8 | |
Tony Air | 32b5e8e750 | |
Tony Air | 61b987d21a | |
Tony Air | 88cec555d3 | |
Tony Air | ca025220a7 | |
Tony Air | f56ff9069e | |
Tony Air | b2691a7112 | |
Tony Air | b87adfa1cc | |
Tony Air | 1dfaeb1e30 | |
Tony Air | 252097d9b6 | |
Tony Air | 906ffafcef | |
Tony Air | d7152123bf | |
Tony Air | d269968f85 | |
Tony Air | 97c1f0402f | |
Tony Air | b6c20dbf8c | |
Tony Air | 878feb96a3 | |
Tony Air | a0ce4db571 | |
Tony Air | e0faa421df | |
Tony Air | 365165fd41 | |
Tony Air | ab0c9e362a | |
Tony Air | 49cebd4050 | |
Tony Air | 54d44268bd | |
Tony Air | d0a4a479c4 | |
Tony Air | 8f88563bb7 | |
Tony Air | 7bc459d363 | |
Tony Air | 5029c8e055 | |
Tony Air | cd5427b2eb | |
Tony Air | 59eca7f6c2 | |
Tony Air | ba534a3f18 | |
Tony Air | 4eeed7a894 | |
Tony Air | 6116d29bf5 | |
Tony Air | 1a20c9f1dd | |
Tony Air | d559313215 | |
Tony Air | 710ca03983 | |
Tony Air | 850704705f | |
Tony Air | 5ddda5d91f | |
Tony Air | b52925d011 | |
Tony Air | 1442256a7c | |
Tony Air | 886b99abec |
|
@ -7,7 +7,7 @@ root = true
|
|||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
indent_size = 4
|
||||
indent_size = 2
|
||||
indent_style = space
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
@ -19,6 +19,15 @@ trim_trailing_whitespace = false
|
|||
indent_size = 2
|
||||
indent_style = space
|
||||
|
||||
|
||||
[*.php]
|
||||
indent_size = 4
|
||||
indent_style = tab
|
||||
|
||||
[*.ss]
|
||||
indent_size = 4
|
||||
indent_style = tab
|
||||
|
||||
[{.travis.yml,package.json}]
|
||||
# The indent size used in the `package.json` file cannot be changed
|
||||
# https://github.com/npm/npm/pull/3180#issuecomment-16336516
|
||||
|
|
16
.env.dist
|
@ -6,4 +6,18 @@ SS_DATABASE_NAME=''
|
|||
SS_DEFAULT_ADMIN_USERNAME=''
|
||||
SS_DEFAULT_ADMIN_PASSWORD=''
|
||||
|
||||
SS_ENVIRONMENT_TYPE='dev'
|
||||
SS_ENVIRONMENT_TYPE='dev'
|
||||
|
||||
SS_SEND_ALL_EMAILS_FROM=''
|
||||
|
||||
NOCAPTCHA_SITE_KEY=''
|
||||
NOCAPTCHA_SECRET_KEY=''
|
||||
|
||||
SS_TURNSTILE_SITE_KEY=''
|
||||
SS_TURNSTILE_SECRET_KEY=''
|
||||
|
||||
GOOGLEMAPS_API_KEY=''
|
||||
MAPBOX_API_KEY=''
|
||||
|
||||
APP_SMTP_USERNAME=''
|
||||
APP_SMTP_PASSWORD=''
|
||||
|
|
|
@ -6,8 +6,10 @@
|
|||
/vendor
|
||||
/public/assets
|
||||
/public/resources
|
||||
/site/client/dist
|
||||
/silverstripe-cache
|
||||
yarn-error\.log
|
||||
package-lock.json
|
||||
pnpm-lock.yaml
|
||||
pnpm-lock.yaml
|
||||
public/_resources
|
||||
.graphql-generated
|
||||
public/_graphql
|
||||
|
|
4
.npmrc
|
@ -1,2 +1,2 @@
|
|||
registry=https://npm.pkg.github.com/a2nt
|
||||
registry=https://registry.npmjs.org/
|
||||
//npmjs.org=true
|
||||
@a2nt:registry=https://npm.pkg.github.com
|
32
README.md
|
@ -1,10 +1,13 @@
|
|||
# silverstripe-webpack SS4.\*
|
||||
|
||||
## Simple WebPack boiler plate for SilverStripe
|
||||
|
||||
[![Silverstripe Version](https://img.shields.io/badge/Silverstripe-5.1-005ae1.svg?labelColor=white&logoColor=ffffff&logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxMDEuMDkxIDU4LjU1NSIgZmlsbD0iIzAwNWFlMSIgeG1sbnM6dj0iaHR0cHM6Ly92ZWN0YS5pby9uYW5vIj48cGF0aCBkPSJNNTAuMDE1IDUuODU4bC0yMS4yODMgMTQuOWE2LjUgNi41IDAgMCAwIDcuNDQ4IDEwLjY1NGwyMS4yODMtMTQuOWM4LjgxMy02LjE3IDIwLjk2LTQuMDI4IDI3LjEzIDQuNzg2czQuMDI4IDIwLjk2LTQuNzg1IDI3LjEzbC02LjY5MSA0LjY3NmM1LjU0MiA5LjQxOCAxOC4wNzggNS40NTUgMjMuNzczLTQuNjU0QTMyLjQ3IDMyLjQ3IDAgMCAwIDUwLjAxNSA1Ljg2MnptMS4wNTggNDYuODI3bDIxLjI4NC0xNC45YTYuNSA2LjUgMCAxIDAtNy40NDktMTAuNjUzTDQzLjYyMyA0Mi4wMjhjLTguODEzIDYuMTctMjAuOTU5IDQuMDI5LTI3LjEyOS00Ljc4NHMtNC4wMjktMjAuOTU5IDQuNzg0LTI3LjEyOWw2LjY5MS00LjY3NkMyMi40My0zLjk3NiA5Ljg5NC0uMDEzIDQuMTk4IDEwLjA5NmEzMi40NyAzMi40NyAwIDAgMCA0Ni44NzUgNDIuNTkyeiIvPjwvc3ZnPg==)](https://packagist.org/packages/goldfinch/google-maps)
|
||||
|
||||
Checkout files at /app/ folder for details
|
||||
Take a look to https://github.com/a2nt/webpack-bootstrap-ui-kit.git for UI Kit details
|
||||
|
||||
Note: I prefer using vanilla JS with minimal external dependencies to reach higher loading speed.
|
||||
There's no jQuery and no React, but it can be connected optionally.
|
||||
|
||||
# UI Demo
|
||||
|
||||
Use UI Repository at https://github.com/a2nt/webpack-bootstrap-ui-kit.git to build static HTML files
|
||||
|
@ -75,7 +78,7 @@ php -d memory_limit=-1 composer.phar update --ignore-platform-reqs
|
|||
- Folder /app/client/src/js/types is used to create page specific JS (just create JS file there and it will be compiled)
|
||||
- Folder /app/clent/src/scss/types is used to create page specific CSS (just create SCSS file there and it will be compiled)
|
||||
- Automatic linting (JS+SCSS)
|
||||
- Bootstrap 4 included by default
|
||||
- Bootstrap 5 included by default
|
||||
- Font-Awesome included by default
|
||||
- Deferred requirements loading
|
||||
- Requirements auto-loading
|
||||
|
@ -116,7 +119,24 @@ php -d memory_limit=-1 composer.phar update --ignore-platform-reqs
|
|||
- yarn lint:check - to check SCSS and JS linting
|
||||
- yarn lint:fix - to fix SCSS and JS linting automatically
|
||||
|
||||
### TODO:
|
||||
### Usefull UNIX console utilities
|
||||
|
||||
#### Code search (find . -name "*.*" | xargs grep "some text" replacement)
|
||||
|
||||
ag "some text" ./
|
||||
https://github.com/ggreer/the_silver_searcher
|
||||
|
||||
#### File content with code hightlighting (cat replacement)
|
||||
|
||||
bat ./app/src/Pages/Page.php
|
||||
https://github.com/sharkdp/bat
|
||||
|
||||
#### File listing (ls replacement)
|
||||
|
||||
exa -aTL3 ./app
|
||||
https://github.com/ogham/exa
|
||||
|
||||
### git diff tool with bat code hightlighting (git show)
|
||||
|
||||
https://github.com/dandavison/delta
|
||||
|
||||
- Planktos torrent auto-generation for static files (https://github.com/xuset/planktos#----------planktos)
|
||||
- ServiceWorker auto-generation
|
||||
|
|
|
@ -1,40 +1,12 @@
|
|||
<?php
|
||||
|
||||
use SilverStripe\Forms\HTMLEditor\HtmlEditorConfig;
|
||||
use SilverStripe\Core\Manifest\ModuleResourceLoader;
|
||||
use SilverStripe\ORM\Search\FulltextSearchable;
|
||||
use SilverStripe\View\Parsers\ShortcodeParser;
|
||||
use Site\Extensions\EmbedShortcodeProvider;
|
||||
|
||||
// setup TinyMCE editor
|
||||
$config = HtmlEditorConfig::get('cms');
|
||||
$config->enablePlugins([
|
||||
'template',
|
||||
'fullscreen',
|
||||
'hr',
|
||||
'contextmenu',
|
||||
'charmap',
|
||||
'visualblocks',
|
||||
'lists',
|
||||
'charcount' => ModuleResourceLoader::resourceURL(
|
||||
'drmartingonzo/ss-tinymce-charcount:client/dist/js/bundle.js'
|
||||
),
|
||||
]);
|
||||
$config->addButtonsToLine(2, 'hr');
|
||||
$config->setOption('block_formats', 'Paragraph=p;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Address=address;Pre=pre');
|
||||
$config->setOption('invalid_elements', 'h1');
|
||||
$config->setOption(
|
||||
'table_class_list',
|
||||
[
|
||||
['title' => 'Transparent Table', 'value' => 'table-none'],
|
||||
['title' => 'Shaded rows', 'value' => 'table table-striped table-bordered'],
|
||||
]
|
||||
);
|
||||
|
||||
FulltextSearchable::enable();
|
||||
|
||||
// replace embed parser
|
||||
$parser = ShortcodeParser::get('default');
|
||||
$parser->unregister('embed');
|
||||
$parser->register('embed', [EmbedShortcodeProvider::class, 'handle_shortcode']);
|
||||
use SilverStripe\Core\EnvironmentLoader;
|
||||
|
||||
$env = BASE_PATH . '/app/.env';
|
||||
$loader = new EnvironmentLoader();
|
||||
$loader->loadFile($env);
|
||||
/*\SilverStripe\Core\Config\Config::modify()->set(
|
||||
\SilverStripe\Control\Email\Email::class,
|
||||
'bcc_all_emails_to',//'cc_all_emails_to',
|
||||
'test@example.com'
|
||||
);*/
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
---
|
||||
Name: app-api-captcha
|
||||
After:
|
||||
- a2nt-cms-niceties-base-config
|
||||
---
|
||||
|
||||
A2nt\CMSNiceties\Extensions\SiteMemberLoginForm:
|
||||
enable_captcha: false
|
||||
|
||||
UndefinedOffset\NoCaptcha\Forms\NocaptchaField:
|
||||
site_key: '`NOCAPTCHA_SITE_KEY`' #Your site key (required)
|
||||
secret_key: '`NOCAPTCHA_SECRET_KEY`' #Your secret key (required)
|
||||
verify_ssl: true #Allows you to disable php-curl's SSL peer verification by setting this to false (optional, defaults to true)
|
||||
default_theme: 'light' #Default theme color (optional, light or dark, defaults to light)
|
||||
default_type: 'image' #Default captcha type (optional, image or audio, defaults to image)
|
||||
default_size: 'normal' #Default size (optional, normal, compact or invisible, defaults to normal)
|
||||
default_badge: 'bottomright' #Default badge position (bottomright, bottomleft or inline, defaults to bottomright)
|
||||
proxy_server: '' #Your proxy server address (optional)
|
||||
proxy_auth: '' #Your proxy server authentication information (optional)
|
||||
|
||||
SilverStripe\SpamProtection\Extension\FormSpamProtectionExtension:
|
||||
default_spam_protector: WebbuildersGroup\Turnstile\Forms\TurnstileProtector
|
||||
#default_spam_protector: UndefinedOffset\NoCaptcha\Forms\NocaptchaProtector
|
||||
|
||||
WebbuildersGroup\Turnstile\Forms\TurnstileField:
|
||||
site_key: '`SS_TURNSTILE_SITE_KEY`' #Your site key (required)
|
||||
secret_key: '`SS_TURNSTILE_SECRET_KEY`' #Your secret key (required)
|
||||
verify_ssl: true #Allows you to disable php-curl's SSL peer verification by setting this to false (optional, defaults to true)
|
||||
default_theme: "light" #Default theme color (optional, light, dark or auto, defaults to light)
|
||||
js_onload_callback: null #Onload callback to be called when the JS for Turnstile is loaded
|
||||
disable_js: true
|
||||
proxy_server: "`SS_OUTBOUND_PROXY_SERVER`" #Your proxy server address (optional)
|
||||
proxy_port: "`SS_OUTBOUND_PROXY_PORT`" #Your proxy server address port (optional)
|
||||
proxy_auth: "`SS_OUTBOUND_PROXY_AUTH`" #Your proxy server authentication information (optional)
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
Name: 'webapp-map'
|
||||
Name: webapp-api-map
|
||||
After:
|
||||
- 'silverstripe-mapboxfield'
|
||||
- 'addressable'
|
||||
|
@ -7,19 +7,23 @@ After:
|
|||
SilverStripe\Core\Injector\Injector:
|
||||
A2nt\SilverStripeMapboxField\MarkerExtension:
|
||||
properties:
|
||||
geocoder: %$Symbiote\Addressable\MapboxGeocodeService
|
||||
geocoder: '%$Symbiote\Addressable\MapboxGeocodeService'
|
||||
Symbiote\Addressable\GeocodeServiceInterface:
|
||||
class: Symbiote\Addressable\MapboxGeocodeService
|
||||
|
||||
A2nt\SilverStripeMapboxField\MapboxField:
|
||||
map_style: 'mapbox://styles/mapbox/streets-v9' #'mapbox://styles/mapbox/light-v10'
|
||||
|
||||
Site\Elements\MapElement:
|
||||
A2nt\ElementalBasics\Elements\MapElement:
|
||||
map_type: 'google-maps'
|
||||
|
||||
BetterBrief\GoogleMapField:
|
||||
default_options:
|
||||
api_key: ''
|
||||
api_key: '`GOOGLEMAPS_API_KEY`'
|
||||
|
||||
Symbiote\Addressable\MapboxGeocodeService:
|
||||
mapbox_api_key: ''
|
||||
mapbox_api_key: '`MAPBOX_API_KEY`'
|
||||
|
||||
SilverStripe\SiteConfig\SiteConfig:
|
||||
map_type: "google-maps"
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
Name: 'webapp-payment'
|
||||
Name: 'webapp-api-payment'
|
||||
---
|
||||
SilverStripe\Omnipay\Model\Payment:
|
||||
allowed_gateways:
|
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
Name: app-basics
|
||||
After:
|
||||
- elemental
|
||||
- elemental-list
|
||||
- elementalvirtual
|
||||
- elemental-basics
|
||||
- a2nt-cms-niceties-options-elements
|
||||
- a2nt-cms-niceties-base-config
|
||||
- webapp-base-extensions
|
||||
- webapp-locale-fluent
|
||||
- silvershop-config
|
||||
---
|
||||
|
||||
SilverStripe\CMS\Model\SiteTree:
|
||||
allowed_elements: null
|
||||
|
||||
DNADesign\ElementalList\Model\ElementList:
|
||||
allowed_elements: null
|
||||
|
||||
DNADesign\ElementalUserForms\Model\ElementForm:
|
||||
block_default_userforms_css: true
|
||||
block_default_userforms_js: true
|
||||
|
||||
SilverLeague\IDEAnnotator\DataObjectAnnotator:
|
||||
enabled: true
|
||||
|
||||
|
||||
SilverStripe\UserForms\Form\UserForm:
|
||||
no_placeholders: false
|
||||
show_labels: true
|
|
@ -0,0 +1,64 @@
|
|||
---
|
||||
Name: webapp-base-logs-dev
|
||||
After:
|
||||
- a2nt-cms-niceties-base-logs-dev
|
||||
Only:
|
||||
environment: dev
|
||||
---
|
||||
SilverStripe\Core\Injector\Injector:
|
||||
Psr\Log\LoggerInterface.errorhandler:
|
||||
calls:
|
||||
pushMyDisplayErrorHandler: [pushHandler, ['%$DisplayErrorHandler']]
|
||||
DisplayErrorHandler:
|
||||
class: SilverStripe\Logging\HTTPOutputHandler
|
||||
constructor:
|
||||
- 'notice'
|
||||
properties:
|
||||
Formatter: '%$SilverStripe\Logging\DetailedErrorFormatter'
|
||||
CLIFormatter: '%$SilverStripe\Logging\DetailedErrorFormatter'
|
||||
---
|
||||
Name: webapp-base-logs-live
|
||||
After:
|
||||
- a2nt-cms-niceties-base-logs-live
|
||||
Except:
|
||||
environment: dev
|
||||
---
|
||||
SilverStripe\Core\Injector\Injector:
|
||||
# Default logger implementation for general purpose use
|
||||
Psr\Log\LoggerInterface:
|
||||
calls:
|
||||
# Save system logs to file
|
||||
pushFileLogHandler: [pushHandler, ['%$LogFileHandler']]
|
||||
|
||||
# Core error handler for system use
|
||||
Psr\Log\LoggerInterface.errorhandler:
|
||||
calls:
|
||||
# Save errors to file
|
||||
pushFileLogHandler: [pushHandler, ['%$LogFileHandler']]
|
||||
# Format and display errors in the browser/CLI
|
||||
pushMyDisplayErrorHandler: [pushHandler, ['%$DisplayErrorHandler']]
|
||||
|
||||
# Custom handler to log to a file
|
||||
LogFileHandler:
|
||||
class: Monolog\Handler\StreamHandler
|
||||
constructor:
|
||||
- '../silverstripe.log'
|
||||
- 'notice'
|
||||
properties:
|
||||
Formatter: '%$Monolog\Formatter\HtmlFormatter'
|
||||
ContentType: text/html
|
||||
|
||||
# Handler for displaying errors in the browser or CLI
|
||||
DisplayErrorHandler:
|
||||
class: SilverStripe\Logging\HTTPOutputHandler
|
||||
constructor:
|
||||
- 'error'
|
||||
properties:
|
||||
Formatter: '%$SilverStripe\Logging\DebugViewFriendlyErrorFormatter'
|
||||
|
||||
# Configuration for the "friendly" error formatter
|
||||
SilverStripe\Logging\DebugViewFriendlyErrorFormatter:
|
||||
class: SilverStripe\Logging\DebugViewFriendlyErrorFormatter
|
||||
properties:
|
||||
Title: 'There has been an error'
|
||||
Body: 'The website server has not been able to respond to your request'
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
Name: app-cache
|
||||
After:
|
||||
- app-basics
|
||||
---
|
||||
|
||||
SilverStripe\Core\Injector\Injector:
|
||||
Psr\SimpleCache\CacheInterface.appCache:
|
||||
factory: SilverStripe\Core\Cache\CacheFactory
|
||||
constructor:
|
||||
namespace: "appCache"
|
||||
defaultLifetime: 3600
|
|
@ -1,17 +0,0 @@
|
|||
---
|
||||
Name: 'app-captcha'
|
||||
---
|
||||
|
||||
SilverStripe\SpamProtection\Extension\FormSpamProtectionExtension:
|
||||
default_spam_protector: UndefinedOffset\NoCaptcha\Forms\NocaptchaProtector
|
||||
|
||||
UndefinedOffset\NoCaptcha\Forms\NocaptchaField:
|
||||
site_key: "YOUR_SITE_KEY" #Your site key (required)
|
||||
secret_key: "YOUR_SECRET_KEY" #Your secret key (required)
|
||||
verify_ssl: true #Allows you to disable php-curl's SSL peer verification by setting this to false (optional, defaults to true)
|
||||
default_theme: "light" #Default theme color (optional, light or dark, defaults to light)
|
||||
default_type: "image" #Default captcha type (optional, image or audio, defaults to image)
|
||||
default_size: "normal" #Default size (optional, normal, compact or invisible, defaults to normal)
|
||||
default_badge: "bottomright" #Default badge position (bottomright, bottomleft or inline, defaults to bottomright)
|
||||
proxy_server: "" #Your proxy server address (optional)
|
||||
proxy_auth: "" #Your proxy server authentication information (optional)
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
Name: 'webapp-columns'
|
||||
---
|
||||
|
||||
Site\Extensions\ElementRows:
|
||||
container_max_width: 1140
|
||||
column_class: 'col-block col-md'
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
---
|
||||
Name: webapp
|
||||
---
|
||||
SilverStripe\Core\Manifest\ModuleManifest:
|
||||
project: app
|
||||
|
||||
Page:
|
||||
default_container_class: 'container'
|
||||
|
||||
#SilverStripe\Admin\LeftAndMain:
|
||||
# extra_requirements_javascript:
|
||||
# - 'colymba/gridfield-bulk-editing-tools:client/dist/js/main.js'
|
||||
# - 'colymba/gridfield-bulk-editing-tools:client/lang/en.js'
|
||||
# extra_requirements_css:
|
||||
# - 'colymba/gridfield-bulk-editing-tools:client/dist/styles/main.css'
|
||||
|
||||
SilverStripe\Admin\LeftAndMain:
|
||||
extra_requirements_js:
|
||||
- 'app/client/dist/css/app_cms.js'
|
||||
extra_requirements_css:
|
||||
- 'app/client/dist/css/app_cms.css'
|
||||
|
||||
SilverStripe\Forms\HTMLEditor\TinyMCEConfig:
|
||||
editor_css:
|
||||
- 'app/client/dist/css/app_editor.css'
|
||||
|
||||
# Secure cookies
|
||||
SilverStripe\Control\Session:
|
||||
cookie_secure: true
|
||||
strict_user_agent_check: false
|
||||
timeout: 604800
|
||||
|
||||
SilverStripe\Control\Email\Email:
|
||||
send_all_emails_from: noreply@twma.pro
|
|
@ -1,12 +0,0 @@
|
|||
---
|
||||
Name: 'webapp-debugbar'
|
||||
After:
|
||||
- 'framework'
|
||||
- 'debugbar'
|
||||
Only:
|
||||
environment: 'dev'
|
||||
---
|
||||
LeKoala\DebugBar\DebugBar:
|
||||
enabled_in_admin: false
|
||||
query_limit: 500
|
||||
max_header_length: 2048
|
|
@ -1,89 +0,0 @@
|
|||
---
|
||||
Name: webapp-elemental
|
||||
After:
|
||||
- elemental
|
||||
- elemental-list
|
||||
- elementalvirtual
|
||||
---
|
||||
Page:
|
||||
searchable_elements:
|
||||
- DNADesign\Elemental\Models\ElementContent
|
||||
searchable_objects:
|
||||
- Site\Models\TeamMember
|
||||
extensions:
|
||||
- DNADesign\Elemental\Extensions\ElementalPageExtension
|
||||
|
||||
SilverStripe\CMS\Controllers\ContentController:
|
||||
extensions:
|
||||
- DNADesign\Elemental\Extensions\ElementalContentControllerExtension
|
||||
- Site\Elements\ElementalContentControllerExtension
|
||||
url_handlers:
|
||||
'element/$ID!': 'handleElement'
|
||||
|
||||
DNADesign\Elemental\Models\ElementalArea:
|
||||
extensions:
|
||||
- Site\Extensions\ElementalArea
|
||||
|
||||
DNADesign\Elemental\Models\BaseElement:
|
||||
default_global_elements: true
|
||||
extensions:
|
||||
- Site\Extensions\ElementRows
|
||||
|
||||
SilverStripe\CMS\Model\SiteTree:
|
||||
allowed_elements:
|
||||
- DNADesign\ElementalList\Model\ElementList
|
||||
- DNADesign\Elemental\Models\ElementContent
|
||||
- DNADesign\ElementalUserForms\Model\ElementForm
|
||||
- Dynamic\Elements\Image\Elements\ElementImage
|
||||
- Dynamic\Elements\Blog\Elements\ElementBlogPosts
|
||||
- Dynamic\Elements\Oembed\Elements\ElementOembed
|
||||
- Dynamic\Elements\Elements\ElementTestimonials
|
||||
#- Site\Elements\TeamMembersElement
|
||||
- Site\Elements\SliderElement
|
||||
- Site\Elements\BlockElement
|
||||
- Site\Elements\MapElement
|
||||
#- Site\Elements\AccordionElement
|
||||
- DNADesign\ElementalVirtual\Model\ElementVirtual
|
||||
- Site\Elements\ColorBarElement
|
||||
- Site\Elements\AccordionElement
|
||||
- Site\Elements\VideoElement
|
||||
- Site\Elements\GalleryElement
|
||||
|
||||
DNADesign\ElementalList\Model\ElementList:
|
||||
inline_editable: false
|
||||
default_global_elements: false
|
||||
allowed_elements:
|
||||
- DNADesign\ElementalList\Model\ElementList
|
||||
- DNADesign\Elemental\Models\ElementContent
|
||||
- DNADesign\ElementalUserForms\Model\ElementForm
|
||||
- Dynamic\Elements\Image\Elements\ElementImage
|
||||
- Dynamic\Elements\Blog\Elements\ElementBlogPosts
|
||||
- Dynamic\Elements\Oembed\Elements\ElementOembed
|
||||
- Dynamic\Elements\Elements\ElementTestimonials
|
||||
#- Site\Elements\TeamMembersElement
|
||||
- Site\Elements\SliderElement
|
||||
- Site\Elements\BlockElement
|
||||
- Site\Elements\MapElement
|
||||
- Site\Elements\ColorBarElement
|
||||
- Site\Elements\AccordionElement
|
||||
styles:
|
||||
whiteframe: 'White Frame'
|
||||
noframe: 'No Frame'
|
||||
|
||||
Site\Elements\AccordionElement:
|
||||
allowed_elements:
|
||||
- DNADesign\Elemental\Models\ElementContent
|
||||
|
||||
DNADesign\Elemental\Models\ElementContent:
|
||||
default_global_elements: false
|
||||
inline_editable: false
|
||||
extensions:
|
||||
- Site\Extensions\ElementContentWidget
|
||||
frontend_searchable_fields:
|
||||
- 'Title:PartialMatch'
|
||||
- 'HTML:PartialMatch'
|
||||
|
||||
Dynamic\Elements\Image\Elements\ElementImage:
|
||||
inline_editable: false
|
||||
extensions:
|
||||
- Site\Extensions\ElementImageWidget
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
Name: app-emailconfig
|
||||
After:
|
||||
- '#emailconfig'
|
||||
---
|
||||
SilverStripe\Core\Injector\Injector:
|
||||
Swift_Transport:
|
||||
class: Swift_SendmailTransport
|
||||
|
||||
#SilverStripe\Control\Email\Email:
|
||||
# admin_email:
|
||||
# support@example.com: 'Support team'
|
||||
|
||||
#SilverStripe\Core\Injector\Injector:
|
||||
# Swift_Transport:
|
||||
# class: Swift_SmtpTransport
|
||||
# properties:
|
||||
# Host: smtp.host.com
|
||||
# Port: <port>
|
||||
# Encryption: tls
|
||||
# calls:
|
||||
# Username: [ setUsername, ['`APP_SMTP_USERNAME`'] ]
|
||||
# Password: [ setPassword, ['`APP_SMTP_PASSWORD`'] ]
|
||||
# AuthMode: [ setAuthMode, ['login'] ]
|
|
@ -1,28 +0,0 @@
|
|||
---
|
||||
Name: webapp-env-check
|
||||
---
|
||||
|
||||
SilverStripe\EnvironmentCheck\EnvironmentCheckSuite:
|
||||
registered_checks:
|
||||
curl:
|
||||
definition: 'HasFunctionCheck("curl_init")'
|
||||
title: 'is curl available?'
|
||||
gd:
|
||||
definition: 'HasFunctionCheck("imagecreatetruecolor")'
|
||||
title: 'Does PHP have GD2 support?'
|
||||
db:
|
||||
definition: 'DatabaseCheck("Page")'
|
||||
title: 'Is the database accessible?'
|
||||
url:
|
||||
definition: 'URLCheck()'
|
||||
title: 'Is the homepage accessible?'
|
||||
registered_suites:
|
||||
check:
|
||||
- curl
|
||||
- gd
|
||||
- db
|
||||
- url
|
||||
health:
|
||||
- db
|
||||
- url
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
---
|
||||
Name: webapp-extensions
|
||||
---
|
||||
# Basic extensions
|
||||
|
||||
SilverStripe\Admin\LeftAndMain:
|
||||
extensions:
|
||||
- Site\Extensions\LeftAndMainExtension
|
||||
|
||||
SilverStripe\SiteConfig\SiteConfig:
|
||||
extensions:
|
||||
- Site\Extensions\SocialExtension
|
||||
- Site\Extensions\SiteConfigExtension
|
||||
- Site\Extensions\NotificationsExtension
|
||||
|
||||
SilverStripe\CMS\Model\SiteTree:
|
||||
extensions:
|
||||
- Site\Extensions\SiteTreeExtension
|
||||
|
||||
Sheadawson\Linkable\Models\EmbeddedObject:
|
||||
extensions:
|
||||
- Site\Extensions\EmbeddedObjectExtension
|
||||
|
||||
SilverStripe\Assets:
|
||||
extensions:
|
||||
- Site\Extensions\ImageExtension
|
||||
|
||||
Dynamic\FlexSlider\Model\SlideImage:
|
||||
extensions:
|
||||
- Site\Extensions\SlideImageExtension
|
||||
|
||||
SilverStripe\Core\Injector\Injector:
|
||||
#SilverStripe\UserForms\Model\UserDefinedForm:
|
||||
# class: Site\Extensions\UserDefinedForm_HiddenClass
|
||||
SilverStripe\Security\MemberAuthenticator\LostPasswordHandler:
|
||||
class: Site\Extensions\LostPasswordHandlerExtension
|
||||
Sheadawson\Linkable\Forms\EmbeddedObjectField:
|
||||
class: Site\Extensions\EmbedObjectField
|
||||
SilverStripe\Forms\CompositeField:
|
||||
class: Site\Extensions\CompositeFieldExtension
|
||||
|
||||
# User Forms module
|
||||
SilverStripe\UserForms\Model\UserDefinedForm:
|
||||
show_in_sitetree: false
|
||||
can_be_root: false
|
||||
extensions:
|
||||
- Site\Extensions\UserDefinedFormExtension
|
||||
|
||||
SilverStripe\UserForms\Form\UserForm:
|
||||
extensions:
|
||||
- Site\Extensions\PlaceholderFormExtension
|
||||
|
||||
DNADesign\ElementalUserForms\Model\ElementForm:
|
||||
extensions:
|
||||
- Site\Extensions\UserDefinedFormExtension
|
|
@ -1,81 +0,0 @@
|
|||
---
|
||||
Name: webapp-files
|
||||
---
|
||||
SilverStripe\Blog\Model\BlogPost:
|
||||
featured_images_directory: 'blog-posts'
|
||||
|
||||
SilverStripe\Assets\Upload_Validator:
|
||||
allowedExtensions:
|
||||
- 'stl'
|
||||
|
||||
SilverStripe\Assets\File:
|
||||
allowed_extensions:
|
||||
- 'ace'
|
||||
- 'arc'
|
||||
- 'arj'
|
||||
- 'asf'
|
||||
- 'au'
|
||||
- 'avi'
|
||||
- 'bmp'
|
||||
- 'bz2'
|
||||
- 'cab'
|
||||
- 'cda'
|
||||
- 'csv'
|
||||
- 'dmg'
|
||||
- 'doc'
|
||||
- 'docx'
|
||||
- 'dotx'
|
||||
- 'flv'
|
||||
- 'gif'
|
||||
- 'gpx'
|
||||
- 'gz'
|
||||
- 'hqx'
|
||||
- 'ico'
|
||||
- 'jpeg'
|
||||
- 'jpg'
|
||||
- 'kml'
|
||||
- 'm4a'
|
||||
- 'm4v'
|
||||
- 'mid'
|
||||
- 'midi'
|
||||
- 'mkv'
|
||||
- 'mov'
|
||||
- 'mp3'
|
||||
- 'mp4'
|
||||
- 'mpa'
|
||||
- 'mpeg'
|
||||
- 'mpg'
|
||||
- 'ogg'
|
||||
- 'ogv'
|
||||
- 'pages'
|
||||
- 'pcx'
|
||||
- 'pdf'
|
||||
- 'png'
|
||||
- 'pps'
|
||||
- 'ppt'
|
||||
- 'pptx'
|
||||
- 'potx'
|
||||
- 'ra'
|
||||
- 'ram'
|
||||
- 'rm'
|
||||
- 'rtf'
|
||||
- 'sit'
|
||||
- 'sitx'
|
||||
- 'tar'
|
||||
- 'tgz'
|
||||
- 'tif'
|
||||
- 'tiff'
|
||||
- 'txt'
|
||||
- 'wav'
|
||||
- 'webm'
|
||||
- 'wma'
|
||||
- 'wmv'
|
||||
- 'xls'
|
||||
- 'xlsx'
|
||||
- 'xltx'
|
||||
- 'zip'
|
||||
- 'zipx'
|
||||
- 'stl'
|
||||
app_categories:
|
||||
document:
|
||||
- 'stl'
|
|
@ -0,0 +1,49 @@
|
|||
---
|
||||
Name: webapp-locale-fluent
|
||||
After:
|
||||
- '#versionedfiles'
|
||||
- webapp-extensions
|
||||
- webapp-elemental
|
||||
- webapp-locale
|
||||
- a2nt-cms-niceties-locale-fluent
|
||||
---
|
||||
# Define Fluent locales
|
||||
TractorCow\Fluent\Model\Locale:
|
||||
default_records:
|
||||
en:
|
||||
Title: 'EN'
|
||||
Locale: en_US
|
||||
URLSegment: en
|
||||
IsGlobalDefault: 1
|
||||
us:
|
||||
Locale: en_US
|
||||
Title: 'EN'
|
||||
URLSegment: en
|
||||
ru:
|
||||
Locale: ru_RU
|
||||
Title: 'RU'
|
||||
URLSegment: ru
|
||||
Fallbacks:
|
||||
- =>TractorCow\Fluent\Model\Locale.us
|
||||
|
||||
# Enable Fluent extensions
|
||||
Page:
|
||||
extensions:
|
||||
- DNADesign\Elemental\TopPage\SiteTreeExtension
|
||||
- DNADesign\Elemental\Extensions\ElementalPageExtension
|
||||
- A2nt\CMSNiceties\Extensions\PageFluentExtension
|
||||
|
||||
DNADesign\Elemental\Models\ElementalArea:
|
||||
extensions:
|
||||
- DNADesign\Elemental\TopPage\FluentExtension
|
||||
- A2nt\ElementalBasics\Extensions\ElementalArea
|
||||
|
||||
DNADesign\Elemental\Models\BaseElement:
|
||||
extensions:
|
||||
- DNADesign\Elemental\TopPage\FluentExtension
|
||||
- A2nt\ElementalBasics\Extensions\ElementRows
|
||||
|
||||
|
||||
SilverStripe\SiteConfig\SiteConfig:
|
||||
extensions:
|
||||
- TractorCow\Fluent\Extension\FluentExtension
|
|
@ -0,0 +1,12 @@
|
|||
---
|
||||
Name: webapp-locale
|
||||
After:
|
||||
- a2nt-cms-niceties-locale
|
||||
---
|
||||
|
||||
Symbiote\Addressable\Addressable:
|
||||
allowed_countries:
|
||||
'us': 'United States'
|
||||
|
||||
SilverStripe\ORM\FieldType\DBCurrency:
|
||||
currency_symbol: '$'
|
|
@ -1,9 +0,0 @@
|
|||
---
|
||||
Name: app-mimeuploadvalidator
|
||||
After: '#mimeuploadvalidator'
|
||||
Only:
|
||||
moduleexists: 'silverstripe/mimevalidator'
|
||||
---
|
||||
SilverStripe\Core\Injector\Injector:
|
||||
SilverStripe\Assets\Upload_Validator:
|
||||
class: SilverStripe\MimeValidator\MimeUploadValidator
|
|
@ -0,0 +1,67 @@
|
|||
---
|
||||
Name: webapp-options-elements
|
||||
After:
|
||||
- app-basics
|
||||
---
|
||||
Page:
|
||||
searchable_elements:
|
||||
- DNADesign\Elemental\Models\ElementContent
|
||||
extensions:
|
||||
- DNADesign\Elemental\Extensions\ElementalPageExtension
|
||||
|
||||
SilverStripe\CMS\Model\SiteTree:
|
||||
allowed_elements:
|
||||
- DNADesign\ElementalList\Model\ElementList
|
||||
- DNADesign\Elemental\Models\ElementContent
|
||||
- DNADesign\ElementalUserForms\Model\ElementForm
|
||||
#- Dynamic\Elements\Image\Elements\ElementImage
|
||||
#- Dynamic\Elements\Blog\Elements\ElementBlogPosts
|
||||
#- Dynamic\Elements\Oembed\Elements\ElementOembed
|
||||
#- Dynamic\Elements\Elements\ElementTestimonials
|
||||
#- A2nt\ElementalBasics\Elements\TeamMembersElement
|
||||
- A2nt\ElementalBasics\Elements\SliderElement
|
||||
#- A2nt\ElementalBasics\Elements\MapElement
|
||||
- A2nt\ElementalBasics\Elements\AccordionElement
|
||||
- DNADesign\ElementalVirtual\Model\ElementVirtual
|
||||
- A2nt\ElementalBasics\Elements\AccordionElement
|
||||
- A2nt\ElementalBasics\Elements\CustomSnippetElement
|
||||
#- A2nt\ElementalBasics\Elements\InstagramElement
|
||||
- A2nt\ElementalBasics\Elements\SidebarElement
|
||||
|
||||
DNADesign\ElementalList\Model\ElementList:
|
||||
inline_editable: false
|
||||
default_global_elements: false
|
||||
allowed_elements:
|
||||
- DNADesign\ElementalList\Model\ElementList
|
||||
- DNADesign\Elemental\Models\ElementContent
|
||||
- DNADesign\ElementalUserForms\Model\ElementForm
|
||||
#- Dynamic\Elements\Image\Elements\ElementImage
|
||||
#- Dynamic\Elements\Blog\Elements\ElementBlogPosts
|
||||
#- Dynamic\Elements\Oembed\Elements\ElementOembed
|
||||
#- Dynamic\Elements\Elements\ElementTestimonials
|
||||
#- A2nt\ElementalBasics\Elements\TeamMembersElement
|
||||
- A2nt\ElementalBasics\Elements\SliderElement
|
||||
#- A2nt\ElementalBasics\Elements\MapElement
|
||||
- A2nt\ElementalBasics\Elements\AccordionElement
|
||||
- A2nt\ElementalBasics\Elements\CustomSnippetElement
|
||||
#- A2nt\ElementalBasics\Elements\InstagramElement
|
||||
styles:
|
||||
whiteframe: 'White Frame'
|
||||
noframe: 'No Frame'
|
||||
|
||||
A2nt\ElementalBasics\Extensions\ElementImageWidget:
|
||||
available_heights:
|
||||
'300': 'Small (300px)'
|
||||
'400': 'Medium (400px)'
|
||||
'600': 'Big (600px)'
|
||||
|
||||
available_widths:
|
||||
'300': 'Small (300px)'
|
||||
'400': 'Medium (400px)'
|
||||
'600': 'Big (600px)'
|
||||
|
||||
available_ratios:
|
||||
'1:1': '1:1'
|
||||
'3:2': '3:2'
|
||||
'2:3': '2:3'
|
||||
'16:9': '16:9'
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
Name: webapp-options-widgets
|
||||
After:
|
||||
- a2nt-cms-niceties-options-widgets
|
||||
---
|
|
@ -1,22 +1,25 @@
|
|||
---
|
||||
Name: 'webapp-shop'
|
||||
Name: webapp-shop
|
||||
After:
|
||||
- app-basics
|
||||
- a2nt-cms-niceties-shop
|
||||
---
|
||||
SilverStripe\Core\Injector\Injector:
|
||||
SilverShop\Checkout\SinglePageCheckoutComponentConfig:
|
||||
class: Site\Models\CheckoutNoDeliveryConfig
|
||||
class: A2nt\CMSNiceties\Models\CheckoutNoDeliveryConfig
|
||||
|
||||
SilverShop\Extension\ShopConfigExtension:
|
||||
base_currency: USD
|
||||
|
||||
SilverShop\Model\Address:
|
||||
extensions:
|
||||
- Site\Extensions\AddressExtension
|
||||
- A2nt\CMSNiceties\Extensions\AddressExtension
|
||||
|
||||
SilverShop\Cart\ShoppingCartController:
|
||||
extensions:
|
||||
- Site\Extensions\ShoppingCartControllerExtension
|
||||
- A2nt\CMSNiceties\Extensions\ShoppingCartControllerExtension
|
||||
|
||||
Site\Templates\DeferedRequirements:
|
||||
A2nt\CMSNiceties\Templates\DeferedRequirements:
|
||||
custom_requirements:
|
||||
SilverShop\Page\AccountPageController:
|
||||
- SilverShop.Page.CheckoutPageController.js
|
||||
|
|
|
@ -1,16 +1,9 @@
|
|||
---
|
||||
Name: 'webapp-requirements'
|
||||
Name: webapp-templates-requirements
|
||||
After:
|
||||
- a2nt-cms-niceties-templates-requirements
|
||||
- a2nt-cms-niceties-templates-themes
|
||||
---
|
||||
Site\Templates\DeferredRequirements:
|
||||
nojquery: false
|
||||
nofontawesome: false
|
||||
version: false
|
||||
static_domain: false
|
||||
deferred: true
|
||||
jquery_version: '3.4.1'
|
||||
|
||||
SilverStripe\FontAwesome\FontAwesomeField:
|
||||
version: '5.12.0'
|
||||
|
||||
SilverStripe\View\Requirements:
|
||||
disable_flush_combined: true
|
||||
|
@ -33,7 +26,7 @@ SilverStripe\Core\Injector\Injector:
|
|||
SilverStripe\Assets\Storage\GeneratedAssetHandler.custom-generated-assets:
|
||||
class: SilverStripe\Assets\Flysystem\GeneratedAssets
|
||||
properties:
|
||||
Filesystem: %$League\Flysystem\Filesystem.custom-filesystem
|
||||
Filesystem: '%$League\Flysystem\Filesystem.custom-filesystem'
|
||||
# Assign this generator to the requirements builder
|
||||
SilverStripe\View\Requirements_Backend:
|
||||
properties:
|
|
@ -0,0 +1,44 @@
|
|||
---
|
||||
Name: webapp-templates-themes
|
||||
After:
|
||||
- webapp-options-elements
|
||||
- a2nt-cms-niceties-templates-requirements
|
||||
- a2nt-cms-niceties-templates-themes
|
||||
---
|
||||
|
||||
A2nt\CMSNiceties\Templates\DeferredRequirements:
|
||||
nofontawesome: false
|
||||
version: false
|
||||
static_domain: false
|
||||
deferred: true
|
||||
noreact: true
|
||||
nojquery: true
|
||||
jquery_version: '3.7.1'
|
||||
fontawesome_svg: false
|
||||
|
||||
SilverStripe\FontAwesome\FontAwesomeField:
|
||||
version: '6.5.1'
|
||||
|
||||
SilverStripe\View\SSViewer:
|
||||
source_file_comments: false
|
||||
themes:
|
||||
- '$public'
|
||||
- '$default'
|
||||
|
||||
A2nt\ElementalBasics\Elements\SliderElement:
|
||||
slide_width: 2140
|
||||
slide_height: 700
|
||||
|
||||
# 2x container width to automatically resize images for 2K display
|
||||
A2nt\ElementalBasics\Extensions\ElementRows:
|
||||
container_max_width: 2280
|
||||
column_class: 'col-block col-md'
|
||||
|
||||
---
|
||||
Name: webapp-templates-themes-debug
|
||||
Only:
|
||||
environment: dev
|
||||
---
|
||||
SilverStripe\View\SSViewer:
|
||||
source_file_comments: false
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
---
|
||||
Name: 'webapp-themes'
|
||||
---
|
||||
|
||||
SilverStripe\View\SSViewer:
|
||||
source_file_comments: true
|
||||
themes:
|
||||
- '$public'
|
||||
- '$default'
|
||||
|
||||
# 2x container width to automatically resize images for 2K display
|
||||
Site\Extensions\ElementRows:
|
||||
container_max_width: 2280
|
|
@ -1,58 +0,0 @@
|
|||
---
|
||||
Name: 'webapp-us-locale'
|
||||
---
|
||||
Symbiote\Addressable\Addressable:
|
||||
allowed_countries:
|
||||
'us': 'United States'
|
||||
allowed_states:
|
||||
'AL': 'Alabama'
|
||||
'AK': 'Alaska'
|
||||
'AZ': 'Arizona'
|
||||
'AR': 'Arkansas'
|
||||
'CA': 'California'
|
||||
'CO': 'Colorado'
|
||||
'CT': 'Connecticut'
|
||||
'DE': 'Delaware'
|
||||
'DC': 'District Of Columbia'
|
||||
'FL': 'Florida'
|
||||
'GA': 'Georgia'
|
||||
'HI': 'Hawaii'
|
||||
'ID': 'Idaho'
|
||||
'IL': 'Illinois'
|
||||
'IN': 'Indiana'
|
||||
'IA': 'Iowa'
|
||||
'KS': 'Kansas'
|
||||
'KY': 'Kentucky'
|
||||
'LA': 'Louisiana'
|
||||
'ME': 'Maine'
|
||||
'MD': 'Maryland'
|
||||
'MA': 'Massachusetts'
|
||||
'MI': 'Michigan'
|
||||
'MN': 'Minnesota'
|
||||
'MS': 'Mississippi'
|
||||
'MO': 'Missouri'
|
||||
'MT': 'Montana'
|
||||
'NE': 'Nebraska'
|
||||
'NV': 'Nevada'
|
||||
'NH': 'New Hampshire'
|
||||
'NJ': 'New Jersey'
|
||||
'NM': 'New Mexico'
|
||||
'NY': 'New York'
|
||||
'NC': 'North Carolina'
|
||||
'ND': 'North Dakota'
|
||||
'OH': 'Ohio'
|
||||
'OK': 'Oklahoma'
|
||||
'OR': 'Oregon'
|
||||
'PA': 'Pennsylvania'
|
||||
'RI': 'Rhode Island'
|
||||
'SC': 'South Carolina'
|
||||
'SD': 'South Dakota'
|
||||
'TN': 'Tennessee'
|
||||
'TX': 'Texas'
|
||||
'UT': 'Utah'
|
||||
'VT': 'Vermont'
|
||||
'VA': 'Virginia'
|
||||
'WA': 'Washington'
|
||||
'WV': 'West Virginia'
|
||||
'WI': 'Wisconsin'
|
||||
'WY': 'Wyoming'
|
|
@ -1,8 +0,0 @@
|
|||
---
|
||||
Name: 'webapp-version-truncator'
|
||||
---
|
||||
Axllent\VersionTruncator\VersionTruncator:
|
||||
keep_versions: 4 # how many (published) versions 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_old_page_types: false # keep page versions where page type (ClassName) has changed
|
|
@ -1,14 +1,24 @@
|
|||
# Name: webapp-webpack
|
||||
# that's important to place this file into /app/_config/webpack.yml
|
||||
# with all configuration variables presented
|
||||
# Cuz WebPack compiling script use it to set configuration
|
||||
|
||||
Site\Templates\WebpackTemplateProvider:
|
||||
APPDIR: app
|
||||
THEMESDIR: themes
|
||||
HOSTNAME: localhost
|
||||
A2nt\CMSNiceties\Templates\WebpackTemplateProvider:
|
||||
APPDIR: './app'
|
||||
THEMESDIR: './themes'
|
||||
HOSTNAME: 127.0.0.1
|
||||
PORT: 3000
|
||||
SRC: client/src
|
||||
DIST: client/dist
|
||||
TYPESJS: client/src/js/types
|
||||
TYPESSCSS: client/src/scss/types
|
||||
webp: false
|
||||
NODE_ENV: production #production,development
|
||||
HTTPS: true
|
||||
injectClient: true
|
||||
GRAPHQL_URL: '/graphql'
|
||||
GRAPHQL_API_KEY: 'LgPaRkVPYa8IY7x3AjbLC8wx6oPPSlO01yPflFXecvQ'
|
||||
PROCESS_CSS: true # Deep CSS minification
|
||||
absolute_path: false
|
||||
JQUERY: false # We don't use jQuery, otherwise it's aliassed and being loaded externaly
|
||||
#STATIC_URL: 'http://127.0.0.1'
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
---
|
||||
Name: 'webapp-widgets'
|
||||
---
|
||||
# Blog + Widgets module extensions
|
||||
Page:
|
||||
extensions:
|
||||
- Site\Widgets\WidgetPageExtension
|
||||
|
||||
SilverStripe\Blog\Model\Blog:
|
||||
extensions:
|
||||
- Site\Extensions\BlogExtension
|
||||
SilverStripe\Blog\Model\BlogPost:
|
||||
extensions:
|
||||
- Site\Extensions\BlogPostExtension
|
||||
|
||||
SilverStripe\Widgets\Model\Widget:
|
||||
icon: '<i class="icon font-icon-p-document"></i>'
|
||||
extensions:
|
||||
- Site\Widgets\WidgetExtension
|
||||
SilverStripe\Blog\Widgets\BlogArchiveWidget:
|
||||
icon: '<i class="icon font-icon-p-archive"></i>'
|
||||
SilverStripe\Blog\Widgets\BlogCategoriesWidget:
|
||||
icon: '<i class="icon font-icon-page-multiple"></i>'
|
||||
SilverStripe\Blog\Widgets\BlogFeaturedPostsWidget:
|
||||
icon: '<i class="icon font-icon-chart-line"></i>'
|
||||
SilverStripe\Blog\Widgets\BlogRecentPostsWidget:
|
||||
icon: '<i class="icon font-icon-back-in-time"></i>'
|
||||
SilverStripe\Blog\Widgets\BlogTagsCloudWidget:
|
||||
icon: '<i class="icon font-icon-tags"></i>'
|
||||
SilverStripe\Blog\Widgets\BlogTagsWidget:
|
||||
icon: '<i class="icon font-icon-tags"></i>'
|
||||
only_available_in:
|
||||
- CMSMain_HiddenClass
|
|
@ -25,8 +25,6 @@
|
|||
"jquery"
|
||||
],
|
||||
|
||||
"parser": "babel-eslint",
|
||||
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 6,
|
||||
"sourceType": "module",
|
||||
|
@ -38,7 +36,6 @@
|
|||
|
||||
"rules": {
|
||||
////////// Possible Errors //////////
|
||||
|
||||
"no-comma-dangle": 0, // disallow trailing commas in object literals
|
||||
"no-cond-assign": 0, // disallow assignment in conditional expressions
|
||||
"no-console": 0, // disallow use of console (off by default in the node environment)
|
||||
|
@ -252,5 +249,14 @@
|
|||
"react/sort-comp": "error",
|
||||
"import/no-mutable-exports": "error",
|
||||
"import/imports-first": "warn"
|
||||
},
|
||||
"settings": {
|
||||
"react": {
|
||||
"createClass": "createReactClass",
|
||||
"pragma": "React",
|
||||
"fragment": "Fragment",
|
||||
"version": "detect",
|
||||
"flowVersion": "0.53"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(.8)}to{transform:scale(1)}}@keyframes fade{0%{opacity:1}50%{opacity:.5}to{opacity:1}}.mapAPI-map{height:30rem;margin-bottom:4rem}.mapboxgl-popup{width:16rem;height:7rem;font-size:.8rem;line-height:1.2em;position:absolute;top:0;left:0;display:flex;pointer-events:none;z-index:4}.mapboxgl-popup-anchor-bottom,.mapboxgl-popup-anchor-bottom-left,.mapboxgl-popup-anchor-bottom-right{flex-direction:column-reverse}.mapboxgl-popup-content{min-width:16rem;background:#fff;color:#212121;position:relative;pointer-events:auto;padding:.8rem;border-radius:.25rem;min-height:5rem;box-shadow:0 .1rem .8rem 0 rgba(0,0,0,.4)}.mapboxgl-popup-close-button{position:absolute;right:0;top:0;font-size:2rem;padding:.5rem;border-top-right-radius:.25rem}.mapboxgl-popup-close-button:focus,.mapboxgl-popup-close-button:hover{background:#2196f3;color:#fff}.mapboxgl-popup-tip{width:0;height:0;border:.8rem solid transparent;z-index:1}.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{border-top-color:#fff;align-self:center;border-bottom:none}.mapboxgl-marker{width:30px;height:30px;font-size:30px;line-height:1em;color:#2196f3;cursor:pointer;text-align:center;display:flex;align-items:flex-end;justify-content:center}.mapboxgl-marker .fab,.mapboxgl-marker .far,.mapboxgl-marker .fas,.mapboxgl-marker .marker-icon{animation:pulse .8s linear infinite}
|
|
@ -1 +1 @@
|
|||
@keyframes pulse{0%{transform:scale(1)}50%{transform:scale(.8)}to{transform:scale(1)}}@keyframes fade{0%{opacity:1}50%{opacity:.5}to{opacity:1}}.mapAPI-map{height:30rem;margin-bottom:4rem}.mapboxgl-popup{width:16rem;height:7rem;font-size:.8rem;line-height:1.2em;position:absolute;top:0;left:0;display:flex;pointer-events:none;z-index:4}.mapboxgl-popup-anchor-bottom,.mapboxgl-popup-anchor-bottom-left,.mapboxgl-popup-anchor-bottom-right{flex-direction:column-reverse}.mapboxgl-popup-content{min-width:16rem;background:#fff;color:#212121;position:relative;pointer-events:auto;padding:.8rem;border-radius:.25rem;min-height:5rem;box-shadow:0 .1rem .8rem 0 rgba(0,0,0,.4)}.mapboxgl-popup-close-button{position:absolute;right:0;top:0;font-size:2rem;padding:.5rem;border-top-right-radius:.25rem}.mapboxgl-popup-close-button:focus,.mapboxgl-popup-close-button:hover{background:#2196f3;color:#fff}.mapboxgl-popup-tip{width:0;height:0;border:.8rem solid transparent;z-index:1}.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{border-top-color:#fff;align-self:center;border-bottom:none}.mapboxgl-marker{width:30px;height:30px;font-size:30px;line-height:1em;color:#2196f3;cursor:pointer;text-align:center;display:flex;align-items:flex-end;justify-content:center}.mapboxgl-marker .fab,.mapboxgl-marker .far,.mapboxgl-marker .fas,.mapboxgl-marker .marker-icon{animation:pulse .8s linear infinite}
|
||||
.mapAPI-map{height:30rem}.mapboxgl-popup{display:flex;font-size:.8rem;height:7rem;left:0;line-height:1.2em;pointer-events:none;position:absolute;top:0;width:16rem;z-index:4}.mapboxgl-popup-anchor-bottom,.mapboxgl-popup-anchor-bottom-left,.mapboxgl-popup-anchor-bottom-right{flex-direction:column-reverse}.mapboxgl-popup-content{background:#fff;border-radius:.25rem;box-shadow:0 .1rem .8rem 0 rgba(0,0,0,.4);color:#212529;min-height:5rem;min-width:16rem;padding:.8rem;pointer-events:auto;position:relative}.mapboxgl-popup-close-button{border-top-right-radius:.25rem;font-size:2rem;padding:.5rem;position:absolute;right:0;top:0;z-index:2}.mapboxgl-popup-close-button:focus,.mapboxgl-popup-close-button:hover{background:#0d6efd;color:#fff}.mapboxgl-popup-tip{border:.8rem solid transparent;height:0;width:0;z-index:1}.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip{align-self:center;border-bottom:0;border-top-color:#fff}.mapboxgl-marker{align-items:flex-end;color:#0d6efd;cursor:pointer;display:flex;font-size:30px;height:30px;justify-content:center;line-height:1em;text-align:center;width:30px}.mapboxgl-marker .fab,.mapboxgl-marker .far,.mapboxgl-marker .fas,.mapboxgl-marker .marker-icon{animation:pulse .8s linear infinite}.mapboxgl-cluster{align-items:center;animation:pulse .8s linear infinite;background:#0dcaf0;border-radius:100%;color:color-yiq(#0dcaf0);display:flex;font-size:1.2rem;font-weight:700}.mapboxgl-cluster:after,.mapboxgl-cluster:before{background:#0dcaf0;border-radius:100%;content:"";display:block;height:140%;left:50%;opacity:.2;position:absolute;top:50%;transform:translate(-50%,-50%);width:140%;z-index:-1}.mapboxgl-cluster:after{height:180%;width:180%}
|
|
@ -1 +1 @@
|
|||
#Menu-Dynamic-Elements-Admin-TestimonialsAdmin,#Menu-Dynamic-Elements-Promos-Admin-PromosAdmin,#Menu-Dynamic-Elements-Sponsors-Admin-SponsorsAdmin,#Menu-SilverStripe-CampaignAdmin-CampaignAdmin{display:none}#Form_ItemEditForm_MajorActions_Holder{min-width:30%;padding-bottom:0;margin-bottom:0;border:0}#Form_EditForm_MajorActions_Holder{min-width:70%;padding-bottom:0;margin-bottom:0;border:0}#Form_ItemEditForm_RightGroup_Holder{min-width:20%;padding-bottom:0;margin-bottom:0;border:0}.grid-field__icon-action.edit-link{opacity:1}.toolbar--south .btn-outline-primary,.toolbar--south .btn-primary{color:#fff}#ActionMenus_MoreOptions .btn-primary{color:#5589a7}body.cms{overflow:hidden}.fields-compact .form-group{padding-bottom:.5rem;margin-bottom:.25rem}.fields-compact .form-group .form__field-label{font-weight:700}.fields-compact .form-group:after{margin-bottom:.25rem}.fields-compact .form-group:after,.fields-compact .form__divider:after{display:none}.fields-row{margin:0!important;padding:0 0 2em!important;width:100%}.fields-row .form__fieldgroup{margin:0!important;padding:0!important;width:100%!important;max-width:100%!important;flex:0 0 100%!important;display:flex;flex-wrap:wrap}.fields-row .form__fieldgroup>.form-group{padding:0 1rem;margin:0!important;flex:1 1 50%;max-width:50%}.notifications-list .alert .btn-close{display:none}.btn-outline-primary,.btn-primary{color:#fff}
|
||||
#Menu-Dynamic-Elements-Admin-TestimonialsAdmin,#Menu-Dynamic-Elements-Promos-Admin-PromosAdmin,#Menu-Dynamic-Elements-Sponsors-Admin-SponsorsAdmin,#Menu-SilverStripe-CampaignAdmin-CampaignAdmin{display:none}#Form_EditForm_MajorActions_Holder,#Form_ItemEditForm_MajorActions_Holder{border:0;flex:1 1;margin-bottom:0;padding-bottom:0}#Form_EditForm_MajorActions_Holder .btn,#Form_ItemEditForm_MajorActions_Holder .btn{white-space:nowrap}#Form_ItemEditForm_RightGroup,#Form_ItemEditForm_RightGroup_Holder{margin-bottom:0;padding-bottom:0}#Form_ItemEditForm_RightGroup{align-items:center;border:0;display:flex;justify-content:center}.grid-field__icon-action.edit-link{opacity:1}.grid-field__table .form-check-input.editable-column-field{margin:0!important}.toolbar--south .btn-primary{color:#fff}.toolbar--south .btn-outline-primary{color:#999}#ActionMenus_MoreOptions .btn-primary{color:#5589a7}body.cms{flex-direction:column;overflow-x:hidden}.fields-compact .form-group{margin-bottom:.25rem;padding-bottom:.5rem}.fields-compact .form-group .form__field-label{font-weight:700}.fields-compact .form-group:after{margin-bottom:.25rem}.fields-compact .form-group:after,.fields-compact .form__divider:after{display:none}.fields-row{margin:0!important;padding:0 0 2em!important;width:100%}.fields-row .form__fieldgroup{display:flex;flex:0 0 100%!important;flex-wrap:wrap;margin:0!important;max-width:100%!important;padding:0!important;width:100%!important}.fields-row .form__fieldgroup>.form-group{flex:1 1 50%;margin:0!important;max-width:50%;padding:0 1rem}.cms table.grid-field__table tbody .col-bulkSelect{position:relative}.notifications-list .alert .btn-close{display:none}.visually-hidden,.visually-hidden-focusable:not(:focus):not(:focus-within){height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;clip:rect(0,0,0,0)!important;border:0!important;white-space:nowrap!important}#MetaLightboxApp{position:relative;z-index:99}.sticky-buttons~table.table.grid-field__table{margin-top:1rem}@keyframes fade{0%{filter:grayscale(0);opacity:1}50%{filter:grayscale(1);opacity:.5}to{filter:grayscale(0);opacity:1}}.meta-MetaWindow{position:fixed}.meta-MetaWindow .meta-error,.meta-MetaWindow .meta-spinner,.meta-MetaWindow .meta-spinner--embed{align-items:center;display:none;justify-content:center;text-align:center;z-index:2}.meta-MetaWindow .meta-spinner,.meta-MetaWindow .meta-spinner--embed{bottom:0;color:#fff;font-size:2rem;font-weight:700;left:0;position:absolute;right:0;text-transform:uppercase;top:0}.meta-MetaWindow .meta-error{color:#f44336;font-size:1.5em;font-weight:700}.meta-MetaWindow .meta-spinner--embed{display:flex}.meta-MetaWindow-overlay{align-items:center;background:rgba(0,0,0,.8);bottom:0;display:none;justify-content:center;left:0;position:fixed;right:0;top:0;z-index:98}.meta-MetaWindow-overlay--open{display:flex}.meta-MetaWindow-overlay--loading{animation-duration:5s;animation-iteration-count:infinite;animation-name:fade}.meta-MetaWindow-overlay--loading .meta-spinner{display:flex}.meta-MetaWindow-overlay--error .meta-content{justify-content:center}.meta-MetaWindow-overlay--error .meta-error{display:flex}.meta-MetaWindow .meta-nav{background:none;border:0;color:#fff;font-size:2rem;text-shadow:#000 0 0 .25em;z-index:2}.meta-MetaWindow .meta-nav:focus,.meta-MetaWindow .meta-nav:hover{color:#fff}.meta-MetaWindow .meta-nav:hover{background:none;color:#eceff1;text-decoration:none;text-shadow:none}.meta-MetaWindow .meta-nav-arrow{align-items:center;bottom:0;display:flex;font-size:2.5rem;justify-content:center;padding:.25rem .5rem;position:absolute;top:auto;z-index:2}.meta-MetaWindow .meta-nav-arrow:focus .fa,.meta-MetaWindow .meta-nav-arrow:focus .fab,.meta-MetaWindow .meta-nav-arrow:focus .far,.meta-MetaWindow .meta-nav-arrow:focus .fas,.meta-MetaWindow .meta-nav-arrow:hover .fa,.meta-MetaWindow .meta-nav-arrow:hover .fab,.meta-MetaWindow .meta-nav-arrow:hover .far,.meta-MetaWindow .meta-nav-arrow:hover .fas{transform:scale(1.5)}@media(min-width:992px){.meta-MetaWindow .meta-nav-arrow{bottom:0;top:0}}.meta-MetaWindow .meta-nav-arrow__next{right:0}.meta-MetaWindow .meta-nav-arrow__prev{left:0}@media(min-width:992px){.meta-MetaWindow .meta-nav-arrow__next{right:-3rem}.meta-MetaWindow .meta-nav-arrow__prev{left:-3rem}}.meta-MetaWindow .meta-close{position:absolute;right:0;top:-3rem;width:1.25em}.meta-MetaWindow .meta-close:hover{transform:rotate(-180deg)}@media(min-width:992px){.meta-MetaWindow .meta-close{right:-3rem;top:-3rem}}.meta-MetaWindow .meta-content{display:flex;flex-direction:column;position:relative;width:100%;z-index:1}@media(min-width:768px){.meta-MetaWindow .meta-content{height:80%}}@media(min-width:992px){.meta-MetaWindow .meta-content{height:90%;height:calc(90% - 3rem);width:90%;width:calc(90% - 3rem)}}.meta-MetaWindow .meta-wrap{display:flex;height:100%;margin:0 auto;max-height:100%;max-width:100%;overflow:auto;width:100%;word-break:break-word}.meta-MetaWindow .meta-wrap img{max-height:100%;max-width:100%;object-fit:cover}.meta-MetaWindow--text .meta-content{background:#fff;color:#212529;padding:1rem 0 1rem .75rem}.meta-MetaWindow--text .meta-wrap{padding-right:.75rem}.meta-MetaWindow--image .meta-wrap,.meta-MetaWindow--image .typography,.meta-MetaWindow--video .meta-wrap,.meta-MetaWindow--video .typography{align-items:center;justify-content:center;min-height:100%;overflow:hidden}.meta-MetaWindow--image .meta-wrap img,.meta-MetaWindow--image .typography img,.meta-MetaWindow--video .meta-wrap img,.meta-MetaWindow--video .typography img{margin:0}.meta-MetaWindow--embed:before,.meta-MetaWindow--video:before{content:"";display:block;padding-top:56.25%;position:relative;width:100%}.meta-MetaWindow--embed a[rel="nofollow noreferrer noopener"],.meta-MetaWindow--video a[rel="nofollow noreferrer noopener"]{color:#fff;font-size:1.2rem;font-weight:700}.meta-MetaWindow--embed a[rel="nofollow noreferrer noopener"]:before,.meta-MetaWindow--video a[rel="nofollow noreferrer noopener"]:before{content:"Unable to load. Please follow the provided link: ";display:block}.meta-MetaWindow--embed iframe,.meta-MetaWindow--video iframe{height:100%;left:0;position:absolute;top:0;width:100%}
|
|
@ -1 +1 @@
|
|||
#DevUtilities{display:none;position:absolute;left:0;width:100%;z-index:999}#DevUtilities .navs{position:fixed;left:0;z-index:999}#DevUtilities .original{position:absolute;top:0;left:0;width:100%;height:10000px;background-repeat:no-repeat;background-color:transparent;background-size:1854px auto;background-position:top;opacity:.5}#DevUtilities .original:hover{opacity:1}
|
||||
#DevUtilities{display:none;left:0;position:absolute;width:100%;z-index:999}#DevUtilities .navs{left:0;position:fixed;z-index:999}#DevUtilities .original{background-color:transparent;background-position:top;background-repeat:no-repeat;background-size:1854px auto;height:10000px;left:0;opacity:.5;position:absolute;top:0;width:100%}#DevUtilities .original:hover{opacity:1}
|
|
@ -1 +1 @@
|
|||
.table,table{width:100%;margin-bottom:1rem;color:#212121}.table td,.table th,table td,table th{padding:.75rem;vertical-align:top;border-top:1px solid #e0e0e0}.table thead th,table thead th{vertical-align:bottom;border-bottom:2px solid #e0e0e0}.table tbody+tbody,table tbody+tbody{border-top:2px solid #e0e0e0}.table-sm td,.table-sm th{padding:.3rem}.table-bordered,.table-bordered td,.table-bordered th,table,table td,table th{border:1px solid #e0e0e0}.table-bordered thead td,.table-bordered thead th,table thead td,table thead th{border-bottom-width:2px}.table-borderless tbody+tbody,.table-borderless td,.table-borderless th,.table-borderless thead th{border:0}.table-striped tbody tr:nth-of-type(odd){background-color:rgba(0,0,0,.05)}.table-hover tbody tr:hover{color:#212121;background-color:rgba(0,0,0,.075)}.table-primary,.table-primary>td,.table-primary>th{background-color:#c1e2fc}.table-primary tbody+tbody,.table-primary td,.table-primary th,.table-primary thead th{border-color:#8cc8f9}.table-hover .table-primary:hover,.table-hover .table-primary:hover>td,.table-hover .table-primary:hover>th{background-color:#a9d7fb}.table-secondary,.table-secondary>td,.table-secondary>th{background-color:#d8d8d8}.table-secondary tbody+tbody,.table-secondary td,.table-secondary th,.table-secondary thead th{border-color:#b7b7b7}.table-hover .table-secondary:hover,.table-hover .table-secondary:hover>td,.table-hover .table-secondary:hover>th{background-color:#cbcbcb}.table-success,.table-success>td,.table-success>th{background-color:#cde9ce}.table-success tbody+tbody,.table-success td,.table-success th,.table-success thead th{border-color:#a2d5a4}.table-hover .table-success:hover,.table-hover .table-success:hover>td,.table-hover .table-success:hover>th{background-color:#bbe1bd}.table-info,.table-info>td,.table-info>th{background-color:#b8ecf3}.table-info tbody+tbody,.table-info td,.table-info th,.table-info thead th{border-color:#7adce9}.table-hover .table-info:hover,.table-hover .table-info:hover>td,.table-hover .table-info:hover>th{background-color:#a2e6ef}.table-warning,.table-warning>td,.table-warning>th{background-color:#fff9c8}.table-warning tbody+tbody,.table-warning td,.table-warning th,.table-warning thead th{border-color:#fff599}.table-hover .table-warning:hover,.table-hover .table-warning:hover>td,.table-hover .table-warning:hover>th{background-color:#fff6af}.table-danger,.table-danger>td,.table-danger>th{background-color:#fccac7}.table-danger tbody+tbody,.table-danger td,.table-danger th,.table-danger thead th{border-color:#f99d96}.table-hover .table-danger:hover,.table-hover .table-danger:hover>td,.table-hover .table-danger:hover>th{background-color:#fbb3af}.table-light,.table-light>td,.table-light>th{background-color:#fcfcfc}.table-light tbody+tbody,.table-light td,.table-light th,.table-light thead th{border-color:#fafafa}.table-hover .table-light:hover,.table-hover .table-light:hover>td,.table-hover .table-light:hover>th{background-color:#efefef}.table-dark,.table-dark>td,.table-dark>th{background-color:#c1c1c1}.table-dark tbody+tbody,.table-dark td,.table-dark th,.table-dark thead th{border-color:#8c8c8c}.table-hover .table-dark:hover,.table-hover .table-dark:hover>td,.table-hover .table-dark:hover>th{background-color:#b4b4b4}.table-active,.table-active>td,.table-active>th,.table-hover .table-active:hover,.table-hover .table-active:hover>td,.table-hover .table-active:hover>th{background-color:rgba(0,0,0,.075)}.table .thead-dark th,table .thead-dark th{color:#fff;background-color:#424242;border-color:#555}.table .thead-light th,table .thead-light th{color:#616161;background-color:#eee;border-color:#e0e0e0}.table-dark{color:#fff;background-color:#424242}.table-dark td,.table-dark th,.table-dark thead th{border-color:#555}.table-dark.table-bordered,table.table-dark{border:0}.table-dark.table-striped tbody tr:nth-of-type(odd){background-color:hsla(0,0%,100%,.05)}.table-dark.table-hover tbody tr:hover{color:#fff;background-color:hsla(0,0%,100%,.075)}@media (max-width:575.98px){.table-responsive-sm{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-sm>.table-bordered,.table-responsive-sm>table{border:0}}@media (max-width:767.98px){.table-responsive-md{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-md>.table-bordered,.table-responsive-md>table{border:0}}@media (max-width:991.98px){.table-responsive-lg{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-lg>.table-bordered,.table-responsive-lg>table{border:0}}@media (max-width:1167.98px){.table-responsive-xl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-xl>.table-bordered,.table-responsive-xl>table{border:0}}@media (max-width:1367.98px){.table-responsive-xxl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-xxl>.table-bordered,.table-responsive-xxl>table{border:0}}@media (max-width:1567.98px){.table-responsive-xxxl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-xxxl>.table-bordered,.table-responsive-xxxl>table{border:0}}@media (max-width:1867.98px){.table-responsive-xxxxl{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive-xxxxl>.table-bordered,.table-responsive-xxxxl>table{border:0}}.table-responsive{display:block;width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-responsive>.table-bordered,.table-responsive>table{border:0}.captionImage,.image,.ss-htmleditorfield-file,img{display:block;margin:1rem;max-width:100%}.captionImage.center,.image.center,.ss-htmleditorfield-file.center,img.center{margin-left:auto;margin-right:auto;text-align:center}.captionImage.left,.image.left,.ss-htmleditorfield-file.left,img.left{float:left;clear:left;margin:0 1rem 1rem 0}.captionImage.right,.image.right,.ss-htmleditorfield-file.right,img.right{float:right;clear:right;margin:1rem 0 0 1rem}.captionImage.leftAlone,.image.leftAlone,.ss-htmleditorfield-file.leftAlone,img.leftAlone{float:left;clear:left;margin:0 1rem 1rem 0}.captionImage.rightAlone,.image.rightAlone,.ss-htmleditorfield-file.rightAlone,img.rightAlone{float:right;clear:right;margin:1rem 0 0 1rem}.captionImage iframe,.image iframe,.ss-htmleditorfield-file iframe,img iframe{width:100%!important;height:100%!important}.captionImage img{margin-bottom:.5rem!important}.captionImage .caption{font-size:.8rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.text-justify{text-align:justify}table{width:100%;max-width:100%;border-collapse:collapse}table.table-none{border:0}table.table-none td,table.table-none th,table.table-none tr{border:0;background:none!important}table:first-child{margin-top:0}table:last-child{margin-bottom:0}ol,ul{padding-left:2rem}ol li,ul li{position:relative;padding-left:0}ul,ul li{list-style:none}ul li{margin:.5em 0}ul li:before{content:"\2022";display:inline-block;margin-right:.5em;position:absolute;left:-.75em;font-size:1.5em;top:-.25em}div,iframe,img,p,table,td,th,tr{max-width:100%!important}@media (max-width:575px){div,iframe,img,p,table,td,th,tr{display:block;width:100%!important;border:0!important;padding-left:0!important;padding-right:0!important}}@media (max-width:575px){div,img,p,table,td,th,tr{height:auto!important}}a{color:#2196f3}img{border:1px dashed #dedede}
|
||||
.table,table{--bs-table-color-type:initial;--bs-table-bg-type:initial;--bs-table-color-state:initial;--bs-table-bg-state:initial;--bs-table-color:var(--bs-emphasis-color);--bs-table-bg:var(--bs-body-bg);--bs-table-border-color:var(--bs-border-color);--bs-table-accent-bg:transparent;--bs-table-striped-color:var(--bs-emphasis-color);--bs-table-striped-bg:rgba(var(--bs-emphasis-color-rgb),0.05);--bs-table-active-color:var(--bs-emphasis-color);--bs-table-active-bg:rgba(var(--bs-emphasis-color-rgb),0.1);--bs-table-hover-color:var(--bs-emphasis-color);--bs-table-hover-bg:rgba(var(--bs-emphasis-color-rgb),0.075);border-color:var(--bs-table-border-color);margin-bottom:1rem;vertical-align:top;width:100%}.table>:not(caption)>*>*,table>:not(caption)>*>*{background-color:var(--bs-table-bg);border-bottom-width:var(--bs-border-width);box-shadow:inset 0 0 0 9999px var(--bs-table-bg-state,var(--bs-table-bg-type,var(--bs-table-accent-bg)));color:var(--bs-table-color-state,var(--bs-table-color-type,var(--bs-table-color)));padding:.5rem}.table>tbody,table>tbody{vertical-align:inherit}.table>thead,table>thead{vertical-align:bottom}.table-group-divider{border-top:calc(var(--bs-border-width)*2) solid}.caption-top{caption-side:top}.table-sm>:not(caption)>*>*{padding:.25rem}.table-bordered>:not(caption)>*,table>:not(caption)>*{border-width:var(--bs-border-width) 0}.table-bordered>:not(caption)>*>*,table>:not(caption)>*>*{border-width:0 var(--bs-border-width)}.table-borderless>:not(caption)>*>*,table.table-none>:not(caption)>*>*{border-bottom-width:0}.table-borderless>:not(:first-child),table.table-none>:not(:first-child){border-top-width:0}.table-striped-columns>:not(caption)>tr>:nth-child(2n),.table-striped>tbody>tr:nth-of-type(odd)>*,table>tbody>tr:nth-of-type(odd)>*{--bs-table-color-type:var(--bs-table-striped-color);--bs-table-bg-type:var(--bs-table-striped-bg)}.table-active{--bs-table-color-state:var(--bs-table-active-color);--bs-table-bg-state:var(--bs-table-active-bg)}.table-hover>tbody>tr:hover>*{--bs-table-color-state:var(--bs-table-hover-color);--bs-table-bg-state:var(--bs-table-hover-bg)}.table-primary{--bs-table-color:#000;--bs-table-bg:#cfe2ff;--bs-table-border-color:#a6b5cc;--bs-table-striped-bg:#c5d7f2;--bs-table-striped-color:#000;--bs-table-active-bg:#bacbe6;--bs-table-active-color:#000;--bs-table-hover-bg:#bfd1ec;--bs-table-hover-color:#000}.table-primary,.table-secondary{border-color:var(--bs-table-border-color);color:var(--bs-table-color)}.table-secondary{--bs-table-color:#000;--bs-table-bg:#e2e3e5;--bs-table-border-color:#b5b6b7;--bs-table-striped-bg:#d7d8da;--bs-table-striped-color:#000;--bs-table-active-bg:#cbccce;--bs-table-active-color:#000;--bs-table-hover-bg:#d1d2d4;--bs-table-hover-color:#000}.table-success{--bs-table-color:#000;--bs-table-bg:#d1e7dd;--bs-table-border-color:#a7b9b1;--bs-table-striped-bg:#c7dbd2;--bs-table-striped-color:#000;--bs-table-active-bg:#bcd0c7;--bs-table-active-color:#000;--bs-table-hover-bg:#c1d6cc;--bs-table-hover-color:#000}.table-info,.table-success{border-color:var(--bs-table-border-color);color:var(--bs-table-color)}.table-info{--bs-table-color:#000;--bs-table-bg:#cff4fc;--bs-table-border-color:#a6c3ca;--bs-table-striped-bg:#c5e8ef;--bs-table-striped-color:#000;--bs-table-active-bg:#badce3;--bs-table-active-color:#000;--bs-table-hover-bg:#bfe2e9;--bs-table-hover-color:#000}.table-warning{--bs-table-color:#000;--bs-table-bg:#fff3cd;--bs-table-border-color:#ccc2a4;--bs-table-striped-bg:#f2e7c3;--bs-table-striped-color:#000;--bs-table-active-bg:#e6dbb9;--bs-table-active-color:#000;--bs-table-hover-bg:#ece1be;--bs-table-hover-color:#000}.table-danger,.table-warning{border-color:var(--bs-table-border-color);color:var(--bs-table-color)}.table-danger{--bs-table-color:#000;--bs-table-bg:#f8d7da;--bs-table-border-color:#c6acae;--bs-table-striped-bg:#eccccf;--bs-table-striped-color:#000;--bs-table-active-bg:#dfc2c4;--bs-table-active-color:#000;--bs-table-hover-bg:#e5c7ca;--bs-table-hover-color:#000}.table-light{--bs-table-color:#000;--bs-table-bg:#f8f9fa;--bs-table-border-color:#c6c7c8;--bs-table-striped-bg:#ecedee;--bs-table-striped-color:#000;--bs-table-active-bg:#dfe0e1;--bs-table-active-color:#000;--bs-table-hover-bg:#e5e6e7;--bs-table-hover-color:#000}.table-dark,.table-light{border-color:var(--bs-table-border-color);color:var(--bs-table-color)}.table-dark{--bs-table-color:#fff;--bs-table-bg:#212529;--bs-table-border-color:#4d5154;--bs-table-striped-bg:#2c3034;--bs-table-striped-color:#fff;--bs-table-active-bg:#373b3e;--bs-table-active-color:#fff;--bs-table-hover-bg:#323539;--bs-table-hover-color:#fff}.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}@media(max-width:575.98px){.table-responsive-sm{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media(max-width:767.98px){.table-responsive-md{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media(max-width:991.98px){.table-responsive-lg{overflow-x:auto;-webkit-overflow-scrolling:touch}}@media(max-width:1167.98px){.table-responsive-xl{overflow-x:auto;-webkit-overflow-scrolling:touch}}body,html{background:#fff;color:#212529}p{margin-bottom:1em}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{color:inherit}.captionImage,.image,.ss-htmleditorfield-file,img{display:block;margin-bottom:1em;margin-top:1em;max-width:100%}@media(min-width:576px){.captionImage,.image,.ss-htmleditorfield-file,img{margin-left:1em;margin-right:1em}}.captionImage.center,.image.center,.ss-htmleditorfield-file.center,img.center{margin-left:auto;margin-right:auto;text-align:center}.captionImage.w-100,.image.w-100,.ss-htmleditorfield-file.w-100,img.w-100{margin-left:0;margin-right:0;text-align:center}.captionImage.left,.captionImage.start,.image.left,.image.start,.ss-htmleditorfield-file.left,.ss-htmleditorfield-file.start,img.left,img.start{clear:left;float:left}@media(min-width:576px){.captionImage.left,.captionImage.start,.image.left,.image.start,.ss-htmleditorfield-file.left,.ss-htmleditorfield-file.start,img.left,img.start{margin:0 1em 1em 0}}.captionImage.leftAlone,.image.leftAlone,.ss-htmleditorfield-file.leftAlone,img.leftAlone{clear:both;float:none;margin-left:0;margin-right:auto}.captionImage.end,.captionImage.right,.image.end,.image.right,.ss-htmleditorfield-file.end,.ss-htmleditorfield-file.right,img.end,img.right{clear:right;float:right}@media(min-width:576px){.captionImage.end,.captionImage.right,.image.end,.image.right,.ss-htmleditorfield-file.end,.ss-htmleditorfield-file.right,img.end,img.right{margin:1em 0 0 1em}}.captionImage.rightAlone,.image.rightAlone,.ss-htmleditorfield-file.rightAlone,img.rightAlone{clear:both;float:none;margin-left:auto;margin-right:0}.captionImage iframe,.image iframe,.ss-htmleditorfield-file iframe,img iframe{max-height:100%!important;width:100%!important}.captionImage img{margin-bottom:1em!important}.captionImage .caption{font-size:.8em}.left,.text-left,.text-start{text-align:left}.center,.text-center{text-align:center}.right,.text-end,.text-right{text-align:right}.text-justify{text-align:justify}table{border-collapse:collapse;max-width:100%;width:100%}table.table-none{border:0;margin-left:-.5em;margin-right:-.5em}table.table-none td,table.table-none th,table.table-none tr{background:none!important;border:0;box-shadow:none!important}ol,ul{padding-left:2em}ol li,ul li{margin:.5em 0;position:relative}ol{padding-left:2em}iframe,img,p,table,td,th,tr{max-width:100%!important}@media(max-width:575px){iframe,img,p,table,td,th,tr{border:0!important;display:block;padding-left:0!important;padding-right:0!important;width:100%!important}img,p,table,td,th,tr{height:auto!important}.d-typography-breakpoint-none{overflow:hidden;position:absolute;clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;padding:0;white-space:nowrap;width:1px}thead{display:block;text-align:center}thead>tr{display:flex}tbody{display:block}td{display:flex;flex-direction:column}td[data-label]:before{content:attr(data-label);display:block;font-weight:700;min-width:50%;padding:0 .5em;width:50%}}img{border:1px dashed}.ss-htmleditorfield-file.embed{position:relative}.ss-htmleditorfield-file.embed:before{content:"";display:block;padding-top:75%;position:relative;width:100%}.ss-htmleditorfield-file.embed iframe{bottom:0;left:0;position:absolute;right:0;top:0}img:last-child{margin-bottom:0!important}.table-none tr:last-child>td{padding-bottom:0}a{color:#0d6efd}img{border:1px dashed #dedede}
|
|
@ -1 +1 @@
|
|||
h1.title{display:block;text-align:right;border-bottom:1px solid #e0e0e0;text-transform:uppercase;line-height:1.5em}.warningMessage{position:relative;padding:.75rem 1.25rem;margin-bottom:1rem;border-radius:.25rem;color:#856404;background-color:#fff3cd;border:1px solid #ffeeba}#Content{text-align:left;margin:auto;padding-left:20px}#Content .emailTitle{font-weight:400;font-size:2.25rem}#Content .emailTitle,#Content .PageTitle{font-family:Lato,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}#Content .PageTitle{padding:5px;color:#212121;font-size:14px}#Content .footer td{padding:10px}#Content .footer td.right{text-align:right}#Content .typography{padding:0 10px}#Content .typography a{font-size:1em;text-decoration:underline}#Content .typography a:hover{text-decoration:none}#Content .typography ul{padding:2px 15px}#Content .typography ul li{padding:2px 5px}#Content .typography p{margin:.75em 0;color:#212121}table#SenderTable .meta,table#SenderTable .sender{width:50%}table#MetaTable{margin-left:auto}table#MetaTable .label{font-weight:700}#ShippingTable td,#ShippingTable th{width:50%}table.infotable{border-collapse:collapse;width:100%;border:1px solid #e0e0e0;background:#fff;margin-top:10px}table.infotable td.product.title{color:#2196f3;font-size:1.75rem;font-weight:400;font-family:Lato,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}table.infotable tr td,table.infotable tr th{padding:5px;color:#212121;border:1px solid #e0e0e0}table.infotable td{vertical-align:middle}table.infotable tr.summary{font-weight:700}table.infotable td.ordersummary{font-size:1em;border-bottom:1px solid #e0e0e0}table.infotable tr th{font-weight:700}table.infotable tr td a{color:#2196f3;text-decoration:underline}table.infotable tr td a:hover{text-decoration:none}table.infotable .modifierRow,table.infotable .right,table.infotable .threeColHeader{text-align:right}table.infotable .center{text-align:center}table.infotable .left,table.infotable th{text-align:left}
|
||||
h1.title{border-bottom:1px solid #dee2e6;display:block;line-height:1.5em;text-align:right;text-transform:uppercase}.warningMessage{background-color:#fff3cd;border-color:transparent;border:var(--bs-border-width) solid #ffeeba;border-radius:var(--bs-border-radius);color:#856404;margin-bottom:1rem;padding:1rem;position:relative}#Content{margin:auto;padding-left:20px;text-align:left}#Content .emailTitle{font-size:2.5rem;font-weight:400}#Content .PageTitle,#Content .emailTitle{font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}#Content .PageTitle{color:#212529;font-size:14px;padding:5px}#Content .footer td{padding:10px}#Content .footer td.right{text-align:right}#Content .typography{padding:0 10px}#Content .typography a{font-size:1em;text-decoration:underline}#Content .typography a:hover{text-decoration:none}#Content .typography ul{padding:2px 15px}#Content .typography ul li{padding:2px 5px}#Content .typography p{color:#212529;margin:.75em 0}table#SenderTable .meta,table#SenderTable .sender{width:50%}table#MetaTable{margin-left:auto}table#MetaTable .label{font-weight:700}#ShippingTable td,#ShippingTable th{width:50%}table.infotable{background:#fff;border:1px solid #dee2e6;border-collapse:collapse;margin-top:10px;width:100%}table.infotable td.product.title{color:#0d6efd;font-family:Roboto,system-ui,-apple-system,Segoe UI,Helvetica Neue,Arial,Noto Sans,Liberation Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-size:1.75rem;font-weight:400}table.infotable tr td,table.infotable tr th{border:1px solid #dee2e6;color:#212529;padding:5px}table.infotable td{vertical-align:middle}table.infotable tr.summary{font-weight:700}table.infotable td.ordersummary{border-bottom:1px solid #dee2e6;font-size:1em}table.infotable tr th{font-weight:700}table.infotable tr td a{color:#0d6efd;text-decoration:underline}table.infotable tr td a:hover{text-decoration:none}table.infotable .modifierRow,table.infotable .right,table.infotable .threeColHeader{text-align:right}table.infotable .center{text-align:center}table.infotable .left,table.infotable th{text-align:left}
|
|
@ -1 +0,0 @@
|
|||
module.exports = "../img/photo3.svg";
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 55 KiB After Width: | Height: | Size: 100 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 6.4 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 9.8 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 72 KiB After Width: | Height: | Size: 122 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 128 KiB |
After Width: | Height: | Size: 129 KiB |
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 135 KiB |
Before Width: | Height: | Size: 85 KiB After Width: | Height: | Size: 138 KiB |
After Width: | Height: | Size: 144 KiB |
After Width: | Height: | Size: 144 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 76 KiB |
After Width: | Height: | Size: 168 KiB |
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 172 KiB |
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 184 KiB |
After Width: | Height: | Size: 188 KiB |
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 192 KiB |
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 193 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 179 KiB |
Before Width: | Height: | Size: 174 KiB After Width: | Height: | Size: 255 KiB |
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 191 KiB |
After Width: | Height: | Size: 194 KiB |
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 144 KiB |
Before Width: | Height: | Size: 125 KiB After Width: | Height: | Size: 199 KiB |
After Width: | Height: | Size: 176 KiB |
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 201 KiB |
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 131 KiB |
After Width: | Height: | Size: 138 KiB |
After Width: | Height: | Size: 139 KiB |
Before Width: | Height: | Size: 84 KiB After Width: | Height: | Size: 149 KiB |
Before Width: | Height: | Size: 174 KiB After Width: | Height: | Size: 262 KiB |
After Width: | Height: | Size: 156 KiB |
After Width: | Height: | Size: 157 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 81 KiB |
|
@ -1,15 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="/icons/mstile-70x70.png"/>
|
||||
<square150x150logo src="/icons/mstile-150x150.png"/>
|
||||
<wide310x150logo src="/icons/mstile-310x150.png"/>
|
||||
<square310x310logo src="/icons/mstile-310x310.png"/>
|
||||
<TileColor>#fff</TileColor>
|
||||
|
||||
</tile>
|
||||
|
||||
</msapplication>
|
||||
|
||||
</browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square70x70logo src="mstile-70x70.png"/>
|
||||
<square150x150logo src="mstile-150x150.png"/>
|
||||
<wide310x150logo src="mstile-310x150.png"/>
|
||||
<square310x310logo src="mstile-310x310.png"/>
|
||||
<TileColor>#fff</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
Before Width: | Height: | Size: 7.0 KiB |
Before Width: | Height: | Size: 504 B After Width: | Height: | Size: 412 B |
Before Width: | Height: | Size: 1013 B After Width: | Height: | Size: 954 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 3.6 KiB |
|
@ -1,59 +0,0 @@
|
|||
{
|
||||
"name": "ss-webpack-boilerplate",
|
||||
"short_name": "ss-webpack-boilerplate",
|
||||
"description": "Lets you create SilverStripe faster",
|
||||
"dir": "auto",
|
||||
"lang": "en-US",
|
||||
"display": "standalone",
|
||||
"orientation": "any",
|
||||
"start_url": "/?homescreen=1",
|
||||
"background_color": "#fff",
|
||||
"theme_color": "#fff",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/icons/android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/android-chrome-256x256.png",
|
||||
"sizes": "256x256",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/android-chrome-384x384.png",
|
||||
"sizes": "384x384",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/android-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
"version": "2.0.2",
|
||||
"name": "ss-webpack-boilerplate",
|
||||
"description": "Lets you create SilverStripe faster",
|
||||
"icons": {
|
||||
"60": "/icons/firefox_app_60x60.png",
|
||||
"128": "/icons/firefox_app_128x128.png",
|
||||
"512": "/icons/firefox_app_512x512.png"
|
||||
},
|
||||
"developer": {
|
||||
"name": "Tony Air",
|
||||
"url": null
|
||||
}
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
"name": "ss-webpack-boilerplate",
|
||||
"short_name": "ss-webpack-boilerplate",
|
||||
"description": "Lets you create SilverStripe faster",
|
||||
"dir": "auto",
|
||||
"lang": "en-US",
|
||||
"display": "standalone",
|
||||
"orientation": "any",
|
||||
"start_url": "/?homescreen=1",
|
||||
"background_color": "#fff",
|
||||
"theme_color": "#fff",
|
||||
"icons": [
|
||||
{
|
||||
"src": "android-chrome-36x36.png",
|
||||
"sizes": "36x36",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "android-chrome-48x48.png",
|
||||
"sizes": "48x48",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "android-chrome-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "android-chrome-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "android-chrome-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "android-chrome-256x256.png",
|
||||
"sizes": "256x256",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "android-chrome-384x384.png",
|
||||
"sizes": "384x384",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "android-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "any"
|
||||
}
|
||||
]
|
||||
}
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 7.3 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 7.9 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"version": "2.0.2",
|
||||
"version": "5.0.0",
|
||||
"api_version": 1,
|
||||
"layout": {
|
||||
"logo": "/icons/yandex-browser-50x50.png",
|
||||
"logo": "yandex-browser-50x50.png",
|
||||
"color": "#fff",
|
||||
"show_title": true
|
||||
}
|
||||
|
|
After Width: | Height: | Size: 20 KiB |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="428" height="428"><path d="M181 383.58c0-.23.728-3.258 1.617-6.73 1.977-7.716 1.445-18.733-1.164-24.1-2.126-4.371-3.68-4.74-5.271-1.25-1.49 3.27-2.979 3.173-3.818-.25-1.006-4.1-4.718-9.126-8.775-11.883-3.044-2.069-6.178-2.749-20.344-4.414-21.513-2.528-36.86-5.255-51.245-9.103-15.956-4.27-18.952-4.723-31.668-4.79-6.143-.033-11.905-.343-12.804-.688-1.44-.552-1.37-.912.588-2.996 1.224-1.302 2.036-2.526 1.805-2.72-.232-.194-4.471-1.284-9.421-2.424-9.311-2.143-22.5-7.457-22.5-9.065 0-.504 1.268-1.17 2.817-1.48 3.028-.606 15.381-8.533 15.874-10.187.164-.55-3.282-2.073-7.657-3.384C18.54 284.972 3 275.39 3 272.065c0-.65 2.699-1.065 6.938-1.065 7.705 0 38.772-3.738 40.883-4.92.929-.52-2.234-3.466-10.238-9.539-6.37-4.833-11.583-8.983-11.583-9.223 0-.55-.043-.574 15.22 8.838C52.304 261.143 57.976 264 59.79 264c3.464 0 12.21-2.869 12.21-4.005 0-.705-7.927-13.068-38.465-59.995-7.53-11.57-7.785-12-7.132-12 .477 0 9.758 12.085 13.823 18 .945 1.375 4.093 5.726 6.996 9.669a9859.722 9859.722 0 0118.102 24.75C73.115 251.1 78.805 258 79.824 258c3.221 0 19.738-9.101 25.682-14.152 6.923-5.883 8.153-7.589 6.598-9.144-1.627-1.627-1.346-2.704.705-2.704.995 0 2.682-.65 3.75-1.446 1.859-1.384 1.804-1.494-1.309-2.597-4.468-1.585-4.073-2.607 1.322-3.416 5.936-.89 7.799-2.895 12.93-13.92 9.882-21.229 16.775-49.281 19.542-79.53 1.243-13.59.863-43.896-.595-47.477-.5-1.23-.38-1.752.347-1.5 1.716.594 12.055 22.351 13.901 29.251.903 3.374 1.979 6.526 2.391 7.004.413.478 1.64-.872 2.728-3 3.473-6.79 9.683-12.907 15.716-15.478l5.61-2.391-.385-5.75c-.212-3.163-.107-5.75.232-5.75.34 0 2.587 2.793 4.995 6.208 2.408 3.414 4.556 5.672 4.774 5.018.218-.653-.314-4.62-1.181-8.814-1.808-8.742-1.864-9.412-.79-9.412 1.166 0 11.136 16.773 18.26 30.72 3.432 6.721 6.591 12.003 7.02 11.739.429-.265 1.08-1.851 1.447-3.524.368-1.674 3.551-11.77 7.075-22.439 9.28-28.098 18.948-52.474 21.414-53.998 1.45-.896 1.296.44-1.956 17.002-10.18 51.842-11.57 96.258-3.974 126.981 1.509 6.101 2.616 8.498 4.7 10.175 2.19 1.763 2.48 2.446 1.477 3.47-1.897 1.934-1.586 3.363 2.75 12.616 8.21 17.518 20.547 32.839 34.412 42.732 3.488 2.49 6.564 4.526 6.836 4.526.272 0 11.015-13.562 23.873-30.137 35.36-45.583 35.992-45.631 4.769-.363-20.257 29.368-22.791 33.266-22.088 33.973.972.979 7.193 3.527 8.61 3.527 1.156 0 9.336-5.77 27.37-19.305 5.104-3.831 9.478-6.769 9.719-6.528.396.397-6.934 7.059-24.187 21.982-3.403 2.943-6.215 5.86-6.25 6.482-.073 1.29 18.504 7.399 30.436 10.008 4.4.962 11.979 1.774 16.841 1.805l8.841.056-4.34 3.866c-5.963 5.31-17.077 11.666-27.328 15.629-4.718 1.823-8.425 3.772-8.24 4.33.54 1.616 7.672 3.848 14.726 4.607 6.316.68 6.417.734 3.546 1.936-1.625.68-10.85 2.565-20.5 4.188-18.155 3.052-43.071 9.68-43.012 11.44.018.552 7.33 4.345 16.25 8.429 8.919 4.084 17.25 8.046 18.514 8.804l2.298 1.38-2.048 3.313c-2.751 4.452-2.582 5.428.448 2.582 4.332-4.07 3.6-1.693-1.976 6.422-6.83 9.939-6.745 9.862-9.074 8.152-1.891-1.39-1.895-1.516-.14-4.504 2.05-3.488 1.308-3.984-1.742-1.166-2.051 1.897-2.196 1.817-23.564-13.074-24.414-17.013-19.757-15.573-40-12.374-5.225.826-13.728 1.806-18.895 2.178-8.46.61-9.725.967-12.71 3.588-3.904 3.428-8.065 11.536-8.992 17.524-.362 2.338-1.073 4.25-1.58 4.25-1.22 0-4.773-7.91-4.801-10.691-.02-1.976-2.012-4.545-2.03-2.618-.004.445-.471 3.67-1.039 7.168-1.393 8.586-6.151 18.73-11.207 23.891-3.677 3.754-5.746 5.134-5.746 3.83zm131.195-34.267c1.543-1.478 2.805-3.181 2.805-3.785 0-.605-2.813-2.527-6.25-4.273-3.438-1.746-12.643-6.567-20.456-10.714-7.814-4.148-14.832-7.541-15.595-7.541-2.031 0-5.243 3.86-4.125 4.957 1.035 1.016 39.67 24.016 40.371 24.032.245.006 1.708-1.198 3.25-2.676zm-76.402-19.901c13.061-1.514 15.156-2.23 15.192-5.193.028-2.353-2.49-2.288-10.52.27-4.38 1.395-10.777 3.059-14.215 3.697-3.438.638-6.25 1.532-6.25 1.987 0 1.08-.142 1.086 15.793-.761zm-40.78-1.834c21.408-2.978 50.173-10.037 54.066-13.268.868-.72 2.315-1.31 3.215-1.31 6.893 0 35.646-13.796 48.623-23.33l5.418-3.98-2.278-1.845c-1.253-1.015-2.904-1.845-3.668-1.845-.764 0-1.389-.428-1.389-.952 0-1.711 9.188 1.758 12.136 4.582 2.923 2.8 4.008 8.545 1.864 9.87-.558.345-1-.415-1-1.718 0-2.408-2.511-6.782-3.893-6.782-.428 0-3.665 2.326-7.193 5.168-7.531 6.069-23.199 16.452-30.664 20.32-2.887 1.497-5.25 2.867-5.25 3.044 0 .178 2.989 1.735 6.642 3.461 6.34 2.996 6.874 3.083 11.75 1.928 6.038-1.43 20.655-6.884 26.653-9.944 5.99-3.056 13.654-10.536 15.013-14.652 1.64-4.972-.929-11.28-6.391-15.694-6.34-5.122-8.053-5.81-10.279-4.124-2.396 1.814-3.54 1.833-5.91.101-1.655-1.21-1.72-1.61-.505-3.076 1.2-1.445 1.194-1.814-.037-2.593-2.334-1.477-5.377-1.072-7.103.943-1.096 1.28-2.448 1.723-4.223 1.384-2.798-.535-3.35-2.126-1.41-4.066 1.906-1.906.076-2.862-10.7-5.592-13.734-3.48-29.574-6.028-50.25-8.085-7.462-.743-8.218.595-1.334 2.359 5.472 1.402 13.663 6.153 16.312 9.46 2.567 3.207 2.215 7.978-.858 11.63-7.299 8.675-28.216 14.02-54.87 14.023-26.43.003-47.625-5.413-54.87-14.023-6.772-8.048-.14-16.53 16.87-21.575 8.065-2.391 4.93-2.869-9.388-1.429-20.39 2.051-52.257 7.91-54.455 10.012-.464.443-.078 1.975.858 3.403 1.836 2.802 2.05 2.51-2.978 4.072-.805.25-2.387-.72-3.515-2.154-1.969-2.503-2.222-2.558-6.263-1.347l-4.21 1.262 2.225 1.802c1.224.991 2.226 2.244 2.226 2.784 0 1.936-4.811 2.213-7.875.455-2.903-1.666-3.178-1.66-6.33.14-10.75 6.14-15.213 15.027-11.321 22.552 6.868 13.282 45.943 26.724 88.526 30.452 9.191.805 47.854-.41 58.013-1.823zm-85.346-10.245c-2.424-2.423 2.195-5.522 4.893-3.283 1.112.923 1.191 1.545.33 2.583-1.195 1.44-4.095 1.829-5.223.7zm-8.438-7.52c.618-1.855 2.771-2.162 2.771-.396 0 .87-.713 1.583-1.583 1.583-.871 0-1.406-.534-1.188-1.188zm166.568-30.493c-2.624-.691-3.388-4.415-1.228-5.994 2.669-1.952 7.836-1.641 9.857.593 1.654 1.827 1.638 2.017-.345 4-1.976 1.976-4.487 2.4-8.284 1.4zm-170.488-3.956c-1.133-2.955 1.1-4.864 5.691-4.864 4.972 0 7.287 2.245 5.07 4.916-1.838 2.215-9.906 2.176-10.76-.052zM116.5 275c-.837-1.354.292-3 2.059-3 .793 0 1.441.9 1.441 2 0 2.07-2.413 2.76-3.5 1zm138.195-5.111c-1.427-.83-1.558-1.349-.628-2.47 1.62-1.95 6.84-1.826 7.61.182 1.104 2.877-3.422 4.36-6.982 2.288zm-139.975-2.177c-.793-2.066.755-3.96 2.9-3.547 2.657.512 2.461 4.252-.243 4.638-1.167.166-2.363-.324-2.657-1.09zm153.439-.02c-1.36-1.638-.545-2.692 2.081-2.692 1.242 0 1.794.58 1.583 1.667-.43 2.22-2.25 2.728-3.664 1.024zm.251 56.142c1.808-2.111 1.807-2.203-.027-3.579-6.406-4.804-15.09-6.703-16.132-3.528-.387 1.18 11.17 9.244 13.277 9.263.565.005 1.862-.965 2.882-2.156zm-70.08-59.77c4.845-1.125 5.609-1.904 3.43-3.498-5.233-3.826-37.363-1.835-33.454 2.073 2.08 2.08 22.936 3.07 30.023 1.425zm25.017-12.612c3.559-3.457 4.57-5.452 2.76-5.452-.491 0-1.145.657-1.453 1.46-.308.803-2.449 2.828-4.757 4.5-3.18 2.304-3.713 3.04-2.2 3.04 1.098 0 3.64-1.597 5.65-3.548zm-7.48.13c.668-.413.94-1.612.606-2.666-.34-1.071-.137-1.916.46-1.916.587 0 1.067.45 1.067 1 0 3.62 4.497-2.234 6.8-8.853 1.049-3.01.94-3.555-1.066-5.334-1.432-1.27-1.663-1.804-.643-1.49 3.058.945 4.153-1.002 4.676-8.313.369-5.153.16-7.437-.728-7.986-.98-.605-.988-1.25-.04-3.023 1.666-3.112.414-15.001-1.579-15.001-.911 0-1.42 1.075-1.42 3 0 2.453-.41 2.994-2.25 2.97-2.076-.029-2.108-.113-.416-1.097 1.314-.764 1.662-1.754 1.226-3.492-.419-1.667-.133-2.608.915-3.01 1.984-.761 1.969-2.371-.023-2.371-2.008 0-6.132 4.472-8.63 9.358-1.673 3.272-1.868 4.974-1.282 11.223.88 9.399.228 12.01-3.216 12.874l-2.693.676 2.715 2.184 2.715 2.185-1.543 5c-2.913 9.438-6.168 11.225-10.945 6.01-3.72-4.06-4.573-4.321-4.573-1.396 0 3.602 4.166 9.897 6.952 10.505a229.4 229.4 0 013.522.793c1.39.339 7.953-.94 9.394-1.83zM223 218c-1.213-.784-1.07-.972.75-.985 1.238-.008 2.25.435 2.25.985 0 1.253-1.061 1.253-3 0zm-61.535 32.114c-3.822-1.77-7.404-4.412-9.77-7.205-3.408-4.021-3.641-4.145-2.652-1.409 2.259 6.25 9.272 11.429 15.457 11.415 2.615-.006 2.225-.366-3.035-2.801zm80.39-5.79c-1.495-1.8-3.373-.116-2.476 2.221.526 1.37.921 1.45 2.145.435 1.165-.967 1.239-1.56.33-2.655zm-65.528 1.573c1.331-.607 3.377-2.805 4.547-4.886 3.553-6.323 2.234-11.158-1.493-5.47-.915 1.397-2.543 3.01-3.617 3.585-2.805 1.502-6.414-2.217-8.313-8.567l-1.512-5.059 2.715-2.185 2.715-2.184-2.649-.665c-3.471-.871-4.05-3.072-3.239-12.306.63-7.164.487-8.016-2.2-13.147-2.805-5.358-7.369-9.258-8.966-7.661-.44.439-.012 1.238.95 1.776 1.213.68 1.567 1.695 1.157 3.328-.416 1.655-.048 2.666 1.244 3.417 1.692.984 1.66 1.069-.416 1.097-1.84.024-2.25-.517-2.25-2.97 0-1.925-.509-3-1.42-3-2.027 0-3.241 11.896-1.54 15.076.917 1.713.945 2.43.103 2.71-.665.221-1.143 2.585-1.143 5.648 0 7.768 2.789 14.49 4.28 10.316.245-.688.845-.874 1.333-.414.502.474-.141 1.67-1.484 2.758l-2.37 1.922 2.87 5.742c2.31 4.621 3.303 5.697 5.082 5.51 1.459-.152 2.043.21 1.715 1.064-1.418 3.695 8.593 6.983 13.9 4.565zM153 211c0-.55.927-1 2.059-1 1.132 0 1.78.45 1.441 1-.34.55-1.266 1-2.059 1-.793 0-1.441-.45-1.441-1zm96.83 34.25c1.236-2.403.39-4.25-1.945-4.25-2.446 0-3.505 2.548-1.874 4.513 1.621 1.953 2.718 1.878 3.819-.263zM132.8 238.8c1.446-1.446 1.586-5.443.22-6.287-2.498-1.544-7.129 3.884-5.526 6.478.852 1.379 3.844 1.27 5.306-.191zm110.011-7.624c.34-4.729-1.01-7.176-3.958-7.176-3.471 0-4.481 7.055-1.546 10.798.56.714 1.957 1.164 3.105 1 1.69-.241 2.147-1.122 2.4-4.622zm-42.357.073c2.84-4.293 5.584-11.834 9.004-24.749 8.144-30.755 11.209-37.923 15.713-36.745 1.773.464 1.96.207 1.36-1.859-1.111-3.826-4.051-7.37-6.404-7.719-2.98-.442-6.218 7.077-8.965 20.823-6.26 31.331-7.381 36.5-9.179 42.319-2.133 6.905-4.913 10.306-7.587 9.28-1.408-.54-1.475-.399-.415.878 2.009 2.42 3.806 1.801 6.473-2.228zM186 226c0-.55-.848-1-1.885-1-4.953 0-8.114-10.81-13.699-46.845-4.118-26.575-7.261-38.218-10.645-39.43-2.04-.73-4.415.98-5.54 3.987-2.277 6.085-2.275 6.263.057 6.02 3.575-.375 7.154 8.342 11.811 28.768 8.739 38.32 12.691 49.5 17.5 49.5 1.32 0 2.401-.45 2.401-1zm-12.2-101.2c1.9-1.9 1.458-4.8-.733-4.8-2.003 0-3.665 3.224-2.573 4.991.824 1.333 1.841 1.274 3.306-.191zm7.2-8.383c0-1.766-2.153-1.459-2.77.395-.219.654.316 1.188 1.187 1.188.87 0 1.583-.713 1.583-1.583zM321.228 364.75c.802-1.238 3.369-5.287 5.704-9 2.336-3.712 4.57-6.75 4.967-6.75.395 0 1.592.65 2.66 1.443 1.85 1.375 1.588 1.8-5.534 9-7.389 7.47-10.626 9.673-7.797 5.307zm13.804-1.029c-.086-2.101 6.486-13.24 11.042-18.714 7.695-9.246 18.64-16.71 41.658-28.403 22.794-11.58 29.593-16.142 32.987-22.135 2.74-4.838 2.946-12.413.475-17.467-1.93-3.946-1.137-3.753-32.694-7.938-24.439-3.241-31.5-4.425-31.5-5.28 0-.443 2.925-2.152 6.5-3.795 15.631-7.187 19.64-9.084 30.5-14.429 6.325-3.113 11.275-5.964 11-6.336-.275-.372-3.539-2.132-7.252-3.912-19.07-9.14-25.576-24.06-21.347-48.962.92-5.418 1.9-11.425 2.176-13.35.277-1.925.924-4.625 1.437-6 1.615-4.333 3.948-25.418 2.926-26.45-.86-.869-1.475 3.162-1.137 7.45.17 2.15-2.705 16.817-8.173 41.704-5.538 25.204-1.91 39.488 11.493 45.254 4.263 1.833 4.903 2.426 3.757 3.481-1.212 1.116-10.883 7.804-30.117 20.825-5.657 3.83-7.364 5.469-6.546 6.286.229.23 11.853 2.704 25.831 5.499 13.978 2.795 25.756 5.615 26.174 6.267.417.651 1.492 3.078 2.388 5.392 2.527 6.526 1.24 12.442-3.803 17.485-6.651 6.651-14.604 9.774-50.307 19.753-13.798 3.857-23.022 7.882-27.896 12.172-5.2 4.576-6.363 3.92-1.354-.765 6.265-5.858 13.748-8.846 40.75-16.27 31.563-8.677 42-15.078 42-25.758 0-2.422-.852-6.075-1.894-8.117l-1.894-3.713-27.106-5.382c-16.23-3.222-27.09-5.83-27.065-6.497.022-.614 8.572-6.9 19-13.968 10.427-7.069 18.959-13.184 18.959-13.59 0-.405-1.07-1.224-2.377-1.82-3.727-1.698-9.39-7.066-11.139-10.558-2.344-4.683-3.434-15.584-2.39-23.93 1.11-8.888 2.064-13.967 5.396-28.75 3.344-14.836 5.469-29.699 5.492-38.417.025-9.519.827-7.98 1.941 3.726.042.445.527.53 1.077.191 1.48-.914 1.243 9.621-.427 19-.783 4.4-2.532 13.175-3.885 19.5-1.354 6.325-2.754 14.66-3.113 18.523-1.16 12.516 2.794 23.964 10.768 31.168C390.97 229.967 406.28 238 408.897 238c3.506 0-1.244 2.742-21.647 12.495-12.512 5.982-23.327 11.385-24.033 12.009-1.344 1.187.404 1.494 39.675 6.96 9.566 1.331 17.734 2.784 18.152 3.228 1.394 1.482 3.956 10.335 3.934 13.593-.012 1.768-.85 5.038-1.863 7.267-3.206 7.06-10.986 12.69-31.836 23.038-10.572 5.247-22.62 11.76-26.776 14.472-9.614 6.275-19.16 15.95-23.217 23.526-3.358 6.272-6.201 10.424-6.254 9.133z"/></svg>
|
After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 229 KiB After Width: | Height: | Size: 127 KiB |
|
@ -1,107 +1,15 @@
|
|||
/*!
|
||||
* Bootstrap alert.js v4.5.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap button.js v4.5.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap carousel.js v4.5.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap collapse.js v4.5.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap modal.js v4.5.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap popover.js v4.5.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap scrollspy.js v4.5.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap tab.js v4.5.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap tooltip.js v4.5.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap util.js v4.5.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Select2 4.0.13
|
||||
* https://select2.github.io
|
||||
*
|
||||
* Released under the MIT license
|
||||
* https://github.com/select2/select2/blob/master/LICENSE.md
|
||||
* Get all of an element's parent elements up the DOM tree
|
||||
* (c) 2019 Chris Ferdinandi, MIT License, https://gomakethings.com
|
||||
* @param {Node} elem The element
|
||||
* @param {String} selector Selector to match against [optional]
|
||||
* @return {Array} The parent elements
|
||||
*/
|
||||
|
||||
/*! Hammer.JS - v2.0.7 - 2016-04-22
|
||||
* http://hammerjs.github.io/
|
||||
*
|
||||
* Copyright (c) 2016 Jorik Tangelder;
|
||||
* Licensed under the MIT license */
|
||||
|
||||
/*! smooth-scroll v16.1.3 | (c) 2020 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/smooth-scroll */
|
||||
|
||||
/**
|
||||
* @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
|
||||
* Released under MIT license, http://github.com/requirejs/almond/LICENSE
|
||||
*/
|
||||
|
||||
/**!
|
||||
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
||||
* @version 1.16.1
|
||||
* @license
|
||||
* Copyright (c) 2016 Federico Zivolo and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
/*!
|
||||
* Glide.js v3.6.0
|
||||
* (c) 2013-2022 Jędrzej Chałubek (https://github.com/jedrzejchalubek/)
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*@cc_on!@*/
|
||||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
!function(e){var t={};function o(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,o),a.l=!0,a.exports}o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)o.d(n,a,function(t){return e[t]}.bind(null,a));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="app/client/dist",o(o.s="./app/client/src/js/types/SilverShop.Page.CheckoutPageController.js")}({"./app/client/src/js/_consts.js":function(e,t,o){"use strict";var n={ENVS:["xs","sm","md","lg","xl","xxl","xxxl"],MAP_DRIVER:o("./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/drivers/_map.google.js").a};t.a=n},"./app/client/src/js/types/SilverShop.Page.CheckoutPageController.js":function(e,t,o){"use strict";o.r(t);o("./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.map.api.js")},"./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.map.api.js":function(e,t,o){"use strict";(function(e){var t=o("jquery"),n=o.n(t),a=o("./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_events.js"),r=o.n(a),i=(o("./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.map.scss"),o("./app/client/src/js/_consts.js"));function s(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}!function(t){var o="jsMapAPI",n=o,a=t("body"),l=i.a.MAP_DRIVER,c=window,p=function(){function i(s){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var c=this,p=new l;c.$el=t(s);var u=c.$el,d=u.data();d.center=[d.lng?d.lng:a.data("default-lng"),d.lat?d.lat:a.data("default-lat")],d.style=d.style?e.parseJSON(d.style):null,d["font-family"]=a.css("font-family"),console.log("".concat(o,": init ").concat(p.getName(),"...")),p.init(u,d),c.drv=p,u.on(r.a.MAPAPILOADED,(function(e){c.map=p.getMap(),d.geojson?(console.log("".concat(o,": setting up geocode data")),p.addGeoJson(d)):d.address?(console.log(d.address),console.log("".concat(o,": setting up address marker")),p.geocode(d.address,(function(e){console.log(e)}))):d.lat&&d.lng&&(console.log("".concat(o,": setting up single lat/lng marker")),d.icon||(d.icon='<i class="fas fa-map-marker-alt"></i>'),p.addMarker([d.lng,d.lat],d)),u.data(n,c),u.addClass("".concat(o,"-active")),u.trigger(r.a.MAPLOADED),console.log("".concat(o,": Map is loaded"))}))}var p,u,d;return p=i,d=[{key:"_jQueryInterface",value:function(){if("undefined"!==typeof c.localStorage)return this.each((function(){var e=t(this),o=e.data(n);o||(o=new i(this),e.data(n,o))}))}}],(u=[{key:"getMap",value:function(){return ui.map}},{key:"dispose",value:function(){var e=this;e.$el=null,t.removeData(e.$el[0],n),e.$el.removeClass("".concat(o,"-active"))}}])&&s(p.prototype,u),d&&s(p,d),i}();t.fn[o]=p._jQueryInterface,t.fn[o].Constructor=p,t.fn[o].noConflict=function(){return t.fn[o]=JQUERY_NO_CONFLICT,p._jQueryInterface},t(c).on("".concat(r.a.AJAX," ").concat(r.a.LOADED),(function(){t(".mapAPI-map-container").jsMapAPI()}))}(n.a)}).call(this,o("jquery"))},"./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/drivers/_map.google.js":function(e,t,o){"use strict";var n=o("jquery"),a=o.n(n),r=o("./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_events.js"),i=o.n(r),s=o("./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/drivers/_map.google.marker.js");function l(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var c,p=(c=a.a,function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,o,n;return t=e,(o=[{key:"getName",value:function(){return"GoogleMapsDriver"}},{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=this,n=window;o.$el=e,o.config=t,o.markers=[],n["init".concat(o.getName())]=function(){o.googleApiLoaded()},c("body").append('<script async defer src="https://maps.googleapis.com/maps/api/js?key='.concat(t.key,"&callback=init").concat(o.getName(),'"><\/script>'))}},{key:"googleApiLoaded",value:function(){var e=this,t=e.$el,o=e.config,n=t.find(".mapAPI-map"),a=o.mapZoom?o.mapZoom:10,r=o.center?{lat:o.center[1],lng:o.center[0]}:{lat:0,lng:0},l=o.style?o.style:null;console.log("".concat(e.getName(),": API is loaded")),e.MarkerUI=s.a.init(c),e.map=new google.maps.Map(n[0],{zoom:a,center:r,fullscreenControl:!0,styles:l}),e.default_zoom=a,n.addClass("mapboxgl-map"),e.popup=new e.MarkerUI({map:e.map,align:["center","top"],divClass:"mapboxgl-popup popup mapboxgl-popup-anchor-bottom d-none",html:'<div class="mapboxgl-popup-tip"></div><div class="mapboxgl-popup-content"><div class="mapboxgl-popup-close-button" type="button" aria-label="Close popup">\xd7</div><div class="html"></div></div>'}),e.geocoder=new google.maps.Geocoder,t.trigger(i.a.MAPAPILOADED)}},{key:"addMarker",value:function(e,t){var o=this,n={lat:e[1],lng:e[0]},a=new o.MarkerUI({position:n,map:o.map,align:["center","top"],html:'<div class="mapboxgl-marker"><div id="Marker'.concat(t.id,'" data-id="').concat(t.id,'" class="marker">').concat(t.icon,"</div></div>"),onClick:function(){var e=c("#Marker".concat(t.id));o.showPopup(n,t.content),e.trigger(i.a.MAPMARKERCLICK)}});return o.markers.push(a),a}},{key:"showPopup",value:function(e,t){var o=this,n=c(o.popup.getDiv());o.config.flyToMarker&&(o.map.setCenter(e),o.config.noZoom||o.map.setZoom(18)),n.css({opacity:"0"}),n.removeClass("d-none"),n.find(".mapboxgl-popup-content .html").html(t),n.find(".mapboxgl-popup-close-button").on("click",(function(e){e.preventDefault(),o.hidePopup()})),o.popup.setPosition(e,["center","top"]),n.css({"margin-top":"-1rem",opacity:"1"})}},{key:"hidePopup",value:function(){var e=this;c(e.popup.getDiv()).addClass("d-none"),e.config.noRestoreBounds&&!e.config.flyToBounds||e.restoreBounds(),e.$el.trigger(i.a.MAPPOPUPCLOSE)}},{key:"geocode",value:function(e,t){var o=this;o.geocoder.geocode({address:e},(function(e,n){if("OK"===n)return"function"===typeof t&&t(e),e;console.error("".concat(o.getName(),": Geocode was not successful for the following reason: ").concat(n))}))}},{key:"reverseGeocode",value:function(e,t){var o=this;o.geocoder.geocode({location:latlng},(function(e,n){if("OK"===n)return"function"===typeof t&&t(e),e;console.error("".concat(o.getName(),": Reverse Geocoding was not successful for the following reason: ").concat(n))}))}},{key:"addGeoJson",value:function(e){var t=this,o=(e.geojson.features[0].geometry.coordinates,new google.maps.LatLngBounds);e.geojson.features.forEach((function(n){var a=n.id,r=n.geometry.coordinates,i=n.properties.content;t.addMarker(r,{id:a,content:i,icon:n.icon,flyToMarker:e.flyToMarker}),o.extend({lat:r[1],lng:r[0]})})),t.markers.length>1?t.map.fitBounds(o,{padding:30}):t.markers[0]&&t.map.setCenter(t.markers[0].getPosition()),t.default_bounds=o,t.default_zoom=t.map.getZoom()}},{key:"getMap",value:function(){return this.map}},{key:"getPopup",value:function(){return this.popup}},{key:"restoreBounds",value:function(){var e=this;e.default_bounds&&e.markers.length>1?e.map.fitBounds(e.default_bounds,{padding:30}):(e.markers[0]&&e.map.setCenter(e.markers[0].getPosition()),e.restoreZoom())}},{key:"restoreZoom",value:function(){this.map.setZoom(this.default_zoom)}}])&&l(t.prototype,o),n&&l(t,n),e}());t.a=p},"./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/drivers/_map.google.marker.js":function(e,t,o){"use strict";(function(e){function o(e){return(o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function r(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var o,n=l(e);if(t){var a=l(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return i(this,o)}}function i(e,t){return!t||"object"!==o(t)&&"function"!==typeof t?s(e):t}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c={init:function(){return function(t){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(p,google.maps.OverlayView);var o,i,l,c=r(p);function p(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p);var o=s(t=c.call(this));return o.setMap(e.map),o.position=e.position,o.html=e.html?e.html:'<div class="mapboxgl-marker"><i class="marker-icon fas fa-map-marker-alt"></i></div>',o.divClass=e.divClass,o.align=e.align,o.isDebugMode=e.debug,o.onClick=e.onClick,o.onMouseOver=e.onMouseOver,o.isBoolean=function(e){return"boolean"===typeof e},o.isNotUndefined=function(e){return"undefined"!==typeof e},o.hasContent=function(e){return e.length>0},o.isString=function(e){return"string"===typeof e},o.isFunction=function(e){return"function"===typeof e},t}return o=p,(i=[{key:"onAdd",value:function(){var e=this;e.div=document.createElement("div"),e.div.style.position="absolute",e.isNotUndefined(e.divClass)&&e.hasContent(e.divClass)&&(e.div.className=e.divClass),e.isNotUndefined(e.html)&&e.hasContent(e.html)&&e.isString(e.html)&&(e.div.innerHTML=e.html),e.isBoolean(e.isDebugMode)&&e.isDebugMode&&(e.div.className="debug-mode",e.div.innerHTML='<div style="height: 10px; width: 10px; background: red; border-radius: 100%;"></div><div style="position: absolute; top: 5px; padding: 5px; width: 130px; text-align: center; font-size: 18px; text-transform: uppercase; font-weight: bolder; background: red; color: white; font-family: Arial;">Debug mode</div>',e.div.setAttribute("style","position: absolute;border: 5px dashed red;height: 150px;width: 150px;display: flex;justify-content: center;align-items: center;")),e.getPanes().overlayMouseTarget.appendChild(e.div),google.maps.event.addDomListener(e.div,"click",(function(t){google.maps.event.trigger(e,"click"),e.isFunction(e.onClick)&&e.onClick(),t.stopPropagation()})),google.maps.event.addDomListener(e.div,"mouseover",(function(t){google.maps.event.trigger(e,"mouseover"),e.isFunction(e.onMouseOver)&&e.onMouseOver(),t.stopPropagation()}))}},{key:"draw",value:function(){var t=this,o=e(t.div).find(".mapboxgl-marker,.marker-pin,.mapboxgl-popup,.popup");o.length||(o=e(t.div));var n=t.getProjection().fromLatLngToDivPixel(new google.maps.LatLng(t.position)),a={y:void 0,x:void 0},r=o.outerWidth(),i=o.outerHeight();switch(Array.isArray(t.align)?t.align.join(" "):""){case"left top":a.y=i,a.x=r;break;case"left center":a.y=i/2,a.x=r;break;case"left bottom":a.y=0,a.x=r;break;case"center top":a.y=i,a.x=r/2;break;case"center center":a.y=i/2,a.x=r/2;break;case"center bottom":a.y=0,a.x=r/2;break;case"right top":a.y=i,a.x=0;break;case"right center":a.y=i/2,a.x=0;break;case"right bottom":a.y=0,a.x=0;break;default:a.y=i/2,a.x=r/2}t.div.style.top="".concat(n.y-a.y,"px"),t.div.style.left="".concat(n.x-a.x,"px")}},{key:"getPosition",value:function(){return this.position}},{key:"getDiv",value:function(){return this.div}},{key:"setPosition",value:function(e,t){var o=this;o.position=e,o.align=t,o.draw()}}])&&n(o.prototype,i),l&&n(o,l),p}()}};t.a=c}).call(this,o("jquery"))},"./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_events.js":function(e,t){e.exports={AJAX:"ajax-load",AJAXMAIN:"ajax-main-load",MAININIT:"main-init",TABHIDDEN:"tab-hidden",TABFOCUSED:"tab-focused",OFFLINE:"offline",ONLINE:"online",BACKONLINE:"back-online",TOUCHENABLE:"touch-enabled",TOUCHDISABLED:"touch-disabled",LOADED:"load",SWIPELEFT:"swipeleft panleft",SWIPERIGHT:"swiperight panright",ALLERTAPPEARED:"alert-appeared",ALERTREMOVED:"alert-removed",LODEDANDREADY:"load-ready",LAZYIMAGEREADY:"image-lazy-bg-loaded",LAZYIMAGESREADY:"images-lazy-loaded",MAPLOADED:"map-loaded",MAPAPILOADED:"map-api-loaded",MAPMARKERCLICK:"map-marker-click",MAPPOPUPCLOSE:"map-popup-close",SCROLL:"scroll",RESIZE:"resize",CAROUSEL_READY:"bs.carousel.ready",SET_TARGET_UPDATE:"set-target-update",RESTORE_FIELD:"restore-field",FORM_INIT_BASICS:"form-basics",FORM_INIT_STEPPED:"form-init-stepped",FORM_INIT_VALIDATE:"form-init-validate",FORM_INIT_VALIDATE_FIELD:"form-init-validate-field",FORM_INIT_STORAGE:"form-init-storage",FORM_VALIDATION_FAILED:"form-validation-failed",FORM_STEPPED_NEW_STEP:"form-new-step",FORM_STEPPED_FIRST_STEP:"form-first-step",FORM_STEPPED_LAST_STEP:"form-last-step",FORM_FIELDS:"input,textarea,select"}},"./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.map.scss":function(e,t,o){},jquery:function(e,t){e.exports=jQuery}});
|
|
@ -1 +1,2 @@
|
|||
!function(e){var t={};function o(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,o),a.l=!0,a.exports}o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)o.d(n,a,function(t){return e[t]}.bind(null,a));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="app/client/dist",o(o.s="./app/client/src/js/types/Site.Controllers.MapElementController.js")}({"./app/client/src/js/_consts.js":function(e,t,o){"use strict";var n={ENVS:["xs","sm","md","lg","xl","xxl","xxxl"],MAP_DRIVER:o("./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/drivers/_map.google.js").a};t.a=n},"./app/client/src/js/types/Site.Controllers.MapElementController.js":function(e,t,o){"use strict";o.r(t);var n=o("jquery"),a=o.n(n),r=o("./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_events.js"),i=o.n(r);o("./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.map.api.js");function s(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var l=function(e){var t=window,o=(document,e("body")),n="LocationUI",a=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}var a,r,l;return a=t,l=[{key:"init",value:function(){this.dispose(),console.log("Initializing: ".concat(n))}},{key:"initMap",value:function(){e(".mapAPI-map-container").find(".marker").on("".concat(i.a.MAPMARKERCLICK),(function(t){var n=e(t.currentTarget).data("id");o.find(".locations .location").removeClass("active"),o.find('.locations .location[data-id="'.concat(n,'"]')).addClass("active")})),o.find(".locations .location").on("click",(function(t){var n=e(t.currentTarget).data("id");o.find("#Marker".concat(n)).click()})),e(".mapAPI-map-container").on(i.a.MAPPOPUPCLOSE,(function(e){o.find(".locations .location").removeClass("active")}))}},{key:"dispose",value:function(){console.log("Destroying: ".concat(n))}}],(r=null)&&s(a.prototype,r),l&&s(a,l),t}();return e(t).on("".concat(i.a.AJAX," ").concat(i.a.LOADED),(function(){a.init()})),e(t).on(i.a.MAPLOADED,(function(){a.initMap()})),a}(a.a);t.default=l},"./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.map.api.js":function(e,t,o){"use strict";(function(e){var t=o("jquery"),n=o.n(t),a=o("./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_events.js"),r=o.n(a),i=(o("./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.map.scss"),o("./app/client/src/js/_consts.js"));function s(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}!function(t){var o="jsMapAPI",n=o,a=t("body"),l=i.a.MAP_DRIVER,c=window,p=function(){function i(s){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i);var c=this,p=new l;c.$el=t(s);var u=c.$el,d=u.data();d.center=[d.lng?d.lng:a.data("default-lng"),d.lat?d.lat:a.data("default-lat")],d.style=d.style?e.parseJSON(d.style):null,d["font-family"]=a.css("font-family"),console.log("".concat(o,": init ").concat(p.getName(),"...")),p.init(u,d),c.drv=p,u.on(r.a.MAPAPILOADED,(function(e){c.map=p.getMap(),d.geojson?(console.log("".concat(o,": setting up geocode data")),p.addGeoJson(d)):d.address?(console.log(d.address),console.log("".concat(o,": setting up address marker")),p.geocode(d.address,(function(e){console.log(e)}))):d.lat&&d.lng&&(console.log("".concat(o,": setting up single lat/lng marker")),d.icon||(d.icon='<i class="fas fa-map-marker-alt"></i>'),p.addMarker([d.lng,d.lat],d)),u.data(n,c),u.addClass("".concat(o,"-active")),u.trigger(r.a.MAPLOADED),console.log("".concat(o,": Map is loaded"))}))}var p,u,d;return p=i,d=[{key:"_jQueryInterface",value:function(){if("undefined"!==typeof c.localStorage)return this.each((function(){var e=t(this),o=e.data(n);o||(o=new i(this),e.data(n,o))}))}}],(u=[{key:"getMap",value:function(){return ui.map}},{key:"dispose",value:function(){var e=this;e.$el=null,t.removeData(e.$el[0],n),e.$el.removeClass("".concat(o,"-active"))}}])&&s(p.prototype,u),d&&s(p,d),i}();t.fn[o]=p._jQueryInterface,t.fn[o].Constructor=p,t.fn[o].noConflict=function(){return t.fn[o]=JQUERY_NO_CONFLICT,p._jQueryInterface},t(c).on("".concat(r.a.AJAX," ").concat(r.a.LOADED),(function(){t(".mapAPI-map-container").jsMapAPI()}))}(n.a)}).call(this,o("jquery"))},"./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/drivers/_map.google.js":function(e,t,o){"use strict";var n=o("jquery"),a=o.n(n),r=o("./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_events.js"),i=o.n(r),s=o("./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/drivers/_map.google.marker.js");function l(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var c,p=(c=a.a,function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}var t,o,n;return t=e,(o=[{key:"getName",value:function(){return"GoogleMapsDriver"}},{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=this,n=window;o.$el=e,o.config=t,o.markers=[],n["init".concat(o.getName())]=function(){o.googleApiLoaded()},c("body").append('<script async defer src="https://maps.googleapis.com/maps/api/js?key='.concat(t.key,"&callback=init").concat(o.getName(),'"><\/script>'))}},{key:"googleApiLoaded",value:function(){var e=this,t=e.$el,o=e.config,n=t.find(".mapAPI-map"),a=o.mapZoom?o.mapZoom:10,r=o.center?{lat:o.center[1],lng:o.center[0]}:{lat:0,lng:0},l=o.style?o.style:null;console.log("".concat(e.getName(),": API is loaded")),e.MarkerUI=s.a.init(c),e.map=new google.maps.Map(n[0],{zoom:a,center:r,fullscreenControl:!0,styles:l}),e.default_zoom=a,n.addClass("mapboxgl-map"),e.popup=new e.MarkerUI({map:e.map,align:["center","top"],divClass:"mapboxgl-popup popup mapboxgl-popup-anchor-bottom d-none",html:'<div class="mapboxgl-popup-tip"></div><div class="mapboxgl-popup-content"><div class="mapboxgl-popup-close-button" type="button" aria-label="Close popup">\xd7</div><div class="html"></div></div>'}),e.geocoder=new google.maps.Geocoder,t.trigger(i.a.MAPAPILOADED)}},{key:"addMarker",value:function(e,t){var o=this,n={lat:e[1],lng:e[0]},a=new o.MarkerUI({position:n,map:o.map,align:["center","top"],html:'<div class="mapboxgl-marker"><div id="Marker'.concat(t.id,'" data-id="').concat(t.id,'" class="marker">').concat(t.icon,"</div></div>"),onClick:function(){var e=c("#Marker".concat(t.id));o.showPopup(n,t.content),e.trigger(i.a.MAPMARKERCLICK)}});return o.markers.push(a),a}},{key:"showPopup",value:function(e,t){var o=this,n=c(o.popup.getDiv());o.config.flyToMarker&&(o.map.setCenter(e),o.config.noZoom||o.map.setZoom(18)),n.css({opacity:"0"}),n.removeClass("d-none"),n.find(".mapboxgl-popup-content .html").html(t),n.find(".mapboxgl-popup-close-button").on("click",(function(e){e.preventDefault(),o.hidePopup()})),o.popup.setPosition(e,["center","top"]),n.css({"margin-top":"-1rem",opacity:"1"})}},{key:"hidePopup",value:function(){var e=this;c(e.popup.getDiv()).addClass("d-none"),e.config.noRestoreBounds&&!e.config.flyToBounds||e.restoreBounds(),e.$el.trigger(i.a.MAPPOPUPCLOSE)}},{key:"geocode",value:function(e,t){var o=this;o.geocoder.geocode({address:e},(function(e,n){if("OK"===n)return"function"===typeof t&&t(e),e;console.error("".concat(o.getName(),": Geocode was not successful for the following reason: ").concat(n))}))}},{key:"reverseGeocode",value:function(e,t){var o=this;o.geocoder.geocode({location:latlng},(function(e,n){if("OK"===n)return"function"===typeof t&&t(e),e;console.error("".concat(o.getName(),": Reverse Geocoding was not successful for the following reason: ").concat(n))}))}},{key:"addGeoJson",value:function(e){var t=this,o=(e.geojson.features[0].geometry.coordinates,new google.maps.LatLngBounds);e.geojson.features.forEach((function(n){var a=n.id,r=n.geometry.coordinates,i=n.properties.content;t.addMarker(r,{id:a,content:i,icon:n.icon,flyToMarker:e.flyToMarker}),o.extend({lat:r[1],lng:r[0]})})),t.markers.length>1?t.map.fitBounds(o,{padding:30}):t.markers[0]&&t.map.setCenter(t.markers[0].getPosition()),t.default_bounds=o,t.default_zoom=t.map.getZoom()}},{key:"getMap",value:function(){return this.map}},{key:"getPopup",value:function(){return this.popup}},{key:"restoreBounds",value:function(){var e=this;e.default_bounds&&e.markers.length>1?e.map.fitBounds(e.default_bounds,{padding:30}):(e.markers[0]&&e.map.setCenter(e.markers[0].getPosition()),e.restoreZoom())}},{key:"restoreZoom",value:function(){this.map.setZoom(this.default_zoom)}}])&&l(t.prototype,o),n&&l(t,n),e}());t.a=p},"./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/drivers/_map.google.marker.js":function(e,t,o){"use strict";(function(e){function o(e){return(o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function n(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function r(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var o,n=l(e);if(t){var a=l(this).constructor;o=Reflect.construct(n,arguments,a)}else o=n.apply(this,arguments);return i(this,o)}}function i(e,t){return!t||"object"!==o(t)&&"function"!==typeof t?s(e):t}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c={init:function(){return function(t){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t)}(p,google.maps.OverlayView);var o,i,l,c=r(p);function p(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p);var o=s(t=c.call(this));return o.setMap(e.map),o.position=e.position,o.html=e.html?e.html:'<div class="mapboxgl-marker"><i class="marker-icon fas fa-map-marker-alt"></i></div>',o.divClass=e.divClass,o.align=e.align,o.isDebugMode=e.debug,o.onClick=e.onClick,o.onMouseOver=e.onMouseOver,o.isBoolean=function(e){return"boolean"===typeof e},o.isNotUndefined=function(e){return"undefined"!==typeof e},o.hasContent=function(e){return e.length>0},o.isString=function(e){return"string"===typeof e},o.isFunction=function(e){return"function"===typeof e},t}return o=p,(i=[{key:"onAdd",value:function(){var e=this;e.div=document.createElement("div"),e.div.style.position="absolute",e.isNotUndefined(e.divClass)&&e.hasContent(e.divClass)&&(e.div.className=e.divClass),e.isNotUndefined(e.html)&&e.hasContent(e.html)&&e.isString(e.html)&&(e.div.innerHTML=e.html),e.isBoolean(e.isDebugMode)&&e.isDebugMode&&(e.div.className="debug-mode",e.div.innerHTML='<div style="height: 10px; width: 10px; background: red; border-radius: 100%;"></div><div style="position: absolute; top: 5px; padding: 5px; width: 130px; text-align: center; font-size: 18px; text-transform: uppercase; font-weight: bolder; background: red; color: white; font-family: Arial;">Debug mode</div>',e.div.setAttribute("style","position: absolute;border: 5px dashed red;height: 150px;width: 150px;display: flex;justify-content: center;align-items: center;")),e.getPanes().overlayMouseTarget.appendChild(e.div),google.maps.event.addDomListener(e.div,"click",(function(t){google.maps.event.trigger(e,"click"),e.isFunction(e.onClick)&&e.onClick(),t.stopPropagation()})),google.maps.event.addDomListener(e.div,"mouseover",(function(t){google.maps.event.trigger(e,"mouseover"),e.isFunction(e.onMouseOver)&&e.onMouseOver(),t.stopPropagation()}))}},{key:"draw",value:function(){var t=this,o=e(t.div).find(".mapboxgl-marker,.marker-pin,.mapboxgl-popup,.popup");o.length||(o=e(t.div));var n=t.getProjection().fromLatLngToDivPixel(new google.maps.LatLng(t.position)),a={y:void 0,x:void 0},r=o.outerWidth(),i=o.outerHeight();switch(Array.isArray(t.align)?t.align.join(" "):""){case"left top":a.y=i,a.x=r;break;case"left center":a.y=i/2,a.x=r;break;case"left bottom":a.y=0,a.x=r;break;case"center top":a.y=i,a.x=r/2;break;case"center center":a.y=i/2,a.x=r/2;break;case"center bottom":a.y=0,a.x=r/2;break;case"right top":a.y=i,a.x=0;break;case"right center":a.y=i/2,a.x=0;break;case"right bottom":a.y=0,a.x=0;break;default:a.y=i/2,a.x=r/2}t.div.style.top="".concat(n.y-a.y,"px"),t.div.style.left="".concat(n.x-a.x,"px")}},{key:"getPosition",value:function(){return this.position}},{key:"getDiv",value:function(){return this.div}},{key:"setPosition",value:function(e,t){var o=this;o.position=e,o.align=t,o.draw()}}])&&n(o.prototype,i),l&&n(o,l),p}()}};t.a=c}).call(this,o("jquery"))},"./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_events.js":function(e,t){e.exports={AJAX:"ajax-load",AJAXMAIN:"ajax-main-load",MAININIT:"main-init",TABHIDDEN:"tab-hidden",TABFOCUSED:"tab-focused",OFFLINE:"offline",ONLINE:"online",BACKONLINE:"back-online",TOUCHENABLE:"touch-enabled",TOUCHDISABLED:"touch-disabled",LOADED:"load",SWIPELEFT:"swipeleft panleft",SWIPERIGHT:"swiperight panright",ALLERTAPPEARED:"alert-appeared",ALERTREMOVED:"alert-removed",LODEDANDREADY:"load-ready",LAZYIMAGEREADY:"image-lazy-bg-loaded",LAZYIMAGESREADY:"images-lazy-loaded",MAPLOADED:"map-loaded",MAPAPILOADED:"map-api-loaded",MAPMARKERCLICK:"map-marker-click",MAPPOPUPCLOSE:"map-popup-close",SCROLL:"scroll",RESIZE:"resize",CAROUSEL_READY:"bs.carousel.ready",SET_TARGET_UPDATE:"set-target-update",RESTORE_FIELD:"restore-field",FORM_INIT_BASICS:"form-basics",FORM_INIT_STEPPED:"form-init-stepped",FORM_INIT_VALIDATE:"form-init-validate",FORM_INIT_VALIDATE_FIELD:"form-init-validate-field",FORM_INIT_STORAGE:"form-init-storage",FORM_VALIDATION_FAILED:"form-validation-failed",FORM_STEPPED_NEW_STEP:"form-new-step",FORM_STEPPED_FIRST_STEP:"form-first-step",FORM_STEPPED_LAST_STEP:"form-last-step",FORM_FIELDS:"input,textarea,select"}},"./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.map.scss":function(e,t,o){},jquery:function(e,t){e.exports=jQuery}});
|
||||
/*! For license information please see app_Site.Controllers.MapElementController.js.LICENSE.txt */
|
||||
!function(){"use strict";var t={3439:function(t){function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}t.exports=function equal(t,r){if(t===r)return!0;if(t&&r&&"object"==_typeof(t)&&"object"==_typeof(r)){if(t.constructor!==r.constructor)return!1;var o,a,i;if(Array.isArray(t)){if((o=t.length)!=r.length)return!1;for(a=o;0!==a--;)if(!equal(t[a],r[a]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if((o=(i=Object.keys(t)).length)!==Object.keys(r).length)return!1;for(a=o;0!==a--;)if(!Object.prototype.hasOwnProperty.call(r,i[a]))return!1;for(a=o;0!==a--;){var l=i[a];if(!equal(t[l],r[l]))return!1}return!0}return t!==t&&r!==r}}},r={};function __webpack_require__(o){var a=r[o];if(void 0!==a)return a.exports;var i=r[o]={exports:{}};return t[o](i,i.exports,__webpack_require__),i.exports}__webpack_require__.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return __webpack_require__.d(r,{a:r}),r},__webpack_require__.d=function(t,r){for(var o in r)__webpack_require__.o(r,o)&&!__webpack_require__.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},__webpack_require__.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},function(){var t="ajax-load",r="load-ready",o="map-loaded",a="map-api-loaded",i="map-marker-click",l="map-popup-close",u=__webpack_require__(3439),c=__webpack_require__.n(u);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _slicedToArray(t,r){return function _arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function _iterableToArrayLimit(t,r){var o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var a,i,l,u,c=[],p=!0,m=!1;try{if(l=(o=o.call(t)).next,0===r){if(Object(o)!==o)return;p=!1}else for(;!(p=(a=l.call(o)).done)&&(c.push(a.value),c.length!==r);p=!0);}catch(t){m=!0,i=t}finally{try{if(!p&&null!=o.return&&(u=o.return(),Object(u)!==u))return}finally{if(m)throw i}}return c}}(t,r)||function _unsupportedIterableToArray(t,r){if(!t)return;if("string"===typeof t)return _arrayLikeToArray(t,r);var o=Object.prototype.toString.call(t).slice(8,-1);"Object"===o&&t.constructor&&(o=t.constructor.name);if("Map"===o||"Set"===o)return Array.from(t);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return _arrayLikeToArray(t,r)}(t,r)||function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var o=0,a=new Array(r);o<r;o++)a[o]=t[o];return a}function _defineProperties(t,r){for(var o=0;o<r.length;o++){var a=r[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,_toPropertyKey(a.key),a)}}function _toPropertyKey(t){var r=function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var a=o.call(t,r||"default");if("object"!=_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==_typeof(r)?r:r+""}var p=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],m=function(){function KDBush(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:64,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Float64Array,a=arguments.length>3?arguments[3]:void 0;if(function _classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,KDBush),isNaN(t)||t<0)throw new Error("Unpexpected numItems value: ".concat(t,"."));this.numItems=+t,this.nodeSize=Math.min(Math.max(+r,2),65535),this.ArrayType=o,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;var i=p.indexOf(this.ArrayType),l=2*t*this.ArrayType.BYTES_PER_ELEMENT,u=t*this.IndexArrayType.BYTES_PER_ELEMENT,c=(8-u%8)%8;if(i<0)throw new Error("Unexpected typed array class: ".concat(o,"."));a&&a instanceof ArrayBuffer?(this.data=a,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+u+c,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+l+u+c),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+u+c,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+i]),new Uint16Array(this.data,2,1)[0]=r,new Uint32Array(this.data,4,1)[0]=t)}return function _createClass(t,r,o){return r&&_defineProperties(t.prototype,r),o&&_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}(KDBush,[{key:"add",value:function add(t,r){var o=this._pos>>1;return this.ids[o]=o,this.coords[this._pos++]=t,this.coords[this._pos++]=r,o}},{key:"finish",value:function finish(){var t=this._pos>>1;if(t!==this.numItems)throw new Error("Added ".concat(t," items when expected ").concat(this.numItems,"."));return sort(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}},{key:"range",value:function range(t,r,o,a){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");for(var i=this.ids,l=this.coords,u=this.nodeSize,c=[0,i.length-1,0],p=[];c.length;){var m=c.pop()||0,d=c.pop()||0,y=c.pop()||0;if(d-y<=u)for(var h=y;h<=d;h++){var g=l[2*h],v=l[2*h+1];g>=t&&g<=o&&v>=r&&v<=a&&p.push(i[h])}else{var _=y+d>>1,b=l[2*_],k=l[2*_+1];b>=t&&b<=o&&k>=r&&k<=a&&p.push(i[_]),(0===m?t<=b:r<=k)&&(c.push(y),c.push(_-1),c.push(1-m)),(0===m?o>=b:a>=k)&&(c.push(_+1),c.push(d),c.push(1-m))}}return p}},{key:"within",value:function within(t,r,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");for(var a=this.ids,i=this.coords,l=this.nodeSize,u=[0,a.length-1,0],c=[],p=o*o;u.length;){var m=u.pop()||0,d=u.pop()||0,y=u.pop()||0;if(d-y<=l)for(var h=y;h<=d;h++)sqDist(i[2*h],i[2*h+1],t,r)<=p&&c.push(a[h]);else{var g=y+d>>1,v=i[2*g],_=i[2*g+1];sqDist(v,_,t,r)<=p&&c.push(a[g]),(0===m?t-o<=v:r-o<=_)&&(u.push(y),u.push(g-1),u.push(1-m)),(0===m?t+o>=v:r+o>=_)&&(u.push(g+1),u.push(d),u.push(1-m))}}return c}}],[{key:"from",value:function from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");var r=_slicedToArray(new Uint8Array(t,0,2),2),o=r[0],a=r[1];if(219!==o)throw new Error("Data does not appear to be in a KDBush format.");var i=a>>4;if(1!==i)throw new Error("Got v".concat(i," data when expected v").concat(1,"."));var l=p[15&a];if(!l)throw new Error("Unrecognized array type.");var u=_slicedToArray(new Uint16Array(t,2,1),1)[0];return new KDBush(_slicedToArray(new Uint32Array(t,4,1),1)[0],u,l,t)}}])}();function sort(t,r,o,a,i,l){if(!(i-a<=o)){var u=a+i>>1;kdbush_select(t,r,u,a,i,l),sort(t,r,o,a,u-1,1-l),sort(t,r,o,u+1,i,1-l)}}function kdbush_select(t,r,o,a,i,l){for(;i>a;){if(i-a>600){var u=i-a+1,c=o-a+1,p=Math.log(u),m=.5*Math.exp(2*p/3),d=.5*Math.sqrt(p*m*(u-m)/u)*(c-u/2<0?-1:1);kdbush_select(t,r,o,Math.max(a,Math.floor(o-c*m/u+d)),Math.min(i,Math.floor(o+(u-c)*m/u+d)),l)}var y=r[2*o+l],h=a,g=i;for(swapItem(t,r,a,o),r[2*i+l]>y&&swapItem(t,r,a,i);h<g;){for(swapItem(t,r,h,g),h++,g--;r[2*h+l]<y;)h++;for(;r[2*g+l]>y;)g--}r[2*a+l]===y?swapItem(t,r,a,g):swapItem(t,r,++g,i),g<=o&&(a=g+1),o<=g&&(i=g-1)}}function swapItem(t,r,o,a){swap(t,o,a),swap(r,2*o,2*a),swap(r,2*o+1,2*a+1)}function swap(t,r,o){var a=t[r];t[r]=t[o],t[o]=a}function sqDist(t,r,o,a){var i=t-o,l=r-a;return i*i+l*l}function supercluster_typeof(t){return supercluster_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},supercluster_typeof(t)}function _createForOfIteratorHelper(t,r){var o="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!o){if(Array.isArray(t)||(o=supercluster_unsupportedIterableToArray(t))||r&&t&&"number"===typeof t.length){o&&(t=o);var a=0,i=function F(){};return{s:i,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){o=o.call(t)},n:function n(){var t=o.next();return u=t.done,t},e:function e(t){c=!0,l=t},f:function f(){try{u||null==o.return||o.return()}finally{if(c)throw l}}}}function supercluster_slicedToArray(t,r){return function supercluster_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function supercluster_iterableToArrayLimit(t,r){var o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var a,i,l,u,c=[],p=!0,m=!1;try{if(l=(o=o.call(t)).next,0===r){if(Object(o)!==o)return;p=!1}else for(;!(p=(a=l.call(o)).done)&&(c.push(a.value),c.length!==r);p=!0);}catch(t){m=!0,i=t}finally{try{if(!p&&null!=o.return&&(u=o.return(),Object(u)!==u))return}finally{if(m)throw i}}return c}}(t,r)||supercluster_unsupportedIterableToArray(t,r)||function supercluster_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function supercluster_unsupportedIterableToArray(t,r){if(t){if("string"===typeof t)return supercluster_arrayLikeToArray(t,r);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?supercluster_arrayLikeToArray(t,r):void 0}}function supercluster_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var o=0,a=new Array(r);o<r;o++)a[o]=t[o];return a}function supercluster_defineProperties(t,r){for(var o=0;o<r.length;o++){var a=r[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,supercluster_toPropertyKey(a.key),a)}}function supercluster_toPropertyKey(t){var r=function supercluster_toPrimitive(t,r){if("object"!=supercluster_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var a=o.call(t,r||"default");if("object"!=supercluster_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==supercluster_typeof(r)?r:r+""}var d,y={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function map(t){return t}},h=Math.fround||(d=new Float32Array(1),function(t){return d[0]=+t,d[0]}),g=3,v=5,_=6,b=function(){return function supercluster_createClass(t,r,o){return r&&supercluster_defineProperties(t.prototype,r),o&&supercluster_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}((function Supercluster(t){!function supercluster_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,Supercluster),this.options=Object.assign(Object.create(y),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}),[{key:"load",value:function load(t){var r=this.options,o=r.log,a=r.minZoom,i=r.maxZoom;o&&console.time("total time");var l="prepare ".concat(t.length," points");o&&console.time(l),this.points=t;for(var u=[],c=0;c<t.length;c++){var p=t[c];if(p.geometry){var m=supercluster_slicedToArray(p.geometry.coordinates,2),d=m[0],y=m[1],g=h(lngX(d)),v=h(latY(y));u.push(g,v,1/0,c,-1,1),this.options.reduce&&u.push(0)}}var _=this.trees[i+1]=this._createTree(u);o&&console.timeEnd(l);for(var b=i;b>=a;b--){var k=+Date.now();_=this.trees[b]=this._createTree(this._cluster(_,b)),o&&console.log("z%d: %d clusters in %dms",b,_.numItems,+Date.now()-k)}return o&&console.timeEnd("total time"),this}},{key:"getClusters",value:function getClusters(t,r){var o=((t[0]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,t[1])),i=180===t[2]?180:((t[2]+180)%360+360)%360-180,l=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)o=-180,i=180;else if(o>i){var u=this.getClusters([o,a,180,l],r),c=this.getClusters([-180,a,i,l],r);return u.concat(c)}var p,m=this.trees[this._limitZoom(r)],d=m.range(lngX(o),latY(l),lngX(i),latY(a)),y=m.data,h=[],_=_createForOfIteratorHelper(d);try{for(_.s();!(p=_.n()).done;){var b=p.value,k=this.stride*b;h.push(y[k+v]>1?getClusterJSON(y,k,this.clusterProps):this.points[y[k+g]])}}catch(w){_.e(w)}finally{_.f()}return h}},{key:"getChildren",value:function getChildren(t){var r=this._getOriginId(t),o=this._getOriginZoom(t),a="No cluster with the specified id.",i=this.trees[o];if(!i)throw new Error(a);var l=i.data;if(r*this.stride>=l.length)throw new Error(a);var u,c=this.options.radius/(this.options.extent*Math.pow(2,o-1)),p=l[r*this.stride],m=l[r*this.stride+1],d=[],y=_createForOfIteratorHelper(i.within(p,m,c));try{for(y.s();!(u=y.n()).done;){var h=u.value*this.stride;l[h+4]===t&&d.push(l[h+v]>1?getClusterJSON(l,h,this.clusterProps):this.points[l[h+g]])}}catch(_){y.e(_)}finally{y.f()}if(0===d.length)throw new Error(a);return d}},{key:"getLeaves",value:function getLeaves(t,r,o){r=r||10,o=o||0;var a=[];return this._appendLeaves(a,t,r,o,0),a}},{key:"getTile",value:function getTile(t,r,o){var a=this.trees[this._limitZoom(t)],i=Math.pow(2,t),l=this.options,u=l.extent,c=l.radius/u,p=(o-c)/i,m=(o+1+c)/i,d={features:[]};return this._addTileFeatures(a.range((r-c)/i,p,(r+1+c)/i,m),a.data,r,o,i,d),0===r&&this._addTileFeatures(a.range(1-c/i,p,1,m),a.data,i,o,i,d),r===i-1&&this._addTileFeatures(a.range(0,p,c/i,m),a.data,-1,o,i,d),d.features.length?d:null}},{key:"getClusterExpansionZoom",value:function getClusterExpansionZoom(t){for(var r=this._getOriginZoom(t)-1;r<=this.options.maxZoom;){var o=this.getChildren(t);if(r++,1!==o.length)break;t=o[0].properties.cluster_id}return r}},{key:"_appendLeaves",value:function _appendLeaves(t,r,o,a,i){var l,u=_createForOfIteratorHelper(this.getChildren(r));try{for(u.s();!(l=u.n()).done;){var c=l.value,p=c.properties;if(p&&p.cluster?i+p.point_count<=a?i+=p.point_count:i=this._appendLeaves(t,p.cluster_id,o,a,i):i<a?i++:t.push(c),t.length===o)break}}catch(m){u.e(m)}finally{u.f()}return i}},{key:"_createTree",value:function _createTree(t){for(var r=new m(t.length/this.stride|0,this.options.nodeSize,Float32Array),o=0;o<t.length;o+=this.stride)r.add(t[o],t[o+1]);return r.finish(),r.data=t,r}},{key:"_addTileFeatures",value:function _addTileFeatures(t,r,o,a,i,l){var u,c=_createForOfIteratorHelper(t);try{for(c.s();!(u=c.n()).done;){var p=u.value*this.stride,m=r[p+v]>1,d=void 0,y=void 0,h=void 0;if(m)d=getClusterProperties(r,p,this.clusterProps),y=r[p],h=r[p+1];else{var _=this.points[r[p+g]];d=_.properties;var b=supercluster_slicedToArray(_.geometry.coordinates,2),k=b[0],w=b[1];y=lngX(k),h=latY(w)}var x={type:1,geometry:[[Math.round(this.options.extent*(y*i-o)),Math.round(this.options.extent*(h*i-a))]],tags:d},P=void 0;void 0!==(P=m||this.options.generateId?r[p+g]:this.points[r[p+g]].id)&&(x.id=P),l.features.push(x)}}catch(C){c.e(C)}finally{c.f()}}},{key:"_limitZoom",value:function _limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}},{key:"_cluster",value:function _cluster(t,r){for(var o=this.options,a=o.radius,i=o.extent,l=o.reduce,u=o.minPoints,c=a/(i*Math.pow(2,r)),p=t.data,m=[],d=this.stride,y=0;y<p.length;y+=d)if(!(p[y+2]<=r)){p[y+2]=r;var h,g=p[y],_=p[y+1],b=t.within(p[y],p[y+1],c),k=p[y+v],w=k,x=_createForOfIteratorHelper(b);try{for(x.s();!(h=x.n()).done;){var P=h.value*d;p[P+2]>r&&(w+=p[P+v])}}catch(U){x.e(U)}finally{x.f()}if(w>k&&w>=u){var C,M=g*k,O=_*k,A=void 0,S=-1,E=(y/d<<5)+(r+1)+this.points.length,T=_createForOfIteratorHelper(b);try{for(T.s();!(C=T.n()).done;){var j=C.value*d;if(!(p[j+2]<=r)){p[j+2]=r;var I=p[j+v];M+=p[j]*I,O+=p[j+1]*I,p[j+4]=E,l&&(A||(A=this._map(p,y,!0),S=this.clusterProps.length,this.clusterProps.push(A)),l(A,this._map(p,j)))}}}catch(U){T.e(U)}finally{T.f()}p[y+4]=E,m.push(M/w,O/w,1/0,E,-1,w),l&&m.push(S)}else{for(var L=0;L<d;L++)m.push(p[y+L]);if(w>1){var N,Z=_createForOfIteratorHelper(b);try{for(Z.s();!(N=Z.n()).done;){var D=N.value*d;if(!(p[D+2]<=r)){p[D+2]=r;for(var R=0;R<d;R++)m.push(p[D+R])}}}catch(U){Z.e(U)}finally{Z.f()}}}}return m}},{key:"_getOriginId",value:function _getOriginId(t){return t-this.points.length>>5}},{key:"_getOriginZoom",value:function _getOriginZoom(t){return(t-this.points.length)%32}},{key:"_map",value:function _map(t,r,o){if(t[r+v]>1){var a=this.clusterProps[t[r+_]];return o?Object.assign({},a):a}var i=this.points[t[r+g]].properties,l=this.options.map(i);return o&&l===i?Object.assign({},l):l}}])}();function getClusterJSON(t,r,o){return{type:"Feature",id:t[r+g],properties:getClusterProperties(t,r,o),geometry:{type:"Point",coordinates:[(l=t[r],360*(l-.5)),(a=t[r+1],i=(180-360*a)*Math.PI/180,360*Math.atan(Math.exp(i))/Math.PI-90)]}};var a,i,l}function getClusterProperties(t,r,o){var a=t[r+v],i=a>=1e4?"".concat(Math.round(a/1e3),"k"):a>=1e3?"".concat(Math.round(a/100)/10,"k"):a,l=t[r+_],u=-1===l?{}:Object.assign({},o[l]);return Object.assign(u,{cluster:!0,cluster_id:t[r+g],point_count:a,point_count_abbreviated:i})}function lngX(t){return t/360+.5}function latY(t){var r=Math.sin(t*Math.PI/180),o=.5-.25*Math.log((1+r)/(1-r))/Math.PI;return o<0?0:o>1?1:o}function index_esm_slicedToArray(t,r){return function index_esm_arrayWithHoles(t){if(Array.isArray(t))return t}(t)||function index_esm_iterableToArrayLimit(t,r){var o=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=o){var a,i,l,u,c=[],p=!0,m=!1;try{if(l=(o=o.call(t)).next,0===r){if(Object(o)!==o)return;p=!1}else for(;!(p=(a=l.call(o)).done)&&(c.push(a.value),c.length!==r);p=!0);}catch(t){m=!0,i=t}finally{try{if(!p&&null!=o.return&&(u=o.return(),Object(u)!==u))return}finally{if(m)throw i}}return c}}(t,r)||index_esm_unsupportedIterableToArray(t,r)||function index_esm_nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _toConsumableArray(t){return function _arrayWithoutHoles(t){if(Array.isArray(t))return index_esm_arrayLikeToArray(t)}(t)||function _iterableToArray(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||index_esm_unsupportedIterableToArray(t)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _callSuper(t,r,o){return r=_getPrototypeOf(r),function _possibleConstructorReturn(t,r){if(r&&("object"===index_esm_typeof(r)||"function"===typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,_isNativeReflectConstruct()?Reflect.construct(r,o||[],_getPrototypeOf(t).constructor):r.apply(t,o))}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t})()}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},_getPrototypeOf(t)}function _inherits(t,r){if("function"!==typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&_setPrototypeOf(t,r)}function _setPrototypeOf(t,r){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){return t.__proto__=r,t},_setPrototypeOf(t,r)}function index_esm_createForOfIteratorHelper(t,r){var o="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!o){if(Array.isArray(t)||(o=index_esm_unsupportedIterableToArray(t))||r&&t&&"number"===typeof t.length){o&&(t=o);var a=0,i=function F(){};return{s:i,n:function n(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function e(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,u=!0,c=!1;return{s:function s(){o=o.call(t)},n:function n(){var t=o.next();return u=t.done,t},e:function e(t){c=!0,l=t},f:function f(){try{u||null==o.return||o.return()}finally{if(c)throw l}}}}function index_esm_unsupportedIterableToArray(t,r){if(t){if("string"===typeof t)return index_esm_arrayLikeToArray(t,r);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?index_esm_arrayLikeToArray(t,r):void 0}}function index_esm_arrayLikeToArray(t,r){(null==r||r>t.length)&&(r=t.length);for(var o=0,a=new Array(r);o<r;o++)a[o]=t[o];return a}function index_esm_typeof(t){return index_esm_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},index_esm_typeof(t)}function index_esm_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function index_esm_defineProperties(t,r){for(var o=0;o<r.length;o++){var a=r[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,index_esm_toPropertyKey(a.key),a)}}function index_esm_createClass(t,r,o){return r&&index_esm_defineProperties(t.prototype,r),o&&index_esm_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}function index_esm_toPropertyKey(t){var r=function index_esm_toPrimitive(t,r){if("object"!=index_esm_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var a=o.call(t,r||"default");if("object"!=index_esm_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==index_esm_typeof(r)?r:r+""}function __rest(t,r){var o={};for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&r.indexOf(a)<0&&(o[a]=t[a]);if(null!=t&&"function"===typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(t);i<a.length;i++)r.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(t,a[i])&&(o[a[i]]=t[a[i]])}return o}var k=function(){return index_esm_createClass((function MarkerUtils(){index_esm_classCallCheck(this,MarkerUtils)}),null,[{key:"isAdvancedMarkerAvailable",value:function isAdvancedMarkerAvailable(t){return google.maps.marker&&!0===t.getMapCapabilities().isAdvancedMarkersAvailable}},{key:"isAdvancedMarker",value:function isAdvancedMarker(t){return google.maps.marker&&t instanceof google.maps.marker.AdvancedMarkerElement}},{key:"setMap",value:function setMap(t,r){this.isAdvancedMarker(t)?t.map=r:t.setMap(r)}},{key:"getPosition",value:function getPosition(t){if(this.isAdvancedMarker(t)){if(t.position){if(t.position instanceof google.maps.LatLng)return t.position;if(t.position.lat&&t.position.lng)return new google.maps.LatLng(t.position.lat,t.position.lng)}return new google.maps.LatLng(null)}return t.getPosition()}},{key:"getVisible",value:function getVisible(t){return!!this.isAdvancedMarker(t)||t.getVisible()}}])}(),w=function(){return index_esm_createClass((function Cluster(t){var r=t.markers,o=t.position;index_esm_classCallCheck(this,Cluster),this.markers=r,o&&(o instanceof google.maps.LatLng?this._position=o:this._position=new google.maps.LatLng(o))}),[{key:"bounds",get:function get(){if(0!==this.markers.length||this._position){var t,r=new google.maps.LatLngBounds(this._position,this._position),o=index_esm_createForOfIteratorHelper(this.markers);try{for(o.s();!(t=o.n()).done;){var a=t.value;r.extend(k.getPosition(a))}}catch(i){o.e(i)}finally{o.f()}return r}}},{key:"position",get:function get(){return this._position||this.bounds.getCenter()}},{key:"count",get:function get(){return this.markers.filter((function(t){return k.getVisible(t)})).length}},{key:"push",value:function push(t){this.markers.push(t)}},{key:"delete",value:function _delete(){this.marker&&(k.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}])}(),x=function(){return index_esm_createClass((function AbstractAlgorithm(t){var r=t.maxZoom,o=void 0===r?16:r;index_esm_classCallCheck(this,AbstractAlgorithm),this.maxZoom=o}),[{key:"noop",value:function noop(t){var r=t.markers;return P(r)}}])}(),P=function _noop(t){return t.map((function(t){return new w({position:k.getPosition(t),markers:[t]})}))},C=function(t){function SuperClusterAlgorithm(t){var r;index_esm_classCallCheck(this,SuperClusterAlgorithm);var o=t.maxZoom,a=t.radius,i=void 0===a?60:a,l=__rest(t,["maxZoom","radius"]);return(r=_callSuper(this,SuperClusterAlgorithm,[{maxZoom:o}])).state={zoom:-1},r.superCluster=new b(Object.assign({maxZoom:r.maxZoom,radius:i},l)),r}return _inherits(SuperClusterAlgorithm,t),index_esm_createClass(SuperClusterAlgorithm,[{key:"calculate",value:function calculate(t){var r=!1,o={zoom:t.map.getZoom()};if(!c()(t.markers,this.markers)){r=!0,this.markers=_toConsumableArray(t.markers);var a=this.markers.map((function(t){var r=k.getPosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[r.lng(),r.lat()]},properties:{marker:t}}}));this.superCluster.load(a)}return r||(this.state.zoom<=this.maxZoom||o.zoom<=this.maxZoom)&&(r=!c()(this.state,o)),this.state=o,r&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:r}}},{key:"cluster",value:function cluster(t){var r=this,o=t.map;return this.superCluster.getClusters([-180,-90,180,90],Math.round(o.getZoom())).map((function(t){return r.transformCluster(t)}))}},{key:"transformCluster",value:function transformCluster(t){var r=index_esm_slicedToArray(t.geometry.coordinates,2),o=r[0],a=r[1],i=t.properties;if(i.cluster)return new w({markers:this.superCluster.getLeaves(i.cluster_id,1/0).map((function(t){return t.properties.marker})),position:{lat:a,lng:o}});var l=i.marker;return new w({markers:[l],position:k.getPosition(l)})}}])}(x),M=index_esm_createClass((function ClusterStats(t,r){index_esm_classCallCheck(this,ClusterStats),this.markers={sum:t.length};var o=r.map((function(t){return t.count})),a=o.reduce((function(t,r){return t+r}),0);this.clusters={count:r.length,markers:{mean:a/r.length,sum:a,min:Math.min.apply(Math,_toConsumableArray(o)),max:Math.max.apply(Math,_toConsumableArray(o))}}})),O=function(){return index_esm_createClass((function DefaultRenderer(){index_esm_classCallCheck(this,DefaultRenderer)}),[{key:"render",value:function render(t,r,o){var a=t.count,i=t.position,l=a>Math.max(10,r.clusters.markers.mean)?"#ff0000":"#0000ff",u='<svg fill="'.concat(l,'" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">\n<circle cx="120" cy="120" opacity=".6" r="70" />\n<circle cx="120" cy="120" opacity=".3" r="90" />\n<circle cx="120" cy="120" opacity=".2" r="110" />\n<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">').concat(a,"</text>\n</svg>"),c="Cluster of ".concat(a," markers"),p=Number(google.maps.Marker.MAX_ZINDEX)+a;if(k.isAdvancedMarkerAvailable(o)){var m=(new DOMParser).parseFromString(u,"image/svg+xml").documentElement;m.setAttribute("transform","translate(0 25)");var d={map:o,position:i,zIndex:p,title:c,content:m};return new google.maps.marker.AdvancedMarkerElement(d)}var y={position:i,zIndex:p,title:c,icon:{url:"data:image/svg+xml;base64,".concat(btoa(u)),anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(y)}}])}();var A,S=index_esm_createClass((function OverlayViewSafe(){index_esm_classCallCheck(this,OverlayViewSafe),function extend(t,r){for(var o in r.prototype)t.prototype[o]=r.prototype[o]}(OverlayViewSafe,google.maps.OverlayView)}));!function(t){t.CLUSTERING_BEGIN="clusteringbegin",t.CLUSTERING_END="clusteringend",t.CLUSTER_CLICK="click"}(A||(A={}));var E=function defaultOnClusterClickHandler(t,r,o){o.fitBounds(r.bounds)},T=function(t){function MarkerClusterer(t){var r,o=t.map,a=t.markers,i=void 0===a?[]:a,l=t.algorithmOptions,u=void 0===l?{}:l,c=t.algorithm,p=void 0===c?new C(u):c,m=t.renderer,d=void 0===m?new O:m,y=t.onClusterClick,h=void 0===y?E:y;return index_esm_classCallCheck(this,MarkerClusterer),(r=_callSuper(this,MarkerClusterer)).markers=_toConsumableArray(i),r.clusters=[],r.algorithm=p,r.renderer=d,r.onClusterClick=h,o&&r.setMap(o),r}return _inherits(MarkerClusterer,t),index_esm_createClass(MarkerClusterer,[{key:"addMarker",value:function addMarker(t,r){this.markers.includes(t)||(this.markers.push(t),r||this.render())}},{key:"addMarkers",value:function addMarkers(t,r){var o=this;t.forEach((function(t){o.addMarker(t,!0)})),r||this.render()}},{key:"removeMarker",value:function removeMarker(t,r){var o=this.markers.indexOf(t);return-1!==o&&(k.setMap(t,null),this.markers.splice(o,1),r||this.render(),!0)}},{key:"removeMarkers",value:function removeMarkers(t,r){var o=this,a=!1;return t.forEach((function(t){a=o.removeMarker(t,!0)||a})),a&&!r&&this.render(),a}},{key:"clearMarkers",value:function clearMarkers(t){this.markers.length=0,t||this.render()}},{key:"render",value:function render(){var t=this.getMap();if(t instanceof google.maps.Map&&t.getProjection()){google.maps.event.trigger(this,A.CLUSTERING_BEGIN,this);var r=this.algorithm.calculate({markers:this.markers,map:t,mapCanvasProjection:this.getProjection()}),o=r.clusters,a=r.changed;if(a||void 0==a){var i,l=new Set,u=index_esm_createForOfIteratorHelper(o);try{for(u.s();!(i=u.n()).done;){var c=i.value;1==c.markers.length&&l.add(c.markers[0])}}catch(h){u.e(h)}finally{u.f()}var p,m=[],d=index_esm_createForOfIteratorHelper(this.clusters);try{for(d.s();!(p=d.n()).done;){var y=p.value;null!=y.marker&&(1==y.markers.length?l.has(y.marker)||k.setMap(y.marker,null):m.push(y.marker))}}catch(h){d.e(h)}finally{d.f()}this.clusters=o,this.renderClusters(),requestAnimationFrame((function(){return m.forEach((function(t){return k.setMap(t,null)}))}))}google.maps.event.trigger(this,A.CLUSTERING_END,this)}}},{key:"onAdd",value:function onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}},{key:"onRemove",value:function onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}},{key:"reset",value:function reset(){this.markers.forEach((function(t){return k.setMap(t,null)})),this.clusters.forEach((function(t){return t.delete()})),this.clusters=[]}},{key:"renderClusters",value:function renderClusters(){var t=this,r=new M(this.markers,this.clusters),o=this.getMap();this.clusters.forEach((function(a){1===a.markers.length?a.marker=a.markers[0]:(a.marker=t.renderer.render(a,r,o),a.markers.forEach((function(t){return k.setMap(t,null)})),t.onClusterClick&&a.marker.addListener("click",(function(r){google.maps.event.trigger(t,A.CLUSTER_CLICK,a),t.onClusterClick(r,a,o)}))),k.setMap(a.marker,o)}))}}])}(S);function map_google_marker_typeof(t){return map_google_marker_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},map_google_marker_typeof(t)}function map_google_marker_defineProperties(t,r){for(var o=0;o<r.length;o++){var a=r[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,map_google_marker_toPropertyKey(a.key),a)}}function map_google_marker_toPropertyKey(t){var r=function map_google_marker_toPrimitive(t,r){if("object"!=map_google_marker_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var a=o.call(t,r||"default");if("object"!=map_google_marker_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==map_google_marker_typeof(r)?r:r+""}function map_google_marker_callSuper(t,r,o){return r=map_google_marker_getPrototypeOf(r),function map_google_marker_possibleConstructorReturn(t,r){if(r&&("object"===map_google_marker_typeof(r)||"function"===typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function map_google_marker_assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,map_google_marker_isNativeReflectConstruct()?Reflect.construct(r,o||[],map_google_marker_getPrototypeOf(t).constructor):r.apply(t,o))}function map_google_marker_isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(map_google_marker_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t})()}function map_google_marker_getPrototypeOf(t){return map_google_marker_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(t){return t.__proto__||Object.getPrototypeOf(t)},map_google_marker_getPrototypeOf(t)}function map_google_marker_setPrototypeOf(t,r){return map_google_marker_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(t,r){return t.__proto__=r,t},map_google_marker_setPrototypeOf(t,r)}var j={init:function init(){return function(t){function GoogleMapsHtmlOverlay(t){var r;!function map_google_marker_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,GoogleMapsHtmlOverlay);var o=r=map_google_marker_callSuper(this,GoogleMapsHtmlOverlay);return o.ownerMap=t.map,o.position=t.position,o.html=t.html?t.html:'<div class="mapboxgl-marker"><i class="marker-icon fas fa-map-marker-alt"></i></div>',o.divClass=t.divClass,o.align=t.align,o.isDebugMode=t.debug,o.onClick=t.onClick,o.onMouseOver=t.onMouseOver,o.isBoolean=function(t){return"boolean"===typeof t},o.isNotUndefined=function(t){return"undefined"!==typeof t},o.hasContent=function(t){return t.length>0},o.isString=function(t){return"string"===typeof t},o.isFunction=function(t){return"function"===typeof t},r}return function map_google_marker_inherits(t,r){if("function"!==typeof r&&null!==r)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),r&&map_google_marker_setPrototypeOf(t,r)}(GoogleMapsHtmlOverlay,window.google.maps.OverlayView),function map_google_marker_createClass(t,r,o){return r&&map_google_marker_defineProperties(t.prototype,r),o&&map_google_marker_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}(GoogleMapsHtmlOverlay,[{key:"onAdd",value:function onAdd(){var t=this;t.div=document.createElement("div"),t.div.style.position="absolute",t.isNotUndefined(t.divClass)&&t.hasContent(t.divClass)&&(t.div.className=t.divClass),t.isNotUndefined(t.html)&&t.hasContent(t.html)&&t.isString(t.html)&&(t.div.innerHTML=t.html),t.isBoolean(t.isDebugMode)&&t.isDebugMode&&(t.div.className="debug-mode",t.div.innerHTML='<div style="height: 10px; width: 10px; background: red; border-radius: 100%;"></div><div style="position: absolute; top: 5px; padding: 5px; width: 130px; text-align: center; font-size: 18px; text-transform: uppercase; font-weight: bolder; background: red; color: white; font-family: Arial;">Debug mode</div>',t.div.setAttribute("style","position: absolute;border: 5px dashed red;height: 150px;width: 150px;display: flex;justify-content: center;align-items: center;")),t.getPanes().overlayMouseTarget.appendChild(t.div),t.div.addEventListener("click",(function(r){window.google.maps.event.trigger(t,"click"),t.isFunction(t.onClick)&&t.onClick(),r.stopPropagation()})),t.div.addEventListener("mouseover",(function(r){window.google.maps.event.trigger(t,"mouseover"),t.isFunction(t.onMouseOver)&&t.onMouseOver(),r.stopPropagation()}))}},{key:"draw",value:function draw(){var t=this,r=document.querySelector(".popup");r.length||(r=t.div);var o=t.getProjection();if(!o)return console.log("GoogleMapsHtmlOverlay: current map is missing"),null;var a=o.fromLatLngToDivPixel(t.getPosition()),i={y:void 0,x:void 0},l=r.offsetWidth,u=r.offsetHeight;switch(Array.isArray(t.align)?t.align.join(" "):""){case"left top":i.y=u,i.x=l;break;case"left center":i.y=u/2,i.x=l;break;case"left bottom":i.y=0,i.x=l;break;case"center top":i.y=u,i.x=l/2;break;case"center center":default:i.y=u/2,i.x=l/2;break;case"center bottom":i.y=0,i.x=l/2;break;case"right top":i.y=u,i.x=0;break;case"right center":i.y=u/2,i.x=0;break;case"right bottom":i.y=0,i.x=0}t.div.style.top="".concat(a.y-i.y,"px"),t.div.style.left="".concat(a.x-i.x,"px")}},{key:"getPosition",value:function getPosition(){return new window.google.maps.LatLng(this.position)}},{key:"getDiv",value:function getDiv(){return this.div}},{key:"setPosition",value:function setPosition(t,r){var o=this;o.position=t,o.align=r,o.draw()}},{key:"remove",value:function remove(){this.setMap(null),this.div.remove()}},{key:"getDraggable",value:function getDraggable(){return!1}}])}()}};function map_google_typeof(t){return map_google_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},map_google_typeof(t)}function map_google_defineProperties(t,r){for(var o=0;o<r.length;o++){var a=r[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,map_google_toPropertyKey(a.key),a)}}function map_google_toPropertyKey(t){var r=function map_google_toPrimitive(t,r){if("object"!=map_google_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var a=o.call(t,r||"default");if("object"!=map_google_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==map_google_typeof(r)?r:r+""}var I=function(t){var r=function(){return function map_google_createClass(t,r,o){return r&&map_google_defineProperties(t.prototype,r),o&&map_google_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}((function GoogleMapsDriver(){!function map_google_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,GoogleMapsDriver)}),[{key:"getName",value:function getName(){return"GoogleMapsDriver"}},{key:"init",value:function init(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],a=this;a.el=r,a.config=o,a.markers=[],t["init".concat(a.getName())]=function(){a.googleApiLoaded()};var i=document.createElement("script");i.src="https://maps.googleapis.com/maps/api/js?key=".concat(o.key,"&callback=init").concat(a.getName()),i.async=!0,i.defer=!0,document.head.appendChild(i)}},{key:"googleApiLoaded",value:function googleApiLoaded(){var r=this,o=r.el,i=r.config,l=o.querySelector(".mapAPI-map"),u=i.mapZoom&&"0"!==i.mapZoom?parseInt(i.mapZoom):10,c=i.center&&","!==i.center?{lat:i.center[1],lng:i.center[0]}:{lat:0,lng:0},p=i.style?i.style:null;console.log("".concat(r.getName(),": API is loaded")),r.MarkerUI=j.init(),r.map=new t.google.maps.Map(l,{zoom:u,center:c,fullscreenControl:!0,styles:p}),r.default_zoom=u,l.classList.add("mapboxgl-map"),r.popup=new r.MarkerUI({map:r.map,align:["center","top"],divClass:"mapboxgl-popup popup mapboxgl-popup-anchor-bottom d-none",html:'<div class="mapboxgl-popup-tip"></div><div class="mapboxgl-popup-content"><div class="mapboxgl-popup-close-button" type="button" aria-label="Close popup">\xd7</div><div class="html"></div></div>'}),r.popup.setMap(r.map),r.geocoder=new t.google.maps.Geocoder,r.cluster=new T(r.map,null,{styles:[{width:30,height:30,className:"mapboxgl-cluster"}]}),o.dispatchEvent(new Event(a))}},{key:"addMarker",value:function addMarker(t,r){var o=this,a={lat:t[1],lng:t[0]},l=new o.MarkerUI({position:a,map:o.map,align:["center","top"],html:'<div class="mapboxgl-marker"><div id="Marker'.concat(r.id,'" data-id="').concat(r.id,'" class="marker">').concat(r.icon,"</div></div>"),onClick:function onClick(){var t=document.querySelector("#Marker".concat(r.id));o.showPopup(a,r.content),t.dispatchEvent(new Event(i))}});return o.markers.push(l),o.cluster.addMarker(l),l.setMap(o.map),l}},{key:"showPopup",value:function showPopup(t,r){var o=this,a=o.popup.getDiv();o.config.flyToMarker&&(o.map.setCenter(t),o.config.noZoom||o.map.setZoom(18)),a.style.opacity="0",a.classList.remove("d-none"),a.querySelector(".mapboxgl-popup-content .html").innerHTML=r,a.querySelector(".mapboxgl-popup-close-button").addEventListener("click",(function(t){t.preventDefault(),o.hidePopup()})),o.popup.setPosition(t,["center","top"]),a.style.opacity="1",a.style["margin-top"]="-1rem"}},{key:"hidePopup",value:function hidePopup(){var t=this;t.popup.getDiv().classList.add("d-none"),t.config.noRestoreBounds&&!t.config.flyToBounds||t.restoreBounds(),t.el.dispatchEvent(new Event(l))}},{key:"geocode",value:function geocode(t,r){var o=this;o.geocoder.geocode({address:t},(function(t,a){if("OK"===a)return"function"===typeof r&&r(t),t;console.error("".concat(o.getName(),": Geocode was not successful for the following reason: ").concat(a))}))}},{key:"reverseGeocode",value:function reverseGeocode(t,r){var o=this;o.geocoder.geocode({location:latlng},(function(t,a){if("OK"===a)return"function"===typeof r&&r(t),t;console.error("".concat(o.getName(),": Reverse Geocoding was not successful for the following reason: ").concat(a))}))}},{key:"addGeoJson",value:function addGeoJson(r){var o=this,a=JSON.parse(r.geojson),i=new t.google.maps.LatLngBounds;a.features.forEach((function(t){var a=t.id,l=t.geometry.coordinates,u=t.properties.content;o.addMarker(l,{id:a,content:u,icon:t.icon,flyToMarker:r.flyToMarker}),i.extend({lat:parseFloat(l[1]),lng:parseFloat(l[0])})})),o.markers.length>1?o.map.fitBounds(i,{padding:30}):o.markers[0]&&o.map.setCenter(o.markers[0].getPosition()),o.default_bounds=i,o.default_zoom=o.map.getZoom()}},{key:"getMap",value:function getMap(){return this.map}},{key:"getPopup",value:function getPopup(){return this.popup}},{key:"restoreBounds",value:function restoreBounds(){var t=this;t.default_bounds&&t.markers.length>1?t.map.fitBounds(t.default_bounds,{padding:30}):(t.markers[0]&&t.map.setCenter(t.markers[0].getPosition()),t.restoreZoom())}},{key:"restoreZoom",value:function restoreZoom(){this.map.setZoom(this.default_zoom)}}])}();return r}(window),L={ENVS:["xs","sm","md","lg","xl","xxl","xxxl"],MAP_DRIVER:I};function map_api_typeof(t){return map_api_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},map_api_typeof(t)}function map_api_defineProperties(t,r){for(var o=0;o<r.length;o++){var a=r[o];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,map_api_toPropertyKey(a.key),a)}}function map_api_toPropertyKey(t){var r=function map_api_toPrimitive(t,r){if("object"!=map_api_typeof(t)||!t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var a=o.call(t,r||"default");if("object"!=map_api_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==map_api_typeof(r)?r:r+""}!function(i){var l="js-mapapi",u=L.MAP_DRIVER,c=function(){return function map_api_createClass(t,r,o){return r&&map_api_defineProperties(t.prototype,r),o&&map_api_defineProperties(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}((function MapAPI(t){!function map_api_classCallCheck(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this,MapAPI);var r=this,o=new u,i=document.querySelector("body"),c=t.dataset;c.lng?c.lng:i.dataset["default-lng"],c.lat?c.lat:i.dataset["default-lat"],c.icon||(c.icon='<i class="fas fa-map-marker-alt"></i>'),console.log("".concat(l,": init ").concat(o.getName(),"...")),r.drv=o,r.el=t,r.config=c,o.init(t,c),t.addEventListener(a,(function(){r.addMarkers()}))}),[{key:"getMap",value:function getMap(){return this.map}},{key:"dispose",value:function dispose(){this.el=null,this.el.classList.remove("".concat(l,"-active"))}},{key:"addMarkers",value:function addMarkers(){console.log("".concat(l,": addMarkers"));var t=this,r=t.el,a=t.drv,i=t.config;if(t.map=a.getMap(),i.geojson)console.log("".concat(l,": setting up geocode data")),a.addGeoJson(i);else if(i.address)console.log(i.address),console.log("".concat(l,": setting up address marker")),a.geocode(i.address,(function(r){console.log(r);var o=parseFloat(r[0].geometry.location.lat()),u=parseFloat(r[0].geometry.location.lng());console.log("".concat(l,": setting up single lat/lng marker lat: ").concat(o," lng: ").concat(u," #1")),a.addMarker([u,o],i),t.map.setCenter({lat:o,lng:u})}));else if(i.lat&&i.lng){var u=parseFloat(i.lat),c=parseFloat(i.lng);console.log("".concat(l,": setting up single lat/lng marker lat: ").concat(u," lng: ").concat(c," #2")),a.addMarker([c,u],i),t.map.setCenter({lat:u,lng:c})}r.classList.add("".concat(l,"-active")),r.dispatchEvent(new Event(o)),console.log("".concat(l,": Map is loaded"))}}])}(),p=function init(){console.log("".concat(l,": init")),document.querySelectorAll(".".concat(l)).forEach((function(t,r){new c(t)}))};i.addEventListener("".concat(r),p),i.addEventListener("".concat(t),p)}(window)}()}();
|
|
@ -0,0 +1,14 @@
|
|||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
|
@ -1 +1 @@
|
|||
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var c=t[r]={i:r,l:!1,exports:{}};return e[r].call(c.exports,c,c.exports,n),c.l=!0,c.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var c in e)n.d(r,c,function(t){return e[t]}.bind(null,c));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="app/client/dist",n(n.s="./app/client/src/js/types/cms.js")}({"./app/client/src/js/types/cms.js":function(e,t,n){"use strict";n.r(t);n("./app/client/src/scss/_cms.scss")},"./app/client/src/scss/_cms.scss":function(e,t,n){}});
|
||||
!function(){"use strict";var e={6793:function(e){e.exports=function makeYoutubeEmbed(e){if("string"===typeof e){var t=function getId(e){var t=e.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);if(t&&11==t[2].length)return t[2]}(e);return t?"//www.youtube.com/embed/"+t:void 0}}}},t={};function __webpack_require__(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,__webpack_require__),o.exports}!function(){var e="ajax-load",t="load-ready";function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _toConsumableArray(e){return function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}(e)||function _iterableToArray(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function _unsupportedIterableToArray(e,t){if(!e)return;if("string"===typeof e)return _arrayLikeToArray(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(e,t)}(e)||function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n<t;n++)a[n]=e[n];return a}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,_toPropertyKey(a.key),a)}}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){var t=function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=_typeof(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==_typeof(t)?t:t+""}var n=window,a=function(){return function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function MetaWindow(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{shown:!1},a=arguments.length>1?arguments[1]:void 0;!function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,MetaWindow),_defineProperty(this,"state",{content:"",type:["empty"],shown:!1,loading:!1,error:!1,embed:!1,collections:[],current:null,target:null,extraClass:null}),_defineProperty(this,"show",(function(){var t=e;console.log("".concat(t.name,": show")),t.setState({shown:!0}),n.dispatchEvent(new Event("{ui.name}.show"))})),_defineProperty(this,"hide",(function(){var t=e;console.log("".concat(t.name,": hide")),t.setState({shown:!1}),n.dispatchEvent(new Event("{ui.name}.hide"))})),_defineProperty(this,"next",(function(){var t=e,a=t.state.current.getAttribute("data-gallery"),o=t._currIndex();o<t.state.collections[a].length-1?o++:o=0,t.state.collections[a][o].click(),console.log("".concat(t.name,": next")),n.dispatchEvent(new Event("{ui.name}.next"))})),_defineProperty(this,"prev",(function(){var t=e,a=t.state.current.getAttribute("data-gallery"),o=t._currIndex();o>0?o--:o=t.state.collections[a].length-1,t.state.collections[a][o].click(),console.log("".concat(t.name,": prev")),n.dispatchEvent(new Event("{ui.name}.prev"))})),_defineProperty(this,"reset",(function(){e.setState({content:"",type:["empty"],shown:!1,loading:!1,error:!1,embed:!1})})),_defineProperty(this,"load",(function(t){var a=e;a.reset(),a.setState({loading:!0}),a.show(),window.fetch(t,{mode:"no-cors"}).then((function(e){var o=e.headers.get("content-type").toLowerCase();console.log(e),console.log("".concat(a.name,": response content-type: ").concat(o));switch(o){case"image/jpeg":case"image/png":case"image/svg+xml":case"image/bmp":case"image/gif":case"image/tiff":case"image/webp":case"image/jpg":case"image/svg":e.arrayBuffer().then((function(e){a.setContent('<img src="data:'.concat(o,";base64,").concat(a._imageEncode(e),'" />'),"meta-".concat(a.name,"--image"))}));break;case"application/json":case"application/ld+json":case"application/json; charset=utf-8":a.setContent("".concat((!1).Content),["meta-".concat(a.name,"--text"),"meta-".concat(a.name,"--html"),"meta-".concat(a.name,"--json")]);break;case"video/mp4":a.setContent('<video controls autoplay><source src="'.concat(t,'" type="video/mp4">Your browser does not support the video tag.</video>'),["meta-".concat(a.name,"--image"),"meta-".concat(a.name,"--video")]);break;case"text/html":case"application/xhtml+xml":case"text/plain":case"text/html; charset=utf-8":case"application/xhtml+xml; charset=utf-8":case"text/plain; charset=utf-8":e.text().then((function(e){a.setContent(e,["meta-".concat(a.name,"--text"),"meta-".concat(a.name,"--html"),"meta-".concat(a.name,"--pajax")])}));break;default:console.warn("".concat(a.name,": Unknown response content-type!"))}n.dispatchEvent(new Event("{ui.name}.loaded"))})).catch((function(e){console.error(e);var t="";if(e.response)switch(e.response.status){case 404:t="Not Found.";break;case 500:t="Server issue, please try again latter.";break;default:t="Something went wrong."}else e.request?t="No response received":console.warn("Error",e.message);a.setState({error:t}),n.dispatchEvent(new Event("{ui.name}.error"))})).then((function(){a.setState({loading:!1}),setTimeout((function(){a.state.current.classList.remove("loading")}),1e3)}))})),_defineProperty(this,"_currIndex",(function(){var t=e,n=t.state.current,a=n.getAttribute("data-gallery");return t.state.collections[a].indexOf(n)})),_defineProperty(this,"embed",(function(t){var n=e;console.log("".concat(n.name,": embed")),n.reset(),n.setState({embed:t,loading:!1,type:["meta-".concat(n.name,"--embed"),"meta-".concat(n.name,"--video")]}),n.show()})),_defineProperty(this,"setCaption",(function(t){var n=e;console.log("".concat(n.name,": setCaption")),n.state.caption=t})),_defineProperty(this,"addExtraClass",(function(t){var n=e;t&&t.length&&(console.log("".concat(n.name,": addExtraClass(").concat(t,")")),n.state.extraClass=t)})),_defineProperty(this,"getCaption",(function(){return e.state.caption})),_defineProperty(this,"_imageEncode",(function(e){var t="";return[].slice.call(new Uint8Array(e)).forEach((function(e){t+=String.fromCharCode(e)})),window.btoa(t)})),_defineProperty(this,"setContent",(function(t,n){var a=e;console.log("".concat(a.name,": setContent"));var o=n||["meta-".concat(a.name,"--html"),"meta-".concat(a.name,"--text")];Array.isArray(o)||(o=n.split(" ")),a.setState({content:t,type:o})})),_defineProperty(this,"getHtml",(function(){var t=e;if(t.state.embed){var n=__webpack_require__(6793)(t.state.embed);t.state.content='<iframe width="600" height="380" src="'.concat(n,'" frameborder="0"></iframe>')}return t.state.content}));var o=this;switch(o.name=o.constructor.name,console.log("".concat(o.name,": init")),o.setState(t),a){case"show":case"hide":o.hide()}n.dispatchEvent(new Event("{ui.name}.init"))}),[{key:"cleanLinks",value:function cleanLinks(){document.querySelectorAll('[data-toggle="lightbox"]').forEach((function(e){e.classList.remove("loading")}))}},{key:"collectGaleries",value:function collectGaleries(e){var t=this;e&&(t.state.collections[e]=[],document.querySelectorAll('[data-toggle="lightbox"][data-gallery="'.concat(e,'"]')).forEach((function(n){t.state.collections[e].push(n)})))}},{key:"toggle",value:function toggle(e){var t=this;t.cleanLinks();var n=e.getAttribute("href")||e.getAttribute("data-href"),a=e.getAttribute("data-embed");e.classList.add("loading"),t.state.current=e;var o=e.getAttribute("data-title");o?t.setCaption(o):t.setCaption(""),a?t.embed(n):t.load(n),t.addExtraClass(e.getAttribute("data-lightbox-class"))}},{key:"init",value:function init(){var e=this;console.log("MetaWindow: [links] init"),document.querySelectorAll('[data-toggle="lightbox"],[data-gallery]').forEach((function(t){var n=t.getAttribute("data-gallery");e.collectGaleries(n),t.addEventListener("click",(function(t){t.preventDefault(),console.log("MetaWindow: [link] click");var n=t.currentTarget;e.toggle(n)}))}))}},{key:"setState",value:function setState(e){var t=this;t.state=Object.assign({},t.state,e),t.render()}},{key:"render",value:function render(){var e,t=this,n=t.name,a=t.state.current;t.state.target.innerHTML="";var o=document.createElement("div");o.classList.add("meta-".concat(n)),(e=o.classList).add.apply(e,_toConsumableArray(t.state.type)),t.state.target.append(o);var r=document.createElement("div");r.classList.add("meta-".concat(n,"-overlay")),t.state.shown&&r.classList.add("meta-".concat(n,"-overlay--open")),t.state.loading&&r.classList.add("meta-".concat(n,"-overlay--loading")),t.state.error&&r.classList.add("meta-".concat(n,"-overlay--error")),o.append(r);var i=document.createElement("div");i.classList.add("meta-content"),r.append(i);var c=document.createElement("button");if(c.classList.add("meta-nav","meta-close","a"),c.innerHTML='<i class="icon fa fas fa-times"></i> <span class="visually-hidden">Close</span>',c.addEventListener("click",(function(e){e.preventDefault(),t.hide()})),i.append(c),a){var s=a.getAttribute("data-gallery");if(s&&t.state.collections[s].length>1){var l=document.createElement("nav");l.classList.add("meta-navs");var d=document.createElement("button");d.classList.add("meta-nav","meta-nav-arrow","meta-nav-arrow__prev","a"),d.innerHTML='<i class="icon fa fas fa-chevron-left"></i> <span class="visually-hidden">Previous</span>',d.addEventListener("click",(function(e){e.preventDefault(),t.prev()})),l.append(d);var u=document.createElement("button");u.classList.add("meta-nav","meta-nav-arrow","meta-nav-arrow__next","a"),u.innerHTML='<i class="icon fa fas fa-chevron-right"></i> <span class="visually-hidden">Next</span>',u.addEventListener("click",(function(e){e.preventDefault(),t.next()})),l.append(u),i.append(l)}}var m=document.createElement("section");if(m.classList.add("meta-wrap","typography"),t.state.extraClass&&m.classList.add(t.state.extraClass),m.innerHTML=t.getHtml(),i.append(m),t.state.error){var p=document.createElement("div");p.classList.add("meta-error"),p.innerHTML=t.state.error,i.append(p)}else if(t.state.caption){var f=document.createElement("div");f.classList.add("meta-caption"),f.innerHTML=t.getCaption(),i.append(f)}return"undefined"!==typeof window.FontAwesome&&window.FontAwesome.dom.i2svg(),t}}])}(),o=a,r=document.getElementById("MetaLightboxApp");r||(console.warn("MetaWindow: missing container #MetaLightboxApp - create new one"),(r=document.createElement("div")).setAttribute("id","MetaLightboxApp"),document.querySelector("body").append(r));var i=function init(){var e=window.MetaWindow;"undefined"===typeof e&&(e=new o({target:r}),window.MetaWindow=e),e.init()};window.addEventListener("".concat(t),i),window.addEventListener("".concat(e),i),window.addEventListener("MetaWindow.initLinks",i);jQuery.entwine("ss",(function($){$('[data-toggle="lightbox"]').entwine({onmatch:function onmatch(){console.log("Init lightbox links at CMS"),window.dispatchEvent(new Event("MetaWindow.initLinks"))}})}))}()}();
|
|
@ -1 +0,0 @@
|
|||
!function(e){var t={};function n(o){if(t[o])return t[o].exports;var a=t[o]={i:o,l:!1,exports:{}};return e[o].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(o,a,function(t){return e[t]}.bind(null,a));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="app/client/dist",n(n.s="./app/client/src/js/types/dev.js")}({"./app/client/src/js/types/dev.js":function(e,t,n){"use strict";n.r(t);var o=n("jquery"),a=n.n(o),r=n("./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_events.js"),i=n.n(r);n("./app/client/src/scss/dev.scss");function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var l=function(e){var t=window,n=(document,e("body"),"DevUI"),o=function(){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t)}var o,a,r;return o=t,r=[{key:"init",value:function(){this.dispose(),console.log("Initializing: ".concat(n));var t=e("#DevUtilities");this.$el=t;var o=t.find(".original");t.find(".toggle-original").on("click",(function(){o.hasClass("d-none")?o.removeClass("d-none"):o.addClass("d-none")}))}},{key:"dispose",value:function(){console.log("Destroying: ".concat(n))}}],(a=null)&&s(o.prototype,a),r&&s(o,r),t}();return e(t).on("".concat(i.a.AJAX," ").concat(i.a.LOADED),(function(){o.init()})),o}(a.a);t.default=l},"./app/client/src/scss/dev.scss":function(e,t,n){},"./node_modules/.pnpm/@a2nt/ss-bootstrap-ui-webpack-boilerplate@2.5.6/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_events.js":function(e,t){e.exports={AJAX:"ajax-load",AJAXMAIN:"ajax-main-load",MAININIT:"main-init",TABHIDDEN:"tab-hidden",TABFOCUSED:"tab-focused",OFFLINE:"offline",ONLINE:"online",BACKONLINE:"back-online",TOUCHENABLE:"touch-enabled",TOUCHDISABLED:"touch-disabled",LOADED:"load",SWIPELEFT:"swipeleft panleft",SWIPERIGHT:"swiperight panright",ALLERTAPPEARED:"alert-appeared",ALERTREMOVED:"alert-removed",LODEDANDREADY:"load-ready",LAZYIMAGEREADY:"image-lazy-bg-loaded",LAZYIMAGESREADY:"images-lazy-loaded",MAPLOADED:"map-loaded",MAPAPILOADED:"map-api-loaded",MAPMARKERCLICK:"map-marker-click",MAPPOPUPCLOSE:"map-popup-close",SCROLL:"scroll",RESIZE:"resize",CAROUSEL_READY:"bs.carousel.ready",SET_TARGET_UPDATE:"set-target-update",RESTORE_FIELD:"restore-field",FORM_INIT_BASICS:"form-basics",FORM_INIT_STEPPED:"form-init-stepped",FORM_INIT_VALIDATE:"form-init-validate",FORM_INIT_VALIDATE_FIELD:"form-init-validate-field",FORM_INIT_STORAGE:"form-init-storage",FORM_VALIDATION_FAILED:"form-validation-failed",FORM_STEPPED_NEW_STEP:"form-new-step",FORM_STEPPED_FIRST_STEP:"form-first-step",FORM_STEPPED_LAST_STEP:"form-last-step",FORM_FIELDS:"input,textarea,select"}},jquery:function(e,t){e.exports=jQuery}});
|
|
@ -1 +0,0 @@
|
|||
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="app/client/dist",r(r.s="./app/client/src/scss/types/editor.scss")}({"./app/client/src/scss/types/editor.scss":function(e,t,r){}});
|
|
@ -1 +0,0 @@
|
|||
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="app/client/dist",r(r.s="./app/client/src/scss/types/order.scss")}({"./app/client/src/scss/types/order.scss":function(e,t,r){}});
|
|
@ -1,107 +1,15 @@
|
|||
/*!
|
||||
* Bootstrap alert.js v4.5.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap button.js v4.5.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap carousel.js v4.5.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap collapse.js v4.5.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap modal.js v4.5.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap popover.js v4.5.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap scrollspy.js v4.5.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap tab.js v4.5.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap tooltip.js v4.5.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Bootstrap util.js v4.5.2 (https://getbootstrap.com/)
|
||||
* Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Select2 4.0.13
|
||||
* https://select2.github.io
|
||||
*
|
||||
* Released under the MIT license
|
||||
* https://github.com/select2/select2/blob/master/LICENSE.md
|
||||
* Get all of an element's parent elements up the DOM tree
|
||||
* (c) 2019 Chris Ferdinandi, MIT License, https://gomakethings.com
|
||||
* @param {Node} elem The element
|
||||
* @param {String} selector Selector to match against [optional]
|
||||
* @return {Array} The parent elements
|
||||
*/
|
||||
|
||||
/*! Hammer.JS - v2.0.7 - 2016-04-22
|
||||
* http://hammerjs.github.io/
|
||||
*
|
||||
* Copyright (c) 2016 Jorik Tangelder;
|
||||
* Licensed under the MIT license */
|
||||
|
||||
/*! smooth-scroll v16.1.3 | (c) 2020 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/smooth-scroll */
|
||||
|
||||
/**
|
||||
* @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
|
||||
* Released under MIT license, http://github.com/requirejs/almond/LICENSE
|
||||
*/
|
||||
|
||||
/**!
|
||||
* @fileOverview Kickass library to create and place poppers near their reference elements.
|
||||
* @version 1.16.1
|
||||
* @license
|
||||
* Copyright (c) 2016 Federico Zivolo and contributors
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
/*!
|
||||
* Glide.js v3.6.0
|
||||
* (c) 2013-2022 Jędrzej Chałubek (https://github.com/jedrzejchalubek/)
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*@cc_on!@*/
|
||||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
||||
|
|
|
@ -0,0 +1,148 @@
|
|||
{
|
||||
"chunks": {
|
||||
"byName": {
|
||||
"app": 524,
|
||||
"app_SilverShop.Page.CheckoutPageController": 950,
|
||||
"app_Site.Controllers.MapElementController": 905,
|
||||
"app_cms": 218,
|
||||
"app_dev": 584,
|
||||
"app_editor": 68,
|
||||
"app_order": 241,
|
||||
"sample": 877
|
||||
},
|
||||
"bySource": {
|
||||
"0 app": 524,
|
||||
"0 app_SilverShop.Page.CheckoutPageController": 950,
|
||||
"0 app_Site.Controllers.MapElementController": 905,
|
||||
"0 app_cms": 218,
|
||||
"0 app_dev": 584,
|
||||
"0 app_editor": 68,
|
||||
"0 app_order": 241,
|
||||
"0 sample": 877
|
||||
},
|
||||
"usedIds": [
|
||||
68,
|
||||
218,
|
||||
241,
|
||||
524,
|
||||
584,
|
||||
877,
|
||||
905,
|
||||
950
|
||||
]
|
||||
},
|
||||
"modules": {
|
||||
"byIdentifier": {
|
||||
"./app/client/src/img|sync|nonrecursive|/\\.(png%7Cwebp%7Cjpg%7Cjpeg%7Cgif%7Csvg)$/": 480,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./app/client/src/js/app.js|8eaca3a8fd9fdf67c21c61e85d6b8f13": 8490,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./app/client/src/js/types/SilverShop.Page.CheckoutPageController.js": 4648,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./app/client/src/js/types/Site.Controllers.MapElementController.js|c9c9d5020de25df2edcbd336ea1739fa": 1501,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./app/client/src/js/types/cms.js|94b306966adc2dd896c889a3566ba065": 649,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/@a2nt+mithril-ui@1.1.7_@popperjs+core@2.11.8/node_modules/@a2nt/mithril-ui/src/js/_events.js": 3144,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/@a2nt+mithril-ui@1.1.7_@popperjs+core@2.11.8/node_modules/@a2nt/mithril-ui/src/js/ui/ajax.js": 6881,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/@a2nt+mithril-ui@1.1.7_@popperjs+core@2.11.8/node_modules/@a2nt/mithril-ui/src/js/ui/index.js": 815,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/@a2nt+mithril-ui@1.1.7_@popperjs+core@2.11.8/node_modules/@a2nt/mithril-ui/src/js/ui/page/index.js": 9219,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/@a2nt+mithril-ui@1.1.7_@popperjs+core@2.11.8/node_modules/@a2nt/mithril-ui/src/js/ui/page/resources.js": 5102,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/@a2nt+mithril-ui@1.1.7_@popperjs+core@2.11.8/node_modules/@a2nt/mithril-ui/src/js/ui/page/tpl.js": 8223,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/@a2nt+mithril-ui@1.1.7_@popperjs+core@2.11.8/node_modules/@a2nt/mithril-ui/src/js/ui/router.js": 2058,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/@a2nt+mithril-ui@1.1.7_@popperjs+core@2.11.8/node_modules/@a2nt/mithril-ui/src/js/util/getParents.js": 3484,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/@a2nt+ss-bootstrap-ui-webpack-boilerplate-react@5.3.9_zone.js@0.14.4/node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/main/funcs.js": 1492,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js": 3439,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/api/mount-redraw.js": 7762,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/api/router.js": 1940,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/hyperscript.js": 1707,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/index.js": 8694,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/mount-redraw.js": 5879,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/pathname/build.js": 1811,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/pathname/compileTemplate.js": 4692,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/pathname/parse.js": 3312,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/promise/polyfill.js": 2149,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/promise/promise.js": 113,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/querystring/build.js": 7528,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/querystring/parse.js": 1747,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/render.js": 4328,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/render/fragment.js": 7835,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/render/hyperscript.js": 6254,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/render/hyperscriptVnode.js": 4354,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/render/render.js": 235,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/render/trust.js": 2793,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/render/vnode.js": 1509,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/request.js": 7015,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/request/request.js": 5965,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/route.js": 8227,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/util/assign.js": 7654,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/util/censor.js": 8421,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/mithril@2.2.2/node_modules/mithril/util/hasOwn.js": 963,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./node_modules/.pnpm/youtube-embed@1.0.0/node_modules/youtube-embed/index.js": 6793,
|
||||
"./node_modules/.pnpm/babel-loader@9.1.3_@babel+core@7.24.5_webpack@5.91.0/node_modules/babel-loader/lib/index.js??ruleSet[1].rules[0].use!./themes/sample/client/src/js/app.js": 7064,
|
||||
"./node_modules/.pnpm/img-optimize-loader@1.0.7_file-loader@6.2.0_webpack@5.91.0/node_modules/img-optimize-loader/dist/index.js??ruleSet[1].rules[4].use[0]!./app/client/src/img/bg.png": 6730,
|
||||
"./node_modules/.pnpm/img-optimize-loader@1.0.7_file-loader@6.2.0_webpack@5.91.0/node_modules/img-optimize-loader/dist/index.js??ruleSet[1].rules[4].use[0]!./app/client/src/img/logo.png": 8614,
|
||||
"./node_modules/.pnpm/img-optimize-loader@1.0.7_file-loader@6.2.0_webpack@5.91.0/node_modules/img-optimize-loader/dist/index.js??ruleSet[1].rules[4].use[0]!./app/client/src/img/logo.svg": 4993,
|
||||
"./node_modules/.pnpm/img-optimize-loader@1.0.7_file-loader@6.2.0_webpack@5.91.0/node_modules/img-optimize-loader/dist/index.js??ruleSet[1].rules[4].use[0]!./app/client/src/img/original.png": 6670,
|
||||
"./node_modules/.pnpm/img-optimize-loader@1.0.7_file-loader@6.2.0_webpack@5.91.0/node_modules/img-optimize-loader/dist/index.js??ruleSet[1].rules[4].use[0]!./app/client/src/img/original2.png": 6526,
|
||||
"./node_modules/.pnpm/img-optimize-loader@1.0.7_file-loader@6.2.0_webpack@5.91.0/node_modules/img-optimize-loader/dist/index.js??ruleSet[1].rules[4].use[0]!./app/client/src/img/photo1.png": 7782,
|
||||
"./node_modules/.pnpm/img-optimize-loader@1.0.7_file-loader@6.2.0_webpack@5.91.0/node_modules/img-optimize-loader/dist/index.js??ruleSet[1].rules[4].use[0]!./app/client/src/img/photo2.jpg": 2637,
|
||||
"./node_modules/.pnpm/img-optimize-loader@1.0.7_file-loader@6.2.0_webpack@5.91.0/node_modules/img-optimize-loader/dist/index.js??ruleSet[1].rules[4].use[0]!./app/client/src/img/photo3.svg": 1955,
|
||||
"./node_modules/.pnpm/mini-css-extract-plugin@2.9.0_webpack@5.91.0/node_modules/mini-css-extract-plugin/dist/loader.js??ruleSet[1].rules[1].use[0]!./node_modules/.pnpm/css-loader@7.1.1_webpack@5.91.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/.pnpm/sass-loader@14.2.1_sass@1.75.0_webpack@5.91.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./app/client/src/scss/types/dev.scss": 6030,
|
||||
"./node_modules/.pnpm/mini-css-extract-plugin@2.9.0_webpack@5.91.0/node_modules/mini-css-extract-plugin/dist/loader.js??ruleSet[1].rules[1].use[0]!./node_modules/.pnpm/css-loader@7.1.1_webpack@5.91.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/.pnpm/sass-loader@14.2.1_sass@1.75.0_webpack@5.91.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./app/client/src/scss/types/editor.scss": 978,
|
||||
"./node_modules/.pnpm/mini-css-extract-plugin@2.9.0_webpack@5.91.0/node_modules/mini-css-extract-plugin/dist/loader.js??ruleSet[1].rules[1].use[0]!./node_modules/.pnpm/css-loader@7.1.1_webpack@5.91.0/node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[1].use[1]!./node_modules/.pnpm/sass-loader@14.2.1_sass@1.75.0_webpack@5.91.0/node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./app/client/src/scss/types/order.scss": 2229,
|
||||
"./node_modules/font-awesome|sync|nonrecursive|/\\.(otf%7Ceot%7Cttf%7Cwoff%7Cwoff2)$/": 9906
|
||||
},
|
||||
"usedIds": [
|
||||
113,
|
||||
235,
|
||||
480,
|
||||
649,
|
||||
815,
|
||||
963,
|
||||
978,
|
||||
1492,
|
||||
1501,
|
||||
1509,
|
||||
1707,
|
||||
1747,
|
||||
1811,
|
||||
1940,
|
||||
1955,
|
||||
2058,
|
||||
2149,
|
||||
2229,
|
||||
2637,
|
||||
2793,
|
||||
3144,
|
||||
3312,
|
||||
3439,
|
||||
3484,
|
||||
4328,
|
||||
4354,
|
||||
4648,
|
||||
4692,
|
||||
4993,
|
||||
5102,
|
||||
5879,
|
||||
5965,
|
||||
6030,
|
||||
6254,
|
||||
6526,
|
||||
6670,
|
||||
6730,
|
||||
6793,
|
||||
6881,
|
||||
7015,
|
||||
7064,
|
||||
7528,
|
||||
7654,
|
||||
7762,
|
||||
7782,
|
||||
7835,
|
||||
8223,
|
||||
8227,
|
||||
8421,
|
||||
8490,
|
||||
8614,
|
||||
8694,
|
||||
9219,
|
||||
9906
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
Example file
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 213 KiB |
After Width: | Height: | Size: 74 KiB |
|
@ -0,0 +1,59 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
version="1.1"
|
||||
id="svg192"
|
||||
width="428"
|
||||
height="428"
|
||||
viewBox="0 0 428 428"
|
||||
sodipodi:docname="Tony.jpg.svg"
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
||||
<metadata
|
||||
id="metadata198">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs196" />
|
||||
<sodipodi:namedview
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="768"
|
||||
id="namedview194"
|
||||
showgrid="false"
|
||||
inkscape:zoom="1.317757"
|
||||
inkscape:cx="214"
|
||||
inkscape:cy="214"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="g200" />
|
||||
<g
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="Image"
|
||||
id="g200">
|
||||
<path
|
||||
d="m 181,383.58077 c 0,-0.23058 0.72754,-3.25909 1.61675,-6.73001 1.97697,-7.71687 1.44479,-18.73402 -1.16417,-24.10076 -2.12511,-4.37145 -3.68034,-4.74029 -5.27063,-1.25 -1.48991,3.27001 -2.9789,3.17252 -3.81834,-0.25 -1.00541,-4.09921 -4.71741,-9.12638 -8.7744,-11.88317 -3.04429,-2.06865 -6.17805,-2.7485 -20.34392,-4.41347 -21.51358,-2.52859 -36.86021,-5.25489 -51.24529,-9.10363 -15.955859,-4.26901 -18.952271,-4.72225 -31.668213,-4.79012 -6.142516,-0.0328 -11.904428,-0.34212 -12.804247,-0.68742 -1.439631,-0.55243 -1.368944,-0.91211 0.588823,-2.99605 1.223671,-1.30254 2.035582,-2.52663 1.804247,-2.72019 C 49.689274,314.46238 45.45,313.37179 40.5,312.23242 31.18871,310.08918 18,304.77524 18,303.16682 c 0,-0.50425 1.267592,-1.17034 2.816871,-1.48019 3.027711,-0.60555 15.381466,-8.53309 15.874152,-10.18663 0.163877,-0.55 -3.28168,-2.07262 -7.656794,-3.3836 C 18.540277,284.97195 3,275.39033 3,272.06456 3,271.4141 5.6989118,271 9.9382768,271 17.643494,271 48.70993,267.26171 50.820545,266.08055 51.749787,265.56052 48.587352,262.61388 40.582557,256.54118 34.212151,251.70838 29,247.55801 29,247.31812 c 0,-0.5493 -0.04282,-0.57417 15.219132,8.83794 C 52.304772,261.14251 57.977494,264 59.790993,264 63.253915,264 72,261.13113 72,259.99523 72,259.2902 64.073295,246.92663 33.535023,200 c -7.529076,-11.56955 -7.784916,-12 -7.132319,-12 0.477287,0 9.758096,12.0849 13.823411,18 0.945006,1.375 4.093224,5.72599 6.996039,9.66887 2.902815,3.94288 11.048475,15.08038 18.101467,24.75 7.791689,10.68237 13.481425,17.5812 14.5,17.5813 3.221494,3.3e-4 19.738298,-9.10131 25.682259,-14.15231 6.923,-5.88294 8.15354,-7.58844 6.59774,-9.14424 C 110.47716,233.07716 110.75814,232 112.80887,232 c 0.99488,0 2.68238,-0.65055 3.75,-1.44567 1.85917,-1.38462 1.8039,-1.49431 -1.30887,-2.59782 -4.4683,-1.58406 -4.07265,-2.60606 1.32208,-3.41505 5.93585,-0.89013 7.79886,-2.89571 12.93015,-13.9196 9.88167,-21.22943 16.77454,-49.28231 19.54161,-79.53121 1.24313,-13.58959 0.86363,-43.89554 -0.59452,-47.4771 -0.50051,-1.229389 -0.37973,-1.751847 0.34678,-1.5 1.71558,0.594711 12.0548,22.35153 13.90105,29.25195 0.90272,3.37398 1.9787,6.52554 2.39106,7.00348 0.41236,0.47794 1.64003,-0.87206 2.72815,-3 3.47214,-6.79011 9.68304,-12.90731 15.71534,-15.478248 L 189.14118,97.5 l -0.3844,-5.75 c -0.21142,-3.1625 -0.10677,-5.75 0.23255,-5.75 0.33932,0 2.58691,2.793394 4.99463,6.207542 2.40772,3.414148 4.55598,5.672629 4.77391,5.018847 0.21793,-0.653782 -0.31344,-4.62031 -1.18082,-8.814506 C 195.76916,79.669859 195.71289,79 196.78643,79 c 1.16651,0 11.13661,16.77342 18.25996,30.72006 3.43281,6.72103 6.59209,12.00337 7.02061,11.73853 0.42852,-0.26484 1.07982,-1.85057 1.44733,-3.52385 0.36752,-1.67327 3.55112,-11.77049 7.07468,-22.438263 9.28088,-28.098363 18.94754,-52.473982 21.41422,-53.998471 1.44907,-0.895578 1.29535,0.440112 -1.95666,17.001994 -10.17955,51.84237 -11.56933,96.25847 -3.97325,126.98102 1.50845,6.10096 2.61561,8.49793 4.69999,10.17536 2.18986,1.76232 2.48059,2.44529 1.47669,3.46898 -1.89729,1.93469 -1.5859,3.36315 2.75025,12.61624 8.20924,17.51807 20.54693,32.83912 34.41179,42.73289 3.48807,2.48903 6.56436,4.52551 6.83621,4.52551 0.27185,0 11.01471,-13.56185 23.87301,-30.13744 35.36004,-45.5825 35.99213,-45.63056 4.76831,-0.36256 -20.25651,29.36771 -22.79071,33.2655 -22.08798,33.97311 0.97216,0.97891 7.1932,3.52689 8.61113,3.52689 1.15524,0 9.33481,-5.76952 27.3686,-19.30466 5.10473,-3.83132 9.47842,-6.76893 9.71932,-6.52804 0.3965,0.39651 -6.93384,7.05855 -24.18692,21.9818 -3.40245,2.943 -6.21495,5.8597 -6.25,6.48156 -0.0727,1.29072 18.50401,7.39929 30.43628,10.00833 4.4,0.96207 11.97851,1.77438 16.84113,1.80512 l 8.84114,0.0559 -4.34114,3.86583 c -5.96227,5.30947 -17.07639,11.66575 -27.32755,15.62892 -4.7172,1.8237 -8.42469,3.77193 -8.23887,4.32939 0.53903,1.61707 7.67178,3.849 14.72529,4.60773 6.31627,0.67942 6.4165,0.73416 3.54598,1.93647 -1.62471,0.68051 -10.84971,2.56479 -20.5,4.1873 -18.15472,3.05235 -43.07123,9.67951 -43.01247,11.44022 0.0184,0.55228 7.33094,4.34535 16.25,8.42906 8.91907,4.08371 17.25055,8.04571 18.5144,8.80445 l 2.29791,1.37952 -2.04791,3.31359 c -2.75093,4.4511 -2.58143,5.42737 0.44815,2.58122 4.33179,-4.0695 3.60041,-1.69288 -1.97636,6.42217 -6.83029,9.93913 -6.74491,9.86241 -9.07345,8.15213 -1.89163,-1.38938 -1.89555,-1.51578 -0.13971,-4.50375 2.04957,-3.48783 1.30733,-3.98465 -1.74209,-1.16608 -2.05181,1.89648 -2.19605,1.81646 -23.56445,-13.07434 -24.41371,-17.01297 -19.75671,-15.57237 -40,-12.37359 -5.225,0.82564 -13.72771,1.80585 -18.89491,2.17825 -8.45983,0.60969 -9.72486,0.96678 -12.70992,3.58769 -3.90404,3.4278 -8.06477,11.53597 -8.99239,17.52382 -0.36212,2.3375 -1.07288,4.25 -1.57948,4.25 -1.22114,0 -4.77346,-7.90983 -4.80134,-10.69098 -0.0198,-1.97603 -2.01152,-4.54529 -2.02951,-2.61804 -0.004,0.44496 -0.47187,3.67045 -1.03935,7.16776 -1.39327,8.58641 -6.15121,18.72963 -11.20682,23.89126 C 183.0692,383.5042 181,384.88364 181,383.58077 Z m 131.19528,-34.26786 c 1.5426,-1.4779 2.80472,-3.18132 2.80472,-3.78537 0,-0.60405 -2.8125,-2.52663 -6.25,-4.27239 -3.4375,-1.74577 -12.64286,-6.56735 -20.45635,-10.71464 C 280.48015,326.39323 273.46239,323 272.69863,323 c -2.03096,0 -5.24261,3.85945 -4.125,4.95702 1.03499,1.01644 39.67114,24.01571 40.37165,24.03238 0.24491,0.006 1.70741,-1.19859 3.25,-2.67649 z m -76.4021,-19.9009 c 13.0609,-1.51417 15.1561,-2.23044 15.19151,-5.19339 0.0281,-2.35217 -2.48959,-2.28756 -10.51915,0.26992 -4.38105,1.3954 -10.77804,3.05911 -14.21554,3.69713 -3.4375,0.63802 -6.25,1.53225 -6.25,1.98718 0,1.07973 -0.1421,1.08658 15.79318,-0.76084 z m -40.78028,-1.83429 c 21.4084,-2.97793 50.17269,-10.03655 54.06584,-13.26751 0.86831,-0.72062 2.31508,-1.31021 3.21505,-1.31021 6.89306,0 35.64573,-13.79602 48.62363,-23.33045 l 5.41742,-3.98 -2.27821,-1.84477 C 302.80362,282.83015 301.15328,282 300.38922,282 299.62515,282 299,281.57152 299,281.04783 c 0,-1.71128 9.18774,1.75785 12.13578,4.58226 2.92333,2.80072 4.00827,8.54482 1.86422,9.86991 -0.55768,0.34467 -1,-0.41545 -1,-1.71848 C 312,291.37429 309.48901,287 308.10718,287 c -0.42867,0 -3.66566,2.32575 -7.19329,5.16832 -7.53127,6.06871 -23.19886,16.45128 -30.66389,20.3203 -2.8875,1.49654 -5.25,2.86626 -5.25,3.04382 0,0.17756 2.9888,1.73497 6.64178,3.46092 6.33942,2.99524 6.87433,3.083 11.75,1.92781 6.03824,-1.43064 20.65512,-6.88413 26.65371,-9.94438 5.98997,-3.05585 13.65381,-10.53564 15.01224,-14.6517 1.64081,-4.97171 -0.92824,-11.28052 -6.3909,-15.6941 -6.33891,-5.12155 -8.0528,-5.8092 -10.27869,-4.12405 -2.396,1.81393 -3.54024,1.83354 -5.90926,0.10127 -1.65566,-1.21064 -1.72144,-1.61102 -0.50544,-3.07621 1.19923,-1.44498 1.19386,-1.81358 -0.0377,-2.5929 -2.33356,-1.47662 -5.37707,-1.07241 -7.10301,0.94334 -1.09571,1.27969 -2.44766,1.72266 -4.22225,1.38342 -2.79824,-0.53491 -3.35021,-2.12609 -1.41044,-4.06586 1.90598,-1.90598 0.0764,-2.86215 -10.7,-5.59211 -13.73443,-3.47931 -29.57412,-6.02793 -50.25,-8.08529 -7.46161,-0.74248 -8.21786,0.59495 -1.33402,2.35923 5.47213,1.40246 13.66326,6.1532 16.31178,9.46059 2.56766,3.20641 2.21569,7.97712 -0.85802,11.63002 -7.29875,8.67406 -28.21556,14.01975 -54.86974,14.023 -26.43051,0.003 -47.62534,-5.41352 -54.86974,-14.023 -6.77262,-8.04881 -0.14067,-16.53057 16.86974,-21.57511 8.06493,-2.39171 4.92913,-2.86905 -9.3877,-1.42901 -20.39067,2.05096 -52.257246,7.90965 -54.455398,10.01166 -0.463704,0.44342 -0.07745,1.97474 0.858335,3.40293 1.836009,2.80211 2.049914,2.50969 -2.978449,4.07159 -0.804766,0.24997 -2.386477,-0.71925 -3.514914,-2.15382 -1.968733,-2.50284 -2.221993,-2.5573 -6.262729,-1.34666 l -4.211027,1.26165 2.225941,1.80246 C 72.998327,274.00948 74,275.26217 74,275.80188 c 0,1.93569 -4.810977,2.21358 -7.8753,0.4549 -2.902477,-1.66579 -3.177371,-1.6597 -6.329479,0.14027 -10.751052,6.13924 -15.212844,15.0271 -11.321444,22.55224 6.868443,13.2821 45.943046,26.72337 88.526223,30.45213 9.19103,0.8048 47.85419,-0.41062 58.0129,-1.8237 z m -85.34623,-10.24439 c -2.42371,-2.4237 2.19529,-5.52271 4.89365,-3.28327 1.11167,0.92261 1.19104,1.5446 0.32957,2.58262 -1.1951,1.44 -4.09489,1.82899 -5.22322,0.70065 z m -8.4375,-7.52083 C 101.84724,307.95828 104,307.65074 104,309.41667 104,310.2875 103.2875,311 102.41667,311 c -0.87084,0 -1.40521,-0.53438 -1.1875,-1.1875 z m 166.56782,-30.49278 c -2.62428,-0.69077 -3.38753,-4.41474 -1.22841,-5.99352 2.66937,-1.95189 7.83622,-1.64137 9.85779,0.59244 1.65397,1.82762 1.63761,2.01738 -0.34501,4 -1.97603,1.97603 -4.48689,2.40067 -8.28437,1.40108 z M 97.309468,275.36408 C 96.175575,272.4092 98.409166,270.5 103,270.5 c 4.97207,0 7.28674,2.24464 5.06957,4.91618 -1.8378,2.21441 -9.905349,2.17535 -10.760102,-0.0521 z M 116.5,275 c -0.83704,-1.35436 0.29243,-3 2.05902,-3 0.79254,0 1.44098,0.9 1.44098,2 0,2.07031 -2.41251,2.7596 -3.5,1 z m 138.19455,-5.11113 c -1.42616,-0.82966 -1.558,-1.34848 -0.62756,-2.46959 1.61912,-1.95092 6.83959,-1.82631 7.61011,0.18164 1.10387,2.87663 -3.42165,4.35949 -6.98255,2.28795 z M 114.7198,267.71219 c -0.7929,-2.06626 0.7554,-3.95991 2.90003,-3.54689 2.65685,0.51167 2.46124,4.25179 -0.24255,4.63757 -1.1675,0.16658 -2.36337,-0.32423 -2.65748,-1.09068 z m 153.43896,-0.0209 c -1.35917,-1.6377 -0.5444,-2.6913 2.08123,-2.6913 1.24239,0 1.79401,0.58082 1.58333,1.66713 -0.43042,2.21935 -2.25049,2.72802 -3.66456,1.02417 z m 0.25168,56.14231 c 1.80743,-2.11093 1.80672,-2.20255 -0.0278,-3.57829 -6.40586,-4.80397 -15.08946,-6.70301 -16.13149,-3.52785 -0.38742,1.18048 11.16927,9.24355 13.27657,9.26303 0.56527,0.005 1.86247,-0.96538 2.88268,-2.15689 z m -70.08122,-59.77002 c 4.84546,-1.12455 5.60969,-1.90387 3.43,-3.4977 -5.2326,-3.82617 -37.36184,-1.83517 -33.4536,2.07307 2.07971,2.0797 22.93673,3.06937 30.0236,1.42463 z M 223.3466,251.45186 C 226.90599,247.99503 227.91611,246 226.10699,246 c -0.49116,0 -1.1451,0.65692 -1.4532,1.45982 -0.3081,0.80291 -2.44877,2.82791 -4.75703,4.5 -3.18035,2.30384 -3.71324,3.04018 -2.2002,3.04018 1.09815,0 3.64067,-1.59666 5.65004,-3.54814 z m -7.47886,0.12988 c 0.66749,-0.41253 0.93999,-1.61218 0.60555,-2.6659 C 216.13337,247.84486 216.33593,247 216.93261,247 c 0.58707,0 1.06739,0.45 1.06739,1 0,3.61951 4.4966,-2.23407 6.80055,-8.85281 1.04804,-3.0108 0.93923,-3.55487 -1.06673,-5.3337 -1.43187,-1.26974 -1.66276,-1.80456 -0.64314,-1.48971 3.05835,0.94438 4.15336,-1.00228 4.67648,-8.31367 0.36873,-5.15347 0.16041,-7.43684 -0.72864,-7.9863 -0.97938,-0.6053 -0.98767,-1.25031 -0.0388,-3.02324 C 228.66473,209.88943 227.41298,198 225.42041,198 224.50884,198 224,199.07471 224,201 c 0,2.45345 -0.40991,2.99446 -2.25,2.96959 -2.07581,-0.0281 -2.108,-0.11296 -0.41588,-1.09677 1.31395,-0.76393 1.66149,-1.75416 1.22544,-3.49155 -0.41854,-1.66759 -0.13243,-2.60794 0.91588,-3.01022 1.98381,-0.76126 1.96807,-2.37105 -0.0232,-2.37105 -2.00807,0 -6.13206,4.47153 -8.63032,9.35763 -1.67333,3.27271 -1.86774,4.97453 -1.28214,11.22366 0.88069,9.39829 0.22857,12.00905 -3.21555,12.87347 l -2.69317,0.67594 2.71521,2.18465 2.71522,2.18465 -1.54342,5 c -2.91345,9.43827 -6.16812,11.2252 -10.94554,6.00947 C 196.85347,239.44919 196,239.1887 196,242.11385 c 0,3.60181 4.16626,9.89758 6.95192,10.50525 1.40144,0.30571 2.98647,0.66261 3.52227,0.7931 1.39033,0.33861 7.95316,-0.94025 9.39355,-1.83046 z M 223,218 c -1.21296,-0.78387 -1.06944,-0.9723 0.75,-0.98469 1.2375,-0.008 2.25,0.43469 2.25,0.98469 0,1.25292 -1.06124,1.25292 -3,0 z m -61.53463,32.11355 c -3.82242,-1.77019 -7.4042,-4.41111 -9.77065,-7.20411 -3.40753,-4.02173 -3.64069,-4.14566 -2.65176,-1.40944 2.25887,6.24991 9.27173,11.42888 15.45704,11.41497 2.61454,-0.006 2.22464,-0.36582 -3.03463,-2.80142 z m 80.38934,-5.78861 c -1.49511,-1.8015 -3.37278,-0.11738 -2.47566,2.22047 0.52591,1.3705 0.92093,1.45052 2.14511,0.43454 1.16462,-0.96655 1.23861,-1.56087 0.33055,-2.65501 z m -65.52802,1.57207 c 1.33144,-0.60664 3.37761,-2.80541 4.54705,-4.88615 3.55363,-6.32283 2.23454,-11.15814 -1.4923,-5.47025 -0.91557,1.39733 -2.5434,3.01089 -3.61741,3.58568 -2.80552,1.50147 -6.41405,-2.21763 -8.31284,-8.56758 L 165.9385,225.5 l 2.71522,-2.18465 2.71521,-2.18465 -2.64863,-0.66476 c -3.47148,-0.87129 -4.05083,-3.0723 -3.23929,-12.30634 0.62955,-7.16331 0.48704,-8.01513 -2.19956,-13.14687 -2.80511,-5.35812 -7.36949,-9.25802 -8.96642,-7.66109 -0.4391,0.4391 -0.012,1.23843 0.94907,1.77628 1.21424,0.67952 1.56744,1.69508 1.15755,3.32823 -0.41546,1.65534 -0.0476,2.66563 1.24423,3.41667 1.69212,0.98381 1.65993,1.06872 -0.41588,1.09677 -1.84009,0.0249 -2.25,-0.51614 -2.25,-2.96959 0,-1.92529 -0.50884,-3 -1.42041,-3 -2.02652,0 -3.24099,11.89564 -1.53913,15.0756 0.91692,1.71329 0.94413,2.42954 0.10294,2.70993 -0.66492,0.22164 -1.1434,2.58543 -1.1434,5.64858 0,7.76782 2.78893,14.49022 4.27976,10.31589 0.24554,-0.6875 0.84554,-0.87376 1.33334,-0.41392 0.50223,0.47345 -0.14137,1.66971 -1.4839,2.75811 l -2.3708,1.92203 2.8708,5.74189 c 2.31054,4.62131 3.30239,5.69673 5.08227,5.51051 1.45819,-0.15257 2.04227,0.20955 1.71473,1.06309 -1.41814,3.69564 8.59298,6.98356 13.90049,4.5653 z M 153,211 c 0,-0.55 0.92656,-1 2.05902,-1 1.13246,0 1.7809,0.45 1.44098,1 -0.33992,0.55 -1.26648,1 -2.05902,1 C 153.64844,212 153,211.55 153,211 Z m 96.82969,34.25 c 1.23593,-2.40305 0.39094,-4.25 -1.94441,-4.25 -2.44648,0 -3.50509,2.54825 -1.87471,4.51273 1.62141,1.95368 2.71798,1.87825 3.81912,-0.26273 z M 132.8,238.8 c 1.44555,-1.44555 1.58587,-5.44349 0.22067,-6.28723 -2.49847,-1.54414 -7.12926,3.88447 -5.5262,6.47828 0.852,1.37857 3.84363,1.27085 5.30553,-0.19105 z m 110.01111,-7.6239 C 243.15137,226.44701 241.80161,224 238.8528,224 c -3.47123,0 -4.48123,7.05503 -1.54587,10.79826 0.55993,0.71404 1.95744,1.16404 3.10556,1 1.68963,-0.24141 2.14681,-1.12241 2.39862,-4.62216 z m -42.35701,0.0726 c 2.84073,-4.29264 5.58421,-11.83348 9.00399,-24.74873 8.1436,-30.75543 11.20851,-37.92296 15.71258,-36.74512 1.7735,0.46378 1.96107,0.20761 1.36077,-1.85847 -1.11184,-3.82675 -4.05147,-7.36959 -6.40471,-7.71897 -2.98039,-0.44248 -6.21762,7.07704 -8.96432,20.82256 -6.2608,31.33138 -7.38187,36.49985 -9.17914,42.31875 -2.13286,6.9054 -4.91322,10.30584 -7.58747,9.27964 -1.40739,-0.54007 -1.47443,-0.39805 -0.4148,0.87872 2.00852,2.42012 3.80646,1.80117 6.4731,-2.22838 z M 186,226 c 0,-0.55 -0.84825,-1 -1.88499,-1 -4.95334,0 -8.11451,-10.8102 -13.6987,-46.8452 -4.11813,-26.57441 -7.26156,-38.21746 -10.64527,-39.42933 -2.03911,-0.7303 -4.41477,0.97906 -5.54015,3.98631 -2.27705,6.08473 -2.27534,6.2637 0.0576,6.0196 3.57449,-0.37399 7.15309,8.34264 11.81092,28.76862 8.73842,38.32065 12.69056,49.5 17.49933,49.5 C 184.91945,227 186,226.55 186,226 Z M 173.8,124.8 c 1.90049,-1.90049 1.45794,-4.8 -0.73261,-4.8 -2.00349,0 -3.66527,3.22359 -2.57292,4.99105 0.82367,1.33273 1.84052,1.27396 3.30553,-0.19105 z m 7.2,-8.38333 c 0,-1.76593 -2.15276,-1.45839 -2.77083,0.39583 -0.21771,0.65313 0.31666,1.1875 1.1875,1.1875 C 180.2875,118 181,117.2875 181,116.41667 Z M 321.22775,364.75 c 0.80178,-1.2375 3.36887,-5.2875 5.70465,-9 2.33579,-3.7125 4.57054,-6.75 4.96611,-6.75 0.39558,0 1.59274,0.64951 2.66036,1.44336 1.84937,1.37513 1.58778,1.80057 -5.53384,9 -7.38886,7.46958 -10.62608,9.67276 -7.79728,5.30664 z m 13.80405,-1.02852 c -0.0859,-2.10179 6.48584,-13.23965 11.0424,-18.71492 7.69437,-9.24572 18.64027,-16.70867 41.65793,-28.40251 22.79391,-11.58016 29.59288,-16.14244 32.98705,-22.13514 2.73995,-4.83764 2.94568,-12.41273 0.47438,-17.46683 -1.92928,-3.94558 -1.13635,-3.75305 -32.69356,-7.93836 -24.4386,-3.24119 -31.5,-4.42455 -31.5,-5.2788 0,-0.44432 2.925,-2.1527 6.5,-3.79639 15.63131,-7.18687 19.64019,-9.08332 30.5,-14.42846 6.325,-3.11312 11.275,-5.96443 11,-6.33625 -0.275,-0.37181 -3.53851,-2.13218 -7.25224,-3.91194 -19.07051,-9.1393 -25.57601,-24.06039 -21.34715,-48.96208 0.91999,-5.41739 1.8995,-11.4248 2.17667,-13.3498 0.27718,-1.925 0.92349,-4.625 1.43625,-6 1.61573,-4.33267 3.94894,-25.41758 2.92691,-26.45 -0.86002,-0.86877 -1.4753,3.16181 -1.13726,7.45 0.16943,2.1494 -2.70522,16.81694 -8.17346,41.70408 -5.53775,25.20347 -1.9099,39.48759 11.49339,45.25354 4.26277,1.83379 4.90261,2.42665 3.75728,3.4814 -1.21207,1.11623 -10.88326,7.80352 -30.11697,20.82484 -5.65721,3.82997 -7.36403,5.46886 -6.54672,6.28617 0.22933,0.22933 11.85355,2.70387 25.8316,5.49897 13.97805,2.7951 25.75617,5.61503 26.17361,6.2665 0.41744,0.65148 1.49221,3.07812 2.38837,5.39255 2.52687,6.52586 1.24009,12.44158 -3.80331,17.48498 -6.65106,6.65106 -14.60393,9.77375 -50.30697,19.753 -13.7977,3.85655 -23.02246,7.88148 -27.8964,12.17169 -5.19936,4.57666 -6.36273,3.9196 -1.3536,-0.76451 6.26467,-5.85818 13.74824,-8.84599 40.75,-16.2694 31.56309,-8.67742 42,-15.07836 42,-25.75851 0,-2.42274 -0.85232,-6.07566 -1.89404,-8.1176 l -1.89404,-3.71263 -27.10596,-5.38184 c -16.2302,-3.22247 -27.08967,-5.82948 -27.06537,-6.49753 0.0223,-0.61363 8.57232,-6.8991 19,-13.96769 C 377.46827,244.57941 386,238.46414 386,238.05852 c 0,-0.40562 -1.06961,-1.22484 -2.37691,-1.82048 -3.72666,-1.69798 -9.39041,-7.06643 -11.13871,-10.55794 -2.34485,-4.68287 -3.43407,-15.58443 -2.39096,-23.9301 1.1109,-8.8881 2.06429,-13.96741 5.39638,-28.75 3.34405,-14.83563 5.46879,-29.69854 5.49188,-38.41667 0.0252,-9.51908 0.82693,-7.98045 1.9413,3.72569 0.0424,0.44496 0.52702,0.5309 1.07702,0.19098 1.47952,-0.91439 1.24272,9.62132 -0.42704,19 -0.78336,4.4 -2.53175,13.175 -3.88529,19.5 -1.35355,6.325 -2.75417,14.66027 -3.1125,18.52282 -1.16111,12.51607 2.79402,23.96423 10.76807,31.16832 3.62549,3.2754 18.93684,11.30886 21.55411,11.30886 3.50601,0 -1.24444,2.74204 -21.64735,12.49523 -12.5125,5.98134 -23.3273,11.38519 -24.03288,12.00856 -1.34414,1.18752 0.4041,1.4942 39.67511,6.95999 9.56572,1.33137 17.73419,2.78417 18.15215,3.22845 1.39369,1.48145 3.95591,10.33516 3.93366,13.59272 -0.0121,1.76828 -0.85023,5.03855 -1.86256,7.26727 -3.20664,7.05968 -10.98643,12.68932 -31.83649,23.03765 -10.57156,5.24689 -22.62087,11.75925 -26.77626,14.47192 -9.61325,6.2756 -19.16019,15.94975 -23.21681,23.52617 -3.35805,6.27174 -6.20139,10.42416 -6.25412,9.13352 z"
|
||||
id="path204" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 19 KiB |
|
@ -2,20 +2,12 @@
|
|||
* Add your global events here
|
||||
*/
|
||||
|
||||
import MAP_DRIVER from '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/drivers/_map.google';
|
||||
//import MAP_DRIVER from '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/drivers/_map.mapbox';
|
||||
import MAP_DRIVER from '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/drivers/map.google'
|
||||
// import MAP_DRIVER from '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/drivers/map.mapbox';
|
||||
|
||||
const CONSTS = {
|
||||
ENVS: [
|
||||
'xs',
|
||||
'sm',
|
||||
'md',
|
||||
'lg',
|
||||
'xl',
|
||||
'xxl',
|
||||
'xxxl',
|
||||
],
|
||||
MAP_DRIVER: MAP_DRIVER
|
||||
};
|
||||
ENVS: ['xs', 'sm', 'md', 'lg', 'xl', 'xxl', 'xxxl'],
|
||||
MAP_DRIVER,
|
||||
}
|
||||
|
||||
export default CONSTS;
|
||||
export default CONSTS
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
import '@a2nt/mithril-ui/src/js/ui'
|
||||
import Events from '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/_events'
|
||||
|
||||
const m = require("mithril") // eslint-disable-line
|
||||
const MainContentContainer = document.getElementById('MainContent')
|
||||
|
||||
const MainContent = document.createElement('div')
|
||||
if (!MainContentContainer.dataset['legacy']) {
|
||||
MainContent.classList.add('page--container')
|
||||
MainContentContainer.append(MainContent)
|
||||
|
||||
const page = require('@a2nt/mithril-ui/src/js/ui/page/tpl')
|
||||
m.mount(MainContent, page)
|
||||
} else {
|
||||
// legacy fallback
|
||||
const spinner = document.getElementById('PageLoading')
|
||||
if (spinner) {
|
||||
window.addEventListener(`${Events.LOADED}`, () => {
|
||||
spinner.classList.add('d-none')
|
||||
})
|
||||
|
||||
window.addEventListener(`${Events.AJAX}`, () => {
|
||||
spinner.classList.add('d-none')
|
||||
})
|
||||
}
|
||||
}
|
|
@ -1,74 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
import $ from 'jquery';
|
||||
import Events from '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_events';
|
||||
|
||||
// AOS
|
||||
import 'aos/dist/aos.css';
|
||||
import AOS from 'aos/dist/aos.js';
|
||||
|
||||
const LayoutUI = (($) => {
|
||||
// Constants
|
||||
const W = window;
|
||||
const $W = $(W);
|
||||
const D = document;
|
||||
const $Body = $('body');
|
||||
|
||||
const NAME = 'LayoutUI';
|
||||
|
||||
class LayoutUI {
|
||||
static init() {
|
||||
const ui = this;
|
||||
ui.dispose();
|
||||
|
||||
console.log(`${NAME}: init`);
|
||||
// your custom UI
|
||||
AOS.init();
|
||||
|
||||
// Fire further js when layout is ready
|
||||
$W.trigger(Events.LODEDANDREADY);
|
||||
|
||||
// Custom fonts
|
||||
$Body.append(
|
||||
'<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,400i,700,700i&display=swap" rel="stylesheet" />',
|
||||
);
|
||||
|
||||
/*google analytics */
|
||||
/*(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', 'UA-********-*', 'auto');
|
||||
ga('send', 'pageview');*/
|
||||
}
|
||||
|
||||
static dispose() {
|
||||
console.log(`${NAME}: dispose`);
|
||||
}
|
||||
}
|
||||
|
||||
$W.on(`${NAME}.init ${Events.AJAX} ${Events.LOADED}`, () => {
|
||||
LayoutUI.init();
|
||||
});
|
||||
|
||||
W.LayoutUI = LayoutUI;
|
||||
|
||||
return LayoutUI;
|
||||
})($);
|
||||
|
||||
export default LayoutUI;
|
|
@ -1,115 +1,68 @@
|
|||
'use strict';
|
||||
'use strict'
|
||||
/*
|
||||
* UI Basics
|
||||
*/
|
||||
// import $ from 'jquery';
|
||||
import '../scss/app.scss'
|
||||
|
||||
import '../scss/app.scss';
|
||||
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/main'
|
||||
|
||||
// import Bootstrap
|
||||
import 'popper.js';
|
||||
import 'bootstrap/js/dist/util';
|
||||
import 'bootstrap/js/dist/alert';
|
||||
import 'bootstrap/js/dist/button';
|
||||
import 'bootstrap/js/dist/carousel';
|
||||
import 'bootstrap/js/dist/collapse';
|
||||
/*
|
||||
* Extra functionality
|
||||
*/
|
||||
import './_graphql'
|
||||
import '@a2nt/meta-lightbox-js/src/js/app'
|
||||
import 'bootstrap/js/src/collapse'
|
||||
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/ui/dropdown'
|
||||
//import '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/ui/carousel'
|
||||
import "@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/ui/glide";
|
||||
// import '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/ui/datepicker';
|
||||
// import '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/ui/instagram.feed';
|
||||
|
||||
//import 'hammerjs/hammer';
|
||||
//import 'jquery-hammerjs/jquery.hammer';
|
||||
//import '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/ui/captcha'
|
||||
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/ui/turnstile'
|
||||
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/ui/password'
|
||||
|
||||
// Routie
|
||||
//import 'pouchdb/dist/pouchdb';
|
||||
//import '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/routes/index';
|
||||
/*
|
||||
* AJAX functionality
|
||||
*/
|
||||
// import '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/ajax/links';
|
||||
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/ajax/online'
|
||||
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/ajax/lazy-images'
|
||||
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/ajax/form'
|
||||
|
||||
// conflicts with _components/_ui.hover.js (shows dropdown on hover)
|
||||
//import 'bootstrap/js/dist/dropdown';
|
||||
/*
|
||||
* Site specific modules
|
||||
*/
|
||||
import './layout'
|
||||
|
||||
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.shrink';
|
||||
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.hover';
|
||||
/*
|
||||
* Import fonts and images
|
||||
*/
|
||||
function importAll (r) {
|
||||
return r.keys().map(r)
|
||||
}
|
||||
|
||||
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.carousel';
|
||||
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.menu';
|
||||
|
||||
import 'bootstrap/js/dist/modal';
|
||||
import 'bootstrap/js/dist/tooltip';
|
||||
import 'bootstrap/js/dist/popover';
|
||||
import 'bootstrap/js/dist/scrollspy';
|
||||
import 'bootstrap/js/dist/tab';
|
||||
//
|
||||
|
||||
import Spinner from '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.spinner';
|
||||
|
||||
// Sticky sidebar
|
||||
import SidebarUI from '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.sidebar';
|
||||
|
||||
//import Multislider from '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.multislider';
|
||||
|
||||
// Flyout UI
|
||||
//import Flyout from '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.flyout';
|
||||
|
||||
// Offcanvas menu
|
||||
//import 'offcanvas-bootstrap/dist/js/bootstrap.offcanvas';
|
||||
|
||||
// Uncomment it to enable meta-lightbox zooming on hover
|
||||
//import 'jquery-zoom/jquery.zoom';
|
||||
|
||||
// Toggle bootstrap form fields
|
||||
//import FormToggleUI from '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.form.fields.toggle';
|
||||
|
||||
// Bootstrap Date & Time fields
|
||||
//import FormDatetime from '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.form.datetime';
|
||||
|
||||
// Stepped forms functionality
|
||||
//import FormStepped from '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.form.stepped';
|
||||
|
||||
// Forms validation functionality
|
||||
import FormValidate from '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.form.validate';
|
||||
|
||||
// Store forms data into localStorage
|
||||
import FormStorage from '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.form.storage';
|
||||
|
||||
// Google NoCaptcha fields
|
||||
import NoCaptcha from '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.nocaptcha';
|
||||
|
||||
// client-side images cropping
|
||||
//import FormCroppie from '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.form.croppie';
|
||||
|
||||
// youtube video preview image
|
||||
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.video.preview';
|
||||
|
||||
// Meta Lightbox
|
||||
import '@a2nt/meta-lightbox/src/js/app';
|
||||
|
||||
//import Confirmation from 'bootstrap-confirmation2/dist/bootstrap-confirmation';
|
||||
//import Table from 'bootstrap-table/dist/bootstrap-table';
|
||||
|
||||
// AJAX UI
|
||||
//import AjaxUI from '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.ajax';
|
||||
|
||||
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_main';
|
||||
import './_layout';
|
||||
importAll(
|
||||
require.context('../img/', false, /\.(png|webp|jpg|jpeg|gif|svg)$/)
|
||||
)
|
||||
importAll(
|
||||
require.context('font-awesome', false, /\.(otf|eot|ttf|woff|woff2)$/)
|
||||
)
|
||||
|
||||
/*
|
||||
* Service workers
|
||||
*/
|
||||
// Register service worker
|
||||
if ('serviceWorker' in navigator) {
|
||||
const baseHref = (document.getElementsByTagName('base')[0] || {}).href;
|
||||
const version = (document.querySelector('meta[name="swversion"]') || {})
|
||||
.content;
|
||||
if (baseHref) {
|
||||
navigator.serviceWorker
|
||||
.register(`${baseHref}sw.js?v=${version}`)
|
||||
.then(() => {
|
||||
console.log('Service Worker Registered');
|
||||
});
|
||||
}
|
||||
const baseHref = (document.getElementsByTagName('base')[0] || {}).href
|
||||
const version = (document.querySelector('meta[name="swversion"]') || {})
|
||||
.content
|
||||
if (baseHref) {
|
||||
navigator.serviceWorker
|
||||
.register(`${baseHref}sw.js?v=${version}`)
|
||||
.then(() => {
|
||||
console.log('Service Worker Registered')
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function importAll(r) {
|
||||
return r.keys().map(r);
|
||||
}
|
||||
|
||||
const images = importAll(
|
||||
require.context('../img/', false, /\.(png|jpe?g|svg)$/),
|
||||
);
|
||||
const fontAwesome = importAll(
|
||||
require.context('font-awesome', false, /\.(otf|eot|svg|ttf|woff|woff2)$/),
|
||||
);
|
||||
|
||||
// Google Analytics
|
||||
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/drivers/_google.track.external.links';
|
||||
//import MarkerClusterer from '@google/markerclusterer/src/markerclusterer.js';
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
import Events from '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/_events'
|
||||
|
||||
const LayoutUI = ((W) => {
|
||||
const NAME = '_layout'
|
||||
const D = document
|
||||
|
||||
const initFonts = () => {
|
||||
console.log(`${NAME}: initFonts`)
|
||||
|
||||
const css = D.createElement('link')
|
||||
css.rel = 'stylesheet'
|
||||
css.type = 'text/css'
|
||||
css.media = 'all'
|
||||
css.href =
|
||||
'https://fonts.googleapis.com/css?family=Roboto:ital,wght@0,400;0,700;1,400&display=swap'
|
||||
D.getElementsByTagName('head')[0].appendChild(css)
|
||||
}
|
||||
|
||||
const initAnalytics = () => {
|
||||
console.log(`${NAME}: initAnalytics`)
|
||||
/* google analytics */
|
||||
/* (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', 'UA-********-*', 'auto');
|
||||
ga('send', 'pageview'); */
|
||||
}
|
||||
|
||||
W.addEventListener(`${Events.LODEDANDREADY}`, () => {
|
||||
initFonts()
|
||||
initAnalytics()
|
||||
})
|
||||
})(window)
|
||||
export default LayoutUI
|
|
@ -1,64 +0,0 @@
|
|||
/*
|
||||
***************************************************************
|
||||
* *** PAGE SPECIFIC CODDING ***
|
||||
* Place it into app/client/src/js/types
|
||||
* Require page specific css as mentioned bellow
|
||||
*
|
||||
* If you don't need page specific JS (only CSS)
|
||||
* you can create SCSS file at app/client/src/scss/types
|
||||
* !!! BUT NOT BOTH at "types" folder !!!
|
||||
***************************************************************
|
||||
*
|
||||
* An example of Page specific JS and Mapbox functionality
|
||||
* Take a look to app/templates/Objects/Map.ss for HTML
|
||||
* Take a look to https://github.com/a2nt/silverstripe-mapboxfield/blob/master/README.md for Data Structure
|
||||
*/
|
||||
"use strict";
|
||||
|
||||
// your page specific css
|
||||
import '../scss/_types/PageTypeClassName.scss';
|
||||
|
||||
import $ from 'jquery';
|
||||
import Events from '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_events';
|
||||
|
||||
// Mapbox API
|
||||
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.map.api';
|
||||
|
||||
const PageTypeUI = (($) => {
|
||||
// Constants
|
||||
const W = window;
|
||||
const D = document;
|
||||
const $Body = $('body');
|
||||
|
||||
const NAME = 'PageTypeUI';
|
||||
class PageTypeUI {
|
||||
// Static methods
|
||||
|
||||
static init() {
|
||||
this.dispose();
|
||||
console.log(`Initializing: ${NAME}`);
|
||||
// custom page specific functionality
|
||||
}
|
||||
|
||||
static initMap() {
|
||||
// custom map functionality
|
||||
}
|
||||
|
||||
static dispose() {
|
||||
console.log(`Destroying: ${NAME}`);
|
||||
}
|
||||
}
|
||||
|
||||
$(W).on(`${Events.AJAX} ${Events.LOADED}`, () => {
|
||||
PageTypeUI.init();
|
||||
});
|
||||
|
||||
$(W).on(Events.MAPLOADED, () => {
|
||||
PageTypeUI.initMap();
|
||||
});
|
||||
|
||||
return PageTypeUI;
|
||||
|
||||
})($);
|
||||
|
||||
export default PageTypeUI;
|
|
@ -1,3 +1,3 @@
|
|||
"use strict";
|
||||
'use strict'
|
||||
|
||||
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.map.api';
|
||||
// import '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.map.api';
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
"use strict";
|
||||
'use strict'
|
||||
|
||||
import $ from 'jquery';
|
||||
import Events from '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_events';
|
||||
// import Events from '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/_events'
|
||||
|
||||
// Mapbox API
|
||||
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.map.api';
|
||||
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/ui/map.api'
|
||||
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/scss/types/map.api.scss'
|
||||
|
||||
const LocationUI = (($) => {
|
||||
/* const LocationUI = (($) => {
|
||||
// Constants
|
||||
const W = window;
|
||||
const D = document;
|
||||
|
@ -59,4 +59,4 @@ const LocationUI = (($) => {
|
|||
|
||||
})($);
|
||||
|
||||
export default LocationUI;
|
||||
export default LocationUI; */
|
||||
|
|
|
@ -1,4 +1,15 @@
|
|||
'use strict';
|
||||
'use strict'
|
||||
|
||||
import '../../scss/_cms.scss';
|
||||
//import '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.image-position';
|
||||
import '../../scss/_cms.scss'
|
||||
import "@a2nt/meta-lightbox-js/src/js/app";
|
||||
|
||||
(function ($) {
|
||||
$.entwine("ss", ($) => {
|
||||
$('[data-toggle="lightbox"]').entwine({
|
||||
onmatch() {
|
||||
console.log("Init lightbox links at CMS");
|
||||
window.dispatchEvent(new Event("MetaWindow.initLinks"));
|
||||
},
|
||||
});
|
||||
});
|
||||
})(jQuery);
|
||||
|
|
|
@ -1,48 +1,3 @@
|
|||
'use strict';
|
||||
'use strict'
|
||||
|
||||
import $ from 'jquery';
|
||||
import Events from '@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_events';
|
||||
|
||||
import '../../scss/dev.scss';
|
||||
|
||||
const DevUI = ($ => {
|
||||
// Constants
|
||||
const W = window;
|
||||
const D = document;
|
||||
const $Body = $('body');
|
||||
|
||||
const NAME = 'DevUI';
|
||||
class DevUI {
|
||||
// Static methods
|
||||
|
||||
static init() {
|
||||
this.dispose();
|
||||
console.log(`Initializing: ${NAME}`);
|
||||
|
||||
const $el = $('#DevUtilities');
|
||||
this.$el = $el;
|
||||
|
||||
const $orig = $el.find('.original');
|
||||
|
||||
$el.find('.toggle-original').on('click', () => {
|
||||
if ($orig.hasClass('d-none')) {
|
||||
$orig.removeClass('d-none');
|
||||
} else {
|
||||
$orig.addClass('d-none');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
static dispose() {
|
||||
console.log(`Destroying: ${NAME}`);
|
||||
}
|
||||
}
|
||||
|
||||
$(W).on(`${Events.AJAX} ${Events.LOADED}`, () => {
|
||||
DevUI.init();
|
||||
});
|
||||
|
||||
return DevUI;
|
||||
})($);
|
||||
|
||||
export default DevUI;
|
||||
import '../../scss/types/dev.scss'
|
||||
|
|
|
@ -1,14 +1,3 @@
|
|||
@import '~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/types/cms.scss';
|
||||
|
||||
.notifications-list {
|
||||
.alert {
|
||||
.btn-close {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-outline-primary,
|
||||
.btn-primary {
|
||||
color: #fff;
|
||||
}
|
||||
@import "./variables";
|
||||
@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/scss/types/cms";
|
||||
@import "~@a2nt/meta-lightbox-js/src/scss/app";
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
/* style elements here */
|
|
@ -1,204 +0,0 @@
|
|||
/**
|
||||
* Your custom style
|
||||
*/
|
||||
body {
|
||||
position: relative;
|
||||
}
|
||||
.field {
|
||||
margin: 2rem 0;
|
||||
&.required:after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
.form-control,
|
||||
.select2-container--default .select2-selection,
|
||||
.select2-dropdown .select2-search__field {
|
||||
border-width: 0 0 1px 0;
|
||||
}
|
||||
|
||||
.bg-alt {
|
||||
@extend .bg-dark;
|
||||
|
||||
background-color: $bg-alt !important;
|
||||
}
|
||||
|
||||
.bootstrap-select .dropdown-toggle .filter-option .option {
|
||||
background: #dedede;
|
||||
padding: 0.2rem 0.5rem;
|
||||
margin: 0.2rem;
|
||||
color: #212529;
|
||||
}
|
||||
|
||||
$full-body-min-width: map-get($grid-breakpoints, 'sm') !default;
|
||||
|
||||
@media (max-width: $full-body-min-width - 1) {
|
||||
.jsSidebarUI__inner {
|
||||
width: auto !important;
|
||||
transform: none !important;
|
||||
position: static !important;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
padding: 0;
|
||||
border-radius: 0;
|
||||
|
||||
.dropdown-list {
|
||||
@extend .list-unstyled;
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
top: 0;
|
||||
left: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
// shrink elements on scroll
|
||||
body.shrink {
|
||||
}
|
||||
|
||||
// sticky footer
|
||||
@media (min-width: $full-body-min-width) {
|
||||
/*body {
|
||||
height: 100%;
|
||||
min-height: 100%;
|
||||
}*/
|
||||
|
||||
.wrapper {
|
||||
min-height: 100%;
|
||||
padding-bottom: $footer-size + $footer-bar-size + $grid-gutter-height /
|
||||
2;
|
||||
|
||||
//padding-top: $grid-gutter-height;
|
||||
}
|
||||
|
||||
.footer {
|
||||
height: $footer-size + $footer-bar-size + $grid-gutter-height / 2;
|
||||
margin-top: -($footer-size + $footer-bar-size + $grid-gutter-height / 2);
|
||||
}
|
||||
}
|
||||
|
||||
// site blocks (elements)
|
||||
.element {
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
|
||||
&.site__elements__sliderelement {
|
||||
.element-container {
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
max-width: none;
|
||||
}
|
||||
}
|
||||
|
||||
&.dynamic__elements__image__elements__elementimage {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
&.site__elements__accordion {
|
||||
.card {
|
||||
padding-left: 0;
|
||||
padding-right: 0;
|
||||
|
||||
.card-header {
|
||||
@extend .bg-dark;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar__col {
|
||||
position: relative;
|
||||
margin-bottom: $grid-gutter-element-height * 2;
|
||||
}
|
||||
.content-holder__sidebar {
|
||||
> .container {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
#SiteWideMessage {
|
||||
text-align: center;
|
||||
.alert {
|
||||
margin-bottom: 0;
|
||||
.btn-close {
|
||||
margin-top: -0.5rem;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// stick navbar to top using mobile layout
|
||||
/*#Header {
|
||||
position: relative;
|
||||
padding-top: $grid-gutter-height / 2;
|
||||
padding-bottom: 1rem;
|
||||
|
||||
@media (min-width: map-get($grid-breakpoints, "lg")) {
|
||||
padding-top: 1rem;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
#Navigation {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 10;
|
||||
|
||||
@media (min-width: map-get($grid-breakpoints, "lg")) {
|
||||
position: relative;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
}*/
|
||||
|
||||
#MainContent {
|
||||
padding-top: $grid-gutter-element-height;
|
||||
padding-bottom: $grid-gutter-element-height;
|
||||
}
|
||||
|
||||
#PageBreadcumbs {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
#Footer {
|
||||
background-color: $dark;
|
||||
color: darken($white, 5%);
|
||||
> .wrapper {
|
||||
padding-top: $grid-gutter-element-height;
|
||||
}
|
||||
|
||||
a {
|
||||
color: $white;
|
||||
}
|
||||
|
||||
ul {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.footer {
|
||||
background-color: darken($dark, 5%);
|
||||
|
||||
.copyright {
|
||||
padding-right: 0.5rem;
|
||||
}
|
||||
|
||||
li {
|
||||
padding: 0 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: $full-body-min-width) {
|
||||
.wrapper {
|
||||
padding-bottom: $footer-bar-size;
|
||||
}
|
||||
|
||||
.footer {
|
||||
height: $footer-bar-size;
|
||||
margin-top: -$footer-bar-size;
|
||||
line-height: $footer-bar-size;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,26 +1,33 @@
|
|||
// Add your site-wide, but not content editor typography styling
|
||||
|
||||
.bg-dark {
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
.h1,
|
||||
.h2,
|
||||
.h3,
|
||||
.h4,
|
||||
.h5,
|
||||
.h6,
|
||||
.typography,
|
||||
a {
|
||||
color: $white;
|
||||
}
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
.h1,
|
||||
.h2,
|
||||
.h3,
|
||||
.h4,
|
||||
.h5,
|
||||
.h6,
|
||||
.typography,
|
||||
a {
|
||||
color: $white;
|
||||
}
|
||||
}
|
||||
|
||||
.typography {
|
||||
@include clearfix;
|
||||
@include clearfix;
|
||||
@import "./types/editor";
|
||||
|
||||
@import './types/editor';
|
||||
a.btn-primary {
|
||||
color: $white;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,69 +0,0 @@
|
|||
/*
|
||||
* Your custom variables
|
||||
*/
|
||||
|
||||
// screen size - 32px (ex. 1400 - 32 = 1368)
|
||||
$grid-breakpoints: (
|
||||
xs: 0,
|
||||
sm: 576px,
|
||||
md: 768px,
|
||||
lg: 992px,
|
||||
xl: 1168px,
|
||||
xxl: 1368px,
|
||||
xxxl: 1568px,
|
||||
xxxxl: 1868px,
|
||||
);
|
||||
// screen size - (32px * 2) (ex. 1400 - 64 = 1336)
|
||||
$container-max-widths: (
|
||||
sm: 540px,
|
||||
md: 720px,
|
||||
lg: 960px,
|
||||
xl: 1136px,
|
||||
xxl: 1336px,
|
||||
xxxl: 1536px,
|
||||
xxxxl: 1836px,
|
||||
);
|
||||
|
||||
$full-body-min-width: map-get($grid-breakpoints, 'lg');
|
||||
|
||||
$font-family-sans-serif: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
||||
'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji',
|
||||
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
|
||||
$font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas,
|
||||
'Liberation Mono', 'Courier New', monospace;
|
||||
|
||||
$font-family-base: 'Lato', $font-family-sans-serif;
|
||||
|
||||
$grid-gutter-width: 2rem;
|
||||
$grid-gutter-height: 2rem;
|
||||
$grid-gutter-element-height: $grid-gutter-height;
|
||||
|
||||
$border-radius: 0.25rem;
|
||||
$border-radius-lg: 0.3rem;
|
||||
$border-radius-sm: 0.2rem;
|
||||
|
||||
$font-size-base: 1rem;
|
||||
$h1-font-size: $font-size-base * 2.25;
|
||||
$h3-font-size: $font-size-base * 1.75;
|
||||
$h4-font-size: $font-size-base * 1.5;
|
||||
$h5-font-size: $font-size-base * 1.25;
|
||||
$h6-font-size: $font-size-base;
|
||||
|
||||
@import '~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_variables';
|
||||
|
||||
// Add your site-wide + content editor typography styling
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
.h1,
|
||||
.h2,
|
||||
.h3,
|
||||
.h4,
|
||||
.h5,
|
||||
.h6 {
|
||||
color: $headings-color;
|
||||
}
|
|
@ -1,31 +1,16 @@
|
|||
//@import "~bootstrap-select/sass/bootstrap-select.scss";
|
||||
@import "variables";
|
||||
|
||||
//@import "~bootstrap-datepicker/dist/css/bootstrap-datepicker.css";
|
||||
//@import "~bootstrap-timepicker/css/bootstrap-timepicker.css";
|
||||
@import "~@a2nt/meta-lightbox-js/src/scss/app";
|
||||
@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/scss/libs/bootstrap";
|
||||
|
||||
// Your custom variables
|
||||
@import '_variables';
|
||||
@import "~bootstrap/scss/card";
|
||||
@import "~bootstrap/scss/accordion";
|
||||
//@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/scss/ui/datepicker";
|
||||
|
||||
//@import "~bootstrap-select/dist/css/bootstrap-select.css";
|
||||
// conflicts to bootstrap-select
|
||||
//@import "~select2/dist/css/select2.css";
|
||||
|
||||
@import '~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.bootstrap';
|
||||
|
||||
// By default we prefer font awesome CDN
|
||||
//@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/js/_components/_ui.fontawesome";
|
||||
@import '~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.lightbox';
|
||||
|
||||
// Flyout UI
|
||||
//@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.flyout";
|
||||
|
||||
@import '~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.main';
|
||||
@import '~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.form.basics';
|
||||
@import '~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.elemental';
|
||||
|
||||
//@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/_components/_ui.form.stepped";
|
||||
@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/scss/layout";
|
||||
@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/scss/libs/silverstripe";
|
||||
|
||||
// Your custom styling
|
||||
@import '_typography';
|
||||
@import '_layout';
|
||||
@import '_elements';
|
||||
@import "typography";
|
||||
@import "layout";
|
||||
@import "elements";
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
/*
|
||||
* Use this file to display original website template image above current layout
|
||||
*/
|
||||
#DevUtilities {
|
||||
display: none;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 999;
|
||||
|
||||
.navs {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.original {
|
||||
position: absolute;
|
||||
|
||||
top: 0;
|
||||
left: 0;
|
||||
|
||||
width: 100%;
|
||||
height: 10000px;
|
||||
|
||||
background-repeat: no-repeat;
|
||||
|
||||
/*background-image: url(../img/original2.png);
|
||||
background-image: url(../img/original.png);*/
|
||||
|
||||
background-color: transparent;
|
||||
background-size: 1854px auto;
|
||||
background-position: top center;
|
||||
opacity: 0.5;
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
.carousel {
|
||||
&-caption {
|
||||
font-size: 3rem;
|
||||
padding: 6rem 0;
|
||||
}
|
||||
&-title {
|
||||
font-size: 4rem;
|
||||
}
|
||||
|
||||
&-content {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
&__img {
|
||||
min-width: 100%;
|
||||
background-size: cover;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.glide__slide {
|
||||
video {
|
||||
pointer-events: none;
|
||||
background: $black;
|
||||
aspect-ratio: 1920/549;
|
||||
min-width: 100%;
|
||||
max-width: 100%;
|
||||
min-height: 20rem;
|
||||
object-fit: cover;
|
||||
|
||||
&::after {
|
||||
position: absolute;
|
||||
z-index: 9;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
display: block;
|
||||
content: "";
|
||||
}
|
||||
}
|
||||
|
||||
video::-webkit-media-controls,
|
||||
video::-moz-media-controls,
|
||||
video::-o-media-controls,
|
||||
video::-ms-media-controls,
|
||||
video::-webkit-media-controls-enclosure,
|
||||
video::-webkit-slider-thumb,
|
||||
video::-moz-range-track,
|
||||
video::-moz-range-thumb {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.a2nt__elementalbasics__elements__sliderelement {
|
||||
padding: 0;
|
||||
|
||||
.element__container {
|
||||
max-width: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.slide-link__media {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.carousel-item {
|
||||
&:hover,
|
||||
&:focus {
|
||||
.carousel__btn {
|
||||
color: $white !important;
|
||||
|
||||
@extend .btn-primary,
|
||||
:hover;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/scss/elements";
|
||||
@import "carousel";
|
|
@ -0,0 +1,38 @@
|
|||
/**
|
||||
* Your custom style
|
||||
*/
|
||||
|
||||
body {
|
||||
}
|
||||
|
||||
/*#MainContent {
|
||||
padding-top: 2 * $element-reduced-spacer-y;
|
||||
padding-bottom: 2 * $element-reduced-spacer-y;
|
||||
}*/
|
||||
|
||||
// disable animation
|
||||
main {
|
||||
|
||||
&.loaded,
|
||||
&.loading {
|
||||
animation: none;
|
||||
}
|
||||
}
|
||||
|
||||
#PageBreadcumbs {
|
||||
padding-bottom: 0;
|
||||
margin-bottom: -2rem;
|
||||
}
|
||||
|
||||
.page-header-element {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
// hide content loading anmation by default
|
||||
//.form-container,
|
||||
main {
|
||||
&.loaded,
|
||||
&.loading {
|
||||
animation: none;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,2 @@
|
|||
#Footer {
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
#SiteWideMessage {
|
||||
text-align: center;
|
||||
|
||||
.alert {
|
||||
margin-bottom: 0;
|
||||
|
||||
.btn-close {
|
||||
float: right;
|
||||
margin-top: -.5rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Header {
|
||||
position: relative;
|
||||
z-index: 9;
|
||||
|
||||
.element {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.nav-container {
|
||||
position: static;
|
||||
display: flex;
|
||||
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
@import "base";
|
||||
@import "header";
|
||||
@import "navigation";
|
||||
@import "footer";
|
|
@ -0,0 +1,91 @@
|
|||
#Header {
|
||||
.element--nav {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
#Navigation {
|
||||
padding: 0;
|
||||
|
||||
.navbar-nav {
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
|
||||
align-items: stretch;
|
||||
justify-content: stretch;
|
||||
}
|
||||
|
||||
.nav {
|
||||
&-item {
|
||||
flex: 1 1;
|
||||
}
|
||||
|
||||
&-link {
|
||||
width: 100%;
|
||||
background: none;
|
||||
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
&.active {
|
||||
}
|
||||
|
||||
&.section {
|
||||
}
|
||||
|
||||
&[aria-expanded="true"],
|
||||
&:hover,
|
||||
&:focus {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.dropdown-toggle {
|
||||
&:after {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: $full-body-min-width) {
|
||||
.dropdown-toggle-touch {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.dropdown-toggle-notouch {
|
||||
display: flex !important;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-menu {
|
||||
top: 100%;
|
||||
min-width: 18em;
|
||||
border: 0;
|
||||
.dropdown-menu {
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown-item {
|
||||
&.active,
|
||||
&:active {
|
||||
}
|
||||
.nav {
|
||||
&-item {
|
||||
&[aria-expanded="true"],
|
||||
&:hover,
|
||||
&:focus {
|
||||
}
|
||||
}
|
||||
|
||||
&-link {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#PageBreadcumbs {
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Use this file to display original website template image above current layout
|
||||
*/
|
||||
#DevUtilities {
|
||||
display: none;
|
||||
left: 0;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
z-index: 999;
|
||||
|
||||
.navs {
|
||||
left: 0;
|
||||
position: fixed;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.original {
|
||||
background-color: transparent;
|
||||
|
||||
background-position: top center;
|
||||
background-repeat: no-repeat;
|
||||
|
||||
background-size: 1854px auto;
|
||||
height: 10000px;
|
||||
|
||||
left: 0;
|
||||
|
||||
/*background-image: url(../img/original2.png);
|
||||
background-image: url(../img/original.png);*/
|
||||
|
||||
opacity: 0.5;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,11 +1,11 @@
|
|||
@import '~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/types/editor';
|
||||
@import '../_variables';
|
||||
@import "../variables";
|
||||
@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/scss/types/editor";
|
||||
|
||||
// Add content editor (only) typography styling
|
||||
a {
|
||||
color: $link-color;
|
||||
color: $link-color;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 1px dashed #dedede;
|
||||
border: 1px dashed #dedede;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
@import "../_variables";
|
||||
@import "../variables";
|
||||
|
||||
@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate/src/scss/types/order";
|
||||
@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/scss/types/order";
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
@import "./colors";
|
|
@ -0,0 +1,3 @@
|
|||
$white: #fff;
|
||||
$black: #000;
|
||||
$gray-500: #212529;
|
|
@ -0,0 +1,15 @@
|
|||
//
|
||||
// !!! IMPORTANT !!
|
||||
// First Define Bootstrap and Webkit bootstrap UI variables
|
||||
//
|
||||
|
||||
@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/scss/mixings";
|
||||
@import "./ui";
|
||||
@import "~@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/scss/variables";
|
||||
$headings-margin-bottom: $spacer;
|
||||
|
||||
//
|
||||
// !!! IMPORTANT !!
|
||||
// Next Define your project variables
|
||||
//
|
||||
@import "./app";
|
|
@ -0,0 +1,39 @@
|
|||
@import "./colors";
|
||||
|
||||
// Bootstrap and Webkit bootstrap UI variables
|
||||
|
||||
$html-font-size: 14px;
|
||||
$font-family-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
$font-family-base: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
$body-bg: $white;
|
||||
$body-color: $gray-500;
|
||||
|
||||
$sidebar-nav-link-hover-color: $body-color;
|
||||
|
||||
// screen size - 32px (ex. 1400 - 32 = 1368)
|
||||
$grid-breakpoints: (
|
||||
xs: 0,
|
||||
sm: 576px,
|
||||
md: 768px,
|
||||
lg: 992px,
|
||||
xl: 1168px,
|
||||
);
|
||||
// container size - (32px * 2) (ex. 1400 - 64 = 1336)
|
||||
$container-max-widths: (
|
||||
sm: 540px,
|
||||
md: 720px,
|
||||
lg: 960px,
|
||||
xl: 1136px,
|
||||
);
|
||||
$enable-gradients: false;
|
||||
$enable-shadows: false;
|
||||
//
|
||||
|
||||
$full-body-min-width: map-get($grid-breakpoints, "lg");
|
||||
$typography-breakpoint: map-get($grid-breakpoints, "sm") - 1;
|
||||
$sliderelement-slide-ratio-x: 16;
|
||||
$sliderelement-slide-ratio-y: 9;
|
||||
|
||||
// disable large screen sizing by default
|
||||
$extra-large-screen: 80000px;
|
||||
$headings-line-height: 1.2;
|
|
@ -1,31 +0,0 @@
|
|||
en:
|
||||
SilverStripe\Security\Member:
|
||||
SURNAME: 'Last Name'
|
||||
db_Surname: 'Last Name'
|
||||
SUBJECTPASSWORDRESET: 'Your password reset link'
|
||||
ENTEREMAIL: 'Please enter an email address to get a password reset link.'
|
||||
PASSWORDRESETSENTHEADER: 'Password reset link sent'
|
||||
PASSWORDRESETSENTTEXT: 'Thank you. A reset link has been sent, provided an account exists for this email address.'
|
||||
Page:
|
||||
LOADINGTEXT: 'LOADING ..'
|
||||
JAVASCRIPTREQUIRED: 'Please, enable javascript!'
|
||||
UPGRADEBROWSER: 'Upgrade your browser'
|
||||
OUTDATEDBROWSER: 'You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today.'
|
||||
SilverShop\Model\Address:
|
||||
db_Surname: 'Last Name'
|
||||
SilverShop\Model\Order:
|
||||
db_Surname: 'Last Name'
|
||||
SilverShop\Page\CheckoutPage:
|
||||
ProceedToPayment: 'Send Order to Store'
|
||||
UndefinedOffset\NoCaptcha\Forms\NocaptchaField:
|
||||
EMPTY: 'Please prove you are human - check the Captcha box.'
|
||||
NOSCRIPT: 'You must enable JavaScript to submit this form'
|
||||
VALIDATE_ERROR: 'Captcha could not be validated'
|
||||
Dynamic\FlexSlider\Model\SlideImage:
|
||||
SINGULARNAME: 'Slide'
|
||||
PLURALNAME: 'Slides'
|
||||
Addressable:
|
||||
SUBURB: 'City'
|
||||
Symbiote\AddressableAddressable:
|
||||
SUBURB: 'City'
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
ru:
|
||||
Page:
|
||||
LOADINGTEXT: "ЗАГРУЗКА .."
|
||||
JAVASCRIPTREQUIRED: "Для корректной работы страницы требуется включить Javascript!"
|
||||
UPGRADEBROWSER: "Обновите браузер!"
|
||||
OUTDATEDBROWSER: "Вы используете устаревшую версию браузера. Обновите ваш браузер сейчас для повышения уровня безопасности вашей системы."
|
||||
PaginationLabel: "Переключение страниц"
|
||||
PaginationPrevious: "Назад"
|
||||
PaginationNext: "Вперед"
|
||||
SilverStripe\Blog\Model\Blog:
|
||||
PostedIn: "Категории"
|
||||
Tagged: "Отметки"
|
||||
Comments: "Коментарии"
|
||||
Posted: "Опубликовано"
|
||||
By: " - "
|
||||
AND: "и"
|
||||
LessThanAMinuteToRead: "Меньше минуты на чтение"
|
||||
MinutesToRead: "Минут на чтение"
|
||||
READMORE: "Подробнее"
|
|
@ -1,21 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Controllers;
|
||||
|
||||
use DNADesign\Elemental\Controllers\ElementController;
|
||||
use Site\Templates\DeferredRequirements;
|
||||
|
||||
class MapElementController extends ElementController
|
||||
{
|
||||
public function init()
|
||||
{
|
||||
parent::init();
|
||||
|
||||
DeferredRequirements::loadCSS('https://api.tiles.mapbox.com/mapbox-gl-js/v0.48.0/mapbox-gl.css');
|
||||
DeferredRequirements::loadJS('https://api.tiles.mapbox.com/mapbox-gl-js/v0.48.0/mapbox-gl.js');
|
||||
|
||||
DeferredRequirements::loadCSS('app_Site.Controllers.MapElementController.css');
|
||||
DeferredRequirements::loadJS('app_Site.Controllers.MapElementController.js');
|
||||
}
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 6/30/18
|
||||
* Time: 11:54 PM
|
||||
*/
|
||||
|
||||
namespace Site\Elements;
|
||||
|
||||
use DNADesign\ElementalList\Model\ElementList;
|
||||
|
||||
class AccordionElement extends ElementList
|
||||
{
|
||||
private static $singular_name = 'Accordion Element';
|
||||
|
||||
private static $plural_name = 'Accordion Element';
|
||||
|
||||
private static $description = 'Displays Accordion of Elements';
|
||||
|
||||
private static $table_name = 'AccordionElement';
|
||||
|
||||
public function getType()
|
||||
{
|
||||
return self::$singular_name;
|
||||
}
|
||||
|
||||
public function Accordion()
|
||||
{
|
||||
return $this->Elements()->renderWith(static::class.'_AccordionArea');
|
||||
}
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 6/30/18
|
||||
* Time: 11:54 PM
|
||||
*/
|
||||
|
||||
namespace Site\Elements;
|
||||
|
||||
use Sheadawson\Linkable\Forms\LinkField;
|
||||
use Sheadawson\Linkable\Models\Link;
|
||||
use SilverStripe\FontAwesome\FontAwesomeField;
|
||||
use DNADesign\Elemental\Models\ElementContent;
|
||||
|
||||
class BlockElement extends ElementContent
|
||||
{
|
||||
private static $singular_name = 'Block Element';
|
||||
|
||||
private static $plural_name = 'Block Element';
|
||||
|
||||
private static $description = 'Displays Block';
|
||||
|
||||
private static $table_name = 'BlockElement';
|
||||
|
||||
public function getType()
|
||||
{
|
||||
return self::$singular_name;
|
||||
}
|
||||
|
||||
private static $db = [
|
||||
'BlockIcon' => 'Varchar(255)',
|
||||
];
|
||||
|
||||
private static $has_one = [
|
||||
'BlockLink' => Link::class,
|
||||
];
|
||||
|
||||
public function getCMSFields()
|
||||
{
|
||||
$fields = parent::getCMSFields();
|
||||
|
||||
$fields->addFieldsToTab('Root.Main', [
|
||||
FontAwesomeField::create('BlockIcon'),
|
||||
LinkField::create('BlockLinkID', 'Link'),
|
||||
]);
|
||||
|
||||
return $fields;
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Elements;
|
||||
|
||||
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
|
||||
class ElementListExtension extends DataExtension
|
||||
{
|
||||
public function getControllerName()
|
||||
{
|
||||
return EmptyPageController::class;
|
||||
}
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Elements;
|
||||
|
||||
|
||||
use DNADesign\Elemental\Models\BaseElement;
|
||||
use SilverStripe\CMS\Model\SiteTree;
|
||||
|
||||
class ElementalContentControllerExtension extends \DNADesign\Elemental\Extensions\ElementalContentControllerExtension
|
||||
{
|
||||
private static $allowed_actions = array(
|
||||
'handleElement'
|
||||
);
|
||||
|
||||
public function handleElement()
|
||||
{
|
||||
$id = $this->owner->getRequest()->param('ID');
|
||||
|
||||
if (!$id) {
|
||||
user_error('No element ID supplied', E_USER_ERROR);
|
||||
return false;
|
||||
}
|
||||
|
||||
/** @var SiteTree $elementOwner */
|
||||
//$elementOwner = $this->owner->data();
|
||||
|
||||
/*$elementalAreaRelations = $this->owner->getElementalRelations();
|
||||
|
||||
if (!$elementalAreaRelations) {
|
||||
user_error(get_class($this->owner) . ' has no ElementalArea relationships', E_USER_ERROR);
|
||||
return false;
|
||||
}*/
|
||||
|
||||
$element = BaseElement::get()->byID($id);
|
||||
|
||||
if ($element) {
|
||||
return $element->getController();
|
||||
}
|
||||
|
||||
user_error('Element $id not found', E_USER_ERROR);
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Elements;
|
||||
|
||||
|
||||
use SilverStripe\SiteConfig\SiteConfig;
|
||||
|
||||
class EmptyPageController extends \PageController
|
||||
{
|
||||
public function __construct($dataRecord = null)
|
||||
{
|
||||
parent::__construct();
|
||||
$this->dataRecord->Title = SiteConfig::current_site_config()->getField('Title');
|
||||
|
||||
$this->setFailover($this->dataRecord);
|
||||
}
|
||||
|
||||
public static function DefaultContainer()
|
||||
{
|
||||
return \Page::DefaultContainer();
|
||||
}
|
||||
}
|
|
@ -1,98 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 6/30/18
|
||||
* Time: 11:54 PM
|
||||
*/
|
||||
|
||||
namespace Site\Elements;
|
||||
|
||||
use A2nt\SilverStripeMapboxField\MapboxField;
|
||||
use BetterBrief\GoogleMapField;
|
||||
use Colymba\BulkManager\BulkManager;
|
||||
use DNADesign\Elemental\Models\ElementContent;
|
||||
use SilverStripe\Core\Config\Config;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\Forms\GridField\GridField;
|
||||
use SilverStripe\Forms\GridField\GridFieldConfig_RelationEditor;
|
||||
use SilverStripe\Forms\HTMLEditor\HTMLEditorField;
|
||||
use SilverStripe\Forms\NumericField;
|
||||
use Site\Controllers\MapElementController;
|
||||
use Site\Extensions\MapExtension;
|
||||
use SilverStripe\Forms\GridField\GridFieldDataColumns;
|
||||
|
||||
class MapElement extends ElementContent
|
||||
{
|
||||
private static $icon = 'font-icon-globe-1';
|
||||
|
||||
private static $singular_name = 'Map Element';
|
||||
|
||||
private static $plural_name = 'Map Element';
|
||||
|
||||
private static $description = 'Displays dynamic map';
|
||||
|
||||
private static $table_name = 'MapElement';
|
||||
|
||||
private static $controller_class = MapElementController::class;
|
||||
private static $map_type = 'mapbox';
|
||||
|
||||
private static $extensions = [
|
||||
MapExtension::class,
|
||||
];
|
||||
|
||||
public function getType():string
|
||||
{
|
||||
return self::$singular_name;
|
||||
}
|
||||
|
||||
public function getCMSFields(): FieldList
|
||||
{
|
||||
$fields = parent::getCMSFields();
|
||||
|
||||
$fields->remove('HTML');
|
||||
|
||||
$tab = $fields->findOrMakeTab('Root.MapPins');
|
||||
$tab->setTitle('Description');
|
||||
$tab->push(HTMLEditorField::create('HTML', 'Content'));
|
||||
|
||||
$fields->addFieldsToTab('Root.Main', [
|
||||
NumericField::create('MapZoom', 'Initial Map Zoom (enter a number from 0 to 24)'),
|
||||
GridField::create(
|
||||
'Locations',
|
||||
'Locations',
|
||||
$this->owner->Locations(),
|
||||
$cfg = GridFieldConfig_RelationEditor::create(100)
|
||||
)
|
||||
]);
|
||||
|
||||
$cfg->getComponentByType(GridFieldDataColumns::class)->setFieldFormatting([
|
||||
'ShowAtMap' => static function ($v, $obj) {
|
||||
return $v ? 'YES' : 'NO';
|
||||
}
|
||||
]);
|
||||
$cfg->addComponent(new BulkManager());
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
public static function MapAPIKey(): string
|
||||
{
|
||||
$type = self::config()->get('map_type');
|
||||
|
||||
switch ($type) {
|
||||
case 'mapbox':
|
||||
$key = MapboxField::getAccessToken();
|
||||
break;
|
||||
case 'google-maps':
|
||||
$cfg = Config::inst()->get(GoogleMapField::class, 'default_options');
|
||||
$key = $cfg['api_key'];
|
||||
break;
|
||||
default:
|
||||
$key = '';
|
||||
break;
|
||||
}
|
||||
|
||||
return $key;
|
||||
}
|
||||
}
|
|
@ -1,133 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 6/30/18
|
||||
* Time: 11:54 PM
|
||||
*/
|
||||
|
||||
namespace Site\Elements;
|
||||
|
||||
use Dynamic\Elements\Flexslider\Elements\ElementSlideshow;
|
||||
use Dynamic\FlexSlider\Model\SlideImage;
|
||||
use Dynamic\FlexSlider\ORM\FlexSlider;
|
||||
use SilverStripe\Core\Injector\Injector;
|
||||
use SilverStripe\Forms\CheckboxField;
|
||||
use SilverStripe\Forms\LiteralField;
|
||||
use SilverStripe\Forms\NumericField;
|
||||
use SilverStripe\Forms\ReadonlyField;
|
||||
use Symbiote\GridFieldExtensions\GridFieldEditableColumns;
|
||||
|
||||
class SliderElement extends ElementSlideshow
|
||||
{
|
||||
private static $singular_name = 'Slider';
|
||||
|
||||
private static $plural_name = 'Sliders';
|
||||
|
||||
private static $description = 'Displays slide show';
|
||||
|
||||
private static $table_name = 'SliderElement';
|
||||
|
||||
private static $slide_width = 2140;
|
||||
private static $slide_height = 700;
|
||||
|
||||
private static $db = [
|
||||
'Interval' => 'Int',
|
||||
];
|
||||
|
||||
private static $extensions = [
|
||||
FlexSlider::class,
|
||||
];
|
||||
|
||||
private static $owns = [
|
||||
'Slides',
|
||||
];
|
||||
|
||||
private $items;
|
||||
|
||||
public function getType()
|
||||
{
|
||||
return self::$singular_name;
|
||||
}
|
||||
|
||||
public function getSlideWidth()
|
||||
{
|
||||
return self::config()->get('slide_width');
|
||||
}
|
||||
|
||||
public function getSlideHeight()
|
||||
{
|
||||
return self::config()->get('slide_height');
|
||||
}
|
||||
|
||||
public function getCMSFields()
|
||||
{
|
||||
$fields = parent::getCMSFields();
|
||||
|
||||
// remove in case you don't need to provide this functionality
|
||||
$fields->removeByName([
|
||||
'ConfigHD',
|
||||
'Animation',
|
||||
'Loop',
|
||||
'Animate',
|
||||
'ThumbnailNav',
|
||||
'SliderControlNav',
|
||||
'SliderDirectionNav',
|
||||
'CarouselControlNav',
|
||||
'CarouselDirectionNav',
|
||||
'CarouselThumbnailCt',
|
||||
]);
|
||||
|
||||
$fields->addFieldsToTab('Root.Settings', [
|
||||
NumericField::create('Interval', 'Auto-play Interval'),
|
||||
]);
|
||||
|
||||
$grid = $fields->dataFieldByName('Slides');
|
||||
if ($grid) {
|
||||
$config = $grid->getConfig();
|
||||
|
||||
$columns = new GridFieldEditableColumns();
|
||||
$columns->setDisplayFields([
|
||||
'Hide' => [
|
||||
'title' => 'Hide it?',
|
||||
'field' => CheckboxField::class,
|
||||
],
|
||||
]);
|
||||
|
||||
$config->addComponent($columns);
|
||||
}
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function getSlideShow()
|
||||
{
|
||||
if ($this->items) {
|
||||
return $this->items;
|
||||
}
|
||||
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$this->items = $this->Slides()->filter([
|
||||
'Hide' => '0',
|
||||
])->filterByCallback(static function ($item, $list) use ($date) {
|
||||
$on = $item->getField('DateOn');
|
||||
$off = $item->getField('DateOff');
|
||||
|
||||
return ($on <= $date) && (!$off || $off > $date);
|
||||
})->sort('SortOrder');
|
||||
|
||||
return $this->items;
|
||||
}
|
||||
|
||||
public function onBeforeWrite()
|
||||
{
|
||||
parent::onBeforeWrite();
|
||||
|
||||
if (!$this->getField('Interval')) {
|
||||
$this->setField('Interval', 5000);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 6/30/18
|
||||
* Time: 11:54 PM
|
||||
*/
|
||||
|
||||
namespace Site\Elements;
|
||||
use DNADesign\Elemental\Models\BaseElement;
|
||||
use Site\Models\TeamMember;
|
||||
|
||||
class TeamMembersElement extends BaseElement
|
||||
{
|
||||
private static $singular_name = 'Team Members';
|
||||
|
||||
private static $plural_name = 'Team Members';
|
||||
|
||||
private static $description = 'Displays random Team Members';
|
||||
|
||||
public function getType()
|
||||
{
|
||||
return self::$singular_name;
|
||||
}
|
||||
|
||||
public function Members()
|
||||
{
|
||||
return TeamMember::get()->sort('RAND()');
|
||||
}
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 8/26/18
|
||||
* Time: 12:55 PM
|
||||
*/
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
|
||||
use SilverStripe\Core\Extension;
|
||||
use SilverStripe\Forms\CompositeField;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
|
||||
class AddressExtension extends Extension
|
||||
{
|
||||
public function updateFormFields(FieldList $fields)
|
||||
{
|
||||
$holder = CompositeField::create();
|
||||
foreach ($fields as $field) {
|
||||
$holder->push($field);
|
||||
$fields->remove($field);
|
||||
}
|
||||
|
||||
$holder->addExtraClass('col-sm-6');
|
||||
$fields->push($holder);
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use SilverStripe\Blog\Forms\GridField\GridFieldConfigBlogPost;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
|
||||
class BlogExtension extends DataExtension
|
||||
{
|
||||
public function updateCMSFields(FieldList $fields)
|
||||
{
|
||||
$f = $fields->dataFieldByName('ChildPages');
|
||||
if ($f) {
|
||||
$f->setConfig(GridFieldConfigBlogPost::create(75));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 7/2/18
|
||||
* Time: 12:10 AM
|
||||
*/
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use DNADesign\Elemental\Models\ElementContent;
|
||||
use SilverStripe\Forms\CheckboxField;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
|
||||
class BlogPostExtension extends DataExtension
|
||||
{
|
||||
private static $db = [
|
||||
'Featured' => 'Boolean(0)',
|
||||
];
|
||||
|
||||
public function updateCMSFields(FieldList $fields)
|
||||
{
|
||||
$mainTab = $fields->findOrMakeTab('Root.Main');
|
||||
$mainTab->push(CheckboxField::create('Featured'));
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 7/2/18
|
||||
* Time: 1:05 AM
|
||||
*/
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use SilverStripe\ORM\HiddenClass;
|
||||
use Page;
|
||||
|
||||
class CMSMain_HiddenClass extends Page implements HiddenClass
|
||||
{
|
||||
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use SilverStripe\Blog\Forms\GridField\GridFieldConfigBlogPost;
|
||||
use SilverStripe\Core\Extension;
|
||||
use SilverStripe\Forms\CompositeField;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
|
||||
class CompositeFieldExtension extends CompositeField
|
||||
{
|
||||
public function extraClass()
|
||||
{
|
||||
return 'composite '.parent::extraClass();
|
||||
}
|
||||
|
||||
public function getAttributes()
|
||||
{
|
||||
$attrs = parent::getAttributes();
|
||||
unset($attrs['name'], $attrs['type'], $attrs['disabled'], $attrs['readonly'], $attrs['autofocus']);
|
||||
|
||||
return $attrs;
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 6/24/18
|
||||
* Time: 2:35 PM
|
||||
*/
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
|
||||
class ElementContentWidget extends DataExtension
|
||||
{
|
||||
}
|
|
@ -1,118 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 6/24/18
|
||||
* Time: 1:46 AM
|
||||
*/
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use Dynamic\Elements\Image\Elements\ElementImage;
|
||||
use Sheadawson\Linkable\Forms\LinkField;
|
||||
use Sheadawson\Linkable\Models\Link;
|
||||
use SilverStripe\Core\Config\Config;
|
||||
use SilverStripe\Forms\CheckboxField;
|
||||
use SilverStripe\Forms\DropdownField;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
|
||||
class ElementImageWidget extends DataExtension
|
||||
{
|
||||
private static $available_heights = [
|
||||
'300' => 'Small (300px)',
|
||||
'400' => 'Medium (400px)',
|
||||
'600' => 'Big (600px)',
|
||||
];
|
||||
|
||||
private static $db = [
|
||||
'Resize' => 'Boolean(1)',
|
||||
'ImageHeight' => 'Float',
|
||||
'Content' => 'HTMLText',
|
||||
];
|
||||
|
||||
private static $has_one = [
|
||||
'ImageLink' => Link::class,
|
||||
];
|
||||
|
||||
public function updateCMSFields(FieldList $fields)
|
||||
{
|
||||
parent::updateCMSFields($fields);
|
||||
|
||||
$fields->insertBefore(
|
||||
'Image',
|
||||
LinkField::create('ImageLinkID', 'Link')
|
||||
);
|
||||
|
||||
$this->owner->ImageHeight = $this->getHeight();
|
||||
|
||||
$heights = Config::inst()->get(__CLASS__, 'available_heights');
|
||||
|
||||
$fields->replaceField('Resize', CheckboxField::create(
|
||||
'Resize',
|
||||
'Would you like to scale image?'
|
||||
));
|
||||
|
||||
if (count($heights)) {
|
||||
$fields->replaceField(
|
||||
'ImageHeight',
|
||||
DropdownField::create(
|
||||
'ImageHeight',
|
||||
'Image Height',
|
||||
$heights,
|
||||
$this->getHeight()
|
||||
)
|
||||
->setEmptyString('(unspecified)')
|
||||
->displayIf('Resize')->isChecked()->end()
|
||||
);
|
||||
} else {
|
||||
$fields->dataFieldByName('ImageHeight')
|
||||
->setValue($this->getHeight());
|
||||
}
|
||||
}
|
||||
|
||||
public function ImageResized()
|
||||
{
|
||||
$image = $this->owner->Image();
|
||||
|
||||
if (!$this->owner->Resize) {
|
||||
return $image;
|
||||
}
|
||||
|
||||
$width = $this->getWidth();
|
||||
$height = $this->getHeight();
|
||||
|
||||
if (!$width || $width === 'auto') {
|
||||
return $height > 0
|
||||
? $image->ScaleHeight($height)
|
||||
: $image;
|
||||
}
|
||||
|
||||
return $height > 0
|
||||
? $image->Fill($width, $height)
|
||||
: $image->ScaleWidth($width);
|
||||
}
|
||||
|
||||
public function getWidth()
|
||||
{
|
||||
return $this->owner->getColumnWidthRecursive();
|
||||
}
|
||||
|
||||
public function getHeight()
|
||||
{
|
||||
$height = $this->owner->getField('ImageHeight');
|
||||
if ($height > 0) {
|
||||
return $height;
|
||||
}
|
||||
|
||||
$sibling = $this->owner->getSibling(false, [
|
||||
'ImageHeight:GreaterThan' => '0'
|
||||
]);
|
||||
|
||||
if ($sibling && $sibling->getField('ImageHeight')) {
|
||||
return $sibling->getField('ImageHeight');
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
|
@ -1,309 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 6/23/18
|
||||
* Time: 1:23 PM
|
||||
*/
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use DNADesign\Elemental\Models\BaseElement;
|
||||
use DNADesign\ElementalList\Model\ElementList;
|
||||
use SilverStripe\Core\Config\Config;
|
||||
use SilverStripe\Forms\CheckboxField;
|
||||
use SilverStripe\Forms\DropdownField;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\Forms\LiteralField;
|
||||
use Site\Elements\AccordionElement;
|
||||
|
||||
class ElementRows extends DataExtension
|
||||
{
|
||||
private static $container_max_width = 1140;
|
||||
private static $column_class = 'col-block col-md';
|
||||
|
||||
private static $container_styles = [
|
||||
'container' => 'Fixed container',
|
||||
'container-fluid' => 'Fluid Container',
|
||||
];
|
||||
|
||||
private static $db = [
|
||||
'ContainerType' => 'Varchar(254)',
|
||||
//'SidebarOnly' => 'Boolean(0)',
|
||||
'Size' => 'Enum("1,2,3,4,5,6,7,8,9,10,11,12,auto","auto")',
|
||||
];
|
||||
|
||||
public function updateCMSFields(FieldList $fields)
|
||||
{
|
||||
parent::updateCMSFields($fields);
|
||||
|
||||
// move available globaly to main tab
|
||||
$fields->removeByName('AvailableGlobally');
|
||||
//$fields->removeByName('SidebarOnly');
|
||||
|
||||
$tab = $fields->findOrMakeTab('Root.Main');
|
||||
$tab->push(CheckboxField::create('AvailableGlobally'));
|
||||
//$tab->push(CheckboxField::create('SidebarOnly', 'Hidden (Sidebar Only)'));
|
||||
|
||||
// container type
|
||||
if ($this->isRoot()) {
|
||||
$tab->push(DropdownField::create(
|
||||
'ContainerType',
|
||||
_t(__CLASS__.'.CONTAINERTYPE', 'Container Type'),
|
||||
self::$container_styles
|
||||
));
|
||||
} else {
|
||||
$fields->removeByName('ContainerType');
|
||||
}
|
||||
|
||||
// site-specific
|
||||
$fields->removeByName('ContainerType');
|
||||
|
||||
// column size
|
||||
if ($this->isColumn()) {
|
||||
$sizes = $this->owner->dbObject('Size');
|
||||
$defaultSize = $sizes->getDefaultValue();
|
||||
|
||||
$sizeDropdown = DropdownField::create(
|
||||
'Size',
|
||||
_t(
|
||||
__CLASS__.'.SIZE',
|
||||
'Column Width (max 12 cols)'
|
||||
),
|
||||
array_combine(
|
||||
array_values($sizes->enumValues()),
|
||||
[
|
||||
'8.3% (1 of 12)',
|
||||
'16.6% (2 of 12)',
|
||||
'25% (3 of 12)',
|
||||
'33% (4 of 12)',
|
||||
'41.6% (5 of 12)',
|
||||
'50% (6 of 12)',
|
||||
'58.3% (7 of 12)',
|
||||
'66.4% (8 of 12)',
|
||||
'74.7% (9 of 12)',
|
||||
'83% (10 of 12)',
|
||||
'91.3% (11 of 12)',
|
||||
'100% (12 of 12)',
|
||||
'auto',
|
||||
]
|
||||
)
|
||||
);
|
||||
$tab->push($sizeDropdown);
|
||||
|
||||
// set default size
|
||||
if (!$this->owner->getField('Size')) {
|
||||
$sibling = $this->getSibling();
|
||||
|
||||
$sizeDropdown->setValue($sibling ? $sibling->getField('Size') : $defaultSize);
|
||||
}
|
||||
} else {
|
||||
$fields->removeByName('Size');
|
||||
}
|
||||
|
||||
// move parent elements
|
||||
if ($this->isList()) {
|
||||
$currEls = $this->owner->getField('Elements')->Elements();
|
||||
if ($currEls->count()) {
|
||||
$tab->push(DropdownField::create(
|
||||
'MoveElementIDToParent',
|
||||
'Move an element from the current list to parent',
|
||||
$currEls->map('ID', 'Title')
|
||||
)->setEmptyString('(select an element to move)'));
|
||||
}
|
||||
|
||||
$parentEls = $this->owner->Parent()->Elements()->exclude('ID', $this->owner->ID);
|
||||
if ($parentEls->count()) {
|
||||
$tab->push(DropdownField::create(
|
||||
'MoveElementIDFromParent',
|
||||
'Move an element from the parent to the current list',
|
||||
$parentEls->map('ID', 'Title')
|
||||
)->setEmptyString('(select an element to move)'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$fields->findOrMakeTab('Root.Settings')
|
||||
->push(LiteralField::create(
|
||||
'ClassName',
|
||||
'<div class="form-group field text">'
|
||||
.'<div class="form__field-label">Class</div>'
|
||||
.'<div class="form__field-holder">'.$this->owner->getField('ClassName').'</div>'
|
||||
.'</div>'
|
||||
));
|
||||
}
|
||||
|
||||
public function getWidthPercetage()
|
||||
{
|
||||
return $this->isColumn() ? $this->owner->getField('Size') / self::colsNumber() * 100 : false;
|
||||
}
|
||||
|
||||
public function isList()
|
||||
{
|
||||
return is_a($this->owner, ElementList::class) && !is_a($this->owner, AccordionElement::class);
|
||||
}
|
||||
|
||||
public function isRow()
|
||||
{
|
||||
if (!$this->isList()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isColumn()
|
||||
{
|
||||
if (!$this->isRoot()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function isRoot()
|
||||
{
|
||||
$parent = $this->owner->Parent()->getOwnerPage();
|
||||
if (is_a($parent, 'Page')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getSibling($any = true, $filter = [], $exclude = [])
|
||||
{
|
||||
$class = $any ? $this->owner->baseClass() : $this->owner->ClassName;
|
||||
|
||||
return $class::get()->filter(array_merge(
|
||||
['ParentID' => $this->owner->Parent()->ID],
|
||||
$filter
|
||||
))->exclude(array_merge(
|
||||
['ID' => $this->owner->ID],
|
||||
$exclude
|
||||
))->last();
|
||||
}
|
||||
|
||||
public function getColumnSizeRecursive($object = null)
|
||||
{
|
||||
$object = $object ? $object : $this->owner;
|
||||
|
||||
if ($object->isColumn() && $object->getField('Size')) {
|
||||
return $object->getField('Size');
|
||||
}
|
||||
|
||||
$parent = $object->Parent()->getOwnerPage();
|
||||
|
||||
if (is_a($parent, 'Page')) {
|
||||
return ($this->owner->getField('ContainerType') === 'container-fluid') ? false : self::colsNumber();
|
||||
}
|
||||
|
||||
return $object->getColumnSizeRecursive($parent);
|
||||
}
|
||||
|
||||
public function getColumnWidthRecursive($object = null, $max = null)
|
||||
{
|
||||
$max = $max ? $max : self::maxWidth();
|
||||
|
||||
$object = $object ? $object : $this->owner;
|
||||
|
||||
if (!$object->isRoot()) {
|
||||
$size = $object->getField('Size');
|
||||
$cols = self::colsNumber();
|
||||
|
||||
if ($size === 'auto') {
|
||||
return $size;
|
||||
}
|
||||
|
||||
$max = $size ? $max / ($cols / $size) : $max;
|
||||
$parent = $object->Parent()->getOwnerPage();
|
||||
|
||||
return $this->getColumnWidthRecursive($parent, $max);
|
||||
}
|
||||
|
||||
return $max;
|
||||
}
|
||||
|
||||
public static function colsNumber()
|
||||
{
|
||||
$db = Config::inst()->get(self::class, 'db');
|
||||
$sizes = $db['Size'];
|
||||
$sizes = preg_replace('!Enum\("([0-9A-z,]+)","([0-9A-z]+)"\)!i', '$1', $sizes);
|
||||
$sizes = explode(',', $sizes);
|
||||
|
||||
// remove auto
|
||||
$k = array_search('auto', $sizes);
|
||||
if ($k !== false) {
|
||||
unset($sizes[$k]);
|
||||
}
|
||||
|
||||
return max($sizes);
|
||||
}
|
||||
|
||||
public static function maxWidth()
|
||||
{
|
||||
return Config::inst()->get(self::class, 'container_max_width');
|
||||
}
|
||||
|
||||
public function ExtraClass()
|
||||
{
|
||||
$object = $this->owner;
|
||||
|
||||
return $object->getField('ExtraClass')
|
||||
.(
|
||||
$this->isColumn()
|
||||
? ' '.Config::inst()->get(self::class, 'column_class')
|
||||
.($object->getField('Size') === 'auto' ? '' : '-'.$object->getField('Size'))
|
||||
: ''
|
||||
);
|
||||
}
|
||||
|
||||
/*
|
||||
* if it's root element and it doesn't contain any container styles
|
||||
* add the first one
|
||||
*/
|
||||
public function ContainerClass()
|
||||
{
|
||||
$type = $this->owner->getField('ContainerType');
|
||||
$container_styles = array_keys(self::$container_styles);
|
||||
|
||||
if (!$type && $this->isRoot()) {
|
||||
$type = \Page::DefaultContainer();
|
||||
}
|
||||
|
||||
return $type;
|
||||
}
|
||||
|
||||
public static function MoveElement($moveID, $targetID)
|
||||
{
|
||||
$el = BaseElement::get_by_id($moveID);
|
||||
if (!$el) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$el->setField('ParentID', $targetID);
|
||||
$el->write();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function onBeforeWrite()
|
||||
{
|
||||
parent::onBeforeWrite();
|
||||
|
||||
$moveID = $this->owner->getField('MoveElementIDFromParent');
|
||||
$targetID = $moveID ? $this->owner->Elements()->ID : null;
|
||||
|
||||
if ($moveID && $targetID) {
|
||||
self::MoveElement($moveID, $targetID);
|
||||
}
|
||||
|
||||
$moveID = $this->owner->getField('MoveElementIDToParent');
|
||||
$targetID = $moveID ? $this->owner->Parent()->ID : null;
|
||||
|
||||
if ($moveID && $targetID) {
|
||||
self::MoveElement($moveID, $targetID);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 6/23/18
|
||||
* Time: 1:23 PM
|
||||
*/
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use DNADesign\Elemental\Models\BaseElement;
|
||||
use SilverStripe\ORM\ArrayList;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
use SilverStripe\ORM\HasManyList;
|
||||
use SilverStripe\ORM\UnsavedRelationList;
|
||||
|
||||
class ElementalArea extends DataExtension
|
||||
{
|
||||
public function ElementFilteredControllers()
|
||||
{
|
||||
// Don't try and process unsaved lists
|
||||
if ($this->Elements() instanceof UnsavedRelationList) {
|
||||
return ArrayList::create();
|
||||
}
|
||||
|
||||
$controllers = ArrayList::create();
|
||||
$items = $this->Elements()->filterByCallback(static function (BaseElement $item) {
|
||||
return $item->canView();
|
||||
});
|
||||
|
||||
if ($items !== null) {
|
||||
foreach ($items as $element) {
|
||||
$controller = $element->getController();
|
||||
$controllers->push($controller);
|
||||
}
|
||||
}
|
||||
|
||||
return $controllers;
|
||||
}
|
||||
|
||||
/**
|
||||
* A cache-aware accessor for the elements
|
||||
* @return ArrayList|HasManyList|BaseElement[]
|
||||
*/
|
||||
public function Elements()
|
||||
{
|
||||
return $this->owner->Elements();//->exclude('SidebarOnly', true);
|
||||
}
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
|
||||
use Sheadawson\Linkable\Forms\EmbeddedObjectField;
|
||||
use SilverStripe\Forms\CheckboxField;
|
||||
use SilverStripe\Forms\CompositeField;
|
||||
use SilverStripe\Forms\LiteralField;
|
||||
use SilverStripe\ORM\FieldType\DBHTMLText;
|
||||
|
||||
class EmbedObjectField extends EmbeddedObjectField
|
||||
{
|
||||
/**
|
||||
* @param array $properties
|
||||
* @return mixed|DBHTMLText
|
||||
*/
|
||||
public function FieldHolder($properties = [])
|
||||
{
|
||||
$name = $this->getName();
|
||||
|
||||
$fields = [
|
||||
CheckboxField::create(
|
||||
$name . '[autoplay]',
|
||||
_t(self::CLASS.'AUTOPLAY', 'Autoplay video?')
|
||||
)->setValue($this->object->getField('Autoplay')),
|
||||
|
||||
CheckboxField::create(
|
||||
$name . '[loop]',
|
||||
_t(self::CLASS.'LOOP', 'Loop video?')
|
||||
)->setValue($this->object->getField('Loop')),
|
||||
|
||||
CheckboxField::create(
|
||||
$name.'[controls]',
|
||||
_t(self::CLASS.'CONTROLS', 'Show player controls?')
|
||||
)->setValue($this->object->getField('Controls'))
|
||||
];
|
||||
|
||||
return CompositeField::create(array_merge([
|
||||
LiteralField::create(
|
||||
$name.'Options',
|
||||
parent::FieldHolder($properties)
|
||||
)
|
||||
], $fields));
|
||||
}
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
|
||||
use SilverStripe\Core\Convert;
|
||||
use SilverStripe\View\HTML;
|
||||
|
||||
class EmbedShortcodeProvider extends \SilverStripe\View\Shortcodes\EmbedShortcodeProvider
|
||||
{
|
||||
/**
|
||||
* Build video embed tag
|
||||
*
|
||||
* @param array $arguments
|
||||
* @param string $content Raw HTML content
|
||||
* @return string
|
||||
*/
|
||||
protected static function videoEmbed($arguments, $content)
|
||||
{
|
||||
// Ensure outer div has given width (but leave height auto)
|
||||
if (!empty($arguments['width'])) {
|
||||
$arguments['style'] = 'width:' . (int) $arguments['width'] . 'px';
|
||||
//.';height:' . (int) $arguments['height'] . 'px';
|
||||
}
|
||||
|
||||
// Convert caption to <p>
|
||||
if (!empty($arguments['caption'])) {
|
||||
$xmlCaption = Convert::raw2xml($arguments['caption']);
|
||||
$content .= "\n<p class=\"caption\">{$xmlCaption}</p>";
|
||||
}
|
||||
|
||||
// Convert arguments to data-*argument_name*
|
||||
foreach ($arguments as $k => $v) {
|
||||
if($k === 'class' || $k === 'style') {
|
||||
continue;
|
||||
}
|
||||
|
||||
unset($arguments[$k]);
|
||||
$arguments['data-'.$k] = $v;
|
||||
}
|
||||
|
||||
$arguments['class'] .= ' embed-youtube embed-responsive embed-responsive-16by9';
|
||||
|
||||
$iframe = strpos($content, 'iframe');
|
||||
if($iframe >= 0) {
|
||||
$content = substr($content, 0, $iframe+6).' class="embed-responsive-item" '.substr($content, $iframe +7);
|
||||
}
|
||||
|
||||
return HTML::createTag('div', $arguments, $content);
|
||||
}
|
||||
}
|
|
@ -1,98 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use SilverStripe\Forms\CheckboxField;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\Forms\NumericField;
|
||||
use SilverStripe\Forms\TextareaField;
|
||||
use SilverStripe\Forms\TextField;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
|
||||
class EmbeddedObjectExtension extends DataExtension
|
||||
{
|
||||
private static $db = [
|
||||
'Autoplay' => 'Boolean(0)',
|
||||
'Loop' => 'Boolean(0)',
|
||||
'Controls' => 'Boolean(1)',
|
||||
];
|
||||
|
||||
public function Embed()
|
||||
{
|
||||
$this->owner->Embed();
|
||||
$this->setEmbedParams();
|
||||
|
||||
return $this->owner;
|
||||
}
|
||||
|
||||
public function setEmbedParams($params = [])
|
||||
{
|
||||
// YouTube params
|
||||
if (stripos($this->owner->EmbedHTML, 'https://www.youtube.com/embed/') > 0) {
|
||||
$url = $this->owner->getField('SourceURL');
|
||||
preg_match(
|
||||
'/^(?:http(?:s)?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com\/(?:(?:watch)?\?(?:.*&)?v(?:i)?=|(?:embed|v|vi|user)\/))([^\?&"\'>]+)/',
|
||||
$url,
|
||||
$matches
|
||||
);
|
||||
$videoID = $matches[1];
|
||||
|
||||
$params = array_merge([
|
||||
'feature=oembed',
|
||||
'wmode=transparent',
|
||||
'enablejsapi=1',
|
||||
'disablekb=1',
|
||||
'iv_load_policy=3',
|
||||
'modestbranding=1',
|
||||
'rel=0',
|
||||
'showinfo=0',
|
||||
'controls='.($this->owner->getField('Controls') ? '1': '0'),
|
||||
], $params);
|
||||
|
||||
if ($this->owner->getField('Autoplay')) {
|
||||
$params[] = 'autoplay=1';
|
||||
}
|
||||
|
||||
if ($this->owner->getField('Loop')) {
|
||||
$params[] = 'loop=1';
|
||||
$params[] = 'playlist='.$videoID;
|
||||
}
|
||||
|
||||
$this->owner->EmbedHTML = preg_replace(
|
||||
'/src="([A-z0-9:\/\.]+)\??(.*?)"/',
|
||||
'src="https://www.youtube.com/embed/'.$videoID.'?' . implode('&', $params) . '"',
|
||||
$this->owner->EmbedHTML
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
public function updateCMSFields(FieldList $fields)
|
||||
{
|
||||
parent::updateCMSFields($fields);
|
||||
|
||||
$fields->removeByName([
|
||||
'Width', 'Height', 'EmbedHTML', 'ThumbURL',
|
||||
'Autoplay', 'Loop', 'Controls',
|
||||
'ExtraClass', 'Type',
|
||||
]);
|
||||
|
||||
$fields->addFieldsToTab('Root.Extra', [
|
||||
CheckboxField::create('Autoplay'),
|
||||
CheckboxField::create('Loop'),
|
||||
CheckboxField::create('Controls'),
|
||||
NumericField::create('Width'),
|
||||
NumericField::create('Height'),
|
||||
TextareaField::create('EmbedHTML'),
|
||||
TextField::create('ThumbURL'),
|
||||
TextField::create('ExtraClass'),
|
||||
TextField::create('Type'),
|
||||
]);
|
||||
}
|
||||
|
||||
public function onBeforeWrite()
|
||||
{
|
||||
parent::onBeforeWrite();
|
||||
$this->setEmbedParams();
|
||||
}
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use SilverStripe\CMS\Model\SiteTree;
|
||||
use SilverStripe\Forms\Form;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
|
||||
class HtmlEditorFieldExtension extends DataExtension
|
||||
{
|
||||
public function updateMediaForm(Form $form)
|
||||
{
|
||||
$page_id = $_SESSION['CMSMain']['currentPage'];
|
||||
$page_urlsegment = SiteTree::get()->byID($page_id)->URLSegment;
|
||||
|
||||
$computerUploadField = $form->Fields()->dataFieldByName('AssetUploadField');
|
||||
$computerUploadField->setFolderName(sprintf("%s/images/%s", 'Uploads', $page_urlsegment));
|
||||
}
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use SilverStripe\Forms\CheckboxField;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\Forms\NumericField;
|
||||
use SilverStripe\Forms\TextareaField;
|
||||
use SilverStripe\Forms\TextField;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
|
||||
class ImageExtension extends DataExtension
|
||||
{
|
||||
public function updateCMSFields(FieldList $fields)
|
||||
{
|
||||
parent::updateCMSFields($fields);
|
||||
|
||||
/*$fields->removeByName([
|
||||
'Filename',
|
||||
]);*/
|
||||
}
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use SilverStripe\Core\Config\Config;
|
||||
use SilverStripe\Core\Extension;
|
||||
use SilverStripe\FontAwesome\FontAwesomeField;
|
||||
use SilverStripe\View\Requirements;
|
||||
use Site\Templates\DeferredRequirements;
|
||||
|
||||
class LeftAndMainExtension extends Extension
|
||||
{
|
||||
public function init()
|
||||
{
|
||||
$config = Config::inst()->get(DeferredRequirements::class);
|
||||
// App libs
|
||||
if (!$config['nofontawesome']) {
|
||||
$v = !isset($config['fontawesome_version']) || !$config['fontawesome_version']
|
||||
? Config::inst()->get(FontAwesomeField::class, 'version')
|
||||
: $config['fontawesome_version'];
|
||||
|
||||
Requirements::css('//use.fontawesome.com/releases/v'.$v.'/css/all.css');
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 6/30/18
|
||||
* Time: 11:37 PM
|
||||
*/
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use Sheadawson\Linkable\Forms\LinkField;
|
||||
use Sheadawson\Linkable\Models\Link;
|
||||
use SilverStripe\Control\HTTPResponse;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\Forms\TextField;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
use SilverStripe\ORM\FieldType\DBField;
|
||||
use SilverStripe\Security\MemberAuthenticator\LostPasswordHandler;
|
||||
|
||||
class LostPasswordHandlerExtension extends LostPasswordHandler
|
||||
{
|
||||
private static $url_handlers = [
|
||||
'passwordsent' => 'passwordsent',
|
||||
];
|
||||
|
||||
private static $allowed_actions = [
|
||||
'passwordsent',
|
||||
];
|
||||
|
||||
/**
|
||||
* Show the "password sent" page, after a user has requested
|
||||
* to reset their password.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function passwordsent()
|
||||
{
|
||||
$message = _t(
|
||||
'SilverStripe\\Security\\Security.PASSWORDRESETSENTTEXT',
|
||||
"Thank you. A reset link has been sent, provided an account exists for this email address."
|
||||
);
|
||||
|
||||
$email = $this->getRequest()->getVar('email');
|
||||
$message = $email
|
||||
? 'Thank you! A reset link has been sent to \''.$email.'\', provided an account exists for this email address.'
|
||||
: $message;
|
||||
|
||||
return [
|
||||
'Title' => _t(
|
||||
'SilverStripe\\Security\\Security.PASSWORDRESETSENTHEADER',
|
||||
"Password reset link sent".($email ? ' to \''.$email.'\'' : '')
|
||||
),
|
||||
'ElementalArea' => DBField::create_field('HTMLFragment', "<p>$message</p>"),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Avoid information disclosure by displaying the same status, regardless wether the email address actually exists
|
||||
*
|
||||
* @param array $data
|
||||
* @return HTTPResponse
|
||||
*/
|
||||
protected function redirectToSuccess(array $data)
|
||||
{
|
||||
$link = $this->link('passwordsent').'?email='.$data['Email'];
|
||||
|
||||
return $this->redirect($this->addBackURLParam($link));
|
||||
}
|
||||
}
|
|
@ -1,73 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 8/26/18
|
||||
* Time: 12:55 PM
|
||||
*/
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use SilverStripe\Core\Extension;
|
||||
use SilverStripe\Forms\CompositeField;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\Forms\GridField\GridField;
|
||||
use SilverStripe\Forms\GridField\GridFieldConfig_RelationEditor;
|
||||
use SilverStripe\Forms\GridField\GridFieldDataColumns;
|
||||
use SilverStripe\Forms\NumericField;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
use Site\Models\MapPin;
|
||||
|
||||
class MapExtension extends DataExtension
|
||||
{
|
||||
private static $db = [
|
||||
'MapZoom' => 'Int',
|
||||
];
|
||||
|
||||
private static $many_many = [
|
||||
'Locations' => MapPin::class,
|
||||
];
|
||||
|
||||
private static $owns = [
|
||||
'Locations',
|
||||
];
|
||||
|
||||
public function updateCMSFields(FieldList $fields): void
|
||||
{
|
||||
parent::updateCMSFields($fields);
|
||||
|
||||
$fields->removeByName('Locations');
|
||||
$fields->addFieldsToTab('Root.MapPins', [
|
||||
NumericField::create('MapZoom', 'Initial Map Zoom (enter a number from 0 to 24)'),
|
||||
GridField::create(
|
||||
'Locations',
|
||||
'Locations',
|
||||
$this->owner->Locations(),
|
||||
$cfg = GridFieldConfig_RelationEditor::create(100)
|
||||
)
|
||||
]);
|
||||
|
||||
$cfg->getComponentByType(GridFieldDataColumns::class)->setFieldFormatting([
|
||||
'ShowAtMap' => static function ($v, $obj) {
|
||||
return $v ? 'YES' : 'NO';
|
||||
}
|
||||
]);
|
||||
|
||||
$fields->findOrMakeTab('Root.MapPins')->setTitle('Locations');
|
||||
}
|
||||
|
||||
public function getGeoJSON(): string
|
||||
{
|
||||
$locs = $this->owner->Locations()->filter('ShowAtMap', true);
|
||||
|
||||
$pins = [];
|
||||
foreach ($locs as $off) {
|
||||
$pins[] = $off->getGeo();
|
||||
}
|
||||
|
||||
return json_encode([
|
||||
'type' => 'MarkerCollection',
|
||||
'features' => $pins
|
||||
]);
|
||||
}
|
||||
}
|
|
@ -1,98 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use Dynamic\Elements\Blog\Elements\ElementBlogPosts;
|
||||
use Innoweb\Sitemap\Pages\SitemapPage;
|
||||
use Sheadawson\Linkable\Forms\LinkField;
|
||||
use Sheadawson\Linkable\Models\Link;
|
||||
use SilverStripe\AssetAdmin\Forms\UploadField;
|
||||
use SilverStripe\Assets\Image;
|
||||
use SilverStripe\Forms\CheckboxField;
|
||||
use SilverStripe\Forms\DropdownField;
|
||||
use SilverStripe\Forms\GridField\GridField;
|
||||
use SilverStripe\Forms\GridField\GridFieldConfig;
|
||||
use SilverStripe\Forms\GridField\GridFieldDeleteAction;
|
||||
use SilverStripe\Forms\GridField\GridFieldDetailForm;
|
||||
use SilverStripe\Forms\GridField\GridFieldEditButton;
|
||||
use SilverStripe\Forms\GridField\GridFieldToolbarHeader;
|
||||
use SilverStripe\Forms\HeaderField;
|
||||
use SilverStripe\Forms\LiteralField;
|
||||
use SilverStripe\Forms\TextareaField;
|
||||
use SilverStripe\Forms\TextField;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
use SilverStripe\CMS\Model\SiteTree;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\Forms\TreeMultiselectField;
|
||||
use BetterBrief\GoogleMapField;
|
||||
use Site\Models\Holiday;
|
||||
use Site\Models\Notification;
|
||||
use Site\Models\OpeningHour;
|
||||
use Symbiote\GridFieldExtensions\GridFieldAddNewInlineButton;
|
||||
use Symbiote\GridFieldExtensions\GridFieldEditableColumns;
|
||||
use Symbiote\GridFieldExtensions\GridFieldTitleHeader;
|
||||
|
||||
class NotificationsExtension extends DataExtension
|
||||
{
|
||||
private static $db = [
|
||||
'ShowNotifications' => 'Boolean(1)',
|
||||
];
|
||||
|
||||
private static $has_many = [
|
||||
'Notifications' => Notification::class,
|
||||
];
|
||||
|
||||
public function updateCMSFields(FieldList $fields)
|
||||
{
|
||||
$tab = $fields->findOrMakeTab('Root.Notifications');
|
||||
|
||||
if(!$this->owner->exists()) {
|
||||
$tab->push(LiteralField::create(
|
||||
'NotificationsNotice',
|
||||
'<p class="message notice">The object must be saved before notifications can be added</p>'
|
||||
));
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
$items = $this->owner->Notifications();
|
||||
|
||||
$config = GridFieldConfig::create();
|
||||
$config->addComponents([
|
||||
new GridFieldToolbarHeader(),
|
||||
new GridFieldTitleHeader(),
|
||||
new GridFieldEditableColumns(),
|
||||
new GridFieldAddNewInlineButton('toolbar-header-right'),
|
||||
new GridFieldDetailForm(),
|
||||
new GridFieldEditButton(),
|
||||
new GridFieldDeleteAction(),
|
||||
]);
|
||||
|
||||
$tab->setChildren(FieldList::create(
|
||||
HeaderField::create('NotificationsHeader','Notifications'),
|
||||
LiteralField::create(
|
||||
'CurrentNotifications',
|
||||
'<b>Current:</b>'
|
||||
.$this->owner->renderWith('Site\\Objects\\NotificationsList')
|
||||
),
|
||||
CheckboxField::create('ShowNotifications'),
|
||||
GridField::create(
|
||||
'Notifications',
|
||||
'',
|
||||
$items,
|
||||
$config
|
||||
)
|
||||
));
|
||||
}
|
||||
|
||||
public function NotificationsToday()
|
||||
{
|
||||
$items = $this->owner->Notifications();
|
||||
$time = time();
|
||||
|
||||
return $items->filter([
|
||||
'DateOn:LessThanOrEqual' => date('Y-m-d', $time),
|
||||
'DateOff:GreaterThanOrEqual' => date('Y-m-d', $time),
|
||||
]);
|
||||
}
|
||||
}
|
|
@ -1,189 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use Dynamic\Elements\Blog\Elements\ElementBlogPosts;
|
||||
use Innoweb\Sitemap\Pages\SitemapPage;
|
||||
use Sheadawson\Linkable\Forms\LinkField;
|
||||
use Sheadawson\Linkable\Models\Link;
|
||||
use SilverStripe\AssetAdmin\Forms\UploadField;
|
||||
use SilverStripe\Assets\Image;
|
||||
use SilverStripe\Forms\CheckboxField;
|
||||
use SilverStripe\Forms\DropdownField;
|
||||
use SilverStripe\Forms\GridField\GridField;
|
||||
use SilverStripe\Forms\GridField\GridFieldConfig;
|
||||
use SilverStripe\Forms\GridField\GridFieldDeleteAction;
|
||||
use SilverStripe\Forms\GridField\GridFieldToolbarHeader;
|
||||
use SilverStripe\Forms\HeaderField;
|
||||
use SilverStripe\Forms\LiteralField;
|
||||
use SilverStripe\Forms\TextareaField;
|
||||
use SilverStripe\Forms\TextField;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
use SilverStripe\CMS\Model\SiteTree;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\Forms\TreeMultiselectField;
|
||||
use BetterBrief\GoogleMapField;
|
||||
use Site\Models\Holiday;
|
||||
use Site\Models\OpeningHour;
|
||||
use Symbiote\GridFieldExtensions\GridFieldAddNewInlineButton;
|
||||
use Symbiote\GridFieldExtensions\GridFieldEditableColumns;
|
||||
use Symbiote\GridFieldExtensions\GridFieldTitleHeader;
|
||||
|
||||
class OpenningHoursExtension extends DataExtension
|
||||
{
|
||||
private static $db = [
|
||||
'ShowOpeningHours' => 'Boolean(1)',
|
||||
'OpenningHoursNote' => 'Varchar(255)',
|
||||
];
|
||||
|
||||
private static $has_one = [
|
||||
'OpeningHoursPage' => SiteTree::class,
|
||||
];
|
||||
|
||||
private static $has_many = [
|
||||
'OpeningHours' => OpeningHour::class,
|
||||
'Holidays' => Holiday::class,
|
||||
];
|
||||
|
||||
public function HoursLink()
|
||||
{
|
||||
return $this->owner->OpeningHoursPage()->Link();
|
||||
}
|
||||
|
||||
public function updateCMSFields(FieldList $fields)
|
||||
{
|
||||
$tab = $fields->findOrMakeTab('Root.OpeningHours');
|
||||
|
||||
if(!$this->owner->exists()) {
|
||||
$tab->push(LiteralField::create(
|
||||
'OpeningHoursNotice',
|
||||
'<p class="message notice">The object must be saved before opening hours can be added</p>'
|
||||
));
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
$hours = $this->owner->OpeningHours();
|
||||
|
||||
$config = GridFieldConfig::create();
|
||||
$config->addComponents([
|
||||
new GridFieldToolbarHeader(),
|
||||
new GridFieldTitleHeader(),
|
||||
new GridFieldEditableColumns(),
|
||||
new GridFieldAddNewInlineButton('toolbar-header-right'),
|
||||
new GridFieldDeleteAction(),
|
||||
]);
|
||||
|
||||
$tab->setChildren(FieldList::create(
|
||||
HeaderField::create('OpeningHours','Opening Hours'),
|
||||
LiteralField::create(
|
||||
'CurrentOpeningHour',
|
||||
'<b>Today:</b>'
|
||||
.'<p class="message notice">'
|
||||
.$this->owner->renderWith('Site\\Objects\\OpeningHoursList')
|
||||
.'</p>'
|
||||
),
|
||||
CheckboxField::create('ShowOpeningHours'),
|
||||
DropdownField::create(
|
||||
'OpeningHoursPageID',
|
||||
'Opening Hours Page',
|
||||
SiteTree::get()->map()->toArray()
|
||||
),
|
||||
/*TextareaField::create('OpenningHoursNote'),
|
||||
LiteralField::create(
|
||||
'OpeningHoursNote',
|
||||
'<p><b>Please, specify time ranges. For example:</b><br/>'
|
||||
.'Monday 10:00 AM - 2:00 PM<br/>'
|
||||
.'Monday 3:00 PM - 6:00 PM<br/>'
|
||||
.'Tuesday 12:00 AM - 2:00 PM<br/>'
|
||||
.'Tuesday 3:00 PM - 4:00 PM<br/>'
|
||||
.'...<br/>'
|
||||
.'<b>Short day example durring holidays:</b><br/>'
|
||||
.'Monday 12:00 AM - 2:00 PM 12/31/2018 - 01/06/2019'
|
||||
.'</p>'
|
||||
),*/
|
||||
GridField::create(
|
||||
'OpeningHours',
|
||||
'Opening Hours',
|
||||
$hours,
|
||||
$config
|
||||
)
|
||||
));
|
||||
|
||||
$tab = $fields->findOrMakeTab('Root.Holidays');
|
||||
$tab->push(GridField::create(
|
||||
'Holidays',
|
||||
'Holidays',
|
||||
$this->owner->Holidays(),
|
||||
$config
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the opening hours
|
||||
*
|
||||
* @return OpeningHour|DataObject|null
|
||||
*/
|
||||
public function OpeningHoursToday()
|
||||
{
|
||||
$hours = $this->owner->OpeningHours();
|
||||
$time = time();
|
||||
|
||||
$today = $hours->filter([
|
||||
'Day' => date('l', $time),
|
||||
'DisplayStart:LessThanOrEqual' => date('Y-m-d', $time),
|
||||
'DisplayEnd:GreaterThanOrEqual' => date('Y-m-d', $time),
|
||||
]);
|
||||
|
||||
return $today->exists() ? $today : $hours->filter([
|
||||
'Day' => date('l', $time),
|
||||
'DisplayStart' => null,
|
||||
'DisplayEnd' => null,
|
||||
]);
|
||||
}
|
||||
|
||||
public function OpeningHoursJSON()
|
||||
{
|
||||
$hours = $this->owner->OpeningHours();
|
||||
$result = [];
|
||||
foreach ($hours as $hour) {
|
||||
$from = str_replace(':00', '', date('g:i a', strtotime($hour->getField('From'))));
|
||||
$till = str_replace(':00', '', date('g:i a', strtotime($hour->getField('Till'))));
|
||||
|
||||
$result['days'][$hour->getField('Day')][] = [
|
||||
'From' => $from,
|
||||
'Till' => $till,
|
||||
'DisplayStart' => $hour->getField('DisplayStart'),
|
||||
'DisplayEnd' => $hour->getField('DisplayEnd'),
|
||||
];
|
||||
}
|
||||
|
||||
$holidays = $this->owner->Holidays();
|
||||
foreach ($holidays as $holiday) {
|
||||
$result['holidays'][$holiday->getField('Date')] = $holiday->getField('Title');
|
||||
}
|
||||
|
||||
return json_encode($result);
|
||||
}
|
||||
|
||||
public function onBeforeWrite()
|
||||
{
|
||||
parent::onBeforeWrite();
|
||||
if ($this->owner->exists() && !$this->owner->OpeningHours()->exists()) {
|
||||
$this->createOpeningHours();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set up the opening hours for each day of the week
|
||||
*/
|
||||
private function createOpeningHours()
|
||||
{
|
||||
$days = OpeningHour::singleton()->dbObject('Day')->enumValues();
|
||||
foreach ($days as $day) {
|
||||
$openingHour = OpeningHour::create();
|
||||
$openingHour->Day = $day;
|
||||
$this->owner->OpeningHours()->add($openingHour);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use SilverStripe\Core\Extension;
|
||||
use SilverStripe\Forms\CompositeField;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\Forms\TextField;
|
||||
|
||||
class PlaceholderFormExtension extends Extension
|
||||
{
|
||||
public function updateFormFields(FieldList $fields)
|
||||
{
|
||||
foreach ($fields as $field) {
|
||||
$this->setPlaceholder($field);
|
||||
}
|
||||
}
|
||||
|
||||
private function setPlaceholder($field)
|
||||
{
|
||||
if (is_a($field, TextField::class)) {
|
||||
$field->setAttribute(
|
||||
'placeholder',
|
||||
$field->Title()
|
||||
.($field->hasClass('requiredField') ? '*' : '')
|
||||
);
|
||||
$field->setTitle('');
|
||||
}
|
||||
|
||||
if (is_a($field, CompositeField::class)) {
|
||||
$children = $field->getChildren();
|
||||
foreach ($children as $child) {
|
||||
$this->setPlaceholder($child);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 6/23/18
|
||||
* Time: 1:23 PM
|
||||
*/
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
|
||||
class ShoppingCartControllerExtension extends DataExtension
|
||||
{
|
||||
public function updateAddResponse($request, $response, $product, $quantity)
|
||||
{
|
||||
\PageController::setSiteWideMessage('+'.$quantity.' item(s) was added into the cart', 'success', $request);
|
||||
}
|
||||
|
||||
public function updateRemoveResponse($request, $response, $product, $quantity)
|
||||
{
|
||||
\PageController::setSiteWideMessage(''.$quantity.' item(s) was removed from the cart', 'success', $request);
|
||||
}
|
||||
}
|
|
@ -1,139 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use A2nt\SilverStripeMapboxField\MapboxField;
|
||||
use Innoweb\Sitemap\Pages\SitemapPage;
|
||||
use SilverStripe\AssetAdmin\Forms\UploadField;
|
||||
use SilverStripe\Assets\Image;
|
||||
use SilverStripe\Blog\Model\BlogPost;
|
||||
use SilverStripe\Forms\LiteralField;
|
||||
use SilverStripe\Forms\TextareaField;
|
||||
use SilverStripe\Forms\TextField;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
use SilverStripe\CMS\Model\SiteTree;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\Forms\TreeMultiselectField;
|
||||
use SilverStripe\Forms\DropdownField;
|
||||
|
||||
//use BetterBrief\GoogleMapField;
|
||||
|
||||
class SiteConfigExtension extends DataExtension
|
||||
{
|
||||
private static $db = [
|
||||
'ExtraCode' => 'Text',
|
||||
'Longitude' => 'Decimal(10, 8)',
|
||||
'Latitude' => 'Decimal(11, 8)',
|
||||
'MapZoom' => 'Int',
|
||||
//'MapAPIKey' => 'Varchar(255)',
|
||||
'Description' => 'Varchar(255)',
|
||||
'Address' => 'Varchar(255)',
|
||||
'Suburb' => 'Varchar(255)',
|
||||
'State' => 'Varchar(255)',
|
||||
'ZipCode' => 'Varchar(6)',
|
||||
];
|
||||
|
||||
private static $has_one = [
|
||||
'PrivacyPolicy' => SiteTree::class,
|
||||
'Sitemap' => SiteTree::class,
|
||||
];
|
||||
|
||||
private static $many_many = [
|
||||
'Navigation' => SiteTree::class,
|
||||
];
|
||||
|
||||
public function updateCMSFields(FieldList $fields)
|
||||
{
|
||||
$img = Image::get()->filter([
|
||||
'ParentID' => 0,
|
||||
'FileFilename' => 'qrcode.png',
|
||||
])->first();
|
||||
if ($img) {
|
||||
$fields->addFieldsToTab('Root.Main', [
|
||||
LiteralField::create('QRCode', '<img src="'.$img->Link().'" alt="QR code" width="200" style="float:left" />'),
|
||||
]);
|
||||
}
|
||||
|
||||
$fields->addFieldsToTab('Root.Main', [
|
||||
TreeMultiselectField::create(
|
||||
'Navigation',
|
||||
'Navigation',
|
||||
SiteTree::class
|
||||
)->setDisableFunction(static function ($el) {
|
||||
return $el->getField('ParentID') !== 0;
|
||||
}),
|
||||
TextareaField::create('Description', 'Website Description'),
|
||||
TextareaField::create('ExtraCode', 'Extra site-wide HTML code'),
|
||||
DropdownField::create(
|
||||
'PrivacyPolicyID',
|
||||
'Privacy Policy Page',
|
||||
SiteTree::get()->map()->toArray()
|
||||
)->setEmptyString('(Select one)'),
|
||||
DropdownField::create(
|
||||
'SitemapID',
|
||||
'Sitemap Page',
|
||||
SitemapPage::get()->map()->toArray()
|
||||
)->setEmptyString('(Select one)'),
|
||||
]);
|
||||
|
||||
$mapTab = $fields->findOrMakeTab('Root.Maps');
|
||||
$mapTab->setTitle('Address / Map');
|
||||
|
||||
$fields->addFieldsToTab('Root.Maps', [
|
||||
TextField::create('Address'),
|
||||
TextField::create('Suburb', 'City'),
|
||||
TextField::create('State'),
|
||||
TextField::create('ZipCode'),
|
||||
]);
|
||||
|
||||
if (MapboxField::getAccessToken()) {
|
||||
$fields->addFieldsToTab('Root.Maps', [
|
||||
//TextField::create('MapAPIKey'),
|
||||
TextField::create('MapZoom'),
|
||||
MapboxField::create('Map', 'Choose a location', 'Latitude', 'Longitude'),
|
||||
]);
|
||||
} else {
|
||||
$fields->addFieldsToTab('Root.Maps', [
|
||||
LiteralField::create('MapNotice', '<p class="alert alert-info">No Map API keys specified.</p>')
|
||||
]);
|
||||
}
|
||||
|
||||
/*GoogleMapField::create(
|
||||
$this->owner,
|
||||
'Location',
|
||||
[
|
||||
'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()
|
||||
{
|
||||
return '{"type": "MarkerCollection","features": [{"type": "Feature","icon": "<i class=\'fas fa-map-marker-alt\'></i>",'
|
||||
.'"properties": {"content": "'.$this->owner->getTitle().'"},"geometry": {"type": "Point",'
|
||||
.'"coordinates": ['.$this->owner->getField('Longitude').','.$this->owner->getField('Latitude').']}}]}';
|
||||
}
|
||||
|
||||
public function DirectionsLink()
|
||||
{
|
||||
return '<a href="https://www.google.com/maps/dir/Current+Location/'
|
||||
.$this->owner->getField('Latitude').','
|
||||
.$this->owner->getField('Longitude').'" class="btn btn-primary btn-directions" target="_blank">'
|
||||
.'<i class="fas fa-road"></i> Get Directions</a>';
|
||||
}
|
||||
|
||||
public function getLatestBlogPosts()
|
||||
{
|
||||
return BlogPost::get()->sort('PublishDate DESC');
|
||||
}
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use SilverStripe\Forms\TextareaField;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
|
||||
class SiteTreeExtension extends DataExtension
|
||||
{
|
||||
private static $db = [
|
||||
'ExtraCode' => 'Text',
|
||||
];
|
||||
|
||||
public function updateSettingsFields(FieldList $fields)
|
||||
{
|
||||
$fields->addFieldsToTab('Root.Settings', [
|
||||
TextareaField::create(
|
||||
'ExtraCode',
|
||||
'Extra page specific HTML code'
|
||||
),
|
||||
]);
|
||||
}
|
||||
}
|
|
@ -1,74 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 6/30/18
|
||||
* Time: 11:37 PM
|
||||
* Ref: Dynamic\FlexSlider\Model\SlideImage
|
||||
*/
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use SilverStripe\Forms\CheckboxField;
|
||||
use SilverStripe\Forms\DatetimeField;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\Forms\ToggleCompositeField;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
|
||||
class SlideImageExtension extends DataExtension
|
||||
{
|
||||
private static $db = [
|
||||
'Hide' => 'Boolean(0)',
|
||||
'DateOn' => 'Datetime',
|
||||
'DateOff' => 'Datetime',
|
||||
];
|
||||
|
||||
private $_cache = [];
|
||||
|
||||
public function getElement()
|
||||
{
|
||||
if(!isset($this->_cache['element'])) {
|
||||
$this->_cache['element'] = $this->owner->SlideshowElement();
|
||||
}
|
||||
|
||||
return $this->_cache['element'];
|
||||
}
|
||||
|
||||
public function getSlideWidth()
|
||||
{
|
||||
$element = $this->getElement();
|
||||
return $element->getSlideWidth();
|
||||
}
|
||||
|
||||
public function getSlideHeight()
|
||||
{
|
||||
$element = $this->getElement();
|
||||
return $element->getSlideHeight();
|
||||
}
|
||||
|
||||
public function updateCMSFields(FieldList $fields)
|
||||
{
|
||||
parent::updateCMSFields($fields);
|
||||
|
||||
$fields->removeByName([
|
||||
'PageLinkID',
|
||||
'Hide',
|
||||
'DateOn',
|
||||
'DateOff',
|
||||
]);
|
||||
|
||||
|
||||
$fields->dataFieldByName('Image')
|
||||
->setTitle('Image ('.$this->getSlideWidth().' x '.$this->getSlideHeight().' px)');
|
||||
|
||||
$fields->addFieldToTab('Root.Main', ToggleCompositeField::create(
|
||||
'ConfigHD',
|
||||
'Slide Settings',
|
||||
[
|
||||
CheckboxField::create('Hide', 'Hide this slide? (That will hide the slide regardless of start/end fields)'),
|
||||
DatetimeField::create('DateOn', 'When would you like to start showing the slide?'),
|
||||
DatetimeField::create('DateOff', 'When would you like to stop showing the slide?'),
|
||||
]
|
||||
));
|
||||
}
|
||||
}
|
|
@ -1,76 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 6/30/18
|
||||
* Time: 11:37 PM
|
||||
*/
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use Sheadawson\Linkable\Forms\LinkField;
|
||||
use Sheadawson\Linkable\Models\Link;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\Forms\TextField;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
use SilverStripe\Security\Member;
|
||||
|
||||
class SocialExtension extends DataExtension
|
||||
{
|
||||
private static $db = [
|
||||
'PhoneNumber' => 'Varchar(255)',
|
||||
];
|
||||
|
||||
private static $has_one = [
|
||||
'Facebook' => Link::class,
|
||||
'LinkedIn' => Link::class,
|
||||
'Pinterest' => Link::class,
|
||||
'Instagram' => Link::class,
|
||||
'Twitter' => Link::class,
|
||||
'PublicEmail' => Link::class,
|
||||
//'PhoneNumber' => Link::class,
|
||||
];
|
||||
|
||||
public function updateCMSFields(FieldList $fields)
|
||||
{
|
||||
parent::updateCMSFields($fields);
|
||||
|
||||
$linkFields = [
|
||||
LinkField::create('FacebookID'),
|
||||
LinkField::create('LinkedInID'),
|
||||
LinkField::create('PinterestID'),
|
||||
LinkField::create('InstagramID'),
|
||||
LinkField::create('TwitterID'),
|
||||
];
|
||||
|
||||
foreach ($linkFields as $field) {
|
||||
$field->setAllowedTypes(['URL']);
|
||||
}
|
||||
|
||||
$fields->findOrMakeTab('Root.Social');
|
||||
|
||||
$fields->addFieldsToTab('Root.Social', [
|
||||
TextField::create('PhoneNumber'),
|
||||
LinkField::create('PublicEmailID', 'Public Email')
|
||||
->setAllowedTypes(['Email']),
|
||||
/*LinkField::create('PhoneNumberID', 'Phone Number')
|
||||
->setAllowedTypes(['Phone']),*/
|
||||
]);
|
||||
|
||||
$fields->addFieldsToTab('Root.Social', $linkFields);
|
||||
}
|
||||
|
||||
public static function byPhone($phone)
|
||||
{
|
||||
$links = Link::get()->filter('Phone', $phone);
|
||||
|
||||
if ($links->exists()) {
|
||||
return Member::get()->filter(
|
||||
'PhoneNumberID',
|
||||
array_keys($links->map('ID', 'Title')->toArray())
|
||||
)->first();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -1,79 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\Forms\GridField\GridFieldDataColumns;
|
||||
use SilverStripe\Forms\GridField\GridFieldPaginator;
|
||||
use SilverStripe\Forms\ListboxField;
|
||||
use SilverStripe\Forms\TextareaField;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
use SilverStripe\UserForms\Model\EditableFormField;
|
||||
|
||||
class UserDefinedFormExtension extends DataExtension
|
||||
{
|
||||
/*private static $db = [
|
||||
'CustomThankYouCode' => 'HTMLText',
|
||||
'RedirectOnComplete' => 'Boolean(0)',
|
||||
'RedirectOnCompleteURL' => 'Varchar(255)',
|
||||
];*/
|
||||
|
||||
private static $many_many = [
|
||||
'SubmissionColumns' => EditableFormField::class,
|
||||
];
|
||||
|
||||
public function updateCMSFields(FieldList $fields)
|
||||
{
|
||||
parent::updateCMSFields($fields);
|
||||
|
||||
$fields->removeByName('RedirectOnComplete');
|
||||
$fields->removeByName('RedirectOnCompleteURL');
|
||||
|
||||
$fields->removeByName('SubmissionColumns');
|
||||
|
||||
$fields->addFieldToTab(
|
||||
'Root.Main',
|
||||
ListboxField::create(
|
||||
'SubmissionColumns',
|
||||
'Display following columns at submissions list',
|
||||
$this->owner->Fields()->map('ID', 'Title')
|
||||
)
|
||||
);
|
||||
|
||||
$tab = $fields->findOrMakeTab('Root.FormOptions');
|
||||
|
||||
/*$tab->push(CheckboxField::create('RedirectOnComplete'));
|
||||
$tab->push(TextField::create('RedirectOnCompleteURL'));*/
|
||||
//$tab->push(TextareaField::create('CustomThankYouCode'));
|
||||
|
||||
$grid = $fields->dataFieldByName('Submissions');
|
||||
|
||||
$config = $grid->getConfig();
|
||||
$config->getComponentByType(GridFieldPaginator::class)->setItemsPerPage(100);
|
||||
|
||||
$cols = $this->owner->SubmissionColumns();
|
||||
if ($grid && $cols->count()) {
|
||||
$dataCols = $config->getComponentByType(GridFieldDataColumns::class);
|
||||
|
||||
$columns = [
|
||||
'ID' => 'ID',
|
||||
'Created' => 'Created',
|
||||
];
|
||||
|
||||
foreach ($cols as $col) {
|
||||
$title = $col->getField('Title');
|
||||
$name = $col->getField('Name');
|
||||
$columns[$name] = [
|
||||
'title' => $title,
|
||||
'callback' => function ($item) use ($name) {
|
||||
return $item->relField($name);
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
$columns['Actions'] = 'Actions';
|
||||
|
||||
$dataCols->setDisplayFields($columns);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Site\Extensions;
|
||||
|
||||
use SilverStripe\ORM\HiddenClass;
|
||||
use SilverStripe\UserForms\Model\UserDefinedForm;
|
||||
|
||||
class UserDefinedForm_HiddenClass extends UserDefinedForm implements HiddenClass
|
||||
{
|
||||
}
|
|
@ -1,57 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 9/12/18
|
||||
* Time: 2:55 AM
|
||||
*/
|
||||
|
||||
namespace Site\Models;
|
||||
|
||||
use Dynamic\FlexSlider\Model\SlideImage;
|
||||
use Sheadawson\Linkable\Forms\LinkField;
|
||||
use Sheadawson\Linkable\Models\Link;
|
||||
use SilverStripe\ORM\DataObject;
|
||||
use SilverStripe\ORM\ValidationResult;
|
||||
use SilverStripe\SiteConfig\SiteConfig;
|
||||
|
||||
class Holiday extends DataObject
|
||||
{
|
||||
private static $table_name = 'Holiday';
|
||||
|
||||
private static $db = [
|
||||
'Title' => 'Varchar(255)',
|
||||
'Date' => 'Date',
|
||||
];
|
||||
|
||||
private static $has_one = [
|
||||
'Parent' => SiteConfig::class,
|
||||
];
|
||||
|
||||
|
||||
private static $summary_fields = [
|
||||
'Title' => 'Title',
|
||||
'Date' => 'Date',
|
||||
];
|
||||
|
||||
private static $default_sort = 'Date ASC, Title ASC';
|
||||
|
||||
public function validate()
|
||||
{
|
||||
$result = parent::validate();
|
||||
|
||||
$exists = self::get()->filter([
|
||||
'ID:not' => $this->ID,
|
||||
'Date' => $this->getField('Date'),
|
||||
])->exists();
|
||||
|
||||
if($exists) {
|
||||
return $result->addError(
|
||||
'Holiday was defined already.',
|
||||
ValidationResult::TYPE_ERROR
|
||||
);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
|
@ -1,136 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 9/12/18
|
||||
* Time: 2:55 AM
|
||||
*/
|
||||
|
||||
namespace Site\Models;
|
||||
|
||||
use A2nt\SilverStripeMapboxField\MapboxField;
|
||||
use A2nt\SilverStripeMapboxField\MarkerExtension;
|
||||
use Sheadawson\Linkable\Forms\LinkField;
|
||||
use Sheadawson\Linkable\Models\Link;
|
||||
use SilverStripe\Forms\CheckboxField;
|
||||
use SilverStripe\ORM\DataObject;
|
||||
use SilverStripe\Versioned\Versioned;
|
||||
use Site\Elements\MapElement;
|
||||
use Symbiote\Addressable\Addressable;
|
||||
|
||||
class MapPin extends DataObject
|
||||
{
|
||||
private static $table_name = 'MapPin';
|
||||
|
||||
private static $db = [
|
||||
'Title' => 'Varchar(255)',
|
||||
'ShowAtMap' => 'Boolean(1)',
|
||||
];
|
||||
|
||||
private static $has_one = [
|
||||
'PhoneNumber' => Link::class,
|
||||
'Fax' => Link::class,
|
||||
];
|
||||
|
||||
private static $extensions = [
|
||||
Addressable::class,
|
||||
MarkerExtension::class,
|
||||
Versioned::class,
|
||||
];
|
||||
|
||||
private static $belongs_many_many = [
|
||||
'MapElements' => MapElement::class,
|
||||
];
|
||||
|
||||
private static $default_sort = 'Title ASC, ID DESC';
|
||||
|
||||
private static $summary_fields = [
|
||||
'Title',
|
||||
'Address',
|
||||
'ShowAtMap',
|
||||
];
|
||||
|
||||
public function getCMSFields()
|
||||
{
|
||||
$fields = parent::getCMSFields();
|
||||
|
||||
$fields->removeByName('MapElements');
|
||||
|
||||
$fields->replaceField(
|
||||
'PhoneNumberID',
|
||||
LinkField::create('PhoneNumberID', 'Phone Number')
|
||||
->setAllowedTypes(['Phone'])
|
||||
);
|
||||
|
||||
$fields->replaceField(
|
||||
'FaxID',
|
||||
LinkField::create('FaxID', 'FAX')
|
||||
->setAllowedTypes(['Phone'])
|
||||
);
|
||||
$fields->removeByName(['Map', 'LatLngOverride', 'Lng','Lat']);
|
||||
|
||||
$fields->addFieldsToTab('Root.Main', [
|
||||
CheckboxField::create('ShowAtMap', 'Show at the map?'),
|
||||
CheckboxField::create('LatLngOverride', 'Override Latitude and Longitude?')
|
||||
->setDescription('Check this box and save to be able to edit the latitude and longitude manually.'),
|
||||
MapboxField::create('Map', 'Choose a location', 'Lat', 'Lng'),
|
||||
]);
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
public function onBeforeWrite()
|
||||
{
|
||||
parent::onBeforeWrite();
|
||||
|
||||
$lng = $this->getField('Lng');
|
||||
$lat = $this->getField('Lat');
|
||||
|
||||
|
||||
if (!$this->getField('Country')) {
|
||||
$this->setField('Country', 'us');
|
||||
}
|
||||
|
||||
// geocode
|
||||
try {
|
||||
// reverse geocoding get address
|
||||
if (!$this->hasAddress() && $lng && $lat) {
|
||||
require_once BASE_PATH . '/app/thirdparty/geocoding-example/php/Mapbox.php';
|
||||
$mapbox = new \Mapbox(MapboxField::getAccessToken());
|
||||
|
||||
// GET Address
|
||||
$res = $mapbox->reverseGeocode($lng, $lat);
|
||||
if ($res->success() && $res->getCount()) {
|
||||
$res = $res->getData();
|
||||
if (count($res) && isset($res[0]['place_name'])) {
|
||||
$details = explode(',', $res[0]['place_name']);
|
||||
$fields = [
|
||||
'Address',
|
||||
'City',
|
||||
'State',
|
||||
//'Country',
|
||||
];
|
||||
|
||||
$n = count($fields);
|
||||
for ($i = 0; $i < $n; $i++) {
|
||||
if (!isset($details[$i])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$name = $fields[$i];
|
||||
$val = $details[$i];
|
||||
|
||||
// get postal code
|
||||
if ($name === 'State') {
|
||||
$this->setField('PostalCode', substr($val, strrpos($val, ' ')+1));
|
||||
}
|
||||
|
||||
$this->setField($name, $val);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,75 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 9/12/18
|
||||
* Time: 2:55 AM
|
||||
*/
|
||||
|
||||
namespace Site\Models;
|
||||
|
||||
use Dynamic\FlexSlider\Model\SlideImage;
|
||||
use Sheadawson\Linkable\Forms\LinkField;
|
||||
use Sheadawson\Linkable\Models\Link;
|
||||
use SilverStripe\ORM\DataObject;
|
||||
use SilverStripe\ORM\ValidationResult;
|
||||
use SilverStripe\SiteConfig\SiteConfig;
|
||||
|
||||
class Notification extends DataObject
|
||||
{
|
||||
private static $table_name = 'Notification';
|
||||
|
||||
private static $db = [
|
||||
'Title' => 'Varchar(255)',
|
||||
'Content' => 'Text',
|
||||
'DateOn' => 'Date',
|
||||
'DateOff' => 'Date',
|
||||
];
|
||||
|
||||
private static $has_one = [
|
||||
'Parent' => SiteConfig::class,
|
||||
'TargetLink' => Link::class,
|
||||
];
|
||||
|
||||
|
||||
private static $summary_fields = [
|
||||
'Title' => 'Title',
|
||||
'Content' => 'Text',
|
||||
'DateOn' => 'Turn on date',
|
||||
'DateOff' => 'Turn off date',
|
||||
];
|
||||
|
||||
private static $default_sort = 'DateOn DESC, DateOff DESC, Title ASC';
|
||||
|
||||
public function getCMSFields()
|
||||
{
|
||||
$fields = parent::getCMSFields();
|
||||
|
||||
$fields->addFieldsToTab('Root.Main', [
|
||||
LinkField::create('TargetLinkID', 'Link'),
|
||||
]);
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
public function validate()
|
||||
{
|
||||
$result = parent::validate();
|
||||
|
||||
if(!$this->getField('DateOn') || !$this->getField('DateOff')) {
|
||||
return $result->addError(
|
||||
'Turn on and turn off dates are required.',
|
||||
ValidationResult::TYPE_ERROR
|
||||
);
|
||||
}
|
||||
|
||||
if(!$this->getField('Content')) {
|
||||
return $result->addError(
|
||||
'Text field required.',
|
||||
ValidationResult::TYPE_ERROR
|
||||
);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
|
@ -1,90 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 9/12/18
|
||||
* Time: 2:55 AM
|
||||
*/
|
||||
|
||||
namespace Site\Models;
|
||||
|
||||
use Dynamic\FlexSlider\Model\SlideImage;
|
||||
use Sheadawson\Linkable\Forms\LinkField;
|
||||
use Sheadawson\Linkable\Models\Link;
|
||||
use SilverStripe\ORM\DataObject;
|
||||
use SilverStripe\ORM\ValidationResult;
|
||||
use SilverStripe\SiteConfig\SiteConfig;
|
||||
|
||||
class OpeningHour extends DataObject
|
||||
{
|
||||
private static $table_name = 'OpeningHour';
|
||||
|
||||
private static $db = [
|
||||
'Day' => 'Enum("Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday", "Monday")',
|
||||
'From' => 'Time',
|
||||
'Till' => 'Time',
|
||||
'Comment' => 'Varchar(255)',
|
||||
'DisplayStart' => 'Date',
|
||||
'DisplayEnd' => 'Date',
|
||||
];
|
||||
|
||||
private static $has_one = [
|
||||
'Parent' => SiteConfig::class,
|
||||
];
|
||||
|
||||
private static $defaults = [
|
||||
'From' => '09:00:00',
|
||||
'Till' => '22:00:00',
|
||||
];
|
||||
|
||||
private static $summary_fields = [
|
||||
'Day' => 'Day *',
|
||||
'From' => 'From *',
|
||||
'Till' => 'Till *',
|
||||
//'Comment' => 'Comment',
|
||||
'DisplayStart' => 'Display Start',
|
||||
'DisplayEnd' => 'Display End',
|
||||
];
|
||||
|
||||
private static $default_sort = 'Day ASC, From ASC';
|
||||
|
||||
public function validate()
|
||||
{
|
||||
$result = parent::validate();
|
||||
|
||||
|
||||
if(
|
||||
!$this->getField('Day')
|
||||
|| !$this->getField('From')
|
||||
|| !$this->getField('Till')
|
||||
|| $this->getField('From') > $this->getField('Till')
|
||||
) {
|
||||
return $result->addError(
|
||||
'Day, From and Till fields are required or wrong time range was specified.',
|
||||
ValidationResult::TYPE_ERROR
|
||||
);
|
||||
}
|
||||
|
||||
$exists = self::get()->filter([
|
||||
'ID:not' => $this->ID,
|
||||
'ParentID' => $this->getField('ParentID'),
|
||||
'Day' => $this->getField('Day'),
|
||||
'From:GreaterThanOrEqual' => $this->getField('From'),
|
||||
'Till:LessThanOrEqual' => $this->getField('Till'),
|
||||
])->exists();
|
||||
|
||||
if($exists) {
|
||||
return $result->addError(
|
||||
'Hours were defined already for specified range.',
|
||||
ValidationResult::TYPE_ERROR
|
||||
);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
public function forTemplate()
|
||||
{
|
||||
return $this->renderWith(__CLASS__);
|
||||
}
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 6/30/18
|
||||
* Time: 11:36 PM
|
||||
*/
|
||||
|
||||
namespace Site\Models;
|
||||
|
||||
use SilverStripe\Assets\Image;
|
||||
use SilverStripe\ORM\DataObject;
|
||||
use SilverStripe\Versioned\Versioned;
|
||||
use Site\Extensions\SocialExtension;
|
||||
use Site\Pages\TeamPage;
|
||||
|
||||
class TeamMember extends DataObject
|
||||
{
|
||||
private static $table_name = 'TeamMember';
|
||||
|
||||
private static $db = [
|
||||
'FirstName' => 'Varchar(254)',
|
||||
'LastName' => 'Varchar(254)',
|
||||
'Company' => 'Varchar(254)',
|
||||
'Position' => 'Varchar(254)',
|
||||
'Content' => 'HTMLText',
|
||||
];
|
||||
|
||||
private static $has_one = [
|
||||
'Photo' => Image::class,
|
||||
'Page' => TeamPage::class,
|
||||
];
|
||||
|
||||
private static $extensions = [
|
||||
SocialExtension::class,
|
||||
Versioned::class,
|
||||
];
|
||||
|
||||
private static $owns = [
|
||||
'Photo',
|
||||
];
|
||||
|
||||
private static $summary_fields = [
|
||||
'Company',
|
||||
'FirstName',
|
||||
'LastName',
|
||||
'Position',
|
||||
];
|
||||
|
||||
private static $searchable_fields = [
|
||||
'FirstName',
|
||||
'LastName',
|
||||
];
|
||||
|
||||
private static $frontend_searchable_fields = [
|
||||
'FirstName:PartialMatch',
|
||||
'LastName:PartialMatch',
|
||||
'Content:PartialMatch',
|
||||
];
|
||||
|
||||
public function getTitle()
|
||||
{
|
||||
return $this->getField('Company').' | '.$this->getField('FirstName').' '.$this->getField('LastName');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace App\Pages\Controllers;
|
||||
|
||||
use PageController;
|
||||
|
||||
/**
|
||||
* Class \App\Pages\Controllers\HomePageController
|
||||
*
|
||||
* @property \App\Pages\HomePage $dataRecord
|
||||
* @method \App\Pages\HomePage data()
|
||||
* @mixin \App\Pages\HomePage
|
||||
*/
|
||||
class HomePageController extends PageController
|
||||
{
|
||||
}
|
|
@ -1,10 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace Site\Pages;
|
||||
namespace App\Pages;
|
||||
|
||||
use App\Pages\Controllers\HomePageController;
|
||||
use Page;
|
||||
|
||||
/**
|
||||
* Class \App\Pages\HomePage
|
||||
*
|
||||
*/
|
||||
class HomePage extends Page
|
||||
{
|
||||
private static $icon_class = 'font-icon-p-home';
|
||||
private static $controller_name = HomePageController::class;
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Site\Pages;
|
||||
|
||||
use PageController;
|
||||
|
||||
class HomePageController extends PageController
|
||||
{
|
||||
}
|
|
@ -2,25 +2,33 @@
|
|||
|
||||
// vendor/silverstripe/errorpage/src/ErrorPage.php
|
||||
// extends global Page class
|
||||
//namespace Site\Pages;
|
||||
//namespace App\Pages;
|
||||
|
||||
use Sheadawson\Linkable\Forms\LinkField;
|
||||
use SilverStripe\CMS\Model\SiteTree;
|
||||
use DNADesign\Elemental\Models\ElementContent;
|
||||
use SilverStripe\FontAwesome\FontAwesomeField;
|
||||
|
||||
/**
|
||||
* Class \Page
|
||||
*
|
||||
* @property bool $InheritSideBar
|
||||
* @property string $BlockIcon
|
||||
* @property int $SideBarID
|
||||
* @property int $ElementalAreaID
|
||||
* @method \SilverStripe\Widgets\Model\WidgetArea SideBar()
|
||||
* @method \DNADesign\Elemental\Models\ElementalArea ElementalArea()
|
||||
* @mixin \DNADesign\Elemental\Extensions\ElementalPageExtension
|
||||
* @mixin \A2nt\CMSNiceties\Widgets\WidgetPageExtension
|
||||
* @mixin \A2nt\CMSNiceties\GraphQL\ObjectGraphQlEx
|
||||
*/
|
||||
class Page extends SiteTree
|
||||
{
|
||||
private static $default_container_class = 'container';
|
||||
protected $_cached = [];
|
||||
private static $db = [
|
||||
'BlockIcon' => 'Varchar(255)',
|
||||
];
|
||||
|
||||
public static function DefaultContainer()
|
||||
{
|
||||
return self::config()->get('default_container_class');
|
||||
}
|
||||
private static $field_include = [
|
||||
'ElementalAreaID',
|
||||
];
|
||||
|
||||
public function getSettingsFields()
|
||||
{
|
||||
|
@ -32,45 +40,4 @@ class Page extends SiteTree
|
|||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
/*
|
||||
* Shows custom summary of the post, otherwise
|
||||
* Displays summary of the first content element
|
||||
*/
|
||||
public function Summary($wordsToDisplay = 30)
|
||||
{
|
||||
if (isset($this->_cached['summary'.$wordsToDisplay])) {
|
||||
return $this->_cached['summary'.$wordsToDisplay];
|
||||
}
|
||||
|
||||
$summary = $this->getField('Summary');
|
||||
if ($summary) {
|
||||
$this->_cached['summary'.$wordsToDisplay] = $summary;
|
||||
return $this->_cached['summary'.$wordsToDisplay];
|
||||
}
|
||||
|
||||
$element = ElementContent::get()->filter([
|
||||
'ParentID' => $this->ElementalArea()->ID,
|
||||
'HTML:not' => [null],
|
||||
])->first();
|
||||
|
||||
if ($element) {
|
||||
$this->_cached['summary'.$wordsToDisplay] = $element->dbObject('HTML')->Summary($wordsToDisplay);
|
||||
return $this->_cached['summary'.$wordsToDisplay];
|
||||
}
|
||||
|
||||
$content = $this->getField('Content');
|
||||
if ($content) {
|
||||
$this->_cached['summary'.$wordsToDisplay] = $this->dbObject('Content')->Summary($wordsToDisplay);
|
||||
return $this->_cached['summary'.$wordsToDisplay];
|
||||
}
|
||||
|
||||
$this->_cached['summary'.$wordsToDisplay] = false;
|
||||
return $this->_cached['summary'.$wordsToDisplay];
|
||||
}
|
||||
|
||||
public function CSSClass()
|
||||
{
|
||||
return str_replace(['\\'], '-', $this->getField('ClassName'));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,226 +2,82 @@
|
|||
|
||||
// vendor/silverstripe/errorpage/src/ErrorPageController.php
|
||||
// extends global PageController class
|
||||
//namespace Site\Pages;
|
||||
//namespace App\Pages;
|
||||
|
||||
use SilverStripe\Control\Controller;
|
||||
use A2nt\CMSNiceties\Ajax\Ex\AjaxControllerEx;
|
||||
use SilverStripe\CMS\Controllers\ContentController;
|
||||
use SilverStripe\Control\Director;
|
||||
use SilverStripe\Core\Config\Config;
|
||||
use SilverStripe\ORM\FieldType\DBDatetime;
|
||||
use SilverStripe\View\ArrayData;
|
||||
use SilverStripe\CMS\Model\SiteTree;
|
||||
use SilverStripe\ORM\PaginatedList;
|
||||
use SilverStripe\Forms\Form;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\Forms\TextField;
|
||||
use SilverStripe\Forms\FormAction;
|
||||
use SilverStripe\Forms\RequiredFields;
|
||||
use SilverStripe\Control\HTTPRequest;
|
||||
use SilverStripe\ORM\ArrayList;
|
||||
use DNADesign\Elemental\Models\ElementContent;
|
||||
use DNADesign\Elemental\Models\ElementalArea;
|
||||
use DNADesign\ElementalUserForms\Control\ElementFormController;
|
||||
use Site\Models\TeamMember;
|
||||
use Site\Templates\DeferredRequirements;
|
||||
use SilverStripe\Control\Controller;
|
||||
use SilverStripe\Control\Director;
|
||||
use SilverStripe\View\SSViewer;
|
||||
|
||||
/**
|
||||
* Class \PageController
|
||||
*
|
||||
* @property \Page $dataRecord
|
||||
* @method \Page data()
|
||||
* @mixin \Page
|
||||
* @mixin \A2nt\CMSNiceties\Extensions\PageControllerEx
|
||||
* @mixin \A2nt\CMSNiceties\Ajax\Ex\AjaxControllerEx
|
||||
*/
|
||||
class PageController extends ContentController
|
||||
{
|
||||
private static $allowed_actions = [
|
||||
'SearchForm',
|
||||
];
|
||||
|
||||
private static $searchable_elements = [
|
||||
ElementContent::class,
|
||||
];
|
||||
|
||||
private static $searchable_objects = [
|
||||
TeamMember::class,
|
||||
];
|
||||
|
||||
private $site_message;
|
||||
private $search_term;
|
||||
|
||||
protected function init()
|
||||
{
|
||||
DeferredRequirements::Auto();
|
||||
|
||||
return parent::init();
|
||||
}
|
||||
|
||||
public function index(HTTPRequest $request)
|
||||
{
|
||||
$search = $request->getVar('q');
|
||||
if ($search) {
|
||||
return $this->doSearch($search);
|
||||
}
|
||||
|
||||
return $this->render();
|
||||
}
|
||||
private static $graphql_resources = [];
|
||||
private static $ajax_resources = [];
|
||||
|
||||
public function ElementalArea()
|
||||
{
|
||||
if ($this->CurrentElement() || $this->getAction() !== 'index') {
|
||||
return false;
|
||||
return $this->dataRecord->ElementalArea();
|
||||
}
|
||||
|
||||
public function getViewer($action)
|
||||
{
|
||||
// Manually set templates should be dealt with by Controller::getViewer()
|
||||
if (!empty($this->templates[$action])
|
||||
|| !empty($this->templates['index'])
|
||||
|| $this->template
|
||||
) {
|
||||
return parent::getViewer($action);
|
||||
}
|
||||
|
||||
return ElementalArea::get()->byID($this->getField('ElementalAreaID'));
|
||||
}
|
||||
// Prepare action for template search
|
||||
$action = $action === 'index' ? '' : '_' . $action;
|
||||
|
||||
public function CurrentElement()
|
||||
{
|
||||
$controller_curr = Controller::curr();
|
||||
|
||||
if (is_a($controller_curr, ElementFormController::class)) {
|
||||
return $controller_curr;
|
||||
$templatesFound = [];
|
||||
// Find templates for the record + action together - e.g. Page_action.ss
|
||||
if ($this->dataRecord instanceof SiteTree) {
|
||||
$templatesFound[] = $this->dataRecord->getViewerTemplates($action);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
// Find templates for the controller + action together - e.g. PageController_action.ss
|
||||
$templatesFound[] = SSViewer::get_templates_by_class(static::class, $action, Controller::class);
|
||||
|
||||
public function SearchForm()
|
||||
{
|
||||
$config = $this->SiteConfig();
|
||||
return Form::create(
|
||||
$this,
|
||||
__FUNCTION__,
|
||||
FieldList::create(
|
||||
TextField::create('q', 'Search ...')
|
||||
->setAttribute('placeholder', 'Search '.$config->getField('Title').' Website')
|
||||
),
|
||||
FieldList::create(
|
||||
FormAction::create(
|
||||
'doSearch',
|
||||
'Find it!'
|
||||
)
|
||||
->setUseButtonTag(true)
|
||||
->addExtraClass('btn-secondary')
|
||||
->setButtonContent(
|
||||
'<i class="fas fa-search"></i>'
|
||||
.'<span class="sr-only">Search</span>'
|
||||
)
|
||||
),
|
||||
RequiredFields::create(['q'])
|
||||
)->setFormMethod('POST');
|
||||
}
|
||||
|
||||
public function doSearch($data)
|
||||
{
|
||||
$this->search_term = is_array($data) ? $data['q'] : $data;
|
||||
|
||||
return $this->renderWith([__CLASS__.'_search', 'Page']);
|
||||
}
|
||||
|
||||
private static function getSearchObjects($classNames, $term)
|
||||
{
|
||||
$elements = ArrayList::create();
|
||||
foreach ($classNames as $class) {
|
||||
$fields = Config::inst()->get($class, 'frontend_searchable_fields');
|
||||
$find = array_combine($fields, $fields);
|
||||
$find = array_map(static function () use ($term) {
|
||||
return $term;
|
||||
}, $find);
|
||||
|
||||
$elements->merge($class::get()->filterAny($find)->sort('Created DESC'));
|
||||
// Find templates for the record without an action - e.g. Page.ss
|
||||
if ($this->dataRecord instanceof SiteTree) {
|
||||
$templatesFound[] = $this->dataRecord->getViewerTemplates();
|
||||
}
|
||||
|
||||
return $elements;
|
||||
}
|
||||
// Find the templates for the controller without an action - e.g. PageController.ss
|
||||
$templatesFound[] = SSViewer::get_templates_by_class(static::class, "", Controller::class);
|
||||
|
||||
public function SearchResults()
|
||||
{
|
||||
$term = $this->search_term;
|
||||
if (!$term) {
|
||||
return false;
|
||||
$tpls = array_merge(...$templatesFound);
|
||||
|
||||
// inject AJAX processing
|
||||
if (Director::is_ajax()) {
|
||||
return AjaxControllerEx::processAJAX($tpls);
|
||||
}
|
||||
|
||||
$results = ArrayList::create();
|
||||
return SSViewer::create($tpls);
|
||||
}
|
||||
|
||||
// get pages by title and content
|
||||
$pages = SiteTree::get()->filterAny([
|
||||
'Title:PartialMatch' => $term,
|
||||
'Content:PartialMatch' => $term,
|
||||
])->sort('Created DESC');
|
||||
protected function prepareResponse($response)
|
||||
{
|
||||
parent::prepareResponse($response);
|
||||
|
||||
$results->merge($pages);
|
||||
|
||||
// get pages by elements
|
||||
$elements = self::getSearchObjects(
|
||||
self::config()->get('searchable_elements'),
|
||||
$term
|
||||
);
|
||||
|
||||
foreach ($elements as $element) {
|
||||
$page = Page::get()->filter('ElementalAreaID', $element->getField('ParentID'))->first();
|
||||
if (!$page) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$results->push($page);
|
||||
// inject AJAX processing
|
||||
if (Director::is_ajax()) {
|
||||
$response = $this->getResponse();
|
||||
$this->prepareAjaxResponse($response);
|
||||
}
|
||||
|
||||
// get pages by onjects
|
||||
$elements = self::getSearchObjects(
|
||||
self::config()->get('searchable_objects'),
|
||||
$term
|
||||
);
|
||||
|
||||
foreach ($elements as $element) {
|
||||
$page = $element->Page();
|
||||
if (!$page) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$results->push($page);
|
||||
}
|
||||
|
||||
$results->removeDuplicates();
|
||||
|
||||
return ArrayData::create([
|
||||
'Title' => 'You searched for: "'.$term.'"',
|
||||
'Results' => PaginatedList::create($results),
|
||||
]);
|
||||
}
|
||||
|
||||
public function getParentRecursively()
|
||||
{
|
||||
return $this->Level(1);
|
||||
}
|
||||
|
||||
public static function setSiteWideMessage($message, $type, $request = null)
|
||||
{
|
||||
$request = $request ? $request : Controller::curr()->getRequest();
|
||||
$request->getSession()->set(
|
||||
'SiteWideMessage',
|
||||
ArrayData::create([
|
||||
'Message' => $message,
|
||||
'Type' => $type,
|
||||
])
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getSiteWideMessage()
|
||||
{
|
||||
$request = $this->getRequest();
|
||||
|
||||
if ($request->isGET() && !$this->site_message) {
|
||||
$session = $request->getSession();
|
||||
$this->site_message = $session->get('SiteWideMessage');
|
||||
$session->clear('SiteWideMessage');
|
||||
}
|
||||
|
||||
return $this->site_message;
|
||||
}
|
||||
|
||||
public function CurrentTime()
|
||||
{
|
||||
return DBDatetime::now();
|
||||
}
|
||||
|
||||
public function isDev()
|
||||
{
|
||||
return Director::isDev();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace App\Tasks;
|
||||
|
||||
use A2nt\CMSNiceties\Tasks\BuildTask;
|
||||
|
||||
class MoveOldData extends BuildTask
|
||||
{
|
||||
protected $title = 'Move Old Data';
|
||||
protected $description = 'Move Old Data';
|
||||
protected $enabled = false;
|
||||
|
||||
public function run($request)
|
||||
{
|
||||
die('Done!');
|
||||
}
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 6/30/18
|
||||
* Time: 11:46 PM
|
||||
*/
|
||||
|
||||
namespace Site\Pages;
|
||||
|
||||
use SilverStripe\Forms\GridField\GridField;
|
||||
use SilverStripe\Forms\GridField\GridFieldConfig_RecordEditor;
|
||||
use Site\Models\TeamMember;
|
||||
|
||||
class TeamPage extends \Page
|
||||
{
|
||||
private static $icon_class = 'font-icon-p-profile';
|
||||
|
||||
private static $has_many = [
|
||||
'Members' => TeamMember::class,
|
||||
];
|
||||
|
||||
private static $owns = [
|
||||
'Members',
|
||||
];
|
||||
|
||||
public function getCMSFields()
|
||||
{
|
||||
$fields = parent::getCMSFields();
|
||||
|
||||
$fields->addFieldToTab(
|
||||
'Root.Members',
|
||||
GridField::create(
|
||||
'Members',
|
||||
'',
|
||||
$this->Members(),
|
||||
GridFieldConfig_RecordEditor::create()
|
||||
)
|
||||
);
|
||||
|
||||
return $fields;
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 6/30/18
|
||||
* Time: 11:49 PM
|
||||
*/
|
||||
|
||||
namespace Site\Pages;
|
||||
|
||||
|
||||
class TeamPageController extends \PageController
|
||||
{
|
||||
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 8/26/18
|
||||
* Time: 1:40 PM
|
||||
*/
|
||||
|
||||
namespace Site\Models;
|
||||
|
||||
|
||||
use SilverShop\Checkout\Component\CheckoutComponent;
|
||||
use SilverShop\Model\Order;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\Forms\HeaderField;
|
||||
use SilverStripe\Forms\LiteralField;
|
||||
use SilverStripe\SiteConfig\SiteConfig;
|
||||
use SilverStripe\View\SSViewer;
|
||||
|
||||
class CheckoutMapComponent extends CheckoutComponent
|
||||
{
|
||||
public function getFormFields(Order $order)
|
||||
{
|
||||
$config = SiteConfig::current_site_config();
|
||||
|
||||
return FieldList::create(
|
||||
HeaderField::create('MapHeader', 'Pick up location'),
|
||||
LiteralField::create(
|
||||
'Map',
|
||||
SSViewer::create('Objects\Map')->process($config)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function validateData(Order $order, array $data)
|
||||
{
|
||||
}
|
||||
|
||||
public function setData(Order $order, array $data)
|
||||
{
|
||||
}
|
||||
|
||||
public function getData(Order $order)
|
||||
{
|
||||
return [];
|
||||
}
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 8/26/18
|
||||
* Time: 1:08 PM
|
||||
*/
|
||||
|
||||
namespace Site\Models;
|
||||
|
||||
|
||||
use SilverShop\Checkout\Checkout;
|
||||
use SilverShop\Checkout\CheckoutComponentConfig;
|
||||
use SilverShop\Checkout\Component\CustomerDetails;
|
||||
use SilverShop\Checkout\Component\Notes;
|
||||
use SilverShop\Checkout\Component\Payment;
|
||||
use SilverShop\Checkout\Component\Terms;
|
||||
use SilverShop\Checkout\Component\Membership;
|
||||
use SilverShop\Model\Order;
|
||||
use SilverStripe\Omnipay\GatewayInfo;
|
||||
use SilverStripe\Security\Security;
|
||||
|
||||
class CheckoutNoDeliveryConfig extends CheckoutComponentConfig
|
||||
{
|
||||
public function __construct(Order $order)
|
||||
{
|
||||
parent::__construct($order);
|
||||
$this->addComponent(CustomerDetails::create());
|
||||
|
||||
if (Checkout::member_creation_enabled() && !Security::getCurrentUser()) {
|
||||
$this->addComponent(Membership::create());
|
||||
}
|
||||
|
||||
if (count(GatewayInfo::getSupportedGateways()) > 1) {
|
||||
$this->addComponent(Payment::create());
|
||||
}
|
||||
|
||||
$this->addComponent(Notes::create());
|
||||
|
||||
$this->addComponent(CheckoutMapComponent::create());
|
||||
$this->addComponent(Terms::create());
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
Remove it in case u need silvershop module
|
|
@ -1,39 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Tasks;
|
||||
|
||||
use SilverStripe\Assets\File;
|
||||
use SilverStripe\Dev\BuildTask;
|
||||
|
||||
class BrokenFilesTask extends BuildTask
|
||||
{
|
||||
protected $title = 'Broken Files Task';
|
||||
|
||||
protected $description = 'Broken files report';
|
||||
|
||||
protected $enabled = true;
|
||||
|
||||
public function run($request)
|
||||
{
|
||||
$files = File::get();
|
||||
$i = 0;
|
||||
foreach ($files as $file) {
|
||||
if (!$file->exists()) {
|
||||
echo '<b style="color:red">File name was not found at SS DB: '
|
||||
.$file->getField('Name').'</b><br/>'
|
||||
.PHP_EOL;
|
||||
|
||||
$i++;
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
echo ($i > 0) ?
|
||||
'<h2 style="color:red">Missing '.$i.' files</h2>'
|
||||
: '<h2 style="color:green">All files are ok!</h2>';
|
||||
|
||||
die('Done!');
|
||||
}
|
||||
}
|
|
@ -1,78 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Tasks;
|
||||
|
||||
|
||||
use SilverStripe\Control\HTTPRequest;
|
||||
|
||||
class BuildTask extends \SilverStripe\Dev\BuildTask
|
||||
{
|
||||
|
||||
protected $title = 'Base build task interface';
|
||||
protected $description = 'Base build task interface';
|
||||
protected $enabled = false;
|
||||
|
||||
protected $messages = [];
|
||||
/**
|
||||
* Implement this method in the task subclass to
|
||||
* execute via the TaskRunner
|
||||
*
|
||||
* @param HTTPRequest $request
|
||||
* @return
|
||||
*/
|
||||
public function run($request)
|
||||
{
|
||||
// TODO: Implement run() method.
|
||||
return $this->render();
|
||||
}
|
||||
|
||||
public function Title()
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
protected function setMessage($msg, string $type = 'msg')
|
||||
{
|
||||
if(is_array($msg)) {
|
||||
$type = 'list';
|
||||
}
|
||||
|
||||
$this->messages[] = [$type, $msg];
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
echo '<style>'
|
||||
.'.info{color:#053bff}'
|
||||
.'.bad,.error{color:red}'
|
||||
.'.good,.success{color:green}'
|
||||
.'</style>';
|
||||
|
||||
foreach ($this->messages as $item) {
|
||||
$type = $item[0];
|
||||
$msg = $item[1];
|
||||
|
||||
switch ($type) {
|
||||
case 'h2':
|
||||
echo '<h2>'.$msg.'</h2>'.PHP_EOL;
|
||||
break;
|
||||
case 'h3':
|
||||
echo '<h3>'.$msg.'</h3>'.PHP_EOL;
|
||||
break;
|
||||
case 'list':
|
||||
echo '<ul>';
|
||||
foreach ($msg as $m) {
|
||||
echo '<li>'.$m.'</li>';
|
||||
}
|
||||
echo '</ul>';
|
||||
break;
|
||||
default:
|
||||
echo $msg.'<br/>'.PHP_EOL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
echo '<h2 class="success">Success!</h2>';
|
||||
}
|
||||
}
|
|
@ -1,105 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Tasks;
|
||||
|
||||
use Endroid\QrCode\ErrorCorrectionLevel;
|
||||
use Endroid\QrCode\LabelAlignment;
|
||||
use Endroid\QrCode\QrCode;
|
||||
use SilverStripe\Assets\File;
|
||||
use SilverStripe\Assets\Image;
|
||||
use SilverStripe\Assets\Storage\AssetStore;
|
||||
use SilverStripe\Assets\Upload;
|
||||
use SilverStripe\Control\Director;
|
||||
use SilverStripe\Core\Injector\Injector;
|
||||
|
||||
|
||||
class QRCodeTask extends BuildTask
|
||||
{
|
||||
protected $title = 'Generate website QR-code';
|
||||
|
||||
protected $description = 'Generate website QR-code';
|
||||
|
||||
protected $enabled = true;
|
||||
|
||||
public function run($request)
|
||||
{
|
||||
echo '<h1>'.$this->Title().'</h1>';
|
||||
|
||||
echo self::generateQR();
|
||||
|
||||
die('Done!');
|
||||
}
|
||||
|
||||
public static function generateQR()
|
||||
{
|
||||
$qrCode = new QrCode(Director::absoluteBaseURL());
|
||||
$qrCode->setSize(600);
|
||||
$qrCode->setMargin(10);
|
||||
|
||||
$qrCode->setWriterByName('png');
|
||||
$qrCode->setEncoding('UTF-8');
|
||||
$qrCode->setErrorCorrectionLevel(ErrorCorrectionLevel::HIGH());
|
||||
$qrCode->setForegroundColor(['r' => 0, 'g' => 0, 'b' => 0, 'a' => 0]);
|
||||
$qrCode->setBackgroundColor(['r' => 255, 'g' => 255, 'b' => 255, 'a' => 0]);
|
||||
$qrCode->setLabel(Director::absoluteBaseURL(), 16, null, LabelAlignment::CENTER());
|
||||
/*$qrCode->setLogoPath('/'.File::join_paths(
|
||||
PUBLIC_PATH,
|
||||
RESOURCES_DIR,
|
||||
project(),
|
||||
'client', 'dist', 'icons',
|
||||
'apple-touch-icon-152x152.png'
|
||||
));
|
||||
$qrCode->setLogoSize(152, 152);*/
|
||||
$qrCode->setValidateResult(true);
|
||||
|
||||
|
||||
// Round block sizes to improve readability and make the blocks sharper in pixel based outputs (like png).
|
||||
// There are three approaches:
|
||||
$qrCode->setRoundBlockSize(true, QrCode::ROUND_BLOCK_SIZE_MODE_MARGIN); // The size of the qr code is shrinked, if necessary, but the size of the final image remains unchanged due to additional margin being added (default)
|
||||
$qrCode->setRoundBlockSize(true, QrCode::ROUND_BLOCK_SIZE_MODE_ENLARGE); // The size of the qr code and the final image is enlarged, if necessary
|
||||
$qrCode->setRoundBlockSize(true, QrCode::ROUND_BLOCK_SIZE_MODE_SHRINK); // The size of the qr code and the final image is shrinked, if necessary
|
||||
|
||||
// Set additional writer options (SvgWriter example)
|
||||
$qrCode->setWriterOptions(['exclude_xml_declaration' => true]);
|
||||
|
||||
// Directly output the QR code
|
||||
/*header('Content-Type: '.$qrCode->getContentType());
|
||||
echo $qrCode->writeString();
|
||||
die();*/
|
||||
|
||||
// Save it to a file
|
||||
$qrCode->writeFile(TEMP_PATH.'/qrcode.png');
|
||||
$res = self::getAssetStore()->setFromLocalFile(
|
||||
TEMP_PATH.'/qrcode.png',
|
||||
'qrcode.png', null, null,
|
||||
[
|
||||
'conflict' => AssetStore::CONFLICT_OVERWRITE,
|
||||
'visibility' => AssetStore::VISIBILITY_PUBLIC,
|
||||
]
|
||||
);
|
||||
|
||||
$img = Image::get()->filter([
|
||||
'ParentID' => 0,
|
||||
'FileFilename' => $res['Filename'],
|
||||
])->first();
|
||||
if(!$img) {
|
||||
$img = Image::create();
|
||||
}
|
||||
|
||||
$res['FileHash'] = $res['Hash'];
|
||||
$res['FileFilename'] = $res['Filename'];
|
||||
$res['ParentID'] = 0;
|
||||
|
||||
$img = $img->update($res);
|
||||
$img->write();
|
||||
$img->publishFile();
|
||||
|
||||
return '<img src="'.$qrCode->writeDataUri().'" width="300" alt="QR-code" /><br/>';
|
||||
}
|
||||
|
||||
protected static function getAssetStore()
|
||||
{
|
||||
return Injector::inst()->get(AssetStore::class);
|
||||
}
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Tasks;
|
||||
|
||||
use SilverStripe\Assets\File;
|
||||
use SilverStripe\Dev\BuildTask;
|
||||
|
||||
class RestoreFilesTask extends BuildTask
|
||||
{
|
||||
protected $title = 'Restore Files Task';
|
||||
|
||||
protected $description = 'Restores file from specific folder';
|
||||
|
||||
protected $enabled = false;
|
||||
|
||||
public function run($request)
|
||||
{
|
||||
die('Specify path first');
|
||||
$path = '*<Path to the folder with files to be restored>*';
|
||||
|
||||
$files = array_diff(scandir($path), ['.','..']);
|
||||
foreach ($files as $fileName) {
|
||||
$file = File::get()->filter('Name', $fileName);
|
||||
if (!$file->count()) {
|
||||
echo '<b style="color:red">File name was not found at SS DB: '.$fileName.'</b><br/>'.PHP_EOL;
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ($file as $f) {
|
||||
if ($f->exists()) {
|
||||
echo 'File #'.$f->ID.' already exists at SS file structure. <b style="color:green">'.$fileName.'</b><br/>' . PHP_EOL;
|
||||
continue;
|
||||
}
|
||||
|
||||
echo 'Found non existing at SS file system file and found it at SS DB.'
|
||||
.' Creating the file #'.$f->ID.' at SS file system. "<b style="color:#053bff">' . $fileName . '"</b><br/>' . PHP_EOL;
|
||||
|
||||
$f->setFromLocalFile($path.'/'.$fileName);
|
||||
$f->write();
|
||||
$f->publishFile();
|
||||
}
|
||||
}
|
||||
|
||||
die('Success!');
|
||||
}
|
||||
}
|
|
@ -1,218 +0,0 @@
|
|||
<?php
|
||||
|
||||
/** @noinspection PhpUnusedPrivateFieldInspection */
|
||||
|
||||
namespace Site\Templates;
|
||||
|
||||
use SilverStripe\Control\Controller;
|
||||
use SilverStripe\View\TemplateGlobalProvider;
|
||||
use SilverStripe\View\Requirements;
|
||||
use SilverStripe\Core\Config\Config;
|
||||
use SilverStripe\Control\Director;
|
||||
use SilverStripe\Core\Path;
|
||||
use SilverStripe\FontAwesome\FontAwesomeField;
|
||||
|
||||
class DeferredRequirements implements TemplateGlobalProvider
|
||||
{
|
||||
private static $css = [];
|
||||
private static $js = [];
|
||||
private static $deferred = false;
|
||||
private static $static_domain;
|
||||
private static $version;
|
||||
private static $nojquery = false;
|
||||
private static $jquery_version = '3.4.1';
|
||||
private static $nofontawesome = false;
|
||||
private static $custom_requirements = [];
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public static function get_template_global_variables(): array
|
||||
{
|
||||
return [
|
||||
'AutoRequirements' => 'Auto',
|
||||
'DeferedCSS' => 'loadCSS',
|
||||
'DeferedJS' => 'loadJS',
|
||||
'WebpackActive' => 'webpackActive',
|
||||
'EmptyImgSrc' => 'emptyImageSrc',
|
||||
];
|
||||
}
|
||||
|
||||
public static function Auto($class = false): string
|
||||
{
|
||||
$config = Config::inst()->get(self::class);
|
||||
$projectName = WebpackTemplateProvider::projectName();
|
||||
$mainTheme = WebpackTemplateProvider::mainTheme();
|
||||
$mainTheme = $mainTheme ?: $projectName;
|
||||
|
||||
$dir = Path::join(
|
||||
Director::publicFolder(),
|
||||
RESOURCES_DIR,
|
||||
$projectName,
|
||||
'client',
|
||||
'dist'
|
||||
);
|
||||
$cssPath = Path::join($dir, 'css');
|
||||
$jsPath = Path::join($dir, 'js');
|
||||
|
||||
// Initialization
|
||||
Requirements::block(THIRDPARTY_DIR.'/jquery/jquery.js');
|
||||
/*if (defined('FONT_AWESOME_DIR')) {
|
||||
Requirements::block(FONT_AWESOME_DIR.'/css/lib/font-awesome.min.css');
|
||||
}*/
|
||||
Requirements::set_force_js_to_bottom(true);
|
||||
|
||||
// Main libs
|
||||
if (!$config['nojquery']) {
|
||||
self::loadJS(
|
||||
'//ajax.googleapis.com/ajax/libs/jquery/'
|
||||
.$config['jquery_version'].'/jquery.min.js'
|
||||
);
|
||||
}
|
||||
// App libs
|
||||
if (!$config['nofontawesome']) {
|
||||
$v = !isset($config['fontawesome_version']) || !$config['fontawesome_version']
|
||||
? Config::inst()->get(FontAwesomeField::class, 'version')
|
||||
: $config['fontawesome_version'];
|
||||
|
||||
self::loadCSS('//use.fontawesome.com/releases/v'.$v.'/css/all.css');
|
||||
}
|
||||
|
||||
self::loadCSS($mainTheme.'.css');
|
||||
|
||||
// hot reloading
|
||||
if (self::webpackActive()) {
|
||||
self::loadJS('hot.js');
|
||||
}
|
||||
|
||||
self::loadJS($mainTheme.'.js');
|
||||
|
||||
// Custom controller requirements
|
||||
$curr_class = $class ?: get_class(Controller::curr());
|
||||
if (isset($config['custom_requirements'][$curr_class])) {
|
||||
foreach ($config['custom_requirements'][$curr_class] as $file) {
|
||||
if (strpos($file, '.css')) {
|
||||
self::loadCSS($file);
|
||||
}
|
||||
if (strpos($file, '.js')) {
|
||||
self::loadJS($file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$curr_class = str_replace('\\', '.', $curr_class);
|
||||
|
||||
// Controller requirements
|
||||
$themePath = Path::join($cssPath, $mainTheme.'_'.$curr_class . '.css');
|
||||
$projectPath = Path::join($cssPath, $projectName.'_'.$curr_class . '.css');
|
||||
if ($mainTheme && file_exists($themePath)) {
|
||||
self::loadCSS($mainTheme.'_'.$curr_class . '.css');
|
||||
} elseif (file_exists($projectPath)) {
|
||||
self::loadCSS($projectName.'_'.$curr_class . '.css');
|
||||
}
|
||||
|
||||
$themePath = Path::join($jsPath, $mainTheme.'_'.$curr_class . '.js');
|
||||
$projectPath = Path::join($jsPath, $projectName.'_'.$curr_class . '.js');
|
||||
if ($mainTheme && file_exists($themePath)) {
|
||||
self::loadJS($mainTheme.'_'.$curr_class . '.js');
|
||||
} elseif (file_exists($projectPath)) {
|
||||
self::loadJS($projectName.'_'.$curr_class . '.js');
|
||||
}
|
||||
|
||||
return self::forTemplate();
|
||||
}
|
||||
|
||||
public static function loadCSS($css): void
|
||||
{
|
||||
$external = (mb_strpos($css, '//') === 0 || mb_strpos($css, 'http') === 0);
|
||||
if ($external || (self::getDeferred() && !self::webpackActive())) {
|
||||
self::$css[] = $css;
|
||||
} else {
|
||||
WebpackTemplateProvider::loadCSS($css);
|
||||
}
|
||||
}
|
||||
|
||||
public static function loadJS($js): void
|
||||
{
|
||||
/*$external = (mb_substr($js, 0, 2) === '//' || mb_substr($js, 0, 4) === 'http');
|
||||
if ($external || (self::getDeferred() && !self::_webpackActive())) {*/
|
||||
// webpack supposed to load external JS
|
||||
if (self::getDeferred() && !self::webpackActive()) {
|
||||
self::$js[] = $js;
|
||||
} else {
|
||||
WebpackTemplateProvider::loadJS($js);
|
||||
}
|
||||
}
|
||||
|
||||
public static function webpackActive(): bool
|
||||
{
|
||||
return WebpackTemplateProvider::isActive();
|
||||
}
|
||||
|
||||
public static function setDeferred($bool): void
|
||||
{
|
||||
Config::inst()->set(__CLASS__, 'deferred', $bool);
|
||||
}
|
||||
|
||||
public static function getDeferred(): bool
|
||||
{
|
||||
return self::config()['deferred'];
|
||||
}
|
||||
|
||||
public static function forTemplate(): string
|
||||
{
|
||||
$result = '';
|
||||
self::$css = array_unique(self::$css);
|
||||
foreach (self::$css as $css) {
|
||||
$result .= '<i class="defer-cs" data-load="' . self::get_url($css) . '"></i>';
|
||||
}
|
||||
|
||||
self::$js = array_unique(self::$js);
|
||||
foreach (self::$js as $js) {
|
||||
$result .= '<i class="defer-sc" data-load="' . self::get_url($js) . '"></i>';
|
||||
}
|
||||
|
||||
$result .=
|
||||
'<script>function lsc(a,b){var c=document.createElement("script");c.readyState'
|
||||
.'?c.onreadystatechange=function(){"loaded"!=c.readyState&&"complete"!=c.readyState||(c.onreadystatechange=null,b())}'
|
||||
.':c.onload=function(){b()},c.src=a,document.getElementsByTagName("body")[0].appendChild(c)}'
|
||||
.'function lscd(a){a<s.length-1&&(a++,lsc(s.item(a).getAttribute("data-load"),function(){lscd(a)}))}'
|
||||
.'for(var s=document.getElementsByClassName("defer-cs"),i=0;i<s.length;i++){var b=document.createElement("link");b.rel="stylesheet",'
|
||||
.'b.type="text/css",b.href=s.item(i).getAttribute("data-load"),b.media="all";var c=document.getElementsByTagName("body")[0];'
|
||||
.'c.appendChild(b)}var s=document.getElementsByClassName("defer-sc"),i=0;if(s.item(i)!==null)lsc(s.item(i).getAttribute("data-load"),function(){lscd(i)});'
|
||||
.'</script>';
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
private static function get_url($url): string
|
||||
{
|
||||
$config = self::config();
|
||||
|
||||
// external URL
|
||||
if (strpos($url, '//') !== false) {
|
||||
return $url;
|
||||
}
|
||||
|
||||
$path = WebpackTemplateProvider::toPublicPath($url);
|
||||
|
||||
$absolutePath = Director::getAbsFile($path);
|
||||
$hash = sha1_file($absolutePath);
|
||||
|
||||
$version = $config['version'] ? '&v='.$config['version'] : '';
|
||||
//$static_domain = $config['static_domain'];
|
||||
//$static_domain = $static_domain ?: '';
|
||||
|
||||
return Controller::join_links(WebpackTemplateProvider::toPublicPath($url), '?m='.$hash.$version);
|
||||
}
|
||||
|
||||
public static function emptyImageSrc(): string
|
||||
{
|
||||
return 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
|
||||
}
|
||||
|
||||
public static function config(): array
|
||||
{
|
||||
return Config::inst()->get(__CLASS__);
|
||||
}
|
||||
}
|
|
@ -1,152 +0,0 @@
|
|||
<?php
|
||||
/** @noinspection PhpUnusedPrivateFieldInspection */
|
||||
|
||||
/**
|
||||
* Directs assets requests to Webpack server or to static files
|
||||
*/
|
||||
|
||||
namespace Site\Templates;
|
||||
|
||||
use SilverStripe\Core\Manifest\ModuleManifest;
|
||||
use SilverStripe\View\SSViewer;
|
||||
use SilverStripe\View\TemplateGlobalProvider;
|
||||
use SilverStripe\View\Requirements;
|
||||
use SilverStripe\Control\Director;
|
||||
use SilverStripe\Control\Controller;
|
||||
use SilverStripe\Core\Config\Config;
|
||||
|
||||
class WebpackTemplateProvider implements TemplateGlobalProvider
|
||||
{
|
||||
/**
|
||||
* @var int port number
|
||||
*/
|
||||
private static $port = 3000;
|
||||
|
||||
/**
|
||||
* @var string host name
|
||||
*/
|
||||
private static $hostname = 'localhost';
|
||||
|
||||
/**
|
||||
* @var string assets static files directory
|
||||
*/
|
||||
private static $dist = 'client/dist';
|
||||
private static $webp = false;
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public static function get_template_global_variables(): array
|
||||
{
|
||||
return [
|
||||
'WebpackDevServer' => 'isActive',
|
||||
'WebpackCSS' => 'loadCSS',
|
||||
'WebpackJS' => 'loadJS',
|
||||
'ResourcesURL' => 'resourcesURL',
|
||||
'ProjectName' => 'themeName',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Load CSS file
|
||||
* @param $path
|
||||
*/
|
||||
public static function loadCSS($path): void
|
||||
{
|
||||
if (self::isActive()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Requirements::css(self::_getPath($path));
|
||||
}
|
||||
|
||||
/**
|
||||
* Load JS file
|
||||
* @param $path
|
||||
*/
|
||||
public static function loadJS($path): void
|
||||
{
|
||||
Requirements::javascript(self::_getPath($path));
|
||||
}
|
||||
|
||||
public static function projectName(): string
|
||||
{
|
||||
return Config::inst()->get(ModuleManifest::class, 'project');
|
||||
}
|
||||
|
||||
public static function mainTheme()
|
||||
{
|
||||
$themes = Config::inst()->get(SSViewer::class, 'themes');
|
||||
return is_array($themes) && $themes[0] !== '$public' && $themes[0] !== '$default' ? $themes[0] : false;
|
||||
}
|
||||
|
||||
public static function resourcesURL($link = null): string
|
||||
{
|
||||
$cfg = self::config();
|
||||
|
||||
if ($cfg['webp'] && !self::isActive()) {
|
||||
$link = str_replace(['.png','.jpg','.jpeg'], '.webp', $link);
|
||||
}
|
||||
|
||||
return Controller::join_links(
|
||||
Director::baseURL(),
|
||||
'/resources/',
|
||||
self::projectName(),
|
||||
$cfg['dist'],
|
||||
'img',
|
||||
$link
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks if dev mode is enabled and if webpack server is online
|
||||
* @return bool
|
||||
*/
|
||||
public static function isActive(): bool
|
||||
{
|
||||
$cfg = self::config();
|
||||
return Director::isDev() && @fsockopen(
|
||||
$cfg['HOSTNAME'],
|
||||
$cfg['PORT']
|
||||
);
|
||||
}
|
||||
|
||||
protected static function _getPath($path): string
|
||||
{
|
||||
return self::isActive() && strpos($path, '//') === false ?
|
||||
self::_toDevServerPath($path) :
|
||||
self::toPublicPath($path);
|
||||
}
|
||||
|
||||
protected static function _toDevServerPath($path): string
|
||||
{
|
||||
$cfg = self::config();
|
||||
return sprintf(
|
||||
'%s%s:%s/%s',
|
||||
Director::protocol(),
|
||||
$cfg['HOSTNAME'],
|
||||
$cfg['PORT'],
|
||||
basename($path)
|
||||
);
|
||||
}
|
||||
|
||||
public static function toPublicPath($path): string
|
||||
{
|
||||
$cfg = self::config();
|
||||
return strpos($path, '//') === false ?
|
||||
Controller::join_links(
|
||||
RESOURCES_DIR,
|
||||
self::projectName(),
|
||||
$cfg['dist'],
|
||||
(strpos($path, '.css') ? 'css' : 'js'),
|
||||
$path
|
||||
)
|
||||
: $path;
|
||||
}
|
||||
|
||||
public static function config(): array
|
||||
{
|
||||
return Config::inst()->get(__CLASS__);
|
||||
}
|
||||
}
|
|
@ -1,142 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Created by PhpStorm.
|
||||
* User: tony
|
||||
* Date: 10/31/18
|
||||
* Time: 5:31 AM
|
||||
*/
|
||||
|
||||
namespace Site\Tests;
|
||||
|
||||
use SilverStripe\Assets\Upload_Validator;
|
||||
use SilverStripe\Core\Cache\FilesystemCacheFactory;
|
||||
use SilverStripe\Core\Config\Config;
|
||||
use SilverStripe\Core\Convert;
|
||||
use SilverStripe\Dev\BuildTask;
|
||||
use SilverStripe\Dev\Deprecation;
|
||||
use SilverStripe\Assets\File;
|
||||
|
||||
class TestServer extends BuildTask
|
||||
{
|
||||
protected $title = 'Test server';
|
||||
protected $description = 'Test server';
|
||||
|
||||
public function run($request)
|
||||
{
|
||||
echo '<style>table{width:100%}table td,table th{border:1px solid #dedede}</style>';
|
||||
|
||||
echo '<h2>Testing Server</h2>';
|
||||
echo self::success('BASE_PATH: <b>'.BASE_PATH.'</b>');
|
||||
echo self::success('PHP: <b>'.phpversion().'</b>');
|
||||
|
||||
$v = Deprecation::dump_settings()['version'];
|
||||
if ($v) {
|
||||
echo self::success('SilverStipe version: <b>'.$v.'</b>');
|
||||
} else {
|
||||
echo self::success('SilverStipe version unknown: <b>'
|
||||
.(file_exists(BASE_PATH.'/framework') ? '3.x.x' : '4.x.x')
|
||||
.'</b>');
|
||||
}
|
||||
|
||||
echo self::success('Memory limit: <b>'.ini_get('memory_limit').'</b>');
|
||||
|
||||
|
||||
if (is_writable(TEMP_FOLDER)) {
|
||||
echo self::success('TMP (cache) dir <b>'.TEMP_FOLDER.'</b> dir is writable.');
|
||||
} else {
|
||||
echo self::error('TMP (cache) dir <b>'.TEMP_FOLDER.'</b> dir is no writable!');
|
||||
}
|
||||
|
||||
echo '<h2>Testing Uploads</h2>';
|
||||
$maxUpload = ini_get('upload_max_filesize');
|
||||
$maxPost = ini_get('post_max_size');
|
||||
|
||||
echo self::success('PHP max upload size: '.$maxUpload);
|
||||
echo self::success('PHP max post size: '.$maxPost);
|
||||
echo self::success('So calculated max upload size: '.self::formatBytes(min(
|
||||
self::memstring2bytes($maxUpload),
|
||||
self::memstring2bytes($maxPost)
|
||||
)));
|
||||
|
||||
$defaultSizes = Config::inst()->get(Upload_Validator::class, 'default_max_file_size');
|
||||
if ($defaultSizes) {
|
||||
if (!is_array($defaultSizes)) {
|
||||
echo self::error('default_max_file_size miss-configuration, plz fix');
|
||||
var_dump($defaultSizes);
|
||||
die();
|
||||
}
|
||||
|
||||
echo '<h3>Configured limits:</h3><table style="text-align:center">'
|
||||
.'<thead><tr><th>File</th><th>Size limit</th></tr></thead><tbody>';
|
||||
foreach ($defaultSizes as $k => $size) {
|
||||
echo '<tr><td>'.$k.'</td><td>'.$size.'</td></tr>';
|
||||
}
|
||||
echo '</tbody></table>';
|
||||
}
|
||||
|
||||
if (is_writable(ASSETS_DIR)) {
|
||||
echo self::success('Assets dir <b>'.ASSETS_DIR.'</b> dir is writable.');
|
||||
} else {
|
||||
echo self::error('Assets dir <b>'.ASSETS_DIR.'</b> dir is no writable!');
|
||||
}
|
||||
|
||||
if (function_exists('imagewebp')) {
|
||||
echo self::success('WebP is available');
|
||||
} else {
|
||||
echo self::error('WebP is not available');
|
||||
}
|
||||
|
||||
|
||||
die();
|
||||
}
|
||||
|
||||
|
||||
public static function formatBytes($size, $precision = 2)
|
||||
{
|
||||
$base = log($size, 1024);
|
||||
$suffixes = array('', 'K', 'M', 'G', 'T');
|
||||
|
||||
return round(pow(1024, $base - floor($base)), $precision) . $suffixes[(string)floor($base)];
|
||||
}
|
||||
|
||||
public static function error($text)
|
||||
{
|
||||
return '<span style="color:red">ERROR: '.$text.'</span><br/>';
|
||||
}
|
||||
|
||||
public static function success($text)
|
||||
{
|
||||
return '<span style="color:green">SUCCESS: '.$text.'</span><br/>';
|
||||
}
|
||||
|
||||
public static function warning($text)
|
||||
{
|
||||
return '<span style="color:#0014ff">WARNING: '.$text.'</span><br/>';
|
||||
}
|
||||
|
||||
public static function renderValidation($result)
|
||||
{
|
||||
echo '<p>';
|
||||
$msgs = $result->getMessages();
|
||||
foreach ($msgs as $msg) {
|
||||
echo self::error($msg['fieldName'].': '.$msg['message']);
|
||||
}
|
||||
echo '</p>';
|
||||
}
|
||||
|
||||
public static function memstring2bytes($memString)
|
||||
{
|
||||
// Remove non-unit characters from the size
|
||||
$unit = preg_replace('/[^bkmgtpezy]/i', '', $memString);
|
||||
// Remove non-numeric characters from the size
|
||||
$size = preg_replace('/[^0-9\.]/', '', $memString);
|
||||
|
||||
if ($unit) {
|
||||
// Find the position of the unit in the ordered string which is the power
|
||||
// of magnitude to multiply a kilobyte by
|
||||
return round($size * pow(1024, stripos('bkmgtpezy', $unit[0])));
|
||||
}
|
||||
|
||||
return round($size);
|
||||
}
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Traits;
|
||||
|
||||
trait PaginatedListing
|
||||
{
|
||||
private $filter = [];
|
||||
|
||||
public function NextPage($pageID = null)
|
||||
{
|
||||
$vars = $this->getRequest()->requestVars();
|
||||
$vars = array_filter($vars);
|
||||
$vars['page'] = $pageID ? $pageID : '2';
|
||||
|
||||
return $this->Link('?'.http_build_query($vars));
|
||||
}
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Widgets;
|
||||
|
||||
use Sheadawson\Linkable\Forms\LinkField;
|
||||
use Sheadawson\Linkable\Models\Link;
|
||||
use SilverStripe\AssetAdmin\Forms\UploadField;
|
||||
use SilverStripe\Assets\Image;
|
||||
use SilverStripe\Widgets\Model\Widget;
|
||||
|
||||
if (!class_exists(Widget::class)) {
|
||||
return;
|
||||
}
|
||||
|
||||
class BannerWidget extends Widget
|
||||
{
|
||||
private static $title = 'Banner';
|
||||
private static $cmsTitle = 'Banner';
|
||||
private static $description = 'Shows banner with image and link.';
|
||||
private static $icon = '<i class="icon font-icon-block-banner"></i>';
|
||||
private static $table_name = 'BannerWidget';
|
||||
|
||||
private static $has_one = [
|
||||
'Image' => Image::class,
|
||||
'Link' => Link::class,
|
||||
];
|
||||
|
||||
private static $owns = [
|
||||
'Image',
|
||||
'Link',
|
||||
];
|
||||
|
||||
public function getCMSFields()
|
||||
{
|
||||
$fields = parent::getCMSFields();
|
||||
|
||||
$fields->push(UploadField::create('Image', 'Image (minimal width 301px)')
|
||||
->setAllowedFileCategories(['image/supported']));
|
||||
|
||||
$fields->push(LinkField::create('LinkID', 'Link'));
|
||||
|
||||
return $fields;
|
||||
}
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Widgets;
|
||||
|
||||
use Sheadawson\Linkable\Forms\LinkField;
|
||||
use Sheadawson\Linkable\Models\Link;
|
||||
use SilverStripe\AssetAdmin\Forms\UploadField;
|
||||
use SilverStripe\Assets\Image;
|
||||
use SilverStripe\Forms\HTMLEditor\HTMLEditorField;
|
||||
use SilverStripe\Widgets\Model\Widget;
|
||||
|
||||
if (!class_exists(Widget::class)) {
|
||||
return;
|
||||
}
|
||||
|
||||
class ContentWidget extends Widget
|
||||
{
|
||||
private static $title = 'Content';
|
||||
private static $cmsTitle = 'Content';
|
||||
private static $description = 'Shows text content.';
|
||||
private static $icon = '<i class="icon font-icon-block-content"></i>';
|
||||
private static $table_name = 'ContentWidget';
|
||||
|
||||
private static $db = [
|
||||
'Text' => 'HTMLText',
|
||||
];
|
||||
|
||||
public function getCMSFields()
|
||||
{
|
||||
$fields = parent::getCMSFields();
|
||||
|
||||
$fields->push(HTMLEditorField::create('Text'));
|
||||
|
||||
return $fields;
|
||||
}
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Widgets;
|
||||
|
||||
use DNADesign\Elemental\Models\BaseElement;
|
||||
use DNADesign\ElementalList\Model\ElementList;
|
||||
use SilverStripe\CMS\Model\SiteTree;
|
||||
use SilverStripe\Forms\DropdownField;
|
||||
use SilverStripe\Forms\TreeDropdownField;
|
||||
use SilverStripe\Widgets\Model\Widget;
|
||||
|
||||
if (!class_exists(Widget::class)) {
|
||||
return;
|
||||
}
|
||||
|
||||
class ElementWidget extends Widget
|
||||
{
|
||||
private static $title = 'Virtual Element';
|
||||
private static $cmsTitle = 'Virtual Element';
|
||||
private static $description = 'Adds existing element to side bar';
|
||||
private static $icon = '<i class="icon font-icon-block-banner"></i>';
|
||||
private static $table_name = 'ElementWidget';
|
||||
|
||||
private static $has_one = [
|
||||
'Element' => BaseElement::class,
|
||||
];
|
||||
|
||||
public function getCMSFields()
|
||||
{
|
||||
$fields = parent::getCMSFields();
|
||||
|
||||
$fields->push(
|
||||
DropdownField::create(
|
||||
'ElementID',
|
||||
'Displayed Element',
|
||||
BaseElement::get()
|
||||
->filter(['AvailableGlobally' => true])
|
||||
->exclude(['ClassName' => ElementList::class])
|
||||
)
|
||||
/*TreeDropdownField::create(
|
||||
'ElementID',
|
||||
'Displayed Element',
|
||||
SiteTree::class
|
||||
)->setFilterFunction(static function($el){
|
||||
return (bool) $el->getField('ElementalArea')->Elements()->count();
|
||||
})*/
|
||||
);
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
public function SimpleClassName()
|
||||
{
|
||||
$el = $this->getField('Element');
|
||||
var_dump($el);
|
||||
die();
|
||||
return $el->getSimpleClassName();
|
||||
}
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Widgets;
|
||||
|
||||
use Sheadawson\Linkable\Forms\LinkField;
|
||||
use Sheadawson\Linkable\Models\Link;
|
||||
use SilverStripe\AssetAdmin\Forms\UploadField;
|
||||
use SilverStripe\Assets\Image;
|
||||
use SilverStripe\Forms\GridField\GridField;
|
||||
use SilverStripe\Forms\GridField\GridFieldConfig_RecordEditor;
|
||||
use SilverStripe\Forms\LiteralField;
|
||||
use SilverStripe\Widgets\Model\Widget;
|
||||
|
||||
if (!class_exists(Widget::class)) {
|
||||
return;
|
||||
}
|
||||
|
||||
class LinksWidget extends Widget
|
||||
{
|
||||
private static $title = 'Links';
|
||||
private static $cmsTitle = 'Links';
|
||||
private static $description = 'Shows listing of links.';
|
||||
private static $icon = '<i class="icon font-icon-list"></i>';
|
||||
private static $table_name = 'LinksWidget';
|
||||
|
||||
private static $many_many = [
|
||||
'Links' => Link::class,
|
||||
];
|
||||
|
||||
private static $owns = [
|
||||
'Links',
|
||||
];
|
||||
|
||||
public function getCMSFields()
|
||||
{
|
||||
$fields = parent::getCMSFields();
|
||||
|
||||
if($this->ID) {
|
||||
$fields->push(GridField::create(
|
||||
'Links',
|
||||
'',
|
||||
$this->Links(),
|
||||
GridFieldConfig_RecordEditor::create()
|
||||
));
|
||||
}else{
|
||||
$fields->push(LiteralField::create(
|
||||
'Note',
|
||||
'<p class="alert alert-warning"><b>Note:</b> The widget needs to be saved before adding a link.'
|
||||
.' Enter the Title and click "+ Create" button at the bottom left corner of the screen</p>')
|
||||
);
|
||||
}
|
||||
|
||||
return $fields;
|
||||
}
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Widgets;
|
||||
|
||||
use SilverStripe\Forms\CheckboxField;
|
||||
use SilverStripe\Widgets\Model\Widget;
|
||||
|
||||
if (!class_exists(Widget::class)) {
|
||||
return;
|
||||
}
|
||||
|
||||
class SubmenuWidget extends Widget
|
||||
{
|
||||
private static $title = 'Sub-Menu';
|
||||
private static $cmsTitle = 'Sub-Menu';
|
||||
private static $description = 'Shows sub menu.';
|
||||
private static $icon = '<i class="icon font-icon-tree"></i>';
|
||||
private static $table_name = 'SubmenuWidget';
|
||||
|
||||
private static $db = [
|
||||
'TopLevelSubmenu' => 'Boolean(1)',
|
||||
];
|
||||
|
||||
public function getPage()
|
||||
{
|
||||
$area = $this->Parent();
|
||||
return \Page::get()->filter('SideBarID', $area->ID)->first();
|
||||
}
|
||||
|
||||
public function getSubmenu()
|
||||
{
|
||||
$page = $this->getPage();
|
||||
|
||||
if(!$this->getField('TopLevelSubmenu')) {
|
||||
return $page->Children();
|
||||
}
|
||||
|
||||
return $page->Level(1)->Children();
|
||||
}
|
||||
|
||||
public function getCMSFields()
|
||||
{
|
||||
$fields = parent::getCMSFields();
|
||||
|
||||
$fields->push(CheckboxField::create(
|
||||
'TopLevelSubmenu',
|
||||
'Display sub-menu starting from the top level (otherwise current page children will be displayed)'
|
||||
));
|
||||
|
||||
return $fields;
|
||||
}
|
||||
}
|
|
@ -1,157 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Widgets;
|
||||
|
||||
use DNADesign\Elemental\Controllers\ElementalAreaController;
|
||||
use DNADesign\Elemental\Forms\ElementalAreaConfig;
|
||||
use DNADesign\Elemental\Forms\ElementalAreaField;
|
||||
use DNADesign\Elemental\Models\BaseElement;
|
||||
use DNADesign\Elemental\Models\ElementalArea;
|
||||
use SilverStripe\Control\Controller;
|
||||
use SilverStripe\Core\Injector\Injector;
|
||||
use SilverStripe\Forms\CompositeField;
|
||||
use SilverStripe\Forms\FieldGroup;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\Forms\FormField;
|
||||
use SilverStripe\Forms\GridField\GridField;
|
||||
use SilverStripe\Forms\GridField\GridFieldAddExistingAutocompleter;
|
||||
use SilverStripe\Forms\GridField\GridFieldAddNewButton;
|
||||
use SilverStripe\Forms\GridField\GridFieldConfig;
|
||||
use SilverStripe\Forms\GridField\GridFieldConfig_Base;
|
||||
use SilverStripe\Forms\GridField\GridFieldConfig_RelationEditor;
|
||||
use SilverStripe\Forms\GridField\GridFieldDataColumns;
|
||||
use SilverStripe\Forms\GridField\GridFieldDeleteAction;
|
||||
use SilverStripe\Forms\GridField\GridFieldDetailForm;
|
||||
use SilverStripe\Forms\GridField\GridFieldEditButton;
|
||||
use SilverStripe\Forms\TabSet;
|
||||
use SilverStripe\ORM\DataObjectInterface;
|
||||
use SilverStripe\Widgets\Model\Widget;
|
||||
use SilverStripe\Widgets\Model\WidgetArea;
|
||||
use Symbiote\GridFieldExtensions\GridFieldAddNewMultiClass;
|
||||
use UndefinedOffset\SortableGridField\Forms\GridFieldSortableRows;
|
||||
|
||||
class WidgetAreaField extends GridField
|
||||
{
|
||||
/**
|
||||
* @var ElementalArea $area
|
||||
*/
|
||||
protected $area;
|
||||
|
||||
/**
|
||||
* @var array $type
|
||||
*/
|
||||
protected $types = [];
|
||||
|
||||
/**
|
||||
* @var null
|
||||
*/
|
||||
protected $inputType = null;
|
||||
|
||||
protected $modelClassName = Widget::class;
|
||||
|
||||
/**
|
||||
* @param string $name
|
||||
* @param ElementalArea $area
|
||||
* @param string[] $blockTypes
|
||||
*/
|
||||
public function __construct($name, WidgetArea $area, array $blockTypes)
|
||||
{
|
||||
$this->setTypes($blockTypes);
|
||||
|
||||
$config = GridFieldConfig_Base::create();
|
||||
|
||||
$config->getComponentByType(GridFieldDataColumns::class)->setDisplayFields([
|
||||
'Icon' => '',
|
||||
'Title' => 'Title',
|
||||
'Enabled' => 'Enabled',
|
||||
])->setFieldFormatting([
|
||||
'Icon' => static function ($v, Widget $item) {
|
||||
return '<span style="font-size:2rem">'.$item::config()->get('icon').'</span>';
|
||||
},
|
||||
'Enabled' => static function ($v, Widget $item) {
|
||||
return $item->getField('Enabled') ? 'Yes' : 'No';
|
||||
},
|
||||
]);
|
||||
|
||||
$config->addComponent(new GridFieldEditButton());
|
||||
$config->addComponent(new GridFieldDeleteAction(false));
|
||||
$config->addComponent(new GridFieldDetailForm(null, false, false));
|
||||
$config->addComponent(new GridFieldSortableRows('Sort'));
|
||||
|
||||
if (!empty($blockTypes)) {
|
||||
/** @var GridFieldAddNewMultiClass $adder */
|
||||
$adder = Injector::inst()->create(GridFieldAddNewMultiClass::class);
|
||||
$adder->setClasses($blockTypes);
|
||||
$config->addComponent($adder);
|
||||
}
|
||||
|
||||
// By default, no need for a title on the editor. If there is more than one area then use `setTitle` to describe
|
||||
parent::__construct($name, '', $area->Widgets(), $config);
|
||||
|
||||
$this->area = $area;
|
||||
$this->addExtraClass('element-editor__container no-change-track');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $types
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function setTypes($types)
|
||||
{
|
||||
$this->types = $types;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
*/
|
||||
public function getTypes()
|
||||
{
|
||||
$types = $this->types;
|
||||
|
||||
$this->extend('updateGetTypes', $types);
|
||||
|
||||
return $types;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ElementalArea
|
||||
*/
|
||||
public function getArea()
|
||||
{
|
||||
return $this->area;
|
||||
}
|
||||
|
||||
public function saveInto(DataObjectInterface $dataObject)
|
||||
{
|
||||
parent::saveInto($dataObject);
|
||||
|
||||
$elementData = $this->Value();
|
||||
$idPrefixLength = strlen(sprintf(ElementalAreaController::FORM_NAME_TEMPLATE, ''));
|
||||
|
||||
if (!$elementData) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($elementData as $form => $data) {
|
||||
// Extract the ID
|
||||
$elementId = (int) substr($form, $idPrefixLength);
|
||||
|
||||
// @var BaseElement $element
|
||||
$element = $this->getArea()->Widgets()->byID($elementId);
|
||||
|
||||
if (!$element) {
|
||||
// Ignore invalid elements
|
||||
continue;
|
||||
}
|
||||
|
||||
$data = ElementalAreaController::removeNamespacesFromFields($data, $element->ID);
|
||||
|
||||
$element->updateFromFormData($data);
|
||||
$element->write();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,50 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Widgets;
|
||||
|
||||
|
||||
use DNADesign\Elemental\Forms\TextCheckboxGroupField;
|
||||
use SilverStripe\CMS\Model\SiteTree;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\Forms\TreeDropdownField;
|
||||
use SilverStripe\ORM\DataExtension;
|
||||
|
||||
class WidgetExtension extends DataExtension
|
||||
{
|
||||
private static $db = [
|
||||
'ShowTitle' => 'Boolean(1)',
|
||||
];
|
||||
|
||||
public function updateCMSFields(FieldList $fields)
|
||||
{
|
||||
parent::updateCMSFields($fields);
|
||||
// Add a combined field for "Title" and "Displayed" checkbox in a Bootstrap input group
|
||||
$fields->removeByName('ShowTitle');
|
||||
$fields->replaceField(
|
||||
'Title',
|
||||
TextCheckboxGroupField::create()
|
||||
->setName('Title')
|
||||
);
|
||||
$fields->push(TreeDropdownField::create(
|
||||
'MovePageID', 'Move widget to page', SiteTree::class
|
||||
));
|
||||
}
|
||||
|
||||
public function onBeforeWrite()
|
||||
{
|
||||
$obj = $this->owner;
|
||||
$moveID = $obj->MovePageID;
|
||||
if ($moveID) {
|
||||
$page = \Page::get()->byID($moveID);
|
||||
if($page) {
|
||||
$sidebarID = $page->getField('SideBarID');
|
||||
if($sidebarID) {
|
||||
$obj->setField('ParentID', $sidebarID);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
parent::onBeforeWrite();
|
||||
}
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Site\Widgets;
|
||||
|
||||
use DNADesign\Elemental\Forms\ElementalAreaField;
|
||||
use SilverStripe\Forms\FieldList;
|
||||
use SilverStripe\Widgets\Forms\WidgetAreaEditor;
|
||||
use SilverStripe\Widgets\Model\Widget;
|
||||
use SilverStripe\Widgets\Model\WidgetArea;
|
||||
|
||||
class WidgetPageExtension extends \SilverStripe\Widgets\Extensions\WidgetPageExtension
|
||||
{
|
||||
public function updateCMSFields(FieldList $fields)
|
||||
{
|
||||
parent::updateCMSFields($fields);
|
||||
|
||||
$tab = $fields->findOrMakeTab('Root.Widgets');
|
||||
|
||||
$tab->setTitle('Sidebar');
|
||||
|
||||
$tab->removeByName('SideBar');
|
||||
|
||||
$widgetTypes = WidgetAreaEditor::create('Sidebar')->AvailableWidgets();
|
||||
$available = [];
|
||||
/** @var Widget $type */
|
||||
foreach ($widgetTypes as $type) {
|
||||
$available[get_class($type)] = $type->getCMSTitle();
|
||||
}
|
||||
|
||||
$tab->push(WidgetAreaField::create(
|
||||
'SideBar',
|
||||
$this->owner->Sidebar(),
|
||||
$available
|
||||
));
|
||||
}
|
||||
|
||||
public function onBeforeWrite()
|
||||
{
|
||||
parent::onBeforeWrite();
|
||||
|
||||
if (!$this->owner->getField('SideBarID')) {
|
||||
$area = WidgetArea::create();
|
||||
$area->write();
|
||||
|
||||
$this->owner->setField('SideBarID', $area->ID);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<% include PageHeader %>
|
||||
|
||||
<% include Content ExcludeHeader=true %>
|
||||
|
||||
<%-- div class="page-content page-content-main page-content-extra">
|
||||
<div class="element">
|
||||
<div class="element-container $DefaultContainer">
|
||||
<!-- Some exta page type specific content -->
|
||||
</div>
|
||||
</div>
|
||||
</div --%>
|
|
@ -1,21 +0,0 @@
|
|||
<% if $Pages %>
|
||||
<nav class="breadcrumbs $DefaultContainer" aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="/">Home</a>
|
||||
<%-- $Delimiter.RAW --%>
|
||||
</li>
|
||||
<% loop $Pages %>
|
||||
<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 %>
|
|
@ -1,8 +1,11 @@
|
|||
<div
|
||||
id="$Anchor"
|
||||
class="element $SimpleClassName.LowerCase<% if $StyleVariant %> $StyleVariant<% end_if %><% if $ExtraClass %> $ExtraClass<% end_if %>"
|
||||
id="$Anchor"
|
||||
class="element $SimpleClassName.LowerCase
|
||||
<%-- if $LinkedElement %> $LinkedElement.SimpleClassName.LowerCase<% end_if --%>
|
||||
<% if $StyleVariant %> $StyleVariant<% end_if %>
|
||||
<% if $ExtraClass %> $ExtraClass<% end_if %>"
|
||||
>
|
||||
<div class="element-container<% if $ContainerClass %> $ContainerClass<% end_if %>">
|
||||
<div class="element__container<% if $ContainerClass %> $ContainerClass<% end_if %>">
|
||||
$Element
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,20 +1,9 @@
|
|||
<div
|
||||
class="content-element__content<% if $BlockLink %> has-blockLink<% end_if %><% if $BlockIcon %> has-blockIcon<% end_if %><% if $Style %> $CssStyle<% end_if %>"
|
||||
>
|
||||
<% if $BlockIcon %>
|
||||
<i class="content-element__icon $BlockIcon"></i>
|
||||
<% end_if %>
|
||||
<div class="element__content<% if $Style %> $CssStyle<% end_if %>">
|
||||
<% if $ShowTitle %>
|
||||
<h2 class="content-element__title">$Title</h2>
|
||||
<h2 class="element__title">$Title</h2>
|
||||
<% end_if %>
|
||||
|
||||
<div class="typography">
|
||||
<div class="element__html typography">
|
||||
$HTML
|
||||
</div>
|
||||
|
||||
<% if $BlockLink %>
|
||||
<a href="$BlockLink.LinkURL" class="btn btn-default stretched-link">
|
||||
$BlockLink.Title
|
||||
</a>
|
||||
<% end_if %>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<% if $ShowTitle %>
|
||||
<h2 class="list-element__title">$Title</h2>
|
||||
<h2 class="element__title">$Title</h2>
|
||||
<% end_if %>
|
||||
<div class="list-element__container row" data-listelement-count="$Elements.Elements.Count">
|
||||
|
||||
<div class="element__content row" data-listelement-count="{$Elements.Elements.Count}">
|
||||
$Elements
|
||||
</div>
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<div
|
||||
data-aos="fade-up"
|
||||
class="form-element__form"
|
||||
>
|
||||
<div data-aos="fade-up" class="element__content">
|
||||
<% if $Title && $ShowTitle %>
|
||||
<h2 class="form-element__title">$Title</h2>
|
||||
<h2 class="element__title">$Title</h2>
|
||||
<% end_if %>
|
||||
$Form
|
||||
|
||||
<div class="element__form">
|
||||
$Form
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
<% if $Title && $ShowTitle %><h2 class="element__title text-center">$Title</h2><% end_if %>
|
||||
<% if $Content %><div class="element__content">$Content</div><% end_if %>
|
||||
<% if $Title && $ShowTitle %><h2 class="element__title">$Title</h2><% end_if %>
|
||||
<% if $Content %><div class="element__html typography">$Content</div><% end_if %>
|
||||
|
||||
<% if $PostsList %>
|
||||
<div class="element__content">
|
||||
<div class="row">
|
||||
<% loop $PostsList %>
|
||||
<div class="col-sm-4">
|
||||
<% include BlogPostInfo %>
|
||||
<% include SilverStripe\Blog\Includes\BlogPostInfo %>
|
||||
</div>
|
||||
<% end_loop %>
|
||||
</div>
|
||||
<%-- p><a href="$Blog.Link" class="btn btn-primary" title="Go to the $Title page">View all posts</a></p --%>
|
||||
<%-- p><a href="$Blog.Link" class="element__link btn btn-primary" title="Go to the $Title page">View all posts</a></p --%>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<% if $Title && $ShowTitle %><h2 class="element__title text-center">$Title</h2><% end_if %>
|
||||
<% if $Content %><div class="element__content">$Content</div><% end_if %>
|
||||
<% if $Title && $ShowTitle %><h2 class="element__title">$Title</h2><% end_if %>
|
||||
<% if $Content %><div class="element__html">$Content</div><% end_if %>
|
||||
|
||||
<% if $TestimonialsList %>
|
||||
<div class="element__content">
|
||||
<div class="row">
|
||||
<% loop $TestimonialsList %>
|
||||
<% if $Content || $Name || $Affiliation %>
|
||||
|
@ -11,4 +12,5 @@
|
|||
<% end_if %>
|
||||
<% end_loop %>
|
||||
</div>
|
||||
<% end_if %>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
|
|
@ -1,27 +1,24 @@
|
|||
<% if $ImageResized %>
|
||||
<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.LinkURL"><% end_if %>
|
||||
<div class="element__image__container<% if $Resize %><% if $Height %> height{$Height}<% end_if %><% if $Width %> width{$Width}<% end_if %><% end_if %>">
|
||||
<img
|
||||
src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
|
||||
data-lazy-src="$ImageResized.URL" class="img-responsive" alt="$Title.ATT"
|
||||
data-lazy-src="$ImageResized.URL" class="element__image img-responsive" alt="$Title.ATT"
|
||||
/>
|
||||
<% if $ImageLink %></a><% end_if %>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<% if $ShowTitle || $Content || $ImageLink %>
|
||||
<div class="image-element__caption img-content">
|
||||
<% if $ShowTitle %><h3 class="image-element__title title">$Title</h3><% end_if %>
|
||||
<div class="element__content">
|
||||
<% if $ShowTitle %><h3 class="element__title image-element__title">$Title</h3><% end_if %>
|
||||
|
||||
<% if $Content %>
|
||||
<div class="image-element__content typography">$Content</div>
|
||||
<% end_if %>
|
||||
|
||||
<% if $ImageLink %>
|
||||
<a href="$ImageLink.LinkURL" class="image-element__btn btn btn-default">
|
||||
$ImageLink.Title
|
||||
<i class="fas fa-caret-right"></i>
|
||||
</a>
|
||||
<div class="element__html typography">$Content</div>
|
||||
<% end_if %>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<% if $ImageLink %>
|
||||
<a href="$ImageLink.LinkURL" class="element__link graphql-page stretched-link">
|
||||
<b class="visually-hidden">$ImageLink.Title</b>
|
||||
</a>
|
||||
<% end_if %>
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
<% if $Title && $ShowTitle %><h2 class="element__title">$Title</h2><% end_if %>
|
||||
|
||||
<% if $EmbeddedObject %>
|
||||
<div class="row element__oembed__object">
|
||||
<div class="col-md-12 card">
|
||||
$EmbeddedObject
|
||||
<div class="card-body">
|
||||
<% if $EmbeddedObject.Title %><h3 class="card-title">$EmbeddedObject.Title</h3><% end_if %>
|
||||
<% if $EmbeddedObject.Description %><p class="card-text">$EmbeddedObject.Description</p><% end_if %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% else_if $VideoFile %>
|
||||
<% with $VideoFile %>
|
||||
<video controls autoplay="true" muted="true" loop="true" width="100%">
|
||||
<source src="{$Link}" type="video/mp4">
|
||||
Download the
|
||||
<a href="{$Link}">video</a>.
|
||||
</video>
|
||||
<% end_with %>
|
||||
<% end_if %>
|
|
@ -1,45 +0,0 @@
|
|||
<div class="page-content page-content-main">
|
||||
<% if not $ExcludeHeader %>
|
||||
<% include PageHeader %>
|
||||
<% end_if %>
|
||||
|
||||
<% if $CurrentElement %>
|
||||
<div class="current-element">
|
||||
$CurrentElement
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="elemental-area">
|
||||
<% if $ElementalArea.Elements.Count %>
|
||||
$ElementalArea
|
||||
<% else %>
|
||||
<div class="element element_content_field dnadesign__elemental__models__elementcontent">
|
||||
<div class="element-container {$DefaultContainer}">
|
||||
<% include DNADesign\Elemental\Models\ElementContent HTML=$Content %>
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<% if $Form %>
|
||||
<div class="page-form-element element">
|
||||
<div class="element_container">
|
||||
<div class="$DefaultContainer">
|
||||
$Form
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<% if $ExtraCode %>
|
||||
<div class="page-extra-code">
|
||||
<div class="element">
|
||||
<div class="element_container">
|
||||
<div class="$DefaultContainer">
|
||||
$ExtraCode
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
||||
</div>
|
|
@ -1,29 +0,0 @@
|
|||
<%-- Upgrade your Browser notice --%>
|
||||
<!--[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">
|
||||
<img src="{$ResourcesURL('logo.png')}" alt="{$SiteConfig.Title}" /><br/>
|
||||
<div class="lds-ellipsis"><div></div><div></div><div></div><div></div></div>
|
||||
<br/><%t Page.LOADINGTEXT 'LOADING ..' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<% if $isDev || $WebpackActive %>
|
||||
<div id="DevUtilities">
|
||||
$DeferedCSS('app_dev.css')
|
||||
$DeferedJS('app_dev.js')
|
||||
<div class="navs">
|
||||
<button class="toggle-original">Toggle Original</button>
|
||||
</div>
|
||||
<div class="original d-none"></div>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<%-- Site Wide Alert Message --%>
|
||||
<% include SiteWideMessage %>
|
|
@ -1,41 +1,38 @@
|
|||
<% with $SiteConfig %>
|
||||
<div class="wrapper">
|
||||
<div class="element">
|
||||
<div class="footer__container $Top.DefaultContainer">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<a href="/" class="logo2">
|
||||
<img src="$ResourcesURL('logo2.png')" alt="{$Title}" />
|
||||
</a>
|
||||
|
||||
<div class="field">
|
||||
<div class="fn">$Title</div>
|
||||
<div class="footer__container $DefaultContainer">
|
||||
<% with $SiteConfig %>
|
||||
<div class="field">
|
||||
<div class="fn">$Title</div>
|
||||
<% if $Address %>
|
||||
<address>
|
||||
$Address<br/>
|
||||
$Suburb, $State $ZipCode
|
||||
</address>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
T: $PhoneNumber
|
||||
</div>
|
||||
|
||||
<% if $PublicEmail %>
|
||||
<div class="field">
|
||||
E: $PublicEmail
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<% include Objects\SocialLinks %>
|
||||
</div>
|
||||
<div class="col-sm-6 text-right">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<% if $PhoneNumber %>
|
||||
<div class="field">
|
||||
$PhoneNumber
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<% if $PublicEmail %>
|
||||
<div class="field">
|
||||
$PublicEmail
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<% include Objects\SocialLinks %>
|
||||
<% end_with %>
|
||||
|
||||
<% include LocaleMenu %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% with $SiteConfig %>
|
||||
<div class="copyright footer">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
|
|
|
@ -1,22 +1,12 @@
|
|||
<div class="element">
|
||||
<div class="element__container $DefaultContainer">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<a id="Logo" href="/"><img src="{$ResourcesURL('logo.png')}" alt="{$SiteConfig.Title}" /></a>
|
||||
<div class="col col-xl-3">
|
||||
<a id="Logo" class="logo" href="/">
|
||||
<img src="{$ResourcesURL('logo.png')}" width="100" alt="{$SiteConfig.Title}" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-8 text-right">
|
||||
<% with $SiteConfig %>
|
||||
<% if $PhoneNumber %>
|
||||
<span class="phone-number">
|
||||
$PhoneNumber
|
||||
</span>
|
||||
<% end_if %>
|
||||
<% if $PublicEmail %>
|
||||
<span class="public-email">
|
||||
$PublicEmail
|
||||
</span>
|
||||
<% end_if %>
|
||||
<% end_with %>
|
||||
<div class="col col-xl-9 nav-container">
|
||||
<% if $Menu(1) %>
|
||||
<% include Navigation Navigation=$Menu(1), NavID="Navigation" %>
|
||||
<% end_if %>
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
<div class="hidden-print hidden-md">
|
||||
$BetterNavigator
|
||||
</div>
|
||||
|
||||
<%-- Require CSS+JS from /public/resourses/[js,css]/[ClassName].[js,css] --%>
|
||||
$AutoRequirements($ClassName).RAW
|
||||
|
||||
<%-- Mapbox
|
||||
<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" />--%>
|
||||
|
||||
<%-- place extra requirements after this line --%>
|
||||
<div class="extra-code extra-code-site">
|
||||
$SiteConfig.ExtraCode
|
||||
</div>
|
|
@ -0,0 +1,233 @@
|
|||
<style>
|
||||
<%-- Some prestyling to prevent jumpings --%>
|
||||
button{background:none;border:0}
|
||||
.container{margin-left:auto;margin-right:auto;padding-left:0.75rem;padding-right:0.75rem}
|
||||
@media (min-width: 1368px){.container{max-width:1180px}}
|
||||
.meta-MetaWindow {position:fixed}
|
||||
.collapse:not(.show),.offline-message:not(.show){display:none}
|
||||
.row {display:flex;justify-content:space-between}
|
||||
.breadcrumb{list-style:none}
|
||||
.breadcrumb-item{display:inline-block}
|
||||
<%-- always show scroll bar --%>
|
||||
html {overflow-y:scroll}
|
||||
<%-- Site Specific --%>
|
||||
@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(1.35rem, 0);
|
||||
}
|
||||
}
|
||||
body,
|
||||
html {
|
||||
font-size: 14px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: #fff;
|
||||
color: #212529;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
/*@media (min-width: 2000px) {
|
||||
html, body {
|
||||
font-size: .9vw;
|
||||
}
|
||||
}*/
|
||||
#PageLoading {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
margin: 0;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
z-index: 2000;
|
||||
will-change: opacity;
|
||||
background: #fff;
|
||||
color: #212529;
|
||||
}
|
||||
#PageLoading .logo {
|
||||
width:100px;
|
||||
width: 12.5vw;
|
||||
}
|
||||
#PageLoading .tagline {
|
||||
margin-top:1rem;
|
||||
margin-bottom:1rem;
|
||||
color: #fff;
|
||||
font-size:1.8rem;
|
||||
font-size: 4vh;
|
||||
letter-spacing: .25em;
|
||||
}
|
||||
.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 {
|
||||
margin-top:1.5rem;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 4.57rem;
|
||||
height: 1rem;
|
||||
color: #fff;
|
||||
}
|
||||
.lds-ellipsis div {
|
||||
position: absolute;
|
||||
top:0.15rem;
|
||||
width: 0.78rem;
|
||||
height: 0.78rem;
|
||||
border-radius: 50%;
|
||||
background: #888;
|
||||
animation-timing-function: cubic-bezier(0, 1, 1, 0);
|
||||
}
|
||||
.lds-ellipsis div:nth-child(1) {
|
||||
left: 0.42rem;
|
||||
animation: lds-ellipsis1 0.6s infinite;
|
||||
}
|
||||
.lds-ellipsis div:nth-child(2) {
|
||||
left: 0.9rem;
|
||||
animation: lds-ellipsis2 0.6s infinite;
|
||||
}
|
||||
.lds-ellipsis div:nth-child(3) {
|
||||
left: 1.85rem;
|
||||
animation: lds-ellipsis2 0.6s infinite;
|
||||
}
|
||||
.lds-ellipsis div:nth-child(4) {
|
||||
left: 3.21rem;
|
||||
animation: lds-ellipsis3 0.6s infinite;
|
||||
}
|
||||
@keyframes lds-text {
|
||||
from {
|
||||
font-size: 1em;
|
||||
}
|
||||
to {
|
||||
font-size: 1.5em;
|
||||
}
|
||||
}
|
||||
.lds-text {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin-left: -5rem;
|
||||
margin-top: 8rem;
|
||||
font-size: 0.8rem;
|
||||
letter-spacing: 0.25em;
|
||||
color: #fff;
|
||||
}
|
||||
.lds-text b {
|
||||
font-weight: 300;
|
||||
animation: lds-text 5s ease infinite alternate;
|
||||
}
|
||||
.lds-text b:nth-child(1) {
|
||||
animation-delay: 0.5s;
|
||||
}
|
||||
.lds-text b:nth-child(2) {
|
||||
animation-delay: 1s;
|
||||
}
|
||||
.lds-text b:nth-child(3) {
|
||||
animation-delay: 1.5s;
|
||||
}
|
||||
.lds-text b:nth-child(4) {
|
||||
animation-delay: 2s;
|
||||
}
|
||||
.lds-text b:nth-child(5) {
|
||||
animation-delay: 2.5s;
|
||||
}
|
||||
.lds-text b:nth-child(6) {
|
||||
animation-delay: 3s;
|
||||
}
|
||||
.lds-text b:nth-child(7) {
|
||||
animation-delay: 3.5s;
|
||||
}
|
||||
.lds-text b:nth-child(8) {
|
||||
animation-delay: 4s;
|
||||
}
|
||||
.lds-text b:nth-child(9) {
|
||||
animation-delay: 4.5s;
|
||||
}
|
||||
.lds-text b:nth-child(10) {
|
||||
animation-delay: 5s;
|
||||
}
|
||||
@media (orientation: portrait) {
|
||||
#PageLoading .logo {
|
||||
width:50vw;
|
||||
}
|
||||
#PageLoading .tagline {
|
||||
font-size: 4vw;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<% with $SiteConfig %>
|
||||
<div id="PageLoading">
|
||||
<div class="loading-spinner">
|
||||
<img
|
||||
class="logo"
|
||||
src="{$ResourcesURL('logo.png')}"
|
||||
width="200"
|
||||
alt="{$Title}"
|
||||
/><br />
|
||||
<div class="lds-ellipsis">
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
<div></div>
|
||||
</div>
|
||||
<br />
|
||||
|
||||
<% if $Tagline %>
|
||||
<div class="tagline">
|
||||
$Tagline
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="lds-placeholder">LOADING...</div>
|
||||
<div class="lds-text">
|
||||
<b>L</b>
|
||||
<b>O</b>
|
||||
<b>A</b>
|
||||
<b>D</b>
|
||||
<b>I</b>
|
||||
<b>N</b>
|
||||
<b>G</b>
|
||||
<b>.</b>
|
||||
<b>.</b>
|
||||
<b>.</b>
|
||||
</div>
|
||||
<% end_if %>
|
||||
</div>
|
||||
</div>
|
||||
<% end_with %>
|
|
@ -1,55 +0,0 @@
|
|||
<div class="mainContent-page-{$CSSClass}">
|
||||
<% if $HeroImageRecursive %>
|
||||
<div class="element element__hero-image">
|
||||
<div class="element-container">
|
||||
<% include SlideItem Image=$HeroImageRecursive, SlideWidth='2140', SlideHeight='450' %>
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<% if $ParentID %>
|
||||
<div id="PageBreadcumbs">
|
||||
$Breadcrumbs
|
||||
</div>
|
||||
<% else_if $URLSegment != 'home' %>
|
||||
<div id="PageBreadcumbs">
|
||||
<nav class="breadcrumbs $DefaultContainer" aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li class="breadcrumb-item">
|
||||
<a href="/">Home</a>
|
||||
</li>
|
||||
|
||||
<li class="breadcrumb-item current active" aria-current="page">
|
||||
<a href="$Link" class="breadcrumb-2">
|
||||
$MenuTitle
|
||||
</a>
|
||||
</li>
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<% if $SideBarContent || $SideBarView && $SideBarView.Widgets.Count %>
|
||||
<div class="content-holder content-holder__sidebar">
|
||||
<div class="{$DefaultContainer}">
|
||||
<div class="row">
|
||||
<div class="col-md-9 layout__col">
|
||||
$Layout
|
||||
</div>
|
||||
<div class="col-md-3 sidebar__col">
|
||||
<div class="page-content-sidebar page-content jsSidebarUI">
|
||||
<div class="jsSidebarUI__inner">
|
||||
$SideBarContent
|
||||
$SideBarView
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="content-holder">
|
||||
$Layout
|
||||
</div>
|
||||
<% end_if %>
|
||||
</div>
|
|
@ -1,66 +0,0 @@
|
|||
<% base_tag %>
|
||||
$MetaTags
|
||||
|
||||
<meta name="msapplication-navbutton-color" content="#000000" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="#000000" />
|
||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
||||
<meta name="mobile-web-app-capable" content="yes" />
|
||||
|
||||
<%-- OpenGraph --%>
|
||||
<meta property="og:url" content="{$AbsoluteBaseURL}" />
|
||||
<meta property="og:site_name" content="{$SiteConfig.Title}" />
|
||||
<meta property="og:locale" content="$ContentLocale.ATT" />
|
||||
|
||||
<% if $MetaTitle %>
|
||||
<meta property="og:title" content="{$MetaTitle} - {$SiteConfig.Title}" />
|
||||
<meta property="og:image:alt" content="{$MetaTitle}" />
|
||||
<% else %>
|
||||
<meta property="og:title" content="{$Title} - {$SiteConfig.Title}" />
|
||||
<meta property="og:image:alt" content="{$Title}" />
|
||||
<% end_if %>
|
||||
|
||||
<% if $MetaDescription %>
|
||||
<meta property="og:description" content="{$MetaDescription}" />
|
||||
<% end_if %>
|
||||
<% if $MetaImage %>
|
||||
<meta property="og:image" content="{$MetaImage.Link}" />
|
||||
<% end_if %>
|
||||
<% if $FacebookAppID %>
|
||||
<meta property="fb:app_id" content="{$FacebookAppID}" />
|
||||
<% end_if %>
|
||||
<meta property="og:type" content="<% if $OgType %>$OgType<% else %>article<% end_if %>" />
|
||||
<%-- /OpenGraph --%>
|
||||
|
||||
<link rel="canonical" href="{$AbsoluteLink}" />
|
||||
|
||||
<link rel="author" type="text/plain" href="{$AbsoluteBaseURL}humans.txt" />
|
||||
<link rel="sitemap" type="application/xml" title="Sitemap" href="{$AbsoluteBaseURL}sitemap.xml" />
|
||||
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
||||
<link rel="preconnect" href="https://maps.google.com" />
|
||||
<link rel="preconnect" href="https://ajax.googleapis.com" />
|
||||
<link rel="preconnect" href="https://csi.gstatic.com" />
|
||||
<link rel="preconnect" href="https://maps.googleapis.com" />
|
||||
|
||||
<link rel="preconnect" href="https://www.youtube.com" />
|
||||
<link rel="preconnect" href="https://i.ytimg.com" />
|
||||
<link rel="preconnect" href="https://i9.ytimg.com" />
|
||||
<link rel="preconnect" href="https://s.ytimg.com" />
|
||||
|
||||
<link rel="manifest" href="/manifest.json" />
|
||||
<meta name="swversion" content="{$SWVersion}" />
|
||||
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{$AbsoluteBaseURL}resources/app/client/dist/icons/favicon.ico" />
|
||||
<link rel="apple-touch-icon" href="{$AbsoluteBaseURL}resources/app/client/dist/icons/apple-touch-icon.png" />
|
||||
<link rel="apple-touch-icon-precomposed" href="{$AbsoluteBaseURL}resources/app/client/dist/icons/apple-touch-icon-precomposed.png" />
|
||||
|
||||
<meta name="application-name" content="{$SiteConfig.Title}" />
|
||||
<meta name="msapplication-TileImage" content="{$AbsoluteBaseURL}resources/app/client/dist/icons/mstile-144x144.png" />
|
||||
<meta name="msapplication-TileColor" content="#2F98F1" />
|
||||
|
||||
<meta content="yes" name="apple-mobile-web-app-capable" />
|
||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1" />
|
||||
|
||||
<% include Prestyling %>
|
|
@ -1,27 +0,0 @@
|
|||
<% if $Children %>
|
||||
<li class="nav-item dropdown<% if $isCurrent || $isSection %> active <% end_if %> {$CSSClass} {$ExtraClass}">
|
||||
<% include NavItem_link %>
|
||||
|
||||
<b
|
||||
class="nav-dropdown dropdown-toggle"
|
||||
id="NavDropdownToggler{$ID}"
|
||||
role="button"
|
||||
data-toggle="hover"
|
||||
data-allow-click="true"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<i class="fas fa-chevron-right"></i>
|
||||
</b>
|
||||
|
||||
<ul class="dropdown-menu" aria-labelledby="NavItem{$ID}">
|
||||
<% loop $Children %>
|
||||
<% include NavItem ExtraClass="dropdown-item" %>
|
||||
<% end_loop %>
|
||||
</ul>
|
||||
</li>
|
||||
<% else %>
|
||||
<li class="nav-item {$CSSClass} $ExtraClass <% if $isCurrent || $isSection %> active<% end_if %>">
|
||||
<% include NavItem_link %>
|
||||
</li>
|
||||
<% end_if %>
|
|
@ -1,10 +0,0 @@
|
|||
<a
|
||||
class="nav-item-link <% if $LinkClass %>{$LinkClass}<% else %>nav-link<% end_if %>" href="{$Link}"
|
||||
<% if $ExternalURL || $OpenInNewWindow %> target="_blank"<% end_if %>
|
||||
>
|
||||
<% if $BlockIcon %>
|
||||
<i class="fa-icon $BlockIcon"></i>
|
||||
<% end_if %>
|
||||
$MenuTitle.XML
|
||||
<% if $isCurrent || $isSection %><i class="sr-only">(current)</i><% end_if %>
|
||||
</a>
|
|
@ -1,21 +1,23 @@
|
|||
<nav id="{$NavID}" class="navbar navbar-expand-lg dropdown-hover">
|
||||
<% cached 'Navigation', $NavID, $List('SilverStripe\CMS\Model\SiteTree').max('LastEdited'), $List('SilverStripe\CMS\Model\SiteTree').count() %>
|
||||
<nav id="{$NavID}" class="navbar navbar-expand-lg">
|
||||
<button
|
||||
class="navbar-toggler"
|
||||
type="button"
|
||||
data-toggle="collapse"
|
||||
data-target="#{$NavID}Content"
|
||||
aria-controls="{$NavID}Content"
|
||||
aria-expanded="false"
|
||||
aria-label="Toggle navigation"
|
||||
>
|
||||
<i class="fas fa-bars"></i>
|
||||
</button>
|
||||
class="navbar-toggler"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#{$NavID}Content"
|
||||
aria-controls="{$NavID}Content"
|
||||
aria-expanded="false"
|
||||
aria-label="Toggle navigation"
|
||||
>
|
||||
<i class="navbar-toggler-icon fa fas fa-bars"></i>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse" id="{$NavID}Content">
|
||||
<ul class="navbar-nav mr-auto w-100 justify-content-between">
|
||||
<div id="{$NavID}Content" class="collapse navbar-collapse">
|
||||
<div class="navbar-nav">
|
||||
<% loop $Navigation %>
|
||||
<% include NavItem %>
|
||||
<% end_loop %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<% end_cached %>
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
<div class="
|
||||
element
|
||||
page-header-element
|
||||
<% if $ElementalArea.Elements.Count < 1 %>
|
||||
d-block no-elements
|
||||
<% else_if not $ElementalArea.Elements.First.ShowTitle && $ElementalArea.Elements.First.ClassName != Site\Elements\SliderElement %>
|
||||
d-block
|
||||
<% end_if %>
|
||||
">
|
||||
<div class="element-container $DefaultContainer">
|
||||
<h1 class="page-header">
|
||||
$Title
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
|
@ -1,5 +0,0 @@
|
|||
<style>
|
||||
body,html{font-size:14px;margin:0;padding:0;background:#fff;color:#333;overflow-x:hidden}#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;will-change:opacity}.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)}}
|
||||
html,body{color:#212121}a{color:#007bff}
|
||||
</style>
|
|
@ -1 +0,0 @@
|
|||
<div></div>
|
|
@ -1,31 +0,0 @@
|
|||
<div id="SiteWideOffline" class="offline-message">
|
||||
<div class="alert alert-fixed-top alert-danger alert-offline">
|
||||
<div class="$DefaultContainer">
|
||||
<div class="typography">
|
||||
The Internet connection is missing right now, but you're able to browse previously opened pages offline.
|
||||
</div>
|
||||
<b class="btn btn-danger btn-close" data-dismiss="alert" aria-label="Close">
|
||||
<i class="fas fa-times"></i>
|
||||
</b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="SiteWideMessage">
|
||||
<% if $SiteWideMessage %>
|
||||
<div class="single-message">
|
||||
<div class="alert alert-fixed-top alert-{$Type}">
|
||||
<div class="$DefaultContainer">
|
||||
<b class="btn btn-danger btn-close" data-dismiss="alert" aria-label="Close">
|
||||
<i class="fas fa-times"></i>
|
||||
</b>
|
||||
{$Message}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<% with $SiteConfig %>
|
||||
<% include Site\Objects\NotificationsList NotificationsToday=$NotificationsToday.filter('Area', 'Site') %>
|
||||
<% end_with %>
|
||||
</div>
|
|
@ -1,60 +0,0 @@
|
|||
<% if $Video || $Image %>
|
||||
<% if $Video %>
|
||||
<div class="video">
|
||||
$Video.EmbedHTML.RAW
|
||||
</div>
|
||||
<% else %>
|
||||
<% if $Image || $ImageURL %>
|
||||
<span class="img">
|
||||
<img class="d-block w-100"
|
||||
src="{$EmptyImgSrc}"
|
||||
data-lazy-src="<% if $ImageURL %>$ImageURL<% else %>$Image.FocusFill($SlideWidth,$SlideHeight).URL<% end_if %>"
|
||||
alt="<% if $Headline %>$Headline.XML<% end_if %>"
|
||||
/>
|
||||
</span>
|
||||
<% end_if %>
|
||||
|
||||
<% if $SlideLinkID %>
|
||||
<% with $SlideLink %>
|
||||
<a
|
||||
href="$LinkURL" title="$Title.XML"
|
||||
class="stretched-link"<% if $OpenInNewWindow %> target="_blank"<% end_if %>
|
||||
>
|
||||
<span class="sr-only">$Title</span>
|
||||
</a>
|
||||
<% end_with %>
|
||||
<% else_if $SlideLinkURL %>
|
||||
<a href="$SlideLinkURL" title="$Headline.XML" class="stretched-link">
|
||||
<span class="sr-only">$Headline</span>
|
||||
</a>
|
||||
<% end_if %>
|
||||
|
||||
<% end_if %>
|
||||
<% end_if %>
|
||||
|
||||
<% if $Content || $Headline || $Description || $SlideLinkID %>
|
||||
<div class="carousel-caption container">
|
||||
<div class="carousel-caption-container typography">
|
||||
<% if $Headline %><h2 class="carousel-title">$Headline</h2><% end_if %>
|
||||
|
||||
<% if $Content %>
|
||||
<div class="carousel-content">$Content</div>
|
||||
<% else_if $Description %>
|
||||
<p class="carousel-content">$Description</p>
|
||||
<% end_if %>
|
||||
|
||||
<% if $SlideLinkID %>
|
||||
<% with $SlideLink %>
|
||||
<div class="text-right">
|
||||
<a
|
||||
href="$LinkURL" title="$Title.XML" class="slide-link"
|
||||
<% if $OpenInNewWindow %> target="_blank"<% end_if %>
|
||||
>
|
||||
$Title »
|
||||
</a>
|
||||
</div>
|
||||
<% end_with %>
|
||||
<% end_if %>
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
|
@ -1,3 +1 @@
|
|||
<div id="PageContainer" class="page{$CSSClass} action{$Action}">
|
||||
<% include Content %>
|
||||
</div>
|
||||
<% include Content %>
|
||||
|
|
|
@ -1,45 +1,59 @@
|
|||
<% with $SearchResults %>
|
||||
<div id="PageContainer" class="page{$CSSClass} pageSearch action{$Action}">
|
||||
<div class="page-content $Top.DefaultContainer">
|
||||
<div class="element">
|
||||
<h1 class="h2 page-header no-elements">$Title</h1>
|
||||
<div class="element page-header-element d-block no-elements">
|
||||
<div class="element-container {$Top.DefaultContainer}">
|
||||
<h1 class="page-header">
|
||||
$Title
|
||||
</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="element element-search-results">
|
||||
<div class="element-container {$Top.DefaultContainer}">
|
||||
<h2 class="search-header">
|
||||
$Title
|
||||
</h2>
|
||||
<% if $Results %>
|
||||
<div id="SearchAccordion{$ID}">
|
||||
<% loop $Results %>
|
||||
<div class="card">
|
||||
<div class="card-header" id="Heading{$ID}{$Up.ID}">
|
||||
<h3
|
||||
class="mb-0 a"
|
||||
data-toggle="collapse"
|
||||
data-target="#Collapse{$ID}{$Up.ID}"
|
||||
aria-expanded="false"
|
||||
aria-controls="Collapse{$ID}{$Up.ID}"
|
||||
>
|
||||
$Title
|
||||
<i class="fas fa-plus accordion-icon pull-right"></i>
|
||||
</h3>
|
||||
</div>
|
||||
<div id="SearchAccordion{$ID}" class="accordion accordion-flush">
|
||||
<%-- loop $Results %>
|
||||
<div class="accordion-item">
|
||||
<h3 class="accordion-header">
|
||||
<button
|
||||
class="accordion-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#Collapse{$ID}{$Up.ID}"
|
||||
aria-expanded="false"
|
||||
aria-controls="Collapse{$ID}{$Up.ID}"
|
||||
>
|
||||
$Title
|
||||
</button>
|
||||
</h3>
|
||||
|
||||
<div
|
||||
id="Collapse{$ID}{$Up.ID}"
|
||||
class="collapse"
|
||||
class="accordion-collapse collapse"
|
||||
aria-labelledby="Heading{$ID}{$Up.ID}"
|
||||
data-parent="#SearchAccordion{$Up.ID}"
|
||||
data-bs-parent="#SearchAccordion{$Up.ID}"
|
||||
>
|
||||
<div class="card-body">
|
||||
<div class="accordion-body">
|
||||
<p>$Summary(100)</p>
|
||||
<a href="{$Link}">Learn More</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end_loop --%>
|
||||
<% loop $Results %>
|
||||
<h3 class="accordion-header">
|
||||
<a href="$Link" class="accordion-button collapsed">
|
||||
$Title
|
||||
<small>Go to page »</small>
|
||||
</a>
|
||||
</h3>
|
||||
<% end_loop %>
|
||||
</div>
|
||||
<% else %>
|
||||
<h3>Nothing was found.</h3>
|
||||
<h3 class="alert alert-danger not-found">Nothing was found.</h3>
|
||||
<% end_if %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<% end_with %>
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
<div class="vcard h-card">
|
||||
<div class="img">
|
||||
<img
|
||||
class="photo u-photo"
|
||||
src="<% if $Photo %>{$Photo.FocusFill(300,300).Link}<% else %>https://placehold.it/300x300<% end_if %>"
|
||||
alt="{$Title}"
|
||||
/>
|
||||
<div class="caption">
|
||||
<% include Objects\SocialLinks %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h5 class="fn p-name">
|
||||
$FirstName
|
||||
$LastName
|
||||
</h5>
|
||||
|
||||
<% if $Company || $Position %>
|
||||
<div class="company">
|
||||
<% if $Company %>
|
||||
<span class="org p-org">$Company</span><% if $Position %>,<% end_if %>
|
||||
<% end_if %>
|
||||
<% if $Position %>
|
||||
<span class="category p-category">$Position</span>
|
||||
<% end_if %>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<span class="n p-name d-none">
|
||||
<span class="given-name p-given-name">$FirstName</span>
|
||||
<span class="family-name p-family-name">$LastName</span>
|
||||
</span>
|
||||
</div>
|
|
@ -1,28 +0,0 @@
|
|||
<div
|
||||
class="mapAPI-map-container"
|
||||
data-map-zoom="$MapZoom"
|
||||
data-key="$MapAPIKey"
|
||||
data-map-style="<% if $MapStyle %>$MapStyle.XML<% else %>$SiteConfig.MapStyle.XML<% end_if %>"
|
||||
<% if $GeoJSON %>data-geojson="$GeoJSON.XML"<% end_if %>
|
||||
<% if $ID %>
|
||||
data-id="$ID"
|
||||
<% end_if %>
|
||||
<% if $MapIcon %>
|
||||
data-icon="$Icon.XML"
|
||||
<% end_if %>
|
||||
<% if $MapTitle %>
|
||||
data-content="$MapTitle.XML"
|
||||
<% end_if %>
|
||||
<% if $Lat && $Lng %>
|
||||
data-lat="$Lat"
|
||||
data-lng="$Lng"
|
||||
<% else_if $FullAddress %>
|
||||
data-address="$FullAddress.XML"
|
||||
<% else_if $Address %>
|
||||
data-address="$Address.XML"
|
||||
<% end_if %>
|
||||
data-fly-to-marker="true"
|
||||
data-fly-to-bounds="false"
|
||||
>
|
||||
<div class="mapAPI-map"></div>
|
||||
</div>
|
|
@ -1,31 +0,0 @@
|
|||
<%-- NOTE: Before including this, you will need to wrap the include in a with block --%>
|
||||
|
||||
<% if $MoreThanOnePage %>
|
||||
<nav aria-label="<%t Page.PaginationLabel "Pagination" %>">
|
||||
<ul class="pagination justify-content-center">
|
||||
<li class="page-item<% if $FirstPage %> disabled<% end_if %>">
|
||||
<a class="page-link" href="{$PrevLink}" aria-label="<%t Page.PaginationPrevious "Previous" %>">
|
||||
<span aria-hidden="true">«</span>
|
||||
<span class="sr-only"><%t Page.PaginationPrevious "Previous" %></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<% loop $PaginationSummary(12) %>
|
||||
<li class="page-item<% if $CurrentBool %> active<% end_if %>">
|
||||
<% if $Link %>
|
||||
<a href="$Link" class="page-link">$PageNum</a>
|
||||
<% else %>
|
||||
<span>...</span>
|
||||
<% end_if %>
|
||||
</li>
|
||||
<% end_loop %>
|
||||
|
||||
<li class="page-item<% if $LastPage %> disabled<% end_if %>">
|
||||
<a class="page-link" href="{$NextLink}" aria-label="<%t Page.PaginationNext "Next" %>">
|
||||
<span aria-hidden="true">»</span>
|
||||
<span class="sr-only"><%t Page.PaginationNext "Next" %></span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<% end_if %>
|
|
@ -1,10 +0,0 @@
|
|||
<div class="sc-links sc-links-share">
|
||||
<a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u={$AbsoluteLink}" class="fb" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u={$AbsoluteLink}','sharer','toolbar=0,status=0,width=530,height=520');return false;">
|
||||
<i class="fa fas fa-facebook-f"></i>
|
||||
<span class="sr-only">Share Facebook</span>
|
||||
</a>
|
||||
<a target="_blank" href="https://twitter.com/intent/tweet?url={$AbsoluteLink}" class="tw">
|
||||
<i class="fa fas fa-twitter"></i>
|
||||
<span class="sr-only">Share Twitter</span>
|
||||
</a>
|
||||
</div>
|
|
@ -1,32 +0,0 @@
|
|||
<div class="sc-links">
|
||||
<% if $Facebook %>
|
||||
<a href="$Facebook.LinkURL" title="Facebook" target="_blank">
|
||||
<i class="fab fa-facebook-f"></i>
|
||||
<i class="sr-only">Facebook</i>
|
||||
</a>
|
||||
<% end_if %>
|
||||
<% if $LinkedIn %>
|
||||
<a href="$LinkedIn.LinkURL" title="LinkedIn" target="_blank">
|
||||
<i class="fab fa-linkedin-in"></i>
|
||||
<i class="sr-only">LinkedIn</i>
|
||||
</a>
|
||||
<% end_if %>
|
||||
<% if $Pinterest %>
|
||||
<a href="$Pinterest.LinkURL" title="Pinterest" target="_blank">
|
||||
<i class="fab fa-pinterest-p"></i>
|
||||
<i class="sr-only">Pinterest</i>
|
||||
</a>
|
||||
<% end_if %>
|
||||
<% if $Instagram %>
|
||||
<a href="$Instagram.LinkURL" title="Instagram" target="_blank">
|
||||
<i class="fab fa-instagram"></i>
|
||||
<i class="sr-only">Instagram</i>
|
||||
</a>
|
||||
<% end_if %>
|
||||
<% if $Twitter %>
|
||||
<a href="$Twitter.LinkURL" title="Twitter" target="_blank">
|
||||
<i class="fab fa-twitter"></i>
|
||||
<i class="sr-only">Twitter</i>
|
||||
</a>
|
||||
<% end_if %>
|
||||
</div>
|
|
@ -1,16 +0,0 @@
|
|||
<div class="testimonial">
|
||||
<div class="testimonial__quote">
|
||||
<blockquote class="blockquote text-center">
|
||||
<i class="fas fa-quote-left"></i>
|
||||
<% if $Content %><p>$Content</p><% end_if %>
|
||||
<% if $Name || $Affiliation %>
|
||||
<footer class="blockquote-footer">
|
||||
<% if $Name %><div class="fn">$Name</div><% end_if %>
|
||||
<% if $Affiliation || $Position %>
|
||||
<div class="company">$Affiliation<% if $Position && $Affiliation %>, $Position<% else %>$Position<% end_if %></div>
|
||||
<% end_if %>
|
||||
</footer>
|
||||
<% end_if %>
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
|
@ -1,27 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="$ContentLocale.ATT" dir="$i18nScriptDirection.ATT">
|
||||
<%-- manifest="/cache.appcache" --%>
|
||||
<head>
|
||||
<% include MetaHead %>
|
||||
</head>
|
||||
|
||||
<body oncontextmenu="return false;"<% with $SiteConfig %> data-default-lng="$Longitude" data-default-lat="$Latitude"<% end_with %>>
|
||||
<% include First %>
|
||||
|
||||
<div class="wrapper">
|
||||
<header id="Header">
|
||||
<% include Header %>
|
||||
</header>
|
||||
|
||||
<main id="MainContent" data-ajax-region="LayoutAjax">
|
||||
<% include MainContent Layout=$Layout %>
|
||||
</main>
|
||||
</div>
|
||||
|
||||
<footer id="Footer" class="site-footer footer">
|
||||
<% include Footer %>
|
||||
</footer>
|
||||
|
||||
<% include Last %>
|
||||
</body>
|
||||
</html>
|
|
@ -5,6 +5,8 @@
|
|||
<% else_if $Type == 'Email' %>
|
||||
<i class="fas fa-envelope-open"></i>
|
||||
<% end_if %>
|
||||
$Title
|
||||
<span class="link-label">
|
||||
$Title
|
||||
</span>
|
||||
</a>
|
||||
<% end_if %>
|
||||
<% end_if %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<% require css("app/client/dist/css/order.css") %>
|
||||
<% require css("app/client/dist/css/app_order.css") %>
|
||||
|
||||
<%-- As Order.ss is also used in emails, avoid div, paragraph and heading elements --%>
|
||||
<% include SilverShop\Model\Order_Address %>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="page-content">
|
||||
<div class="cart-page cart-page--checkout page-content">
|
||||
<div class="checkout element">
|
||||
<% if $PaymentErrorMessage %>
|
||||
<div class="container">
|
||||
|
|
|
@ -1,31 +1,29 @@
|
|||
<div class="blog-post-info">
|
||||
<div class="row">
|
||||
<%-- div class="published-date">
|
||||
<div class="day">$PublishDate.Format("d")</div>
|
||||
<div class="month">$PublishDate.Format("MMM")</div>
|
||||
</div --%>
|
||||
<div class="col-sm-5">
|
||||
<% if $FeaturedImage %>
|
||||
<div class="img card-img-top">
|
||||
$FeaturedImage.FocusFill(350,200)
|
||||
</div>
|
||||
<% end_if %>
|
||||
<div class="blog-post blog-post--info">
|
||||
<% if $FeaturedImage %>
|
||||
<div class="blog-post__img">
|
||||
$FeaturedImage.Fill(300,200)
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<div class="blog-post__body blog-body">
|
||||
<h2 class="blog-post__title card-title title h3">
|
||||
$Title
|
||||
</h2>
|
||||
|
||||
<div class="blog-post__date">
|
||||
<span class="blog-post__date__m">$PublishDate.Format("MMMM")</span>
|
||||
<span class="blog-post__date__d">$PublishDate.Format("dd"),</span>
|
||||
<span class="blog-post__date__y">$PublishDate.Format("YYYY")</span>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-7 blog-body">
|
||||
<h2 class="card-title title h3">
|
||||
$Title
|
||||
</h2>
|
||||
<div class="blog-post__summary card-text typography summary">
|
||||
$Summary
|
||||
</div>
|
||||
|
||||
<div class="card-text typography summary">
|
||||
$Summary
|
||||
</div>
|
||||
<a href="{$Link}" class="blog-post__link graphql-page stretched-link">
|
||||
<%t SilverStripe\\Blog\\Model\\Blog.READMORE "Read More" %> »
|
||||
</a>
|
||||
|
||||
<a href="{$Link}" class="btn btn-link stretched-link">
|
||||
<span class="sr-only"><%t SilverStripe\\Blog\\Model\\Blog.READMORE "Read More" %> »</span>
|
||||
</a>
|
||||
|
||||
<% include SilverStripe\\Blog\\EntryMeta %>
|
||||
</div>
|
||||
<% include SilverStripe\\Blog\\EntryMeta %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,57 +1,62 @@
|
|||
<div class="blog-post-meta text-muted">
|
||||
<% if $Categories.exists %>
|
||||
<div class="categories">
|
||||
<%t SilverStripe\\Blog\\Model\\Blog.PostedIn "Posted in" %>
|
||||
<% loop $Categories %>
|
||||
<a href="$Link" title="$Title" class="category">$Title</a><% if not Last %>, <% else %>;<% end_if %>
|
||||
<% end_loop %>
|
||||
</div>
|
||||
<% end_if %>
|
||||
<div class="blog-post__meta text-muted">
|
||||
<% if $Categories.exists %>
|
||||
<div class="blog-post__categories categories">
|
||||
<span class="val-title"><%t SilverStripe\\Blog\\Model\\Blog.PostedIn "Posted in" %></span>
|
||||
<% loop $Categories %>
|
||||
<a href="$Link" title="$Title" class="blog-post__cat">$Title</a><% if not Last %>, <% else %>;<% end_if %>
|
||||
<% end_loop %>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<% if $Tags.exists %>
|
||||
<div class="tags">
|
||||
<%t SilverStripe\\Blog\\Model\\Blog.Tagged "Tagged" %>
|
||||
<% loop $Tags %>
|
||||
<a href="$Link" title="$Title" class="tag">$Title</a><% if not Last %>, <% else %>;<% end_if %>
|
||||
<% end_loop %>
|
||||
</div>
|
||||
<% end_if %>
|
||||
<% if $Tags.exists %>
|
||||
<div class="blog-post__tags">
|
||||
<span class="val-title"><%t SilverStripe\\Blog\\Model\\Blog.Tagged "Tagged" %></span>
|
||||
<% loop $Tags %>
|
||||
<a href="$Link" title="$Title" class="blog-post__tag">$Title</a><% if not Last %>, <% else %>;<% end_if %>
|
||||
<% end_loop %>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<div class="posted-ago">
|
||||
<%t SilverStripe\\Blog\\Model\\Blog.Posted "Posted" %>
|
||||
<a href="$MonthlyArchiveLink">$PublishDate.ago</a>
|
||||
</div>
|
||||
<div class="blog-post__ago">
|
||||
<span class="val-title"><%t SilverStripe\\Blog\\Model\\Blog.Posted "Posted" %></span>
|
||||
<a href="$MonthlyArchiveLink" class="val">$PublishDate.ago</a>
|
||||
</div>
|
||||
|
||||
<% if $Credits %>
|
||||
<div class="credits">
|
||||
<%t SilverStripe\\Blog\\Model\\Blog.By "by" %>
|
||||
<% if $Credits %>
|
||||
<div class="blog-post__credits">
|
||||
<span class="val-title"><%t SilverStripe\\Blog\\Model\\Blog.By "by" %></span>
|
||||
|
||||
<% loop $Credits %>
|
||||
<% if not $First && not $Last %>, <% end_if %>
|
||||
<% if not $First && $Last %> <%t SilverStripe\\Blog\\Model\\Blog.AND "and" %> <% end_if %>
|
||||
<% if $URLSegment && not $Up.ProfilesDisabled %>
|
||||
<a href="$URL" class="credit">$Name.XML</a>
|
||||
<% else %>
|
||||
<span class="credit">$Name.XML</span>
|
||||
<% end_if %>
|
||||
<% end_loop %>
|
||||
</div>
|
||||
<% end_if %>
|
||||
<% loop $Credits %>
|
||||
<% if not $First && not $Last %>, <% end_if %>
|
||||
<% if not $First && $Last %> <%t SilverStripe\\Blog\\Model\\Blog.AND "and" %> <% end_if %>
|
||||
<% if $URLSegment && not $Up.ProfilesDisabled %>
|
||||
<a href="$URL" class="blog-post__credit">$Name.XML</a>
|
||||
<% else %>
|
||||
<span class="blog-post__credit">$Name.XML</span>
|
||||
<% end_if %>
|
||||
<% end_loop %>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<% if $Comments.exists %>
|
||||
<a class="comments" href="{$Link}#comments-holder">
|
||||
<span class="count">$Comments.count</span>
|
||||
<%t SilverStripe\\Blog\\Model\\Blog.Comments "comments" %>
|
||||
</a>
|
||||
<% end_if %>
|
||||
<% if $Comments.exists %>
|
||||
<a class="blog-post__comments" href="{$Link}#comments-holder">
|
||||
<span class="val">$Comments.count</span>
|
||||
<span class="val-title"><%t SilverStripe\\Blog\\Model\\Blog.Comments "comments" %></span>
|
||||
</a>
|
||||
<% end_if %>
|
||||
|
||||
<% if $MinutesToRead %>
|
||||
<div class="reading-time">
|
||||
<% if $MinutesToRead < 1 %>
|
||||
<%t SilverStripe\\Blog\\Model\\Blog.LessThanAMinuteToRead "Less than a minute to read" %>
|
||||
<% else %>
|
||||
$MinutesToRead <%t SilverStripe\\Blog\\Model\\Blog.MinutesToRead "Minute(s) to read" %>
|
||||
<% end_if %>
|
||||
</div>
|
||||
<% end_if %>
|
||||
<% if $MinutesToRead %>
|
||||
<div class="blog-post__read-time">
|
||||
<% if $MinutesToRead < 1 %>
|
||||
<span class="val val--less">
|
||||
<%t SilverStripe\\Blog\\Model\\Blog.LessThanAMinuteToRead "Less than a minute to read" %>
|
||||
</span>
|
||||
<% else %>
|
||||
<span class="val">
|
||||
$MinutesToRead
|
||||
</span>
|
||||
<span class="val-title"><%t SilverStripe\\Blog\\Model\\Blog.MinutesToRead "Minute(s) to read" %></span>
|
||||
<% end_if %>
|
||||
</div>
|
||||
<% end_if %>
|
||||
</div>
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<% else %>
|
||||
<div class="element element__no_blogposts">
|
||||
<div class="element-container $DefaultContainer">
|
||||
<p class="alert alert-info alert-block">
|
||||
<p class="blog__no-posts alert alert-info alert-block">
|
||||
<%t SilverStripe\\Blog\\Model\\Blog.NoPosts 'There are no posts' %>
|
||||
</p>
|
||||
</div>
|
||||
|
@ -58,7 +58,7 @@
|
|||
</div>
|
||||
|
||||
<% if $CommentsForm %>
|
||||
<div class="element element__comments">
|
||||
<div class="element element__comments blog__comments">
|
||||
<div class="element-container $DefaultContainer">
|
||||
$CommentsForm
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div id="PageContainer" class="page{$CSSClass} action{$Action}">
|
||||
<article class="blog-entry">
|
||||
<article class="blog-post blog-entry">
|
||||
|
||||
<%-- if $FeaturedImage %>
|
||||
<div id="CarouselTop" class="carousel slide js-carousel d-none d-sm-block">
|
||||
|
@ -23,7 +23,7 @@
|
|||
</article>
|
||||
|
||||
<% if $CommentsForm %>
|
||||
<div class="element element__comments">
|
||||
<div class="element element__comments blog__comments blog-post__comments">
|
||||
<div class="element-container $DefaultContainer">
|
||||
$CommentsForm
|
||||
</div>
|
||||
|
|
|
@ -1,23 +1,49 @@
|
|||
<% require css('silverstripe/blog: client/dist/styles/main.css') %>
|
||||
<div id="PageContainer" class="page{$CSSClass} action{$Action}">
|
||||
<% include Content ExcludeHeader=true %>
|
||||
|
||||
<div class="blog-entry content-container <% if $SideBarView %>unit size3of4<% end_if %>">
|
||||
<div class="page-content">
|
||||
<div class="element page-header-element d-block">
|
||||
<div class="element-container $DefaultContainer">
|
||||
<%t SilverStripe\\Blog\\Model\\Blog.PostsByUser 'Posts by {firstname} {surname} for {title}' firstname=$CurrentProfile.FirstName surname=$CurrentProfile.Surname title=$Title %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% include SilverStripe\\Blog\\MemberDetails %>
|
||||
<% if $PaginatedList.Exists %>
|
||||
<div class="list_blogpost">
|
||||
<% loop $PaginatedList %>
|
||||
<div class="element element__blogpost element__blogpost__short">
|
||||
<div class="element-container $Top.DefaultContainer">
|
||||
<% include SilverStripe\Blog\Includes\BlogPostInfo %>
|
||||
</div>
|
||||
</div>
|
||||
<% end_loop %>
|
||||
</div>
|
||||
<% else %>
|
||||
<div class="element element__no_blogposts">
|
||||
<div class="element-container $DefaultContainer">
|
||||
<p class="blog__no-posts alert alert-info alert-block">
|
||||
<%t SilverStripe\\Blog\\Model\\Blog.NoPosts 'There are no posts' %>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<% if $PaginatedList.Exists %>
|
||||
<h2><%t SilverStripe\\Blog\\Model\\Blog.PostsByUser 'Posts by {firstname} {surname} for {title}' firstname=$CurrentProfile.FirstName surname=$CurrentProfile.Surname title=$Title %></h2>
|
||||
<% loop $PaginatedList %>
|
||||
<% include SilverStripe\\Blog\\PostSummary %>
|
||||
<% end_loop %>
|
||||
<% end_if %>
|
||||
|
||||
$Form
|
||||
$CommentsForm
|
||||
|
||||
<% with $PaginatedList %>
|
||||
<% include SilverStripe\\Blog\\Pagination %>
|
||||
<% end_with %>
|
||||
<div class="element element__pagination">
|
||||
<div class="element-container $DefaultContainer">
|
||||
<% with $PaginatedList %>
|
||||
<% include Objects\Pagination %>
|
||||
<% end_with %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if $CommentsForm %>
|
||||
<div class="element element__comments blog__comments">
|
||||
<div class="element-container $DefaultContainer">
|
||||
$CommentsForm
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% include SilverStripe\\Blog\\BlogSideBar %>
|
||||
<%-- include SilverStripe\\Blog\\BlogSideBar --%>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<% if $Archive %>
|
||||
<div class="blog__archive">
|
||||
<ul>
|
||||
<% loop $Archive %>
|
||||
<li>
|
||||
|
@ -8,4 +9,5 @@
|
|||
</li>
|
||||
<% end_loop %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
|
|
@ -1,11 +1,20 @@
|
|||
<% if $Categories %>
|
||||
<div class="blog__categories">
|
||||
<ul class="list-unstyled list-inline">
|
||||
<% loop $Categories %>
|
||||
<li class="list-inline-item">
|
||||
<a href="$Link">
|
||||
<a href="$Link" class="<% if $Up.Controller.getParentController.CurrentCategory.ID == $ID %>active<% end_if %>">
|
||||
<span class="text">$Title</span>
|
||||
</a>
|
||||
</li>
|
||||
<% end_loop %>
|
||||
<% if $Controller.getParentController.CurrentCategory %>
|
||||
<li class="list-inline-item">
|
||||
<a href="$Controller.getParentController.Link" class="view-all">
|
||||
<span class="text">View All</span>
|
||||
</a>
|
||||
</li>
|
||||
<% end_if %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<% if $Posts %>
|
||||
<div class="blog-posts__featured">
|
||||
<ul>
|
||||
<% loop $Posts %>
|
||||
<li>
|
||||
|
@ -9,4 +10,5 @@
|
|||
</li>
|
||||
<% end_loop %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<% if $Posts %>
|
||||
<div class="blog-posts__recent">
|
||||
<ul class="list-unstyled">
|
||||
<% loop $Posts %>
|
||||
<li>
|
||||
|
@ -8,4 +9,5 @@
|
|||
</li>
|
||||
<% end_loop %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<% if $Tags %>
|
||||
<div class="blog-posts__tags blog-posts__tags-cloud">
|
||||
<ul class="list-unstyled list-inline">
|
||||
<% loop $Tags %>
|
||||
<li class="list-inline-item">
|
||||
|
@ -8,4 +9,5 @@
|
|||
</li>
|
||||
<% end_loop %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<% if $Tags %>
|
||||
<div class="blog-posts__tags">
|
||||
<ul class="list-unstyled list-inline">
|
||||
<% loop $Tags %>
|
||||
<li class="list-inline-item">
|
||||
|
@ -8,4 +9,5 @@
|
|||
</li>
|
||||
<% end_loop %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
|
|
@ -0,0 +1,96 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>Site health: $Status</title>
|
||||
<style>
|
||||
* {
|
||||
font-family: Helvetica, Arial;
|
||||
font-size: 12px;
|
||||
}
|
||||
.subtext {
|
||||
margin-top: -10px;
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 30px;
|
||||
margin-bottom: 3px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 16px;
|
||||
margin: 2px 0 10px 8px;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table th {
|
||||
color: white;
|
||||
background-color: #777;
|
||||
/*border: 1px #aaa solid;*/
|
||||
padding: 10px;
|
||||
text-align: left;
|
||||
}
|
||||
table td {
|
||||
background-color: #eee;
|
||||
/*border: 1px #ddd solid;*/
|
||||
padding: 5px 10px;
|
||||
}
|
||||
table tr:nth-child(odd) td {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
.OK {
|
||||
color: green;
|
||||
}
|
||||
.WARNING {
|
||||
color: orange;
|
||||
font-weight: bold;
|
||||
}
|
||||
.ERROR {
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
.extra-links a {
|
||||
display: block;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
||||
<body>
|
||||
<h1 class="$Status">$Title: $Status</h1>
|
||||
<h2 class="website">Site: $URL</h2>
|
||||
|
||||
<div class="extra-links">
|
||||
<a href="/dev/tasks/DataIntegrityTest/?do=obsoletefields">TEST DB Integrity</a>
|
||||
<a href="/dev/tasks/testemail">Test SilverStripe mailer</a>
|
||||
</div>
|
||||
|
||||
<% if $IncludeDetails %>
|
||||
<table>
|
||||
<tr><th>Check</th> <th>Status</th> <th>Message</th></tr>
|
||||
<% loop $Details %>
|
||||
<tr><td>$Check</td> <td class="$Status">$Status</td> <td>$Message.XML</td></tr>
|
||||
<% end_loop %>
|
||||
</table>
|
||||
<% end_if %>
|
||||
|
||||
<% if $ShouldPass %>
|
||||
<p>Site is available</p>
|
||||
<p class="subtext">(you may check for the presence of the text 'Site is available' rather than an HTTP $ErrorCode error on this page, if you prefer.<% if not $IncludeDetails %> Full details are available for logged in users at <a href="{$AbsoluteBaseURL}dev/check/">dev/check</a><% end_if %>)</p>
|
||||
<% else %>
|
||||
<% if $Name == "check" %>
|
||||
<p><b>A subsystem of the site is unavailable, but the site remains operational</b></p>
|
||||
<% else %>
|
||||
<p><b>Site is not available</b></p>
|
||||
<% end_if %>
|
||||
<% end_if %>
|
||||
</body>
|
||||
</html>
|
|
@ -1,6 +1,6 @@
|
|||
<$Tag $AttributesHTML>
|
||||
<% if $Tag == 'fieldset' && $Legend %>
|
||||
<legend>$Legend</legend>
|
||||
<legend class="form__legend">$Legend</legend>
|
||||
<% end_if %>
|
||||
|
||||
$Field
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<div id="$HolderID" class="field<% if $extraClass %> $extraClass<% end_if %>">
|
||||
<% if $Title %><label class="left" for="$ID">$Title</label><% end_if %>
|
||||
<div id="$HolderID" class="form__field field<% if $extraClass %> $extraClass<% end_if %>">
|
||||
<% if $Title %><label class="field__label field__label-left left" for="$ID">$Title</label><% end_if %>
|
||||
|
||||
<div class="middleColumn">
|
||||
<div class="field__content middleColumn">
|
||||
$Field
|
||||
</div>
|
||||
|
||||
<% if $Title && $RightTitle %>
|
||||
<div class="right">$RightTitle</div>
|
||||
<div class="field__label field__label-right right">$RightTitle</div>
|
||||
<% else_if $RightTitle %>
|
||||
<label class="right" for="$ID">$RightTitle</label>
|
||||
<label class="field__label field__label-right right" for="$ID">$RightTitle</label>
|
||||
<% end_if %>
|
||||
|
||||
<% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
|
||||
<% if $Description %><span class="description">$Description</span><% end_if %>
|
||||
<% if $Message %><span class="field__alert alert alert-{$MessageType} message $MessageType">$Message</span><% end_if %>
|
||||
<% if $Description %><span class="field__description description">$Description</span><% end_if %>
|
||||
</div>
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
<form $AttributesHTML>
|
||||
<% end_if %>
|
||||
<% if $Message %>
|
||||
<p id="{$FormName}_error" class="message $MessageType">$Message.RAW</p>
|
||||
<div id="{$FormName}_error" class="form__message alert alert-{$MessageType} message $MessageType">$Message.RAW</div>
|
||||
<% else %>
|
||||
<p id="{$FormName}_error" class="message $MessageType" style="display: none"></p>
|
||||
<div id="{$FormName}_error" class="form__message alert alert-{$MessageType} message {$MessageType}" style="display: none"></div>
|
||||
<% end_if %>
|
||||
|
||||
<fieldset>
|
||||
<% if $Legend %><legend>$Legend</legend><% end_if %>
|
||||
<fieldset class="form__fieldset">
|
||||
<% if $Legend %><legend class="form__legend">$Legend</legend><% end_if %>
|
||||
<% loop $Fields %>
|
||||
$FieldHolder
|
||||
<% end_loop %>
|
||||
|
@ -16,7 +16,7 @@
|
|||
</fieldset>
|
||||
|
||||
<% if $Actions %>
|
||||
<div class="btn-toolbar">
|
||||
<div class="form__actions btn-toolbar">
|
||||
<% loop $Actions %>
|
||||
$Field
|
||||
<% end_loop %>
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<ul $AttributesHTML>
|
||||
<% loop $Options %>
|
||||
<li class="$Class">
|
||||
<input id="$ID" class="radio" name="$Name" type="radio" value="$Value"<% if $isChecked %> checked<% end_if %><% if $isDisabled %> disabled<% end_if %> />
|
||||
<label for="$ID">$Title.RAW</label>
|
||||
</li>
|
||||
<% end_loop %>
|
||||
</ul>
|
|
@ -1,9 +1,9 @@
|
|||
<div id="$HolderID" class="field<% if $extraClass %> $extraClass<% end_if %>">
|
||||
<% if $Title %><div class="left">$Title</div><% end_if %>
|
||||
<div class="middleColumn">
|
||||
<div id="$HolderID" class="form__field field<% if $extraClass %> $extraClass<% end_if %>">
|
||||
<% if $Title %><div class="field__label field__label-left left">$Title</div><% end_if %>
|
||||
<div class="field__content middleColumn">
|
||||
$Field
|
||||
</div>
|
||||
<% if $RightTitle %><div class="right">$RightTitle</div><% end_if %>
|
||||
<% if $Message %><span class="message $MessageType">$Message</span><% end_if %>
|
||||
<% if $Description %><span class="description">$Description</span><% end_if %>
|
||||
<% if $RightTitle %><div class="field__label field__label-right right">$RightTitle</div><% end_if %>
|
||||
<% if $Message %><span class="field__alert alert alert-{$MessageType} message $MessageType">$Message</span><% end_if %>
|
||||
<% if $Description %><span class="field__description description">$Description</span><% end_if %>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<input $AttributesHTML />
|
||||
|
||||
<b class="field-password__show-password show-password">
|
||||
<i class="fas fa-eye"></i>
|
||||
<span class="visually-hidden">Show Password</span>
|
||||
</b>
|
|
@ -1,4 +1,4 @@
|
|||
<div id="uff">
|
||||
<div id="uff" class="userdefinedform__thx">
|
||||
<div class="on-complete-message user-form">
|
||||
$OnCompleteMessage
|
||||
</div>
|
||||
|
@ -8,4 +8,4 @@
|
|||
$CustomThankYouCode.RAW
|
||||
</div>
|
||||
<% end_if %>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<div id="$Name" class="form__field field<% if $extraClass %> $extraClass<% end_if %>">
|
||||
<% if $Title %><label class="field__label field__label-left left" for="$ID">$Title</label><% end_if %>
|
||||
|
||||
<div class="field__content middleColumn">
|
||||
$Field
|
||||
</div>
|
||||
|
||||
<% if $Title && $RightTitle %>
|
||||
<div class="field__label field__label-right right">$RightTitle</div>
|
||||
<% else_if $RightTitle %>
|
||||
<label class="field__label field__label-right right" for="$ID">$RightTitle</label>
|
||||
<% end_if %>
|
||||
|
||||
<% if $Message %><span class="field__alert alert alert-{$MessageType} message $MessageType">$Message</span><% end_if %>
|
||||
<% if $Description %><span class="field__description description">$Description</span><% end_if %>
|
||||
</div>
|
|
@ -0,0 +1,4 @@
|
|||
<textarea $AttributesHTML
|
||||
<% if $RightTitle %>aria-describedby="{$Name}_right_title"<% end_if %>
|
||||
placeholder="<% if $Placeholder %>{$Placeholder}<% else %>{$Title}<% end_if %>"
|
||||
>$Value</textarea>
|
|
@ -0,0 +1,17 @@
|
|||
<div id="$Name" class="form-floating form__field field<% if $extraClass %> $extraClass<% end_if %>">
|
||||
<div class="field__content middleColumn">
|
||||
<div class="form-floating">
|
||||
$Field
|
||||
<% if $Title %><label for="$ID">$Title</label><% end_if %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if $Title && $RightTitle %>
|
||||
<div class="field__label field__label-right right">$RightTitle</div>
|
||||
<% else_if $RightTitle %>
|
||||
<label class="field__label field__label-right right" for="$ID">$RightTitle</label>
|
||||
<% end_if %>
|
||||
|
||||
<% if $Message %><span class="field__alert alert alert-{$MessageType} message $MessageType">$Message</span><% end_if %>
|
||||
<% if $Description %><span class="field__description description">$Description</span><% end_if %>
|
||||
</div>
|
|
@ -1,8 +0,0 @@
|
|||
<% if $ShowTitle %>
|
||||
<h2 class="list-element__title">$Title</h2>
|
||||
<% end_if %>
|
||||
<div class="accordion-element__container" data-listelement-count="$Elements.Elements.Count">
|
||||
<div id="ElementAccordion{$Elements.ID}" class="accordion">
|
||||
$Accordion
|
||||
</div>
|
||||
</div>
|
|
@ -1,25 +0,0 @@
|
|||
<% if $ElementFilteredControllers %>
|
||||
<% loop $ElementFilteredControllers %>
|
||||
<div class="card">
|
||||
<div
|
||||
id="ElementHeader{$ID}"
|
||||
class="card-header accordion-header a h4"
|
||||
data-toggle="collapse"
|
||||
data-target="#ElementContent{$ID}"
|
||||
aria-expanded="false"
|
||||
aria-controls="ElementContent{$ID}"
|
||||
>
|
||||
$Title
|
||||
</div>
|
||||
|
||||
<div
|
||||
id="ElementContent{$ID}"
|
||||
class="accordion-content collapse"
|
||||
aria-labelledby="ElementHeader{$ID}"
|
||||
data-parent="#ElementAccordion{$Parent.ID}"
|
||||
>
|
||||
$Me
|
||||
</div>
|
||||
</div>
|
||||
<% end_loop %>
|
||||
<% end_if %>
|
|
@ -1,21 +0,0 @@
|
|||
<div
|
||||
data-aos="fade-up"
|
||||
class="content-element__content<% if $BlockLink %> has-blockLink<% end_if %><% if $BlockIcon %> has-blockIcon<% end_if %><% if $Style %> $CssStyle<% end_if %>"
|
||||
>
|
||||
<% if $BlockIcon %>
|
||||
<i class="content-element__icon $BlockIcon"></i>
|
||||
<% end_if %>
|
||||
<% if $ShowTitle %>
|
||||
<h2 class="content-element__title">$Title</h2>
|
||||
<% end_if %>
|
||||
|
||||
<div class="typography">
|
||||
$HTML
|
||||
</div>
|
||||
|
||||
<% if $BlockLink %>
|
||||
<a href="$BlockLink.LinkURL" class="btn btn-default stretched-link">
|
||||
$BlockLink.Title
|
||||
</a>
|
||||
<% end_if %>
|
||||
</div>
|
|
@ -1,21 +0,0 @@
|
|||
<% if $ShowTitle %>
|
||||
<h2 class="content-element__title">$Title</h2>
|
||||
<% end_if %>
|
||||
|
||||
<% if $Content %>
|
||||
<div class="typography">$Content</div>
|
||||
<% end_if %>
|
||||
|
||||
<% include Objects\Map %>
|
||||
|
||||
<% if $Locations %>
|
||||
<div class="locations">
|
||||
<div class="row">
|
||||
<% loop $Locations %>
|
||||
<div class="col">
|
||||
$forTemplate
|
||||
</div>
|
||||
<% end_loop %>
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
|
@ -1,24 +0,0 @@
|
|||
<% if $ShowTitle || $Content %>
|
||||
<div class="slider-caption ">
|
||||
<div class="slider-element__content">
|
||||
<% if $ShowTitle %>
|
||||
<h2 class="slider-element__title text-center">$Title</h2>
|
||||
<% end_if %>
|
||||
<% if $Content %><div class="typography">$Content</div><% end_if %>
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
||||
|
||||
<% if $SlideShow %>
|
||||
<div id="Carousel{$ID}" class="carousel slide js-carousel"<% if $SlideShow.count > 1 %><% if $Interval %> data-interval="$Interval"<% end_if %> data-indicators="true" data-arrows="true"<% end_if %>>
|
||||
<div class="carousel-inner">
|
||||
<% loop $SlideShow %>
|
||||
<div class="carousel-item carousel-item-{$SlideType}<% if no $Controls %> carousel-item-nocontrols<% end_if %><% if $First %> active<% end_if %>">
|
||||
<div class="carousel-slide">
|
||||
<% include SlideItem %>
|
||||
</div>
|
||||
</div>
|
||||
<% end_loop %>
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
|
@ -1,17 +0,0 @@
|
|||
<% if $Members %>
|
||||
<div class="teamMembers-element__content <% if $Style %>$CssStyle<% end_if %>">
|
||||
<% if $ShowTitle %>
|
||||
<h2 class="teamMembers-element__title text-center">$Title</h2>
|
||||
<% end_if %>
|
||||
|
||||
<div class="teamMembers-element__content">
|
||||
<div class="row">
|
||||
<% loop $Members %>
|
||||
<div class="col-sm-3">
|
||||
<% include Objects\HCard %>
|
||||
</div>
|
||||
<% end_loop %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end_if %>
|
|
@ -1,28 +0,0 @@
|
|||
<div id="MapPin{$ID}" data-id="{$ID}" class="location">
|
||||
<div class="fn">{$Title}</div>
|
||||
<div class="addr">{$Address}</div>
|
||||
<% if $Address2 %>
|
||||
<div class="addr2">{$Address2}</div>
|
||||
<% end_if %>
|
||||
<% if $City || $Suburb || $PostalCode || $Postcode %>
|
||||
<div class="city">
|
||||
{$City}{$Suburb}, {$State} {$PostalCode}{$Postcode}
|
||||
</div>
|
||||
<% end_if %>
|
||||
<% if $Country %>
|
||||
<div class="country d-none">{$Country}</div>
|
||||
<% end_if %>
|
||||
<% if $PhoneNumber %>
|
||||
<% with $PhoneNumber %>
|
||||
T: <a href="$LinkURL" class="tel">$Title</a><br/>
|
||||
<% end_with %>
|
||||
<% end_if %>
|
||||
<% if $Fax %>
|
||||
<% with $Fax %>
|
||||
F: <span class="fax">$Title</span>
|
||||
<% end_with %>
|
||||
<% end_if %>
|
||||
<div class="dir-link">
|
||||
<a href="$DirectionsURL" target="_blank">Get Directions »</a>
|
||||
</div>
|
||||
</div>
|
|
@ -1 +0,0 @@
|
|||
<b>$Day:</b> $From.Nice - $Till.Nice
|
|
@ -1,32 +0,0 @@
|
|||
<% if $ShowNotifications && $NotificationsToday %>
|
||||
<div class="notifications-list">
|
||||
<% loop $NotificationsToday %>
|
||||
<div class="alert alert-warning">
|
||||
<div class="container">
|
||||
<% if $DisplayTitle && $Title %>
|
||||
<h2>$Title</h2>
|
||||
<% end_if %>
|
||||
|
||||
<div class="typography">
|
||||
$Content
|
||||
</div>
|
||||
|
||||
<% if $TargetLink %>
|
||||
<% with $TargetLink %>
|
||||
<a
|
||||
class="alert-link" href="$LinkURL"
|
||||
<% if $OpenInNewWindow %> target="_blank"<% end_if %>
|
||||
>
|
||||
$Title
|
||||
</a>
|
||||
<% end_with %>
|
||||
<% end_if %>
|
||||
|
||||
<b class="btn btn-danger btn-close" data-dismiss="alert" aria-label="Close">
|
||||
<i class="fas fa-times"></i>
|
||||
</b>
|
||||
</div>
|
||||
</div>
|
||||
<% end_loop %>
|
||||
</div>
|
||||
<% end_if %>
|
|
@ -1,7 +0,0 @@
|
|||
<% if $OpeningHoursToday %>
|
||||
<% loop $OpeningHoursToday %>
|
||||
$forTemplate<br/>
|
||||
<% end_loop %>
|
||||
<% else %>
|
||||
<b class="hours hous-closed">Closed</b>
|
||||
<% end_if %>
|
|
@ -1,11 +0,0 @@
|
|||
<% include PageHeader %>
|
||||
|
||||
<% include Content ExcludeHeader=true %>
|
||||
|
||||
<%-- div class="page-content page-content-main page-content-extra">
|
||||
<div class="element">
|
||||
<div class="element-container $DefaultContainer">
|
||||
<!-- Some exta page type specific content -->
|
||||
</div>
|
||||
</div>
|
||||
</div --%>
|
|
@ -1,8 +0,0 @@
|
|||
<img src="$Image.FocusFill(432,315).URL" alt="$Title" />
|
||||
<% if $Link %>
|
||||
<% with $Link %>
|
||||
<a href="$URL"<% if $OpenInNewWindow %> target="_blank"<% end_if %> class="stretched-link">
|
||||
<span class="sr-only">$Up.Title</span>
|
||||
</a>
|
||||
<% end_with %>
|
||||
<% end_if %>
|
|
@ -1,3 +0,0 @@
|
|||
<% if $Text %>
|
||||
<div class="typography">$Text</div>
|
||||
<% end_if %>
|
|
@ -1,9 +0,0 @@
|
|||
<% if $Element %>
|
||||
<% with $Element %>
|
||||
<div class="element $SimpleClassName.LowerCase<% if $StyleVariant %> $StyleVariant<% end_if %><% if $ExtraClass %> $ExtraClass<% end_if %>" id="$Anchor">
|
||||
<div class="element-container<% if $ContainerClass %> $ContainerClass<% end_if %>">
|
||||
$forTemplate
|
||||
</div>
|
||||
</div>
|
||||
<% end_with %>
|
||||
<% end_if %>
|
|
@ -1,18 +0,0 @@
|
|||
<% if $Submenu %>
|
||||
<nav>
|
||||
<ul class="nav flex-column">
|
||||
<% with $Page.Level(1) %>
|
||||
<li class="nav-item-level1 nav-item {$CSSClass} $ExtraClass <% if $isCurrent || $isSection %> active<% end_if %>">
|
||||
<b class="nav-link">
|
||||
$MenuTitle.XML
|
||||
<% if $isCurrent || $isSection %><i class="sr-only">(current)</i><% end_if %>
|
||||
</b>
|
||||
</li>
|
||||
<% end_with %>
|
||||
|
||||
<% loop $Submenu %>
|
||||
<% include NavItem %>
|
||||
<% end_loop %>
|
||||
</ul>
|
||||
</nav>
|
||||
<% end_if %>
|
|
@ -1,4 +0,0 @@
|
|||
<nav class="secondary element $ClassName">
|
||||
<% if $ShowTitle && $Title %><h2 class="widget-title">$Title</h2><% end_if %>
|
||||
$Content
|
||||
</nav>
|
|
@ -1 +0,0 @@
|
|||
Subproject commit 57f2097c063461403df25c52fd5302f3ccc96f9c
|
|
@ -3,32 +3,31 @@
|
|||
* to SilverStripe i18n js file in client/lang
|
||||
* Quick and dirty node script!
|
||||
*/
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
const PATHS = {
|
||||
SRC: path.resolve('client/src/lang'),
|
||||
DIST: path.resolve('client/lang'),
|
||||
};
|
||||
DIST: path.resolve('client/lang')
|
||||
}
|
||||
|
||||
console.log('Writing SS i18n JS lang files...');
|
||||
console.log('Writing SS i18n JS lang files...')
|
||||
|
||||
fs.readdir(PATHS.SRC, function(err, files)
|
||||
{
|
||||
files.forEach(function (file) {
|
||||
var lang = file.split('.').shift();
|
||||
fs.readFile(PATHS.SRC + '/' + file, "utf8", function(err, data) {
|
||||
if (err) { console.log(err); }
|
||||
var fileData = `if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
|
||||
fs.readdir(PATHS.SRC, function (err, files) {
|
||||
files.forEach(function (file) {
|
||||
const lang = file.split('.').shift()
|
||||
fs.readFile(PATHS.SRC + '/' + file, 'utf8', function (err, data) {
|
||||
if (err) { console.log(err) }
|
||||
const fileData = `if(typeof(ss) == 'undefined' || typeof(ss.i18n) == 'undefined') {
|
||||
if(typeof(console) != 'undefined') console.error('Class ss.i18n not defined');
|
||||
} else {
|
||||
ss.i18n.addDictionary('${lang}', ${data});
|
||||
}`;
|
||||
}`
|
||||
|
||||
fs.writeFile(PATHS.DIST + '/' + lang + '.js', fileData, "utf8", function(err) {
|
||||
if (err) { console.log(err); }
|
||||
console.log("Saved " + lang + '.js');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
fs.writeFile(PATHS.DIST + '/' + lang + '.js', fileData, 'utf8', function (err) {
|
||||
if (err) { console.log(err) }
|
||||
console.log('Saved ' + lang + '.js')
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
{
|
||||
"presets": [
|
||||
[
|
||||
"@babel/preset-env",
|
||||
{
|
||||
"targets": {
|
||||
"node": "6.10",
|
||||
"browsers": "> 0.25%, not dead"
|
||||
}
|
||||
}
|
||||
],
|
||||
[
|
||||
"@babel/preset-react",
|
||||
{
|
||||
"pragma": "dom", // default pragma is React.createElement (only in classic runtime)
|
||||
"pragmaFrag": "DomFrag", // default is React.Fragment (only in classic runtime)
|
||||
"throwIfNamespace": false, // defaults to true
|
||||
"runtime": "classic" // defaults to classic
|
||||
// "importSource": "custom-jsx-library" // defaults to react (only in automatic runtime)
|
||||
}
|
||||
]
|
||||
],
|
||||
"plugins": [
|
||||
"@babel/plugin-syntax-top-level-await",
|
||||
"@babel/plugin-proposal-object-rest-spread",
|
||||
"@babel/plugin-syntax-jsx"
|
||||
]
|
||||
}
|
207
composer.json
|
@ -1,91 +1,126 @@
|
|||
{
|
||||
"name": "a2nt/silverstripe-webpack",
|
||||
"type": "silverstripe-recipe",
|
||||
"description": "SilverStripe WebPack boilerplate + Basics of JS/CSS UI",
|
||||
"keywords": [
|
||||
"silverstripe",
|
||||
"webpack"
|
||||
"name": "a2nt/silverstripe-webpack",
|
||||
"type": "silverstripe-recipe",
|
||||
"description": "SilverStripe WebPack boilerplate + Basics of JS/CSS UI",
|
||||
"keywords": [
|
||||
"silverstripe",
|
||||
"webpack"
|
||||
],
|
||||
"license": "BSD-3-Clause",
|
||||
"require": {
|
||||
"php": ">=8",
|
||||
"ext-json": "*",
|
||||
"silverstripe/recipe-cms": "^5",
|
||||
"silverstripe/recipe-plugin": "*",
|
||||
"wilr/silverstripe-googlesitemaps": "*",
|
||||
"silverstripe/userforms": "*",
|
||||
"undefinedoffset/sortablegridfield": "*",
|
||||
"silverstripe/spamprotection": "*",
|
||||
"jonom/silverstripe-betternavigator": "*",
|
||||
"silverstripe/externallinks": "*",
|
||||
"symbiote/silverstripe-gridfieldextensions": "*",
|
||||
"colymba/gridfield-bulk-editing-tools": "^4",
|
||||
"dnadesign/silverstripe-elemental-list": "*",
|
||||
"dnadesign/silverstripe-elemental-virtual": "*",
|
||||
"dnadesign/silverstripe-elemental-userforms": "*",
|
||||
"axllent/silverstripe-version-truncator": "*",
|
||||
"axllent/silverstripe-bootstrap-forms": "*",
|
||||
"silverstripe/redirectedurls": "*",
|
||||
"stevie-mayhew/silverstripe-svg": "*",
|
||||
"innoweb/silverstripe-sitemap": "*",
|
||||
"silverstripe/multiuser-editing-alert": "*",
|
||||
"silverstripe/environmentcheck": "*",
|
||||
"a2nt/silverstripe-font-awesome-field": "dev-master",
|
||||
"a2nt/silverstripe-progressivewebapp": "dev-master",
|
||||
"bummzack/sortablefile": "*",
|
||||
"ezyang/htmlpurifier": "^4.13",
|
||||
"endroid/qr-code": "^3.9",
|
||||
"jonom/focuspoint": "*",
|
||||
"silverstripe/login-forms": "*",
|
||||
"axllent/silverstripe-trailing-slash": "*",
|
||||
"webbuilders-group/silverstripe-turnstile": "*",
|
||||
"a2nt/cms-niceties": "*",
|
||||
"dynamic/flexslider": "^5",
|
||||
"dynamic/silverstripe-elemental-flexslider": "^2.0@dev",
|
||||
"silverstripe/blog": "^4.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "*",
|
||||
"sunnysideup/easy-coding-standards": "dev-master",
|
||||
"silverleague/ideannotator": "dev-master",
|
||||
"lekoala/silverstripe-debugbar": "^3.0"
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/a2nt/silverstripe-elemental-archive-report"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/a2nt/silverstripe-font-awesome"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/a2nt/silverstripe-mapboxfield"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/a2nt/silverstripe-addressable"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/a2nt/silverstripe-image-cropper-field"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/a2nt/silverstripe-dataintegritytests"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/a2nt/silverstripe-flexslider"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/a2nt/silverstripe-turnstile"
|
||||
}
|
||||
],
|
||||
"extra": {
|
||||
"expose": [
|
||||
"app/client/dist"
|
||||
],
|
||||
"license": "BSD-3-Clause",
|
||||
"require": {
|
||||
"php": ">=7.1.0",
|
||||
"ext-json": "*",
|
||||
"silverstripe/recipe-cms": "^4",
|
||||
"wilr/silverstripe-googlesitemaps": "*",
|
||||
"silverstripe/userforms": "*",
|
||||
"undefinedoffset/sortablegridfield": "*",
|
||||
"silverstripe/spamprotection": "*",
|
||||
"silverstripe/recaptcha": "*",
|
||||
"jonom/silverstripe-betternavigator": "*",
|
||||
"silverstripe/externallinks": "*",
|
||||
"symbiote/silverstripe-gridfieldextensions": "*",
|
||||
"colymba/gridfield-bulk-editing-tools": "*",
|
||||
"dnadesign/silverstripe-elemental-list": "*",
|
||||
"dnadesign/silverstripe-elemental-virtual": "*",
|
||||
"dnadesign/silverstripe-elemental-userforms": "*",
|
||||
"dynamic/silverstripe-elemental-blocks": "*",
|
||||
"drmartingonzo/ss-tinymce-charcount": "*",
|
||||
"axllent/silverstripe-version-truncator": "*",
|
||||
"gorriecoe/silverstripe-dataobjecthistory": "*",
|
||||
"axllent/silverstripe-bootstrap-forms": "*",
|
||||
"silverstripe/redirectedurls": "*",
|
||||
"undefinedoffset/silverstripe-nocaptcha": "*",
|
||||
"stevie-mayhew/silverstripe-svg": "*",
|
||||
"betterbrief/silverstripe-googlemapfield": "*",
|
||||
"innoweb/silverstripe-sitemap": "*",
|
||||
"silverstripe/multiuser-editing-alert": "*",
|
||||
"gorriecoe/silverstripe-link": "*",
|
||||
"gorriecoe/silverstripe-linkfield": "*",
|
||||
"silverstripe/environmentcheck": "*",
|
||||
"silverstripe/widgets": "^2.0",
|
||||
"a2nt/silverstripe-font-awesome-field": "dev-master",
|
||||
"a2nt/silverstripe-mapboxfield": "dev-master",
|
||||
"a2nt/silverstripe-progressivewebapp": "dev-master",
|
||||
"bummzack/sortablefile": "*",
|
||||
"barryvdh/composer-cleanup-plugin": "0.2.x",
|
||||
"eluceo/ical": "^0.16.0",
|
||||
"ezyang/htmlpurifier": "^4.13",
|
||||
"showpro/silverstripe-seo-images": "^1.0",
|
||||
"endroid/qr-code": "^3.9",
|
||||
"jonom/focuspoint": "^3.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.7",
|
||||
"lekoala/silverstripe-debugbar": "dev-master"
|
||||
},
|
||||
"repositories": [
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/a2nt/silverstripe-font-awesome"
|
||||
},
|
||||
{
|
||||
"type": "vcs",
|
||||
"url": "https://github.com/a2nt/silverstripe-mapboxfield"
|
||||
}
|
||||
"project-files-installed": [
|
||||
"app/.htaccess",
|
||||
"app/_config.php",
|
||||
"app/_config/database.yml",
|
||||
"app/_config/mimevalidator.yml",
|
||||
"app/_config/mysite.yml",
|
||||
"app/src/Page.php",
|
||||
"app/src/PageController.php"
|
||||
],
|
||||
"extra": {
|
||||
"expose": [
|
||||
"app/client/dist"
|
||||
],
|
||||
"project-files-installed": [
|
||||
"app/.htaccess",
|
||||
"app/_config.php",
|
||||
"app/_config/mimevalidator.yml",
|
||||
"app/_config/mysite.yml",
|
||||
"app/src/Page.php",
|
||||
"app/src/PageController.php"
|
||||
],
|
||||
"public-files-installed": [
|
||||
".htaccess",
|
||||
"index.php",
|
||||
"install-frameworkmissing.html",
|
||||
"install.php",
|
||||
"web.config"
|
||||
]
|
||||
"public-files-installed": [
|
||||
".htaccess",
|
||||
"index.php",
|
||||
"install-frameworkmissing.html",
|
||||
"install.php",
|
||||
"web.config"
|
||||
]
|
||||
},
|
||||
"config": {
|
||||
"process-timeout": 600,
|
||||
"allow-plugins": {
|
||||
"composer/installers": true,
|
||||
"silverstripe/vendor-plugin": true,
|
||||
"silverstripe/recipe-plugin": true
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"App\\": "app/src"
|
||||
},
|
||||
"config": {
|
||||
"process-timeout": 600
|
||||
},
|
||||
"prefer-stable": true,
|
||||
"minimum-stability": "dev"
|
||||
"exclude-from-classmap": [
|
||||
"vendor/dynamic/flexslider/src/Model/SlideImage.php"
|
||||
]
|
||||
},
|
||||
"prefer-stable": true,
|
||||
"minimum-stability": "dev"
|
||||
}
|
||||
|
|
14
env-dist
|
@ -7,3 +7,17 @@ SS_DEFAULT_ADMIN_USERNAME=''
|
|||
SS_DEFAULT_ADMIN_PASSWORD=''
|
||||
|
||||
SS_ENVIRONMENT_TYPE='dev'
|
||||
|
||||
SS_SEND_ALL_EMAILS_FROM=''
|
||||
|
||||
NOCAPTCHA_SITE_KEY=''
|
||||
NOCAPTCHA_SECRET_KEY=''
|
||||
|
||||
SS_TURNSTILE_SITE_KEY=''
|
||||
SS_TURNSTILE_SECRET_KEY=''
|
||||
|
||||
GOOGLEMAPS_API_KEY=''
|
||||
MAPBOX_API_KEY=''
|
||||
|
||||
APP_SMTP_USERNAME=''
|
||||
APP_SMTP_PASSWORD=''
|
||||
|
|
|
@ -0,0 +1,272 @@
|
|||
{
|
||||
// http://eslint.org/docs/rules/
|
||||
"extends": "eslint:recommended",
|
||||
|
||||
"settings": {
|
||||
"react": {
|
||||
"version": "detect"
|
||||
}
|
||||
},
|
||||
|
||||
"env": {
|
||||
"browser": true, // browser global variables.
|
||||
"node": true, // Node.js global variables and Node.js-specific rules.
|
||||
"amd": true, // defines require() and define() as global variables as per the amd spec.
|
||||
"mocha": false, // adds all of the Mocha testing global variables.
|
||||
"jasmine": false, // adds all of the Jasmine testing global variables for version 1.3 and 2.0.
|
||||
"phantomjs": false, // phantomjs global variables.
|
||||
"jquery": true, // jquery global variables.
|
||||
"prototypejs": false, // prototypejs global variables.
|
||||
"shelljs": false, // shelljs global variables.
|
||||
"es6": true
|
||||
},
|
||||
|
||||
"globals": {
|
||||
// e.g. "angular": true
|
||||
},
|
||||
|
||||
"plugins": ["react", "import", "jquery"],
|
||||
|
||||
"parser": "@babel/eslint-parser",
|
||||
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 6,
|
||||
"sourceType": "module",
|
||||
"ecmaFeatures": {
|
||||
"jsx": true,
|
||||
"experimentalObjectRestSpread": true
|
||||
}
|
||||
},
|
||||
|
||||
"rules": {
|
||||
////////// Possible Errors //////////
|
||||
|
||||
"no-comma-dangle": 0, // disallow trailing commas in object literals
|
||||
"no-cond-assign": 0, // disallow assignment in conditional expressions
|
||||
"no-console": 0, // disallow use of console (off by default in the node environment)
|
||||
"no-constant-condition": 0, // disallow use of constant expressions in conditions
|
||||
"no-control-regex": 0, // disallow control characters in regular expressions
|
||||
"no-debugger": 0, // disallow use of debugger
|
||||
"no-dupe-keys": 0, // disallow duplicate keys when creating object literals
|
||||
"no-empty": 0, // disallow empty statements
|
||||
"no-empty-class": 0, // disallow the use of empty character classes in regular expressions
|
||||
"no-ex-assign": 0, // disallow assigning to the exception in a catch block
|
||||
"no-extra-boolean-cast": 0, // disallow double-negation boolean casts in a boolean context
|
||||
"no-extra-parens": 0, // disallow unnecessary parentheses (off by default)
|
||||
"no-extra-semi": 0, // disallow unnecessary semicolons
|
||||
"no-func-assign": 0, // disallow overwriting functions written as function declarations
|
||||
"no-inner-declarations": 0, // disallow function or variable declarations in nested blocks
|
||||
"no-invalid-regexp": 0, // disallow invalid regular expression strings in the RegExp constructor
|
||||
"no-irregular-whitespace": 0, // disallow irregular whitespace outside of strings and comments
|
||||
"no-negated-in-lhs": 0, // disallow negation of the left operand of an in expression
|
||||
"no-obj-calls": 0, // disallow the use of object properties of the global object (Math and JSON) as functions
|
||||
"no-regex-spaces": 0, // disallow multiple spaces in a regular expression literal
|
||||
"no-reserved-keys": 0, // disallow reserved words being used as object literal keys (off by default)
|
||||
"no-sparse-arrays": 0, // disallow sparse arrays
|
||||
"no-unreachable": 0, // disallow unreachable statements after a return, throw, continue, or break statement
|
||||
"use-isnan": 0, // disallow comparisons with the value NaN
|
||||
"valid-jsdoc": 0, // Ensure JSDoc comments are valid (off by default)
|
||||
"valid-typeof": 0, // Ensure that the results of typeof are compared against a valid string
|
||||
|
||||
////////// Best Practices //////////
|
||||
|
||||
"block-scoped-var": 0, // treat var statements as if they were block scoped (off by default)
|
||||
"complexity": 0, // specify the maximum cyclomatic complexity allowed in a program (off by default)
|
||||
"consistent-return": 0, // require return statements to either always or never specify values
|
||||
"curly": 0, // specify curly brace conventions for all control statements
|
||||
"default-case": 0, // require default case in switch statements (off by default)
|
||||
"dot-notation": 0, // encourages use of dot notation whenever possible
|
||||
"eqeqeq": 0, // require the use of === and !==
|
||||
"guard-for-in": 0, // make sure for-in loops have an if statement (off by default)
|
||||
"no-alert": 0, // disallow the use of alert, confirm, and prompt
|
||||
"no-caller": 0, // disallow use of arguments.caller or arguments.callee
|
||||
"no-div-regex": 0, // disallow division operators explicitly at beginning of regular expression (off by default)
|
||||
"no-else-return": 0, // disallow else after a return in an if (off by default)
|
||||
"no-empty-label": 0, // disallow use of labels for anything other then loops and switches
|
||||
"no-eq-null": 0, // disallow comparisons to null without a type-checking operator (off by default)
|
||||
"no-eval": 0, // disallow use of eval()
|
||||
"no-extend-native": 0, // disallow adding to native types
|
||||
"no-extra-bind": 0, // disallow unnecessary function binding
|
||||
"no-fallthrough": 0, // disallow fallthrough of case statements
|
||||
"no-floating-decimal": 0, // disallow the use of leading or trailing decimal points in numeric literals (off by default)
|
||||
"no-implied-eval": 0, // disallow use of eval()-like methods
|
||||
"no-iterator": 0, // disallow usage of __iterator__ property
|
||||
"no-labels": 0, // disallow use of labeled statements
|
||||
"no-lone-blocks": 0, // disallow unnecessary nested blocks
|
||||
"no-loop-func": 0, // disallow creation of functions within loops
|
||||
"no-multi-spaces": 0, // disallow use of multiple spaces
|
||||
"no-multi-str": 0, // disallow use of multiline strings
|
||||
"no-native-reassign": 0, // disallow reassignments of native objects
|
||||
"no-new": 0, // disallow use of new operator when not part of the assignment or comparison
|
||||
"no-new-func": 0, // disallow use of new operator for Function object
|
||||
"no-new-wrappers": 0, // disallows creating new instances of String, Number, and Boolean
|
||||
"no-octal": 0, // disallow use of octal literals
|
||||
"no-octal-escape": 0, // disallow use of octal escape sequences in string literals, such as var foo = "Copyright \251";
|
||||
"no-process-env": 0, // disallow use of process.env (off by default)
|
||||
"no-proto": 0, // disallow usage of __proto__ property
|
||||
"no-redeclare": 0, // disallow declaring the same variable more then once
|
||||
"no-return-assign": 0, // disallow use of assignment in return statement
|
||||
"no-script-url": 0, // disallow use of javascript: urls.
|
||||
"no-self-compare": 0, // disallow comparisons where both sides are exactly the same (off by default)
|
||||
"no-sequences": 0, // disallow use of comma operator
|
||||
"no-unused-expressions": 0, // disallow usage of expressions in statement position
|
||||
"no-void": 0, // disallow use of void operator (off by default)
|
||||
"no-warning-comments": 0, // disallow usage of configurable warning terms in comments, e.g. TODO or FIXME (off by default)
|
||||
"no-with": 0, // disallow use of the with statement
|
||||
"radix": 0, // require use of the second argument for parseInt() (off by default)
|
||||
"vars-on-top": 0, // requires to declare all vars on top of their containing scope (off by default)
|
||||
"wrap-iife": 0, // require immediate function invocation to be wrapped in parentheses (off by default)
|
||||
"yoda": 0, // require or disallow Yoda conditions
|
||||
|
||||
////////// Strict Mode //////////
|
||||
|
||||
"global-strict": 0, // (deprecated) require or disallow the "use strict" pragma in the global scope (off by default in the node environment)
|
||||
"no-extra-strict": 0, // (deprecated) disallow unnecessary use of "use strict"; when already in strict mode
|
||||
"strict": 0, // controls location of Use Strict Directives
|
||||
|
||||
////////// Variables //////////
|
||||
|
||||
"no-catch-shadow": 0, // disallow the catch clause parameter name being the same as a variable in the outer scope (off by default in the node environment)
|
||||
"no-delete-var": 0, // disallow deletion of variables
|
||||
"no-label-var": 0, // disallow labels that share a name with a variable
|
||||
"no-shadow": 0, // disallow declaration of variables already declared in the outer scope
|
||||
"no-shadow-restricted-names": 0, // disallow shadowing of names such as arguments
|
||||
"no-undef": 0, // disallow use of undeclared variables unless mentioned in a /*global */ block
|
||||
"no-undef-init": 0, // disallow use of undefined when initializing variables
|
||||
"no-undefined": 0, // disallow use of undefined variable (off by default)
|
||||
"no-unused-vars": 0, // disallow declaration of variables that are not used in the code
|
||||
"no-use-before-define": 0, // disallow use of variables before they are defined
|
||||
|
||||
////////// Node.js //////////
|
||||
|
||||
"handle-callback-err": 0, // enforces error handling in callbacks (off by default) (on by default in the node environment)
|
||||
"no-mixed-requires": 0, // disallow mixing regular variable and require declarations (off by default) (on by default in the node environment)
|
||||
"no-new-require": 0, // disallow use of new operator with the require function (off by default) (on by default in the node environment)
|
||||
"no-path-concat": 0, // disallow string concatenation with __dirname and __filename (off by default) (on by default in the node environment)
|
||||
"no-process-exit": 0, // disallow process.exit() (on by default in the node environment)
|
||||
"no-restricted-modules": 0, // restrict usage of specified node modules (off by default)
|
||||
"no-sync": 0, // disallow use of synchronous methods (off by default)
|
||||
|
||||
////////// Stylistic Issues //////////
|
||||
|
||||
"brace-style": 0, // enforce one true brace style (off by default)
|
||||
"camelcase": 0, // require camel case names
|
||||
"comma-spacing": 0, // enforce spacing before and after comma
|
||||
"comma-style": 0, // enforce one true comma style (off by default)
|
||||
"consistent-this": 0, // enforces consistent naming when capturing the current execution context (off by default)
|
||||
"eol-last": 0, // enforce newline at the end of file, with no multiple empty lines
|
||||
"func-names": 0, // require function expressions to have a name (off by default)
|
||||
"func-style": 0, // enforces use of function declarations or expressions (off by default)
|
||||
"key-spacing": 0, // enforces spacing between keys and values in object literal properties
|
||||
"max-nested-callbacks": 0, // specify the maximum depth callbacks can be nested (off by default)
|
||||
"new-cap": 0, // require a capital letter for constructors
|
||||
"new-parens": 0, // disallow the omission of parentheses when invoking a constructor with no arguments
|
||||
"no-array-constructor": 0, // disallow use of the Array constructor
|
||||
"no-inline-comments": 0, // disallow comments inline after code (off by default)
|
||||
"no-lonely-if": 0, // disallow if as the only statement in an else block (off by default)
|
||||
"no-mixed-spaces-and-tabs": 0, // disallow mixed spaces and tabs for indentation
|
||||
"no-multiple-empty-lines": 0, // disallow multiple empty lines (off by default)
|
||||
"no-nested-ternary": 0, // disallow nested ternary expressions (off by default)
|
||||
"no-new-object": 0, // disallow use of the Object constructor
|
||||
"no-space-before-semi": 0, // disallow space before semicolon
|
||||
"no-spaced-func": 0, // disallow space between function identifier and application
|
||||
"no-ternary": 0, // disallow the use of ternary operators (off by default)
|
||||
"no-trailing-spaces": 0, // disallow trailing whitespace at the end of lines
|
||||
"no-underscore-dangle": 0, // disallow dangling underscores in identifiers
|
||||
"no-wrap-func": 0, // disallow wrapping of non-IIFE statements in parens
|
||||
"one-var": 0, // allow just one var statement per function (off by default)
|
||||
"operator-assignment": 0, // require assignment operator shorthand where possible or prohibit it entirely (off by default)
|
||||
"padded-blocks": 0, // enforce padding within blocks (off by default)
|
||||
"quote-props": 0, // require quotes around object literal property names (off by default)
|
||||
"quotes": 0, // specify whether double or single quotes should be used
|
||||
"semi": 0, // require or disallow use of semicolons instead of ASI
|
||||
"sort-vars": 0, // sort variables within the same declaration block (off by default)
|
||||
"space-after-function-name": 0, // require a space after function names (off by default)
|
||||
"space-after-keywords": 0, // require a space after certain keywords (off by default)
|
||||
"space-before-blocks": 0, // require or disallow space before blocks (off by default)
|
||||
"space-in-brackets": 0, // require or disallow spaces inside brackets (off by default)
|
||||
"space-in-parens": 0, // require or disallow spaces inside parentheses (off by default)
|
||||
"space-infix-ops": 0, // require spaces around operators
|
||||
"space-return-throw-case": 0, // require a space after return, throw, and case
|
||||
"space-unary-ops": 0, // Require or disallow spaces before/after unary operators (words on by default, nonwords off by default)
|
||||
"spaced-line-comment": 0, // require or disallow a space immediately following the // in a line comment (off by default)
|
||||
"wrap-regex": 0, // require regex literals to be wrapped in parentheses (off by default)
|
||||
|
||||
////////// ECMAScript 6 //////////
|
||||
|
||||
"no-var": 0, // require let or const instead of var (off by default)
|
||||
"generator-star": 0, // enforce the position of the * in generator functions (off by default)
|
||||
|
||||
////////// Legacy //////////
|
||||
|
||||
"max-depth": 0, // specify the maximum depth that blocks can be nested (off by default)
|
||||
"max-len": 0, // specify the maximum length of a line in your program (off by default)
|
||||
"max-params": 0, // limits the number of parameters that can be used in the function declaration. (off by default)
|
||||
"max-statements": 0, // specify the maximum number of statement allowed in a function (off by default)
|
||||
"no-bitwise": 0, // disallow use of bitwise operators (off by default)
|
||||
"no-plusplus": 0, // disallow use of unary operators, ++ and -- (off by default)
|
||||
|
||||
//////// Extra //////////
|
||||
"array-bracket-spacing": ["error", "never"],
|
||||
"array-callback-return": "error",
|
||||
"arrow-parens": ["error", "always"],
|
||||
"arrow-spacing": ["error", { "before": true, "after": true }],
|
||||
"comma-dangle": ["error", "always-multiline"],
|
||||
"indent": ["error", 2, { "SwitchCase": 1 }],
|
||||
"no-case-declarations": "error",
|
||||
"no-confusing-arrow": "error",
|
||||
"no-duplicate-imports": "error",
|
||||
"no-param-reassign": "error",
|
||||
"no-useless-escape": "error",
|
||||
"object-curly-spacing": ["error", "always"],
|
||||
"object-shorthand": ["error", "properties"],
|
||||
"prefer-arrow-callback": "error",
|
||||
"prefer-const": "error",
|
||||
"prefer-template": "error",
|
||||
"react/jsx-closing-bracket-location": "error",
|
||||
"react/jsx-curly-spacing": [
|
||||
"error",
|
||||
"never",
|
||||
{ "allowMultiline": true }
|
||||
],
|
||||
"react/jsx-filename-extension": [
|
||||
"error",
|
||||
{ "extensions": [".react.js", ".js", ".jsx"] }
|
||||
],
|
||||
"react/jsx-no-duplicate-props": "error",
|
||||
"react/jsx-no-bind": [
|
||||
"error",
|
||||
{
|
||||
"ignoreRefs": true,
|
||||
"allowArrowFunctions": true,
|
||||
"allowBind": false
|
||||
}
|
||||
],
|
||||
"react/jsx-no-undef": "error",
|
||||
"react/jsx-pascal-case": "error",
|
||||
"react/jsx-tag-spacing": [
|
||||
"error",
|
||||
{
|
||||
"closingSlash": "never",
|
||||
"beforeSelfClosing": "always",
|
||||
"afterOpening": "never"
|
||||
}
|
||||
],
|
||||
"react/jsx-uses-react": "error",
|
||||
"react/jsx-uses-vars": "error",
|
||||
"react/no-danger": "error",
|
||||
"react/no-deprecated": "error",
|
||||
"react/no-did-mount-set-state": "error",
|
||||
"react/no-did-update-set-state": "error",
|
||||
"react/no-direct-mutation-state": "error",
|
||||
"react/no-is-mounted": "error",
|
||||
"react/no-multi-comp": "error",
|
||||
"react/prefer-es6-class": "error",
|
||||
"react/prop-types": "error",
|
||||
"react/require-render-return": "error",
|
||||
"react/self-closing-comp": "error",
|
||||
"react/sort-comp": "error",
|
||||
"import/no-mutable-exports": "error",
|
||||
"import/imports-first": "warn"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node",
|
||||
"target": "ES2020",
|
||||
"jsx": "react",
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"**/node_modules/*"
|
||||
]
|
||||
}
|
413
package.json
|
@ -1,182 +1,235 @@
|
|||
{
|
||||
"name": "ss-webpack-boilerplate",
|
||||
"version": "2.0.2",
|
||||
"description": "Lets you create SilverStripe faster",
|
||||
"author": "Tony Air <tony@twma.pro>",
|
||||
"license": "MIT",
|
||||
"private": false,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/a2nt/silverstripe-webpack"
|
||||
},
|
||||
"engines": {
|
||||
"yarn": ">= 1.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "cross-env NODE_ENV=development webpack-dev-server --https -d --config webpack.config.dev.js",
|
||||
"dash": "cross-env NODE_ENV=development webpack-dashboard -- webpack-dev-server --config webpack.config.dev.js",
|
||||
"prebuild": "rimraf app/client/dist",
|
||||
"build": "cross-env NODE_ENV=production webpack -p --config webpack.config.prod.js --progress",
|
||||
"lint:check": "eslint ./app/client/src --config .eslintrc && sass-lint ./app/client/src --config .sasslintrc -v -q",
|
||||
"lint:fix": "eslint ./app/client/src --config .eslintrc --fix && sass-lint ./app/client/src --config .sasslintrc -v -q --fix",
|
||||
"lint:js": "eslint ./app/client/src --config .eslintrc",
|
||||
"lint:sass": "sass-lint ./app/client/src --config .sasslintrc -v -q",
|
||||
"prunecaches": "rimraf ./node_modules/.cache/",
|
||||
"postinstall": "npm run prunecaches",
|
||||
"postuninstall": "npm run prunecaches",
|
||||
"preinstall": "npx only-allow pnpm"
|
||||
},
|
||||
"browserslist": [
|
||||
"defaults",
|
||||
"ie>=11"
|
||||
],
|
||||
"dependencies": {
|
||||
"@a2nt/meta-lightbox": "^2.3.9",
|
||||
"@a2nt/ss-bootstrap-ui-webpack-boilerplate": "^2.5.6",
|
||||
"aos": "^2.3.4",
|
||||
"bootbox": "^5.4.0",
|
||||
"bootstrap": "^4.5.2",
|
||||
"bootstrap-confirmation2": "^4.1.0",
|
||||
"bootstrap-datepicker": "^1.9.0",
|
||||
"bootstrap-offcanvas": "^1.0.0",
|
||||
"bootstrap-table": "^1.17.1",
|
||||
"bootstrap-timepicker": "^0.5.2",
|
||||
"font-awesome": "^4.7.0",
|
||||
"hammerjs": "^2.0.8",
|
||||
"inputmask": "^5.0.5",
|
||||
"jquery": "^3.5.1",
|
||||
"jquery-hammerjs": "^2.0.0",
|
||||
"jquery-hoverintent": "*",
|
||||
"jquery-zoom": "^1.7.21",
|
||||
"jquery.appear": "^1.0.1",
|
||||
"jquery.instagramFeed": "github:jsanahuja/jquery.instagramFeed",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"lodash.throttle": "^4.1.1",
|
||||
"mapbox-gl": "^1.12.0",
|
||||
"material-design-color": "^2.3.2",
|
||||
"moment": "^2.28.0",
|
||||
"offcanvas-bootstrap": "^2.5.2",
|
||||
"popper.js": "*",
|
||||
"select2": "^4.0.13",
|
||||
"setimmediate": "^1.0.5",
|
||||
"smooth-scroll": "^16.1.3",
|
||||
"sticky-sidebar": "^3.3.1",
|
||||
"tablednd": "^1.0.4",
|
||||
"yarn": "^1.22.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@a2nt/image-sprite-webpack-plugin": "^0.2.5",
|
||||
"@babel/core": "^7.11.6",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.11.0",
|
||||
"@babel/plugin-transform-react-jsx": "^7.10.4",
|
||||
"@babel/preset-env": "^7.11.5",
|
||||
"@google/markerclusterer": "^2.0.8",
|
||||
"animate.css": "^4.1.1",
|
||||
"ansi-html": "^0.0.7",
|
||||
"ansi-regex": "^5.0.0",
|
||||
"autoprefixer": "^9.8.6",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-loader": "^8.1.0",
|
||||
"copy-webpack-plugin": "^6.1.0",
|
||||
"croppie": "^2.6.5",
|
||||
"cross-env": "^7.0.2",
|
||||
"css-loader": "^4.3.0",
|
||||
"eslint": "^7.9.0",
|
||||
"eslint-plugin-import": "^2.22.0",
|
||||
"eslint-plugin-jquery": "^1.5.1",
|
||||
"eslint-plugin-react": "^7.20.6",
|
||||
"exif-js": "^2.3.0",
|
||||
"exports-loader": "^1.1.0",
|
||||
"fast-levenshtein": "^3.0.0",
|
||||
"fastest-levenshtein": "^1.0.12",
|
||||
"favicons-webpack-plugin": "^4.2.0",
|
||||
"file-loader": "^6.1.0",
|
||||
"font-awesome": "^4.7.0",
|
||||
"hard-source-webpack-plugin": "^0.13.1",
|
||||
"hoist-non-react-statics": "^3.3.2",
|
||||
"html-entities": "^1.3.1",
|
||||
"html-webpack-plugin": "^4.4.1",
|
||||
"imagemin-gifsicle": "^7.0.0",
|
||||
"imagemin-jpegtran": "^7.0.0",
|
||||
"imagemin-optipng": "^8.0.0",
|
||||
"imagemin-svgo": "^8.0.0",
|
||||
"imagemin-webp": "^6.0.0",
|
||||
"imagemin-webpack": "^5.1.1",
|
||||
"img-optimize-loader": "^1.0.7",
|
||||
"loglevel": "^1.7.0",
|
||||
"mini-css-extract-plugin": "^0.11.2",
|
||||
"node-sass": "^4.14.1",
|
||||
"object-assign": "^4.1.1",
|
||||
"optimize-css-assets-webpack-plugin": "^5.0.4",
|
||||
"postcss-loader": "^4.0.2",
|
||||
"prop-types": "^15.7.2",
|
||||
"react": "^16.13.1",
|
||||
"react-dom": "^16.13.1",
|
||||
"react-hot-loader": "^4.12.21",
|
||||
"react-is": "^16.13.1",
|
||||
"react-lifecycles-compat": "^3.0.4",
|
||||
"resolve-url-loader": "^3.1.1",
|
||||
"rimraf": "^3.0.2",
|
||||
"routie": "0.0.1",
|
||||
"sass-lint": "^1.13.1",
|
||||
"sass-lint-fix": "^1.12.1",
|
||||
"sass-loader": "^10.0.2",
|
||||
"scheduler": "^0.19.1",
|
||||
"script-ext-html-webpack-plugin": "^2.1.4",
|
||||
"shallowequal": "^1.1.0",
|
||||
"sockjs-client": "^1.5.0",
|
||||
"strip-ansi": "^6.0.0",
|
||||
"style-loader": "^1.2.1",
|
||||
"svg-url-loader": "^6.0.0",
|
||||
"terser-webpack-plugin": "^4.2.1",
|
||||
"url-loader": "^4.1.0",
|
||||
"webpack": "^4.44.1",
|
||||
"webpack-cli": "^3.3.12",
|
||||
"webpack-dev-server": "^3.11.0",
|
||||
"webpack-manifest-plugin": "^2.2.0",
|
||||
"webpack-merge": "^5.1.4"
|
||||
},
|
||||
"stylelint": {
|
||||
"rules": {
|
||||
"block-no-empty": null,
|
||||
"color-no-invalid-hex": true,
|
||||
"comment-empty-line-before": [
|
||||
"always",
|
||||
{
|
||||
"ignore": [
|
||||
"stylelint-commands",
|
||||
"after-comment"
|
||||
]
|
||||
}
|
||||
],
|
||||
"declaration-colon-space-after": "always",
|
||||
"indentation": [
|
||||
4,
|
||||
{
|
||||
"except": [
|
||||
"value"
|
||||
]
|
||||
}
|
||||
],
|
||||
"max-empty-lines": 2,
|
||||
"rule-empty-line-before": [
|
||||
"always",
|
||||
{
|
||||
"except": [
|
||||
"first-nested"
|
||||
],
|
||||
"ignore": [
|
||||
"after-comment"
|
||||
]
|
||||
}
|
||||
],
|
||||
"unit-whitelist": [
|
||||
"em",
|
||||
"rem",
|
||||
"%",
|
||||
"s",
|
||||
"px"
|
||||
]
|
||||
}
|
||||
}
|
||||
"name": "ss-webpack-boilerplate",
|
||||
"version": "5.0.0",
|
||||
"description": "Lets you create SilverStripe faster",
|
||||
"author": "Tony Air <tony@twma.pro>",
|
||||
"license": "MIT",
|
||||
"private": false,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/a2nt/silverstripe-webpack"
|
||||
},
|
||||
"engines": {
|
||||
"yarn": ">= 1.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "cross-env NODE_ENV=development webpack-dev-server --config webpack.config.serve.js",
|
||||
"dash": "cross-env NODE_ENV=development webpack-dashboard -- webpack-dev-server --config webpack.config.serve.js",
|
||||
"prebuild": "yarn lint:fix && yarn lint:check && rimraf ./app/client/dist",
|
||||
"build": "cross-env NODE_ENV=production webpack --progress --stats-all",
|
||||
"lint:fix": "eslint './app/client/src/**/*.js' -c eslint.config.json --fix",
|
||||
"lint:js": "eslint './app/client/src/**/*.js' -c eslint.config.json",
|
||||
"lint:scss": "sass-lint ./app/client/src/**/*.scss -c sass-lint.yml -v",
|
||||
"lint:check": "yarn lint:js && yarn lint:scss",
|
||||
"prunecaches": "rimraf ./node_modules/.cache/",
|
||||
"postinstall": "npm run prunecaches",
|
||||
"postuninstall": "npm run prunecaches",
|
||||
"preinstall": "npx only-allow pnpm"
|
||||
},
|
||||
"resolutions": {
|
||||
"colors": "1.4.0"
|
||||
},
|
||||
"browserslist": [
|
||||
"defaults",
|
||||
"ie>=11"
|
||||
],
|
||||
"dependencies": {
|
||||
"@a2nt/meta-lightbox-js": "^4.2.8",
|
||||
"@a2nt/mithril-ui": "^1.1.7",
|
||||
"@a2nt/ss-bootstrap-ui-webpack-boilerplate-react": "^5.3.9",
|
||||
"@angular/common": "^17.3.6",
|
||||
"@angular/core": "^17.3.6",
|
||||
"@apollo/client": "^3.10.1",
|
||||
"@glidejs/glide": "^3.6.0",
|
||||
"@popperjs/core": "^2.11.8",
|
||||
"@turf/clone": "^6.5.0",
|
||||
"@turf/clusters-dbscan": "^6.5.0",
|
||||
"@turf/clusters-kmeans": "^6.5.0",
|
||||
"@turf/distance": "^6.5.0",
|
||||
"@turf/helpers": "^6.5.0",
|
||||
"@turf/invariant": "^6.5.0",
|
||||
"@turf/meta": "^6.5.0",
|
||||
"aos": "^2.3.4",
|
||||
"apollo3-cache-persist": "^0.15.0",
|
||||
"balanced-match": "^3.0.1",
|
||||
"bootbox": "^6.0.0",
|
||||
"bootstrap": "^5.3.3",
|
||||
"brace-expansion": "^4.0.0",
|
||||
"charming": "^3.0.2",
|
||||
"density-clustering": "^1.3.0",
|
||||
"eslint-scope": "^8.0.1",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"font-awesome": "^4.7.0",
|
||||
"graphql": "^16.8.1",
|
||||
"hammerjs": "^2.0.8",
|
||||
"inputmask": "^5.0.8",
|
||||
"kdbush": "^4.0.2",
|
||||
"keyboardjs": "^2.7.0",
|
||||
"localforage": "^1.10.0",
|
||||
"localforage-cordovasqlitedriver": "^1.8.0",
|
||||
"lodash.debounce": "^4.0.8",
|
||||
"lodash.throttle": "^4.1.1",
|
||||
"mapbox-gl": "^3.3.0",
|
||||
"material-design-color": "^2.3.2",
|
||||
"minimatch": "^9.0.4",
|
||||
"mithril": "^2.2.2",
|
||||
"moment": "^2.30.1",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-easy-swipe": "^0.0.23",
|
||||
"react-tiny-oembed": "^1.1.0",
|
||||
"redaxios": "^0.5.1",
|
||||
"rxjs": "^7.8.1",
|
||||
"select2": "^4.0.13",
|
||||
"setimmediate": "^1.0.5",
|
||||
"skmeans": "^0.11.3",
|
||||
"supercluster": "^8.0.1",
|
||||
"vanilla-calendar": "^1.0.30",
|
||||
"vanillajs-datepicker": "^1.3.4",
|
||||
"youtube-embed": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@a2nt/image-sprite-webpack-plugin": "^0.2.5",
|
||||
"@babel/core": "^7.24.5",
|
||||
"@babel/eslint-parser": "^7.24.5",
|
||||
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
||||
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
|
||||
"@babel/plugin-syntax-jsx": "^7.24.1",
|
||||
"@babel/plugin-syntax-top-level-await": "^7.14.5",
|
||||
"@babel/plugin-transform-react-jsx": "^7.23.4",
|
||||
"@babel/plugin-transform-runtime": "^7.24.3",
|
||||
"@babel/plugin-transform-typescript": "^7.24.5",
|
||||
"@babel/preset-env": "^7.24.5",
|
||||
"@babel/preset-react": "^7.24.1",
|
||||
"@babel/runtime": "^7.24.5",
|
||||
"@googlemaps/markerclusterer": "^2.5.3",
|
||||
"@sucrase/webpack-loader": "^2.0.0",
|
||||
"@ungap/global-this": "^0.4.4",
|
||||
"@wry/context": "^0.7.4",
|
||||
"@wry/equality": "^0.5.7",
|
||||
"@wry/trie": "^0.5.0",
|
||||
"animate.css": "^4.1.1",
|
||||
"ansi-html": "^0.0.9",
|
||||
"ansi-html-community": "^0.0.8",
|
||||
"ansi-regex": "^6.0.1",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"babel-loader": "^9.1.3",
|
||||
"classnames": "^2.5.1",
|
||||
"copy-webpack-plugin": "^12.0.2",
|
||||
"croppie": "^2.6.5",
|
||||
"cross-env": "^7.0.3",
|
||||
"css-loader": "^7.1.1",
|
||||
"css-minimizer-webpack-plugin": "^6.0.0",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint-plugin-jquery": "^1.5.1",
|
||||
"eslint-plugin-react": "^7.34.1",
|
||||
"events": "^3.3.0",
|
||||
"exif-js": "^2.3.0",
|
||||
"exports-loader": "^5.0.0",
|
||||
"fast-equals": "^5.0.1",
|
||||
"fast-json-stable-stringify": "^2.1.0",
|
||||
"fast-levenshtein": "^3.0.0",
|
||||
"fastest-levenshtein": "^1.0.16",
|
||||
"favicons": "^7.2.0",
|
||||
"favicons-webpack-plugin": "^6.0.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"graphql-tag": "^2.12.6",
|
||||
"hoist-non-react-statics": "^3.3.2",
|
||||
"html-dom-parser": "^5.0.8",
|
||||
"html-entities": "^2.5.2",
|
||||
"html-loader": "^5.0.0",
|
||||
"html-react-parser": "^5.1.10",
|
||||
"html-webpack-plugin": "^5.6.0",
|
||||
"img-optimize-loader": "^1.0.7",
|
||||
"js-yaml": "^4.1.0",
|
||||
"loglevel": "^1.9.1",
|
||||
"mini-css-extract-plugin": "^2.9.0",
|
||||
"msw": "^2.2.14",
|
||||
"node-fetch": "^3.3.2",
|
||||
"object-assign": "^4.1.1",
|
||||
"optimism": "^0.17.5",
|
||||
"optimize-css-assets-webpack-plugin": "^6.0.1",
|
||||
"postcss-loader": "^8.1.1",
|
||||
"prop-types": "^15.8.1",
|
||||
"punycode": "^2.3.1",
|
||||
"querystring": "^0.2.1",
|
||||
"raw-loader": "^4.0.2",
|
||||
"react-hot-loader": "^4.13.1",
|
||||
"react-is": "^18.3.1",
|
||||
"react-lifecycles-compat": "^3.0.4",
|
||||
"regenerator-runtime": "^0.14.1",
|
||||
"resolve-url-loader": "^5.0.0",
|
||||
"rimraf": "^5.0.5",
|
||||
"routie": "0.0.1",
|
||||
"sass": "^1.75.0",
|
||||
"sass-lint": "^1.13.1",
|
||||
"sass-lint-auto-fix": "^0.21.2",
|
||||
"sass-lint-fix": "^1.12.1",
|
||||
"sass-loader": "^14.2.1",
|
||||
"scheduler": "^0.23.2",
|
||||
"shallowequal": "^1.1.0",
|
||||
"strip-ansi": "^7.1.0",
|
||||
"style-loader": "^4.0.0",
|
||||
"sucrase": "^3.35.0",
|
||||
"svg-url-loader": "^8.0.0",
|
||||
"symbol-observable": "^4.0.0",
|
||||
"terser-webpack-plugin": "^5.3.10",
|
||||
"ts-invariant": "^0.10.3",
|
||||
"tslib": "^2.6.2",
|
||||
"url": "^0.11.3",
|
||||
"url-loader": "^4.1.1",
|
||||
"webpack": "^5.91.0",
|
||||
"webpack-build-notifications": "^0.3.2",
|
||||
"webpack-bundle-analyzer": "^4.10.2",
|
||||
"webpack-cli": "^5.1.4",
|
||||
"webpack-dev-server": "^5.0.4",
|
||||
"webpack-manifest-plugin": "^5.0.0",
|
||||
"webpack-merge": "^5.10.0",
|
||||
"yarn": "^1.22.22",
|
||||
"zen-observable": "^0.10.0"
|
||||
},
|
||||
"stylelint": {
|
||||
"rules": {
|
||||
"block-no-empty": null,
|
||||
"color-no-invalid-hex": true,
|
||||
"comment-empty-line-before": [
|
||||
"always",
|
||||
{
|
||||
"ignore": [
|
||||
"stylelint-commands",
|
||||
"after-comment"
|
||||
]
|
||||
}
|
||||
],
|
||||
"declaration-colon-space-after": "always",
|
||||
"indentation": [
|
||||
4,
|
||||
{
|
||||
"except": [
|
||||
"value"
|
||||
]
|
||||
}
|
||||
],
|
||||
"max-empty-lines": 2,
|
||||
"rule-empty-line-before": [
|
||||
"always",
|
||||
{
|
||||
"except": [
|
||||
"first-nested"
|
||||
],
|
||||
"ignore": [
|
||||
"after-comment"
|
||||
]
|
||||
}
|
||||
],
|
||||
"unit-whitelist": [
|
||||
"em",
|
||||
"rem",
|
||||
"%",
|
||||
"s",
|
||||
"px"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,154 @@
|
|||
<?xml version="1.0"?>
|
||||
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHP_CodeSniffer" xsi:noNamespaceSchemaLocation="phpcs.xsd">
|
||||
<description>The coding standard for PHP_CodeSniffer itself.</description>
|
||||
|
||||
<file>autoload.php</file>
|
||||
<file>bin</file>
|
||||
<file>scripts</file>
|
||||
<file>src</file>
|
||||
<file>tests</file>
|
||||
|
||||
<exclude-pattern>*/src/Standards/*/Tests/*\.(inc|css|js)$</exclude-pattern>
|
||||
<exclude-pattern>*/tests/Core/*/*\.(inc|css|js)$</exclude-pattern>
|
||||
|
||||
<arg name="basepath" value="."/>
|
||||
<arg name="colors"/>
|
||||
<arg name="parallel" value="75"/>
|
||||
<arg value="np"/>
|
||||
|
||||
<!-- Don't hide tokenizer exceptions -->
|
||||
<rule ref="Internal.Tokenizer.Exception">
|
||||
<type>error</type>
|
||||
</rule>
|
||||
|
||||
<!-- Include the whole PEAR standard -->
|
||||
<rule ref="PEAR">
|
||||
<exclude name="PEAR.NamingConventions.ValidFunctionName"/>
|
||||
<exclude name="PEAR.NamingConventions.ValidVariableName"/>
|
||||
<exclude name="PEAR.Commenting.ClassComment"/>
|
||||
<exclude name="PEAR.Commenting.FileComment.MissingCategoryTag"/>
|
||||
<exclude name="PEAR.Commenting.FileComment.MissingPackageTag"/>
|
||||
<exclude name="PEAR.Commenting.FileComment.MissingLinkTag"/>
|
||||
<exclude name="PEAR.Commenting.FileComment.MissingVersion"/>
|
||||
<exclude name="PEAR.Commenting.InlineComment"/>
|
||||
</rule>
|
||||
|
||||
<!-- Include some sniffs from other standards that don't conflict with PEAR -->
|
||||
<rule ref="Squiz.Arrays.ArrayBracketSpacing"/>
|
||||
<rule ref="Squiz.Arrays.ArrayDeclaration"/>
|
||||
<rule ref="Squiz.Commenting.ClosingDeclarationComment"/>
|
||||
<rule ref="Squiz.ControlStructures.ControlSignature"/>
|
||||
<rule ref="Squiz.ControlStructures.ElseIfDeclaration"/>
|
||||
<rule ref="Squiz.Commenting.BlockComment"/>
|
||||
<rule ref="Squiz.Commenting.DocCommentAlignment"/>
|
||||
<rule ref="Squiz.Commenting.EmptyCatchComment"/>
|
||||
<rule ref="Squiz.Commenting.InlineComment"/>
|
||||
<rule ref="Squiz.Commenting.LongConditionClosingComment"/>
|
||||
<rule ref="Squiz.Commenting.PostStatementComment"/>
|
||||
<rule ref="Squiz.Commenting.VariableComment"/>
|
||||
<rule ref="Squiz.Formatting.OperatorBracket"/>
|
||||
<rule ref="Squiz.Functions.FunctionDeclarationArgumentSpacing"/>
|
||||
<rule ref="Squiz.Operators.ComparisonOperatorUsage"/>
|
||||
<rule ref="Squiz.PHP.DisallowInlineIf"/>
|
||||
<rule ref="Squiz.Scope.MethodScope"/>
|
||||
<rule ref="Squiz.Strings.ConcatenationSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.ControlStructureSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.FunctionClosingBraceSpace"/>
|
||||
<rule ref="Squiz.WhiteSpace.FunctionSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.MemberVarSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.OperatorSpacing"/>
|
||||
<rule ref="Squiz.WhiteSpace.SuperfluousWhitespace"/>
|
||||
<rule ref="Generic.Arrays.DisallowLongArraySyntax"/>
|
||||
<rule ref="Generic.Commenting.Todo"/>
|
||||
<rule ref="Generic.ControlStructures.DisallowYodaConditions"/>
|
||||
<rule ref="Generic.ControlStructures.InlineControlStructure"/>
|
||||
<rule ref="Generic.Formatting.DisallowMultipleStatements"/>
|
||||
<rule ref="Generic.Formatting.SpaceAfterCast"/>
|
||||
<rule ref="Generic.NamingConventions.ConstructorName"/>
|
||||
<rule ref="Generic.PHP.DeprecatedFunctions"/>
|
||||
<rule ref="Generic.PHP.LowerCaseKeyword"/>
|
||||
<rule ref="Generic.Strings.UnnecessaryStringConcat"/>
|
||||
<rule ref="Generic.WhiteSpace.IncrementDecrementSpacing"/>
|
||||
<rule ref="PSR2.Classes.PropertyDeclaration"/>
|
||||
<rule ref="PSR2.Methods.MethodDeclaration"/>
|
||||
<rule ref="PSR2.Files.EndFileNewline"/>
|
||||
<rule ref="PSR12.Files.OpenTag"/>
|
||||
<rule ref="Zend.Files.ClosingTag"/>
|
||||
|
||||
<!-- PEAR uses warnings for inline control structures, so switch back to errors -->
|
||||
<rule ref="Generic.ControlStructures.InlineControlStructure">
|
||||
<properties>
|
||||
<property name="error" value="true"/>
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
<!-- We use custom indent rules for arrays -->
|
||||
<rule ref="Generic.Arrays.ArrayIndent"/>
|
||||
<rule ref="Squiz.Arrays.ArrayDeclaration.KeyNotAligned">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Squiz.Arrays.ArrayDeclaration.ValueNotAligned">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Squiz.Arrays.ArrayDeclaration.CloseBraceNotAligned">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
<rule ref="Squiz.Arrays.ArrayDeclaration.CloseBraceNewLine">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<!-- Check var names, but we don't want leading underscores for private vars -->
|
||||
<rule ref="Squiz.NamingConventions.ValidVariableName"/>
|
||||
<rule ref="Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore">
|
||||
<severity>0</severity>
|
||||
</rule>
|
||||
|
||||
<!-- Only one argument per line in multi-line function calls -->
|
||||
<rule ref="PEAR.Functions.FunctionCallSignature">
|
||||
<properties>
|
||||
<property name="allowMultipleArguments" value="false"/>
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
<!-- Have 12 chars padding maximum and always show as errors -->
|
||||
<rule ref="Generic.Formatting.MultipleStatementAlignment">
|
||||
<properties>
|
||||
<property name="maxPadding" value="12"/>
|
||||
<property name="error" value="true"/>
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
<!-- Ban some functions -->
|
||||
<rule ref="Generic.PHP.ForbiddenFunctions">
|
||||
<properties>
|
||||
<property name="forbiddenFunctions" type="array">
|
||||
<element key="sizeof" value="count"/>
|
||||
<element key="delete" value="unset"/>
|
||||
<element key="print" value="echo"/>
|
||||
<element key="is_null" value="null"/>
|
||||
<element key="create_function" value="null"/>
|
||||
</property>
|
||||
</properties>
|
||||
</rule>
|
||||
|
||||
<!-- Private methods MUST not be prefixed with an underscore -->
|
||||
<rule ref="PSR2.Methods.MethodDeclaration.Underscore">
|
||||
<type>error</type>
|
||||
</rule>
|
||||
|
||||
<!-- Private properties MUST not be prefixed with an underscore -->
|
||||
<rule ref="PSR2.Classes.PropertyDeclaration.Underscore">
|
||||
<type>error</type>
|
||||
</rule>
|
||||
|
||||
<!-- The testing bootstrap file uses string concats to stop IDEs seeing the class aliases -->
|
||||
<rule ref="Generic.Strings.UnnecessaryStringConcat">
|
||||
<exclude-pattern>tests/bootstrap\.php</exclude-pattern>
|
||||
</rule>
|
||||
|
||||
<!-- This test file specifically *needs* Windows line endings for testing purposes. -->
|
||||
<rule ref="Generic.Files.LineEndings.InvalidEOLChar">
|
||||
<exclude-pattern>tests/Core/Tokenizer/StableCommentWhitespaceWinTest\.php</exclude-pattern>
|
||||
</rule>
|
||||
|
||||
</ruleset>
|
|
@ -1,12 +1,19 @@
|
|||
# Redirect to HTTPS
|
||||
#RewriteEngine On
|
||||
#RewriteCond %{HTTPS} off
|
||||
#RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
|
||||
RewriteEngine On
|
||||
|
||||
# Redirect to no-WWW
|
||||
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
|
||||
RewriteRule ^(.*)$ http://%1%{REQUEST_URI} [R=301,QSA,NC,L]
|
||||
|
||||
# Redirect to WWW
|
||||
#RewriteCond %{HTTP_HOST} !^www\. [NC]
|
||||
#RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
|
||||
|
||||
# Redirect to HTTPS
|
||||
RewriteCond %{HTTP:X-Forwarded-Proto} =http [OR]
|
||||
RewriteCond %{HTTPS} off [OR]
|
||||
RewriteCond %{SERVER_PORT} 80 [NC]
|
||||
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
|
||||
|
||||
# SPDY protocol
|
||||
#Header add Alternate-Protocol "443:npn-spdy/3"
|
||||
|
||||
|
@ -17,7 +24,7 @@
|
|||
# Header set Set-Cookie HttpOnly;Secure
|
||||
|
||||
# Submit domain to https://hstspreload.org/
|
||||
#Header add Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
|
||||
Header add Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
|
||||
|
||||
# XSS-protection
|
||||
#Header add X-Frame-Options "SAMEORIGIN"
|
||||
|
|
|
@ -1,12 +1,19 @@
|
|||
# Redirect to HTTPS
|
||||
#RewriteEngine On
|
||||
#RewriteCond %{HTTPS} off
|
||||
#RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
|
||||
RewriteEngine On
|
||||
|
||||
# Redirect to no-WWW
|
||||
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
|
||||
RewriteRule ^(.*)$ http://%1%{REQUEST_URI} [R=301,QSA,NC,L]
|
||||
|
||||
# Redirect to WWW
|
||||
#RewriteCond %{HTTP_HOST} !^www\. [NC]
|
||||
#RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
|
||||
|
||||
# Redirect to HTTPS
|
||||
RewriteCond %{HTTP:X-Forwarded-Proto} =http
|
||||
RewriteCond %{HTTPS} off
|
||||
#RewriteCond %{SERVER_PORT} 80
|
||||
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
|
||||
|
||||
# SPDY protocol
|
||||
#Header add Alternate-Protocol "443:npn-spdy/3"
|
||||
|
||||
|
@ -17,7 +24,7 @@
|
|||
# Header set Set-Cookie HttpOnly;Secure
|
||||
|
||||
# Submit domain to https://hstspreload.org/
|
||||
#Header add Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
|
||||
Header add Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
|
||||
|
||||
# XSS-protection
|
||||
#Header add X-Frame-Options "SAMEORIGIN"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
use SilverStripe\Control\HTTPApplication;
|
||||
use SilverStripe\Control\HTTPRequestBuilder;
|
||||
use SilverStripe\Core\CoreKernel;
|
||||
use SilverStripe\Core\Startup\ErrorControlChainMiddleware;
|
||||
|
||||
// Find autoload.php
|
||||
if (file_exists(__DIR__ . '/../vendor/autoload.php')) {
|
||||
|
@ -22,6 +21,5 @@ $request = HTTPRequestBuilder::createFromEnvironment();
|
|||
// Default application
|
||||
$kernel = new CoreKernel(BASE_PATH);
|
||||
$app = new HTTPApplication($kernel);
|
||||
$app->addMiddleware(new ErrorControlChainMiddleware($app));
|
||||
$response = $app->handle($request);
|
||||
$response->output();
|
||||
|
|
|
@ -0,0 +1,171 @@
|
|||
# sass-lint config to match the AirBNB style guide
|
||||
files:
|
||||
include: "app/client/src/**/*.scss"
|
||||
ignore:
|
||||
- "app/client/src/thirdparty/*"
|
||||
options:
|
||||
formatter: stylish
|
||||
merge-default-rules: false
|
||||
rules:
|
||||
# Warnings
|
||||
# Things that require actual refactoring are marked as warnings
|
||||
class-name-format:
|
||||
- 1
|
||||
- convention: hyphenatedbem
|
||||
placeholder-name-format:
|
||||
- 1
|
||||
- convention: hyphenatedlowercase
|
||||
nesting-depth:
|
||||
- 1
|
||||
- max-depth: 3
|
||||
no-ids: 0
|
||||
no-important: 0
|
||||
no-misspelled-properties:
|
||||
- 1
|
||||
- extra-properties:
|
||||
- "-moz-border-radius-topleft"
|
||||
- "-moz-border-radius-topright"
|
||||
- "-moz-border-radius-bottomleft"
|
||||
- "-moz-border-radius-bottomright"
|
||||
variable-name-format:
|
||||
- 1
|
||||
- allow-leading-underscore: true
|
||||
convention: hyphenatedlowercase
|
||||
no-extends: 1
|
||||
|
||||
# Warnings: these things are preferential rather than mandatory
|
||||
no-css-comments: 1
|
||||
|
||||
# Errors
|
||||
# Things that can be easily fixed are marked as errors
|
||||
indentation:
|
||||
- 2
|
||||
- size: 4
|
||||
final-newline: false
|
||||
no-trailing-whitespace: 2
|
||||
border-zero:
|
||||
- 2
|
||||
- convention: "0"
|
||||
brace-style:
|
||||
- 2
|
||||
- allow-single-line: true
|
||||
clean-import-paths:
|
||||
- 2
|
||||
- filename-extension: false
|
||||
- leading-underscore: true
|
||||
no-debug: 2
|
||||
no-empty-rulesets: 0
|
||||
no-invalid-hex: 2
|
||||
no-mergeable-selectors: 2
|
||||
# no-qualifying-elements:
|
||||
# - 1
|
||||
# - allow-element-with-attribute: false
|
||||
# allow-element-with-class: false
|
||||
# allow-element-with-id: false
|
||||
no-trailing-zero: 2
|
||||
no-url-protocols: 2
|
||||
quotes:
|
||||
- 2
|
||||
- style: double
|
||||
space-after-bang:
|
||||
- 2
|
||||
- include: false
|
||||
space-after-colon:
|
||||
- 2
|
||||
- include: true
|
||||
space-after-comma:
|
||||
- 2
|
||||
- include: true
|
||||
space-before-bang:
|
||||
- 2
|
||||
- include: true
|
||||
space-before-brace:
|
||||
- 2
|
||||
- include: true
|
||||
space-before-colon: 2
|
||||
space-between-parens:
|
||||
- 2
|
||||
- include: false
|
||||
trailing-semicolon: 2
|
||||
url-quotes: 2
|
||||
zero-unit: 2
|
||||
single-line-per-selector: 2
|
||||
one-declaration-per-line: 2
|
||||
empty-line-between-blocks:
|
||||
- 2
|
||||
- ignore-single-line-rulesets: true
|
||||
# Missing rules
|
||||
# There are no sass-lint rules for the following AirBNB style items, but thess
|
||||
# - Put comments on their own line
|
||||
# - Put property delcarations before mixins
|
||||
# Disabled rules
|
||||
# These are other rules that we may wish to consider using in the future
|
||||
# They are not part of the AirBNB CSS standard but they would introduce some strictness
|
||||
# bem-depth: 0
|
||||
# variable-for-property: 0
|
||||
# no-transition-all: 0
|
||||
# hex-length:
|
||||
# - 1
|
||||
# - style: short
|
||||
# hex-notation:
|
||||
# - 1
|
||||
# - style: lowercase
|
||||
# property-units:
|
||||
# - 1
|
||||
# - global:
|
||||
# - ch
|
||||
# - em
|
||||
# - ex
|
||||
# - rem
|
||||
# - cm
|
||||
# - in
|
||||
# - mm
|
||||
# - pc
|
||||
# - pt
|
||||
# - px
|
||||
# - q
|
||||
# - vh
|
||||
# - vw
|
||||
# - vmin
|
||||
# - vmax
|
||||
# - deg
|
||||
# - grad
|
||||
# - rad
|
||||
# - turn
|
||||
# - ms
|
||||
# - s
|
||||
# - Hz
|
||||
# - kHz
|
||||
# - dpi
|
||||
# - dpcm
|
||||
# - dppx
|
||||
# - '%'
|
||||
# per-property: {}
|
||||
# force-attribute-nesting: 1
|
||||
# force-element-nesting: 1
|
||||
# force-pseudo-nesting: 1
|
||||
# function-name-format:
|
||||
# - 1
|
||||
# - allow-leading-underscore: true
|
||||
# convention: hyphenatedlowercase
|
||||
# no-color-literals: 1
|
||||
# no-duplicate-properties: 1
|
||||
# mixin-name-format:
|
||||
# - 1
|
||||
# - allow-leading-underscore: true
|
||||
# convention: hyphenatedlowercase
|
||||
# shorthand-values:
|
||||
# - 1
|
||||
# - allowed-shorthands:
|
||||
# - 1
|
||||
# - 2
|
||||
# - 3
|
||||
# leading-zero:
|
||||
# - 1
|
||||
# - include: false
|
||||
# no-vendor-prefixes:
|
||||
# - 1
|
||||
# - additional-identifiers: []
|
||||
# excluded-identifiers: []
|
||||
# placeholder-in-extend: 1
|
||||
# no-color-keywords: 2
|
2
test.php
|
@ -11,5 +11,5 @@ require_once('app/src/Tests/TestServer.php');
|
|||
|
||||
$req = new \SilverStripe\Control\NullHTTPRequest();
|
||||
|
||||
$t = new \Site\Tests\TestServer();
|
||||
$t = new \A2nt\CMSNiceties\Tests\TestServer();
|
||||
$t->run($req);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<% include MetaHead %>
|
||||
</head>
|
||||
|
||||
<body oncontextmenu="return false;"<% with $SiteConfig %> data-default-lng="$Longitude" data-default-lat="$Latitude"<% end_with %>>
|
||||
<body <% with $SiteConfig %> data-default-lng="$Longitude" data-default-lat="$Latitude"<% end_with %>>
|
||||
<% include First %>
|
||||
|
||||
<div class="wrapper">
|
||||
|
|
|
@ -2,176 +2,196 @@
|
|||
* Common Environment
|
||||
*/
|
||||
|
||||
const webpack = require('webpack');
|
||||
const commonVariables = require('./webpack.configuration');
|
||||
const conf = commonVariables.configuration;
|
||||
const INDEX_NAME = 'app';
|
||||
const YML_PATH = '/app/_config/webpack.yml';
|
||||
const CONF_VAR = 'A2nt\\CMSNiceties\\Templates\\WebpackTemplateProvider';
|
||||
|
||||
const HardSourceWebpackPlugin = require('hard-source-webpack-plugin');
|
||||
const path = require('path');
|
||||
const filesystem = require('fs');
|
||||
const fs = require('fs');
|
||||
const yaml = require('js-yaml');
|
||||
const webpack = require('webpack');
|
||||
|
||||
/*
|
||||
* Load webpack configuration from webpack.yml
|
||||
*/
|
||||
|
||||
const yml = yaml.load(
|
||||
fs.readFileSync(path.join(__dirname, YML_PATH), 'utf8'),
|
||||
);
|
||||
const conf = yml[CONF_VAR];
|
||||
|
||||
let themes = [];
|
||||
// add themes
|
||||
if (conf.THEMESDIR) {
|
||||
const themeDir = conf.THEMESDIR;
|
||||
const dir = path.resolve(__dirname, themeDir);
|
||||
|
||||
if (fs.existsSync(dir)) {
|
||||
fs.readdirSync(dir).forEach((file) => {
|
||||
filePath = path.join(themeDir, file);
|
||||
const stat = fs.statSync(filePath);
|
||||
|
||||
if (stat && stat.isDirectory()) {
|
||||
themes.push(filePath);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/* Setup Entries */
|
||||
const includes = {};
|
||||
const modules = [
|
||||
path.resolve(__dirname, conf.APPDIR, 'client', 'src'),
|
||||
path.resolve(__dirname, conf.APPDIR, 'client', 'src', 'js'),
|
||||
path.resolve(__dirname, conf.APPDIR, 'client', 'src', 'scss'),
|
||||
path.resolve(__dirname, conf.APPDIR, 'client', 'src', 'img'),
|
||||
path.resolve(__dirname, conf.APPDIR, 'client', 'src', 'thirdparty'),
|
||||
path.resolve(__dirname, conf.APPDIR, 'client', 'node_modules'),
|
||||
path.resolve(__dirname, 'node_modules'),
|
||||
path.resolve(__dirname),
|
||||
path.resolve(__dirname, 'public'),
|
||||
path.resolve(__dirname, conf.APPDIR, conf.SRC),
|
||||
path.resolve(__dirname, conf.APPDIR, conf.SRC, 'js'),
|
||||
path.resolve(__dirname, conf.APPDIR, conf.SRC, 'scss'),
|
||||
path.resolve(__dirname, conf.APPDIR, conf.SRC, 'img'),
|
||||
path.resolve(__dirname, conf.APPDIR, conf.SRC, 'thirdparty'),
|
||||
path.resolve(__dirname, 'node_modules'),
|
||||
path.resolve(__dirname),
|
||||
path.resolve(__dirname, 'public'),
|
||||
];
|
||||
|
||||
const _addAppFiles = (theme) => {
|
||||
const dirPath = path.resolve(__dirname, theme);
|
||||
const themeName = path.basename(theme);
|
||||
const dirPath = './' + theme;
|
||||
let themeName = path.basename(theme);
|
||||
if (themeName == '.') {
|
||||
themeName = 'app';
|
||||
}
|
||||
|
||||
if (filesystem.existsSync(path.join(dirPath, conf.SRC, 'js', 'app.js'))) {
|
||||
includes[`${themeName}`] = path.join(dirPath, conf.SRC, 'js', 'app.js');
|
||||
} else if (
|
||||
filesystem.existsSync(path.join(dirPath, conf.SRC, 'scss', 'app.scss'))
|
||||
) {
|
||||
includes[`${themeName}`] = path.join(
|
||||
dirPath,
|
||||
conf.SRC,
|
||||
'scss',
|
||||
'app.scss',
|
||||
);
|
||||
}
|
||||
if (fs.existsSync(path.join(dirPath, conf.SRC, 'js', INDEX_NAME + '.js'))) {
|
||||
includes[`${themeName}`] = path.join(dirPath, conf.SRC, 'js', INDEX_NAME + '.js');
|
||||
} else if (
|
||||
fs.existsSync(path.join(dirPath, conf.SRC, 'scss', INDEX_NAME + '.scss'))
|
||||
) {
|
||||
includes[`${themeName}`] = path.join(
|
||||
dirPath,
|
||||
conf.SRC,
|
||||
'scss',
|
||||
INDEX_NAME + '.scss',
|
||||
);
|
||||
}
|
||||
|
||||
modules.push(path.join(dirPath, 'client', 'src', 'js'));
|
||||
modules.push(path.join(dirPath, 'client', 'src', 'scss'));
|
||||
modules.push(path.join(dirPath, 'client', 'src', 'img'));
|
||||
modules.push(path.join(dirPath, 'client', 'src', 'thirdparty'));
|
||||
modules.push(path.join(dirPath, conf.SRC, 'js'));
|
||||
modules.push(path.join(dirPath, conf.SRC, 'scss'));
|
||||
modules.push(path.join(dirPath, conf.SRC, 'img'));
|
||||
modules.push(path.join(dirPath, conf.SRC, 'thirdparty'));
|
||||
|
||||
const _getAllFilesFromFolder = function (dir, includeSubFolders = true) {
|
||||
const dirPath = path.resolve(__dirname, dir);
|
||||
let results = [];
|
||||
const _getAllFilesFromFolder = function (dir, includeSubFolders = true) {
|
||||
const dirPath = path.resolve(__dirname, dir);
|
||||
let results = [];
|
||||
|
||||
filesystem.readdirSync(dirPath).forEach((file) => {
|
||||
if (file.charAt(0) === '_') {
|
||||
return;
|
||||
}
|
||||
fs.readdirSync(dirPath).forEach((file) => {
|
||||
if (file.charAt(0) === '_') {
|
||||
return;
|
||||
}
|
||||
|
||||
const filePath = path.join(dirPath, file);
|
||||
const stat = filesystem.statSync(filePath);
|
||||
const filePath = path.join(dirPath, file);
|
||||
const stat = fs.statSync(filePath);
|
||||
|
||||
if (stat && stat.isDirectory() && includeSubFolders) {
|
||||
results = results.concat(
|
||||
_getAllFilesFromFolder(filePath, includeSubFolders),
|
||||
);
|
||||
} else {
|
||||
results.push(filePath);
|
||||
}
|
||||
});
|
||||
if (stat && stat.isDirectory() && includeSubFolders) {
|
||||
results = results.concat(
|
||||
_getAllFilesFromFolder(filePath, includeSubFolders),
|
||||
);
|
||||
} else {
|
||||
results.push(filePath);
|
||||
}
|
||||
});
|
||||
|
||||
return results;
|
||||
};
|
||||
return results;
|
||||
};
|
||||
|
||||
// add page specific scripts
|
||||
const typesJSPath = path.join(theme, conf.TYPESJS);
|
||||
if (filesystem.existsSync(typesJSPath)) {
|
||||
const pageScripts = _getAllFilesFromFolder(typesJSPath, true);
|
||||
pageScripts.forEach((file) => {
|
||||
includes[`${themeName}_${path.basename(file, '.js')}`] = file;
|
||||
});
|
||||
}
|
||||
// add page specific scripts
|
||||
const typesJSPath = path.join(theme, conf.TYPESJS);
|
||||
if (fs.existsSync(typesJSPath)) {
|
||||
const pageScripts = _getAllFilesFromFolder(typesJSPath, true);
|
||||
pageScripts.forEach((file) => {
|
||||
includes[`${themeName}_${path.basename(file, '.js')}`] = file;
|
||||
});
|
||||
}
|
||||
|
||||
// add page specific scss
|
||||
const typesSCSSPath = path.join(theme, conf.TYPESSCSS);
|
||||
if (filesystem.existsSync(typesSCSSPath)) {
|
||||
const scssIncludes = _getAllFilesFromFolder(typesSCSSPath, true);
|
||||
scssIncludes.forEach((file) => {
|
||||
includes[`${themeName}_${path.basename(file, '.scss')}`] = file;
|
||||
});
|
||||
}
|
||||
};
|
||||
// add page specific scss
|
||||
const typesSCSSPath = path.join(theme, conf.TYPESSCSS);
|
||||
if (fs.existsSync(typesSCSSPath)) {
|
||||
const scssIncludes = _getAllFilesFromFolder(typesSCSSPath, true);
|
||||
scssIncludes.forEach((file) => {
|
||||
includes[`${themeName}_${path.basename(file, '.scss')}`] = file;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
_addAppFiles(conf.APPDIR);
|
||||
|
||||
// add themes
|
||||
commonVariables.themes.forEach((theme) => {
|
||||
_addAppFiles(theme);
|
||||
});
|
||||
themes.forEach((theme) => {
|
||||
_addAppFiles(theme);
|
||||
});
|
||||
|
||||
const UIInfo = require('./node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/package.json');
|
||||
const UINAME = JSON.stringify(UIInfo.name);
|
||||
const UIVERSION = JSON.stringify(UIInfo.version);
|
||||
const UIMetaInfo = require('./node_modules/@a2nt/meta-lightbox-js/package.json');
|
||||
|
||||
const NODE_ENV = conf.NODE_ENV || process.env.NODE_ENV;
|
||||
const COMPRESS = NODE_ENV === 'production' ? true : false;
|
||||
|
||||
const IP = process.env.IP || conf.HOSTNAME;
|
||||
const PORT = process.env.PORT || conf.PORT;
|
||||
|
||||
console.log('NODE_ENV: ' + NODE_ENV);
|
||||
console.log('COMPRESS: ' + COMPRESS);
|
||||
console.log('WebP images: ' + conf['webp']);
|
||||
console.log('GRAPHQL_API_KEY: ' + conf['GRAPHQL_API_KEY']);
|
||||
|
||||
const JSVARS = {
|
||||
NODE_ENV: JSON.stringify(NODE_ENV),
|
||||
UINAME: UINAME,
|
||||
UIVERSION: UIVERSION,
|
||||
UIAUTHOR: JSON.stringify(UIInfo.author),
|
||||
UIMetaNAME: JSON.stringify(UIMetaInfo.name),
|
||||
UIMetaVersion: JSON.stringify(UIMetaInfo.version),
|
||||
GRAPHQL_API_KEY: JSON.stringify(conf['GRAPHQL_API_KEY']),
|
||||
SWVERSION: JSON.stringify(`sw-${new Date().getTime()}`),
|
||||
BASE_HREF: JSON.stringify(''),
|
||||
};
|
||||
|
||||
const provides = {};
|
||||
const externals = {};
|
||||
const aliases = {};
|
||||
|
||||
if (!conf['JQUERY']) {
|
||||
/*provides['react'] = 'React';
|
||||
provides['react-dom'] = 'ReactDOM';
|
||||
externals['react'] = 'React';
|
||||
externals['react-dom'] = 'ReactDOM';*/
|
||||
} else {
|
||||
provides['$'] = 'jquery';
|
||||
provides['jQuery'] = 'jquery';
|
||||
externals['jquery'] = 'jQuery';
|
||||
|
||||
aliases['window.jQuery'] = require.resolve('jquery');
|
||||
aliases['$'] = require.resolve('jquery');
|
||||
aliases['jquery'] = require.resolve('jquery');
|
||||
aliases['jQuery'] = require.resolve('jquery');
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
entry: includes,
|
||||
devtool: 'source-map',
|
||||
externals: {
|
||||
jquery: 'jQuery',
|
||||
},
|
||||
optimization: {
|
||||
namedModules: true, // NamedModulesPlugin()
|
||||
splitChunks: {
|
||||
// CommonsChunkPlugin()
|
||||
name: 'vendor',
|
||||
minChunks: 2,
|
||||
},
|
||||
noEmitOnErrors: true, // NoEmitOnErrorsPlugin
|
||||
concatenateModules: true, //ModuleConcatenationPlugin
|
||||
},
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.jsx?$/,
|
||||
//exclude: /node_modules/,
|
||||
use: {
|
||||
loader: 'babel-loader',
|
||||
options: {
|
||||
presets: ['@babel/preset-env'], //Preset used for env setup
|
||||
plugins: [
|
||||
['@babel/transform-react-jsx'],
|
||||
['react-hot-loader/babel'],
|
||||
],
|
||||
cacheDirectory: true,
|
||||
cacheCompression: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
/*{
|
||||
test: /\.tsx?$/,
|
||||
use: 'ts-loader',
|
||||
exclude: /node_modules/,
|
||||
},
|
||||
{
|
||||
test: /\.coffee?$/,
|
||||
use: 'coffee-loader',
|
||||
},*/
|
||||
{
|
||||
test: /\.worker\.js$/,
|
||||
use: {
|
||||
loader: 'worker-loader',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
resolve: {
|
||||
modules: modules,
|
||||
alias: {
|
||||
jquery: require.resolve('jquery'),
|
||||
jQuery: require.resolve('jquery'),
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
new webpack.ProvidePlugin({
|
||||
$: 'jquery',
|
||||
jQuery: 'jquery',
|
||||
'window.jQuery': 'jquery',
|
||||
Popper: ['popper.js', 'default'],
|
||||
Util: 'exports-loader?Util!bootstrap/js/dist/util',
|
||||
Alert: 'exports-loader?Alert!bootstrap/js/dist/alert',
|
||||
Button: 'exports-loader?Button!bootstrap/js/dist/button',
|
||||
Carousel: 'exports-loader?Carousel!bootstrap/js/dist/carousel',
|
||||
Collapse: 'exports-loader?Collapse!bootstrap/js/dist/collapse',
|
||||
Dropdown: 'exports-loader?Dropdown!bootstrap/js/dist/dropdown',
|
||||
Modal: 'exports-loader?Modal!bootstrap/js/dist/modal',
|
||||
Tooltip: 'exports-loader?Tooltip!bootstrap/js/dist/tooltip',
|
||||
Popover: 'exports-loader?Popover!bootstrap/js/dist/popover',
|
||||
Scrollspy: 'exports-loader?Scrollspy!bootstrap/js/dist/scrollspy',
|
||||
Tab: 'exports-loader?Tab!bootstrap/js/dist/tab',
|
||||
}),
|
||||
new HardSourceWebpackPlugin(),
|
||||
],
|
||||
};
|
||||
PROVIDES: provides,
|
||||
JSVARS: JSVARS,
|
||||
configuration: conf,
|
||||
themes: themes,
|
||||
webpack: {
|
||||
entry: includes,
|
||||
externals: externals,
|
||||
resolve: {
|
||||
modules: modules,
|
||||
extensions: ['.tsx', '.ts', '.js'],
|
||||
alias: aliases,
|
||||
fallback: {
|
||||
path: false,
|
||||
},
|
||||
},
|
||||
experiments: {
|
||||
topLevelAwait: true,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -1,128 +0,0 @@
|
|||
/*
|
||||
* Development assets generation
|
||||
*/
|
||||
|
||||
const path = require('path');
|
||||
//const autoprefixer = require('autoprefixer');
|
||||
const webpack = require('webpack');
|
||||
const { merge } = require('webpack-merge');
|
||||
const common = require('./webpack.config.common.js');
|
||||
const commonVariables = require('./webpack.configuration');
|
||||
const conf = commonVariables.configuration;
|
||||
|
||||
const IP = process.env.IP || conf.HOSTNAME;
|
||||
const PORT = process.env.PORT || conf.PORT;
|
||||
|
||||
const UIInfo = require('./node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/package.json');
|
||||
const UIMetaInfo = require('./node_modules/@a2nt/meta-lightbox/package.json');
|
||||
|
||||
const config = merge(common, {
|
||||
mode: 'development',
|
||||
|
||||
entry: {
|
||||
hot: [
|
||||
'react-hot-loader/patch',
|
||||
'webpack-dev-server/client?https://' + conf.HOSTNAME + ':' + conf.PORT,
|
||||
'webpack/hot/only-dev-server',
|
||||
],
|
||||
},
|
||||
|
||||
output: {
|
||||
path: path.join(__dirname),
|
||||
filename: '[name].js',
|
||||
// necessary for HMR to know where to load the hot update chunks
|
||||
publicPath: 'https://' + conf.HOSTNAME + ':' + conf.PORT + '/',
|
||||
},
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.s?css$/,
|
||||
use: [
|
||||
{
|
||||
loader: 'style-loader',
|
||||
options: {},
|
||||
},
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
sourceMap: true,
|
||||
},
|
||||
},
|
||||
/*{
|
||||
loader: 'postcss-loader',
|
||||
options: {
|
||||
sourceMap: true,
|
||||
//plugins: [autoprefixer()],
|
||||
},
|
||||
},*/
|
||||
{
|
||||
loader: 'resolve-url-loader',
|
||||
},
|
||||
{
|
||||
loader: 'sass-loader',
|
||||
options: {
|
||||
sourceMap: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /fontawesome([^.]+).(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
|
||||
use: [
|
||||
{
|
||||
loader: 'url-loader',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.(gif|png|jpg|jpeg|ttf|otf|eot|svg|webp|woff(2)?)$/,
|
||||
use: [
|
||||
{
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
name(file) {
|
||||
return 'public/[path][name].[ext]';
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
plugins: [
|
||||
new webpack.HotModuleReplacementPlugin(),
|
||||
new webpack.DefinePlugin({
|
||||
UINAME: JSON.stringify(UIInfo.name),
|
||||
UIVERSION: JSON.stringify(UIInfo.version),
|
||||
UIAUTHOR: JSON.stringify(UIInfo.author),
|
||||
UIMetaNAME: JSON.stringify(UIMetaInfo.name),
|
||||
UIMetaVersion: JSON.stringify(UIMetaInfo.version),
|
||||
}),
|
||||
],
|
||||
|
||||
devServer: {
|
||||
host: IP,
|
||||
port: PORT,
|
||||
historyApiFallback: true,
|
||||
hot: true,
|
||||
clientLogLevel: 'info',
|
||||
disableHostCheck: true,
|
||||
contentBase: [
|
||||
path.resolve(__dirname, 'public'),
|
||||
path.resolve(__dirname, 'public', 'resources'),
|
||||
path.resolve(__dirname, 'public', 'resources', conf.APPDIR, conf.DIST),
|
||||
'node_modules',
|
||||
],
|
||||
//watchContentBase: true,
|
||||
overlay: {
|
||||
warnings: true,
|
||||
errors: true,
|
||||
},
|
||||
headers: {
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = config;
|
|
@ -0,0 +1,358 @@
|
|||
/*
|
||||
* Production assets generation
|
||||
*/
|
||||
const common = require('./webpack.config.common.js');
|
||||
const conf = common.configuration;
|
||||
|
||||
const webpack = require('webpack');
|
||||
const {
|
||||
merge,
|
||||
} = require('webpack-merge');
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
|
||||
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
const CssMinimizerPlugin = require('css-minimizer-webpack-plugin');
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
|
||||
//const ImageSpritePlugin = require('@a2nt/image-sprite-webpack-plugin');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const WebpackBuildNotifications = require('webpack-build-notifications');
|
||||
|
||||
const NODE_ENV = conf.NODE_ENV || process.env.NODE_ENV;
|
||||
const COMPRESS = NODE_ENV === 'production' ? true : false;
|
||||
|
||||
const IP = process.env.IP || conf.HOSTNAME;
|
||||
const PORT = process.env.PORT || conf.PORT;
|
||||
|
||||
const plugins = [
|
||||
new webpack.ProvidePlugin(common['PROVIDES']),
|
||||
new webpack.DefinePlugin(common['JSVARS']),
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
minimize: COMPRESS,
|
||||
debug: !COMPRESS,
|
||||
}),
|
||||
new MiniCssExtractPlugin({
|
||||
experimentalUseImportModule: false,
|
||||
filename: 'css/[name].css',
|
||||
//allChunks: true,
|
||||
}),
|
||||
new WebpackBuildNotifications({
|
||||
title: common['JSVARS']['UINAME'] + ' ' + common['JSVARS']['UIVERSION'],
|
||||
logo: path.join(__dirname, conf.APPDIR, conf.SRC, 'favicon.png'),
|
||||
suppressWarning: true,
|
||||
}),
|
||||
];
|
||||
|
||||
const indexPath = path.join(__dirname, conf.APPDIR, conf.SRC, 'index.html');
|
||||
if (fs.existsSync(indexPath)) {
|
||||
plugins.push(
|
||||
new HtmlWebpackPlugin({
|
||||
publicPath: '',
|
||||
template: path.join(conf.APPDIR, conf.SRC, 'index.html'),
|
||||
templateParameters: {
|
||||
NODE_ENV: NODE_ENV,
|
||||
GRAPHQL_URL: conf['GRAPHQL_URL'],
|
||||
STATIC_URL: conf['STATIC_URL']
|
||||
},
|
||||
xhtml: true,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
const faviconPath = path.join(__dirname, conf.APPDIR, conf.SRC, 'favicon.png');
|
||||
if (fs.existsSync(faviconPath)) {
|
||||
plugins.push(
|
||||
new FaviconsWebpackPlugin({
|
||||
title: 'Webpack App',
|
||||
logo: faviconPath,
|
||||
prefix: '/icons/',
|
||||
emitStats: false,
|
||||
persistentCache: true,
|
||||
inject: false,
|
||||
statsFilename: path.join(
|
||||
conf.APPDIR,
|
||||
conf.DIST,
|
||||
'icons',
|
||||
'iconstats.json',
|
||||
),
|
||||
icons: {
|
||||
android: true,
|
||||
appleIcon: true,
|
||||
appleStartup: true,
|
||||
coast: true,
|
||||
favicons: true,
|
||||
firefox: true,
|
||||
opengraph: true,
|
||||
twitter: true,
|
||||
yandex: true,
|
||||
windows: true,
|
||||
},
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
// add themes favicons
|
||||
common.themes.forEach((theme) => {
|
||||
const faviconPath = path.join(__dirname, theme, conf.SRC, 'favicon.png');
|
||||
if (fs.existsSync(faviconPath)) {
|
||||
plugins.push(
|
||||
new FaviconsWebpackPlugin({
|
||||
title: 'Webpack App',
|
||||
logo: faviconPath,
|
||||
prefix: '/' + theme + '-icons/',
|
||||
emitStats: false,
|
||||
persistentCache: true,
|
||||
inject: false,
|
||||
statsFilename: path.join(
|
||||
conf.APPDIR,
|
||||
conf.DIST,
|
||||
theme + '-icons',
|
||||
'iconstats.json',
|
||||
),
|
||||
icons: {
|
||||
android: true,
|
||||
appleIcon: true,
|
||||
appleStartup: true,
|
||||
coast: true,
|
||||
favicons: true,
|
||||
firefox: true,
|
||||
opengraph: true,
|
||||
twitter: true,
|
||||
yandex: true,
|
||||
windows: true,
|
||||
},
|
||||
}),
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
const minimizers = [];
|
||||
minimizers.push(
|
||||
new TerserPlugin({
|
||||
terserOptions: {
|
||||
module: false,
|
||||
parse: {
|
||||
// we want terser to parse ecma 8 code. However, we don't want it
|
||||
// to apply any minfication steps that turns valid ecma 5 code
|
||||
// into invalid ecma 5 code. This is why the 'compress' and 'output'
|
||||
// sections only apply transformations that are ecma 5 safe
|
||||
// https://github.com/facebook/create-react-app/pull/4234
|
||||
ecma: 8,
|
||||
},
|
||||
compress: {
|
||||
ecma: 6,
|
||||
warnings: false,
|
||||
// Disabled because of an issue with Uglify breaking seemingly valid code:
|
||||
// https://github.com/facebook/create-react-app/issues/2376
|
||||
// Pending further investigation:
|
||||
// https://github.com/mishoo/UglifyJS2/issues/2011
|
||||
comparisons: false,
|
||||
},
|
||||
keep_fnames: true,
|
||||
keep_classnames: true,
|
||||
|
||||
mangle: {
|
||||
safari10: true,
|
||||
keep_fnames: true,
|
||||
keep_classnames: true,
|
||||
reserved: ['$', 'jQuery', 'jquery'],
|
||||
},
|
||||
output: {
|
||||
ecma: 6,
|
||||
comments: false,
|
||||
// Turned on because emoji and regex is not minified properly using default
|
||||
// https://github.com/facebook/create-react-app/issues/2488
|
||||
ascii_only: true,
|
||||
},
|
||||
},
|
||||
// Use multi-process parallel running to improve the build speed
|
||||
// Default number of concurrent runs: os.cpus().length - 1
|
||||
parallel: true,
|
||||
})
|
||||
);
|
||||
|
||||
if (conf['PROCESS_CSS']) {
|
||||
minimizers.push(
|
||||
new CssMinimizerPlugin({
|
||||
parallel: true,
|
||||
minimizerOptions: [{
|
||||
preset: [
|
||||
'default',
|
||||
{
|
||||
discardComments: {
|
||||
removeAll: true,
|
||||
},
|
||||
zindex: true,
|
||||
cssDeclarationSorter: true,
|
||||
reduceIdents: false,
|
||||
mergeIdents: true,
|
||||
mergeRules: true,
|
||||
mergeLonghand: true,
|
||||
discardUnused: true,
|
||||
discardOverridden: true,
|
||||
discardDuplicates: true,
|
||||
},
|
||||
],
|
||||
},],
|
||||
minify: [
|
||||
CssMinimizerPlugin.cssnanoMinify,
|
||||
//CssMinimizerPlugin.cleanCssMinify,
|
||||
],
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
if (COMPRESS) {
|
||||
plugins.push(require('autoprefixer'));
|
||||
|
||||
/*plugins.push(
|
||||
new ImageSpritePlugin({
|
||||
exclude: /exclude|original|default-|icons|sprite|svg|logo|favicon/,
|
||||
commentOrigin: false,
|
||||
compress: COMPRESS,
|
||||
extensions: ['png'],
|
||||
indent: '',
|
||||
log: true,
|
||||
//outputPath: path.join(__dirname, conf.APPDIR, conf.DIST),
|
||||
outputFilename: 'img/sprite-[hash].png',
|
||||
padding: 0,
|
||||
}),
|
||||
);*/
|
||||
}
|
||||
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
|
||||
.BundleAnalyzerPlugin;
|
||||
plugins.push(
|
||||
new BundleAnalyzerPlugin({
|
||||
analyzerMode: 'static',
|
||||
openAnalyzer: false,
|
||||
}),
|
||||
);
|
||||
|
||||
const cfg = merge(common.webpack, {
|
||||
mode: NODE_ENV,
|
||||
cache: {
|
||||
type: 'filesystem',
|
||||
},
|
||||
recordsPath: path.join(__dirname, conf.APPDIR, conf.DIST, 'records.json'),
|
||||
optimization: {
|
||||
//removeAvailableModules: false,
|
||||
//realContentHash: false,
|
||||
splitChunks: {
|
||||
name: 'vendor',
|
||||
minChunks: 2,
|
||||
},
|
||||
concatenateModules: true, //ModuleConcatenationPlugin
|
||||
minimizer: minimizers,
|
||||
},
|
||||
|
||||
output: {
|
||||
publicPath: path.join(conf.APPDIR, conf.DIST) + '/',
|
||||
path: path.join(__dirname, conf.APPDIR, conf.DIST) + '/',
|
||||
filename: path.join('js', '[name].js'),
|
||||
},
|
||||
|
||||
module: {
|
||||
rules: [{
|
||||
test: /\.(js|ts)x?$/,
|
||||
//exclude: /node_modules/,
|
||||
use: {
|
||||
loader: 'babel-loader',//'@sucrase/webpack-loader',
|
||||
options: {
|
||||
"presets": ["@babel/preset-env"],
|
||||
"plugins": [
|
||||
[
|
||||
"@babel/plugin-transform-react-jsx",
|
||||
{
|
||||
"pragma": "m",
|
||||
"pragmaFrag": "'['"
|
||||
}
|
||||
]
|
||||
],
|
||||
cacheDirectory: true,
|
||||
cacheCompression: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.s?css$/,
|
||||
use: [{
|
||||
loader: MiniCssExtractPlugin.loader,
|
||||
options: {
|
||||
publicPath: '../',
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
sourceMap: true,
|
||||
esModule: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: 'sass-loader',
|
||||
options: {
|
||||
sourceMap: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /fontawesome([^.]+).(ttf|otf|eot|woff(2)?)(\?[a-z0-9]+)?$/,
|
||||
type: 'asset/resource',
|
||||
},
|
||||
{
|
||||
test: /\.(ttf|otf|eot|woff(2)?)$/,
|
||||
type: 'asset/resource',
|
||||
}, {
|
||||
test: /\.(png|webp|jpg|jpeg|gif|svg)$/,
|
||||
type: 'javascript/auto',
|
||||
use: [
|
||||
{
|
||||
loader: 'img-optimize-loader',
|
||||
options: {
|
||||
name: '[name].[ext]',
|
||||
outputPath: 'img/',
|
||||
publicPath: '../img/',
|
||||
compress: {
|
||||
// This will take more time and get smaller images.
|
||||
mode: 'low', // 'lossless', 'high', 'low'
|
||||
disableOnDevelopment: true,
|
||||
webp: conf['webp'],
|
||||
// loseless compression for png
|
||||
optipng: {
|
||||
optimizationLevel: 4,
|
||||
},
|
||||
// lossy compression for png. This will generate smaller file than optipng.
|
||||
pngquant: {
|
||||
quality: [0.2, 0.8],
|
||||
},
|
||||
// Compression for svg.
|
||||
svgo: true,
|
||||
// Compression for gif.
|
||||
gifsicle: {
|
||||
optimizationLevel: 3,
|
||||
},
|
||||
// Compression for jpg.
|
||||
mozjpeg: {
|
||||
progressive: true,
|
||||
quality: 60,
|
||||
},
|
||||
},
|
||||
inline: {
|
||||
limit: 1,
|
||||
},
|
||||
},
|
||||
},],
|
||||
},],
|
||||
},
|
||||
|
||||
plugins: plugins,
|
||||
});
|
||||
|
||||
console.log(cfg);
|
||||
module.exports = cfg;
|
|
@ -1,317 +0,0 @@
|
|||
/*
|
||||
* Production assets generation
|
||||
*/
|
||||
|
||||
const webpack = require('webpack');
|
||||
const commonVariables = require('./webpack.configuration');
|
||||
const conf = commonVariables.configuration;
|
||||
const { merge } = require('webpack-merge');
|
||||
const common = require('./webpack.config.common.js');
|
||||
|
||||
const filesystem = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const ExtractTextPlugin = require('mini-css-extract-plugin');
|
||||
const FaviconsWebpackPlugin = require('favicons-webpack-plugin');
|
||||
|
||||
const TerserPlugin = require('terser-webpack-plugin');
|
||||
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
|
||||
//const ImageminPlugin = require('imagemin-webpack');
|
||||
//const ImageSpritePlugin = require('@a2nt/image-sprite-webpack-plugin');
|
||||
|
||||
const COMPRESS = true;
|
||||
|
||||
const UIInfo = require('./node_modules/@a2nt/ss-bootstrap-ui-webpack-boilerplate/package.json');
|
||||
const UIMetaInfo = require('./node_modules/@a2nt/meta-lightbox/package.json');
|
||||
|
||||
console.log('WebP images: ' + conf['webp']);
|
||||
|
||||
let plugins = [
|
||||
new webpack.DefinePlugin({
|
||||
'process.env': {
|
||||
NODE_ENV: JSON.stringify('production'),
|
||||
},
|
||||
UINAME: JSON.stringify(UIInfo.name),
|
||||
UIVERSION: JSON.stringify(UIInfo.version),
|
||||
UIAUTHOR: JSON.stringify(UIInfo.author),
|
||||
UIMetaNAME: JSON.stringify(UIMetaInfo.name),
|
||||
UIMetaVersion: JSON.stringify(UIMetaInfo.version),
|
||||
}),
|
||||
new webpack.LoaderOptionsPlugin({
|
||||
minimize: true,
|
||||
debug: false,
|
||||
}),
|
||||
new ExtractTextPlugin({
|
||||
filename: 'css/[name].css',
|
||||
allChunks: true,
|
||||
}),
|
||||
new OptimizeCssAssetsPlugin({
|
||||
//assetNameRegExp: /\.optimize\.css$/g,
|
||||
cssProcessor: require('cssnano'),
|
||||
cssProcessorPluginOptions: {
|
||||
preset: ['default'],
|
||||
},
|
||||
cssProcessorOptions: {
|
||||
zindex: true,
|
||||
cssDeclarationSorter: true,
|
||||
reduceIdents: false,
|
||||
mergeIdents: true,
|
||||
mergeRules: true,
|
||||
mergeLonghand: true,
|
||||
discardUnused: true,
|
||||
discardOverridden: true,
|
||||
discardDuplicates: true,
|
||||
discardComments: {
|
||||
removeAll: true,
|
||||
},
|
||||
},
|
||||
canPrint: true,
|
||||
}),
|
||||
require('autoprefixer'),
|
||||
/*new ImageminPlugin({
|
||||
bail: false, // Ignore errors on corrupted images
|
||||
cache: true,
|
||||
maxConcurrency: 3,
|
||||
exclude: /original/,
|
||||
filter: (source, sourcePath) => {
|
||||
return source.byteLength < 512000;
|
||||
},
|
||||
imageminOptions: {
|
||||
plugins: [
|
||||
['gifsicle', { interlaced: true }],
|
||||
['jpegtran', { progressive: true }],
|
||||
['optipng', { optimizationLevel: 5 }],
|
||||
[
|
||||
'svgo',
|
||||
{
|
||||
plugins: [
|
||||
{
|
||||
removeViewBox: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
['webp', { quality: 100 }],
|
||||
],
|
||||
},
|
||||
}),*/
|
||||
/*new ImageSpritePlugin({
|
||||
exclude: /exclude|original|default-|icons|sprite/,
|
||||
commentOrigin: false,
|
||||
compress: true,
|
||||
extensions: ['png'],
|
||||
indent: '',
|
||||
log: true,
|
||||
//outputPath: path.join(__dirname, conf.APPDIR, conf.DIST),
|
||||
outputFilename: 'img/sprite-[hash].png',
|
||||
padding: 0,
|
||||
}),*/
|
||||
];
|
||||
|
||||
const faviconPath = path.join(__dirname, conf.APPDIR, conf.SRC, 'favicon.png');
|
||||
if (filesystem.existsSync(faviconPath)) {
|
||||
plugins.push(
|
||||
new FaviconsWebpackPlugin({
|
||||
title: 'Webpack App',
|
||||
logo: faviconPath,
|
||||
prefix: '/icons/',
|
||||
emitStats: false,
|
||||
persistentCache: true,
|
||||
inject: false,
|
||||
statsFilename: path.join(
|
||||
conf.APPDIR,
|
||||
conf.DIST,
|
||||
'icons',
|
||||
'iconstats.json',
|
||||
),
|
||||
icons: {
|
||||
android: true,
|
||||
appleIcon: true,
|
||||
appleStartup: true,
|
||||
coast: true,
|
||||
favicons: true,
|
||||
firefox: true,
|
||||
opengraph: true,
|
||||
twitter: true,
|
||||
yandex: true,
|
||||
windows: true,
|
||||
},
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
// add themes favicons
|
||||
commonVariables.themes.forEach((theme) => {
|
||||
const faviconPath = path.join(__dirname, theme, conf.SRC, 'favicon.png');
|
||||
if (filesystem.existsSync(faviconPath)) {
|
||||
plugins.push(
|
||||
new FaviconsWebpackPlugin({
|
||||
title: 'Webpack App',
|
||||
logo: faviconPath,
|
||||
prefix: '/' + theme + '-icons/',
|
||||
emitStats: false,
|
||||
persistentCache: true,
|
||||
inject: false,
|
||||
statsFilename: path.join(
|
||||
conf.APPDIR,
|
||||
conf.DIST,
|
||||
theme + '-icons',
|
||||
'iconstats.json',
|
||||
),
|
||||
icons: {
|
||||
android: true,
|
||||
appleIcon: true,
|
||||
appleStartup: true,
|
||||
coast: true,
|
||||
favicons: true,
|
||||
firefox: true,
|
||||
opengraph: true,
|
||||
twitter: true,
|
||||
yandex: true,
|
||||
windows: true,
|
||||
},
|
||||
}),
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = merge(common, {
|
||||
mode: 'production',
|
||||
optimization: {
|
||||
removeAvailableModules: false,
|
||||
namedModules: true, // NamedModulesPlugin()
|
||||
splitChunks: {
|
||||
// CommonsChunkPlugin()
|
||||
name: 'vendor',
|
||||
minChunks: 2,
|
||||
},
|
||||
noEmitOnErrors: true, // NoEmitOnErrorsPlugin
|
||||
concatenateModules: true, //ModuleConcatenationPlugin
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
terserOptions: {
|
||||
parse: {
|
||||
// we want terser to parse ecma 8 code. However, we don't want it
|
||||
// to apply any minfication steps that turns valid ecma 5 code
|
||||
// into invalid ecma 5 code. This is why the 'compress' and 'output'
|
||||
// sections only apply transformations that are ecma 5 safe
|
||||
// https://github.com/facebook/create-react-app/pull/4234
|
||||
ecma: 8,
|
||||
},
|
||||
compress: {
|
||||
ecma: 5,
|
||||
warnings: false,
|
||||
// Disabled because of an issue with Uglify breaking seemingly valid code:
|
||||
// https://github.com/facebook/create-react-app/issues/2376
|
||||
// Pending further investigation:
|
||||
// https://github.com/mishoo/UglifyJS2/issues/2011
|
||||
comparisons: false,
|
||||
},
|
||||
mangle: {
|
||||
safari10: true,
|
||||
},
|
||||
output: {
|
||||
ecma: 5,
|
||||
comments: false,
|
||||
// Turned on because emoji and regex is not minified properly using default
|
||||
// https://github.com/facebook/create-react-app/issues/2488
|
||||
ascii_only: true,
|
||||
},
|
||||
},
|
||||
// Use multi-process parallel running to improve the build speed
|
||||
// Default number of concurrent runs: os.cpus().length - 1
|
||||
parallel: true,
|
||||
// Enable file caching
|
||||
cache: true,
|
||||
}),
|
||||
],
|
||||
},
|
||||
|
||||
devtool: '',
|
||||
|
||||
output: {
|
||||
path: path.join(__dirname, conf.APPDIR, conf.DIST),
|
||||
filename: path.join('js', '[name].js'),
|
||||
publicPath: path.join(conf.APPDIR, conf.DIST),
|
||||
},
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.s?css$/,
|
||||
use: [
|
||||
{
|
||||
loader: ExtractTextPlugin.loader,
|
||||
},
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
sourceMap: !COMPRESS,
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: 'postcss-loader',
|
||||
options: {
|
||||
sourceMap: !COMPRESS,
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: 'resolve-url-loader',
|
||||
},
|
||||
{
|
||||
loader: 'sass-loader',
|
||||
options: {
|
||||
sourceMap: !COMPRESS,
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /fontawesome([^.]+).(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
|
||||
use: [
|
||||
{
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
name: '[name].[ext]',
|
||||
outputPath: 'fonts/',
|
||||
publicPath: '../fonts/',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.(ttf|otf|eot|svg|woff(2)?)$/,
|
||||
use: [
|
||||
{
|
||||
loader: 'file-loader',
|
||||
options: {
|
||||
name: '[name].[ext]',
|
||||
outputPath: 'fonts/',
|
||||
publicPath: '../fonts/',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
test: /\.(png|webp|jpg|jpeg|gif|svg)$/,
|
||||
loader: 'img-optimize-loader',
|
||||
options: {
|
||||
name: '[name].[ext]',
|
||||
outputPath: 'img/',
|
||||
publicPath: '../img/',
|
||||
compress: {
|
||||
// This will take more time and get smaller images.
|
||||
mode: 'low', // 'lossless', 'high', 'low'
|
||||
disableOnDevelopment: true,
|
||||
webp: conf['webp'],
|
||||
},
|
||||
inline: {
|
||||
limit: 1,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
plugins: plugins,
|
||||
});
|
|
@ -0,0 +1,141 @@
|
|||
/*
|
||||
* Development assets generation
|
||||
*/
|
||||
const common = require('./webpack.config.common.js');
|
||||
const conf = common.configuration;
|
||||
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
//const autoprefixer = require('autoprefixer');
|
||||
const webpack = require('webpack');
|
||||
const {
|
||||
merge,
|
||||
} = require('webpack-merge');
|
||||
|
||||
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
|
||||
const IP = process.env.IP || conf.HOSTNAME;
|
||||
const PORT = process.env.PORT || conf.PORT;
|
||||
|
||||
const NODE_ENV = 'development'; //conf.NODE_ENV || process.env.NODE_ENV;
|
||||
const COMPRESS = NODE_ENV === 'production' ? true : false;
|
||||
|
||||
const plugins = [
|
||||
new webpack.ProvidePlugin(common['PROVIDES']),
|
||||
new webpack.DefinePlugin(common['JSVARS']),
|
||||
//new webpack.HotModuleReplacementPlugin(),
|
||||
new MiniCssExtractPlugin(),
|
||||
];
|
||||
|
||||
const indexPath = path.join(__dirname, conf.APPDIR, conf.SRC, 'index.html');
|
||||
if (fs.existsSync(indexPath)) {
|
||||
plugins.push(
|
||||
new HtmlWebpackPlugin({
|
||||
publicPath: '',
|
||||
template: path.join(conf.APPDIR, conf.SRC, 'index.html'),
|
||||
templateParameters: {
|
||||
NODE_ENV: NODE_ENV,
|
||||
GRAPHQL_URL: conf['GRAPHQL_URL'],
|
||||
STATIC_URL: conf['STATIC_URL'],
|
||||
REACT_SCRIPTS: NODE_ENV === 'production' ?
|
||||
'<script crossorigin src="https://unpkg.com/react@17/umd/react.production.min.js"></script><script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.production.min.js"></script>' : '<script crossorigin src="https://unpkg.com/react@17/umd/react.development.js"></script><script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>',
|
||||
},
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
const config = merge(common.webpack, {
|
||||
mode: 'development',
|
||||
|
||||
entry: {
|
||||
/*hot: [
|
||||
'react-hot-loader/patch',
|
||||
'webpack-dev-server/?https://' + conf.HOSTNAME + ':' + conf.PORT,
|
||||
'webpack/hot/only-dev-server',
|
||||
],*/
|
||||
},
|
||||
|
||||
output: {
|
||||
path: path.join(__dirname),
|
||||
filename: '[name].js',
|
||||
// necessary for HMR to know where to load the hot update chunks
|
||||
publicPath: `http${conf['HTTPS'] ? 's' : ''}://${conf['HOSTNAME']}:${
|
||||
conf.PORT
|
||||
}/`,
|
||||
},
|
||||
|
||||
module: {
|
||||
rules: [{
|
||||
test: /\.(js|ts)x?$/,
|
||||
//exclude: /node_modules/,
|
||||
use: {
|
||||
loader: 'babel-loader', //'@sucrase/webpack-loader',
|
||||
options: {
|
||||
//transforms: ['jsx']
|
||||
presets: [
|
||||
'@babel/preset-env',
|
||||
'@babel/react',
|
||||
{
|
||||
plugins: [
|
||||
'@babel/plugin-proposal-class-properties',
|
||||
],
|
||||
},
|
||||
], //Preset used for env setup
|
||||
plugins: [
|
||||
'@babel/transform-react-jsx',
|
||||
'@babel/plugin-transform-typescript',
|
||||
],
|
||||
cacheDirectory: true,
|
||||
cacheCompression: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
test: /\.s?css$/,
|
||||
use: [{
|
||||
loader: 'style-loader', //MiniCssExtractPlugin.loader,
|
||||
},
|
||||
{
|
||||
loader: 'css-loader',
|
||||
options: {
|
||||
sourceMap: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
loader: 'sass-loader',
|
||||
options: {
|
||||
sourceMap: true,
|
||||
},
|
||||
}, ],
|
||||
},
|
||||
{
|
||||
test: /fontawesome([^.]+).(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
|
||||
type: 'asset/resource',
|
||||
},
|
||||
{
|
||||
test: /\.(gif|png|jpg|jpeg|ttf|otf|eot|svg|webp|woff(2)?)$/,
|
||||
type: 'asset/resource',
|
||||
}, ],
|
||||
},
|
||||
plugins: plugins,
|
||||
|
||||
devServer: {
|
||||
host: IP,
|
||||
port: PORT,
|
||||
historyApiFallback: false,
|
||||
static: path.resolve(__dirname, conf['APPDIR'], conf['SRC']),
|
||||
https: conf['HTTPS'],
|
||||
hot: false,
|
||||
//injectClient: conf['injectClient'],
|
||||
|
||||
headers: {
|
||||
'Access-Control-Allow-Origin': '*',
|
||||
'Referrer-Policy': 'unsafe-url',
|
||||
'service-worker-allowed': '/',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = config;
|
|
@ -1,33 +0,0 @@
|
|||
/*
|
||||
* Load webpack configuration from app/_config/webpack.yml
|
||||
*/
|
||||
|
||||
const path = require('path');
|
||||
const filesystem = require('fs');
|
||||
const fs = require('fs');
|
||||
const yaml = require('js-yaml');
|
||||
|
||||
const conf = yaml.safeLoad(fs.readFileSync(path.join(__dirname, 'app/_config/webpack.yml'), 'utf8'));
|
||||
|
||||
let themes = [];
|
||||
// add themes
|
||||
if (conf['Site\\Templates\\WebpackTemplateProvider'].THEMESDIR) {
|
||||
const themeDir = conf['Site\\Templates\\WebpackTemplateProvider'].THEMESDIR;
|
||||
const dir = path.resolve(__dirname, themeDir);
|
||||
|
||||
if (filesystem.existsSync(dir)) {
|
||||
filesystem.readdirSync(dir).forEach((file) => {
|
||||
filePath = path.join(themeDir, file);
|
||||
const stat = filesystem.statSync(filePath);
|
||||
|
||||
if (stat && stat.isDirectory()) {
|
||||
themes.push(filePath);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
configuration: conf['Site\\Templates\\WebpackTemplateProvider'],
|
||||
themes: themes,
|
||||
};
|