mirror of
https://github.com/a2nt/silverstripe-webpack.git
synced 2024-10-22 17:05:31 +02:00
Minor updates
This commit is contained in:
parent
7c4e33b30e
commit
5891ff3ff8
@ -28,3 +28,4 @@ SilverStripe\Forms\HTMLEditor\TinyMCEConfig:
|
|||||||
SilverStripe\Control\Session:
|
SilverStripe\Control\Session:
|
||||||
cookie_secure: true
|
cookie_secure: true
|
||||||
strict_user_agent_check: false
|
strict_user_agent_check: false
|
||||||
|
timeout: 604800
|
||||||
|
@ -25,8 +25,8 @@ Dynamic\FlexSlider\Model\SlideImage:
|
|||||||
- Site\Extensions\SlideImageExtension
|
- Site\Extensions\SlideImageExtension
|
||||||
|
|
||||||
SilverStripe\Core\Injector\Injector:
|
SilverStripe\Core\Injector\Injector:
|
||||||
SilverStripe\UserForms\Model\UserDefinedForm:
|
#SilverStripe\UserForms\Model\UserDefinedForm:
|
||||||
class: Site\Extensions\CMSMain_HiddenClass
|
# class: Site\Extensions\UserDefinedForm_HiddenClass
|
||||||
SilverStripe\Security\MemberAuthenticator\LostPasswordHandler:
|
SilverStripe\Security\MemberAuthenticator\LostPasswordHandler:
|
||||||
class: Site\Extensions\LostPasswordHandlerExtension
|
class: Site\Extensions\LostPasswordHandlerExtension
|
||||||
Sheadawson\Linkable\Forms\EmbeddedObjectField:
|
Sheadawson\Linkable\Forms\EmbeddedObjectField:
|
||||||
@ -35,19 +35,20 @@ SilverStripe\Core\Injector\Injector:
|
|||||||
class: Site\Extensions\CompositeFieldExtension
|
class: Site\Extensions\CompositeFieldExtension
|
||||||
|
|
||||||
# User Forms module
|
# User Forms module
|
||||||
|
SilverStripe\UserForms\Model\UserDefinedForm:
|
||||||
|
show_in_sitetree: false
|
||||||
|
can_be_root: false
|
||||||
|
extensions:
|
||||||
|
- Site\Extensions\UserDefinedFormExtension
|
||||||
|
|
||||||
SilverStripe\UserForms\Form\UserForm:
|
SilverStripe\UserForms\Form\UserForm:
|
||||||
extensions:
|
extensions:
|
||||||
- Site\Extensions\PlaceholderFormExtension
|
- Site\Extensions\PlaceholderFormExtension
|
||||||
|
|
||||||
SilverStripe\UserForms\Model\UserDefinedForm:
|
|
||||||
extensions:
|
|
||||||
- Site\Extensions\UserDefinedFormExtension
|
|
||||||
|
|
||||||
DNADesign\ElementalUserForms\Model\ElementForm:
|
DNADesign\ElementalUserForms\Model\ElementForm:
|
||||||
extensions:
|
extensions:
|
||||||
- Site\Extensions\UserDefinedFormExtension
|
- Site\Extensions\UserDefinedFormExtension
|
||||||
|
|
||||||
|
|
||||||
# Blog + Widgets module extensions
|
# Blog + Widgets module extensions
|
||||||
Page:
|
Page:
|
||||||
extensions:
|
extensions:
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
---
|
---
|
||||||
Name: webapp-files
|
Name: webapp-files
|
||||||
---
|
---
|
||||||
|
SilverStripe\Blog\Model\BlogPost:
|
||||||
|
featured_images_directory: 'blog-posts'
|
||||||
|
|
||||||
SilverStripe\Assets\Upload_Validator:
|
SilverStripe\Assets\Upload_Validator:
|
||||||
allowedExtensions:
|
allowedExtensions:
|
||||||
|
58
app/_config/us-locale.yml
Normal file
58
app/_config/us-locale.yml
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
---
|
||||||
|
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'
|
2
app/client/dist/css/app.css
vendored
2
app/client/dist/css/app.css
vendored
File diff suppressed because one or more lines are too long
2
app/client/dist/icons/.cache
vendored
2
app/client/dist/icons/.cache
vendored
@ -1 +1 @@
|
|||||||
{"hash":"3deb17371acdc75398d81da38fad464c","version":"0.0.9","optionHash":"c067d9b2d6a96a86192ece0162f1b1ac","result":{"outputFilePrefix":"/icons/","html":["<meta name=\"mobile-web-app-capable\" content=\"yes\">","<meta name=\"theme-color\" content=\"#fff\">","<meta name=\"application-name\" content=\"Webpack App\">","<link rel=\"apple-touch-icon\" sizes=\"57x57\" href=\"app/client/dist//icons/apple-touch-icon-57x57.png\">","<link rel=\"apple-touch-icon\" sizes=\"60x60\" href=\"app/client/dist//icons/apple-touch-icon-60x60.png\">","<link rel=\"apple-touch-icon\" sizes=\"72x72\" href=\"app/client/dist//icons/apple-touch-icon-72x72.png\">","<link rel=\"apple-touch-icon\" sizes=\"76x76\" href=\"app/client/dist//icons/apple-touch-icon-76x76.png\">","<link rel=\"apple-touch-icon\" sizes=\"114x114\" href=\"app/client/dist//icons/apple-touch-icon-114x114.png\">","<link rel=\"apple-touch-icon\" sizes=\"120x120\" href=\"app/client/dist//icons/apple-touch-icon-120x120.png\">","<link rel=\"apple-touch-icon\" sizes=\"144x144\" href=\"app/client/dist//icons/apple-touch-icon-144x144.png\">","<link rel=\"apple-touch-icon\" sizes=\"152x152\" href=\"app/client/dist//icons/apple-touch-icon-152x152.png\">","<link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"app/client/dist//icons/apple-touch-icon-180x180.png\">","<meta name=\"apple-mobile-web-app-capable\" content=\"yes\">","<meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\">","<meta name=\"apple-mobile-web-app-title\" content=\"Webpack App\">","<link rel=\"icon\" type=\"image/png\" sizes=\"228x228\" href=\"app/client/dist//icons/coast-228x228.png\">","<meta name=\"msapplication-TileColor\" content=\"#fff\">","<meta name=\"msapplication-TileImage\" content=\"mstile-144x144.png\">","<meta name=\"msapplication-config\" content=\"browserconfig.xml\">","<link rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"app/client/dist//icons/favicon-32x32.png\">","<link rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"app/client/dist//icons/favicon-16x16.png\">","<link rel=\"shortcut icon\" href=\"app/client/dist//icons/favicon.ico\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 1)\" href=\"app/client/dist//icons/apple-touch-startup-image-320x460.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 2)\" href=\"app/client/dist//icons/apple-touch-startup-image-640x920.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)\" href=\"app/client/dist//icons/apple-touch-startup-image-640x1096.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)\" href=\"app/client/dist//icons/apple-touch-startup-image-750x1294.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 414px) and (device-height: 736px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 3)\" href=\"app/client/dist//icons/apple-touch-startup-image-1182x2208.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 414px) and (device-height: 736px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 3)\" href=\"app/client/dist//icons/apple-touch-startup-image-1242x2148.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 1)\" href=\"app/client/dist//icons/apple-touch-startup-image-748x1024.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 1)\" href=\"app/client/dist//icons/apple-touch-startup-image-768x1004.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)\" href=\"app/client/dist//icons/apple-touch-startup-image-1496x2048.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)\" href=\"app/client/dist//icons/apple-touch-startup-image-1536x2008.png\">"],"files":["/icons/android-chrome-36x36.png","/icons/android-chrome-48x48.png","/icons/android-chrome-72x72.png","/icons/android-chrome-96x96.png","/icons/android-chrome-144x144.png","/icons/android-chrome-192x192.png","/icons/android-chrome-256x256.png","/icons/android-chrome-512x512.png","/icons/android-chrome-384x384.png","/icons/apple-touch-icon-57x57.png","/icons/apple-touch-icon-72x72.png","/icons/apple-touch-icon-60x60.png","/icons/apple-touch-icon-76x76.png","/icons/apple-touch-icon-114x114.png","/icons/apple-touch-icon-144x144.png","/icons/apple-touch-icon-120x120.png","/icons/apple-touch-icon-152x152.png","/icons/apple-touch-icon-167x167.png","/icons/apple-touch-icon-180x180.png","/icons/apple-touch-icon-precomposed.png","/icons/apple-touch-icon.png","/icons/coast-228x228.png","/icons/yandex-browser-50x50.png","/icons/mstile-70x70.png","/icons/mstile-144x144.png","/icons/mstile-150x150.png","/icons/mstile-310x150.png","/icons/mstile-310x310.png","/icons/favicon-32x32.png","/icons/favicon-16x16.png","/icons/favicon.ico","/icons/apple-touch-startup-image-640x920.png","/icons/apple-touch-startup-image-320x460.png","/icons/apple-touch-startup-image-640x1096.png","/icons/apple-touch-startup-image-748x1024.png","/icons/apple-touch-startup-image-768x1004.png","/icons/apple-touch-startup-image-750x1294.png","/icons/apple-touch-startup-image-1182x2208.png","/icons/apple-touch-startup-image-1242x2148.png","/icons/apple-touch-startup-image-1496x2048.png","/icons/apple-touch-startup-image-1536x2008.png","/icons/firefox_app_128x128.png","/icons/firefox_app_60x60.png","/icons/firefox_app_512x512.png","/icons/manifest.json","/icons/yandex-browser-manifest.json","/icons/browserconfig.xml","/icons/manifest.webapp"]}}
|
{"hash":"3deb17371acdc75398d81da38fad464c","version":"0.0.9","optionHash":"c067d9b2d6a96a86192ece0162f1b1ac","result":{"outputFilePrefix":"/icons/","html":["<meta name=\"mobile-web-app-capable\" content=\"yes\">","<meta name=\"theme-color\" content=\"#fff\">","<meta name=\"application-name\" content=\"Webpack App\">","<link rel=\"apple-touch-icon\" sizes=\"57x57\" href=\"app/client/dist//icons/apple-touch-icon-57x57.png\">","<link rel=\"apple-touch-icon\" sizes=\"60x60\" href=\"app/client/dist//icons/apple-touch-icon-60x60.png\">","<link rel=\"apple-touch-icon\" sizes=\"72x72\" href=\"app/client/dist//icons/apple-touch-icon-72x72.png\">","<link rel=\"apple-touch-icon\" sizes=\"76x76\" href=\"app/client/dist//icons/apple-touch-icon-76x76.png\">","<link rel=\"apple-touch-icon\" sizes=\"114x114\" href=\"app/client/dist//icons/apple-touch-icon-114x114.png\">","<link rel=\"apple-touch-icon\" sizes=\"120x120\" href=\"app/client/dist//icons/apple-touch-icon-120x120.png\">","<link rel=\"apple-touch-icon\" sizes=\"144x144\" href=\"app/client/dist//icons/apple-touch-icon-144x144.png\">","<link rel=\"apple-touch-icon\" sizes=\"152x152\" href=\"app/client/dist//icons/apple-touch-icon-152x152.png\">","<link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"app/client/dist//icons/apple-touch-icon-180x180.png\">","<meta name=\"apple-mobile-web-app-capable\" content=\"yes\">","<meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black-translucent\">","<meta name=\"apple-mobile-web-app-title\" content=\"Webpack App\">","<link rel=\"icon\" type=\"image/png\" sizes=\"228x228\" href=\"app/client/dist//icons/coast-228x228.png\">","<meta name=\"msapplication-TileColor\" content=\"#fff\">","<meta name=\"msapplication-TileImage\" content=\"mstile-144x144.png\">","<meta name=\"msapplication-config\" content=\"browserconfig.xml\">","<link rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"app/client/dist//icons/favicon-32x32.png\">","<link rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"app/client/dist//icons/favicon-16x16.png\">","<link rel=\"shortcut icon\" href=\"app/client/dist//icons/favicon.ico\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 1)\" href=\"app/client/dist//icons/apple-touch-startup-image-320x460.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 320px) and (device-height: 480px) and (-webkit-device-pixel-ratio: 2)\" href=\"app/client/dist//icons/apple-touch-startup-image-640x920.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 320px) and (device-height: 568px) and (-webkit-device-pixel-ratio: 2)\" href=\"app/client/dist//icons/apple-touch-startup-image-640x1096.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 375px) and (device-height: 667px) and (-webkit-device-pixel-ratio: 2)\" href=\"app/client/dist//icons/apple-touch-startup-image-750x1294.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 414px) and (device-height: 736px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 3)\" href=\"app/client/dist//icons/apple-touch-startup-image-1182x2208.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 414px) and (device-height: 736px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 3)\" href=\"app/client/dist//icons/apple-touch-startup-image-1242x2148.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 1)\" href=\"app/client/dist//icons/apple-touch-startup-image-748x1024.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 1)\" href=\"app/client/dist//icons/apple-touch-startup-image-768x1004.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 768px) and (device-height: 1024px) and (orientation: landscape) and (-webkit-device-pixel-ratio: 2)\" href=\"app/client/dist//icons/apple-touch-startup-image-1496x2048.png\">","<link rel=\"apple-touch-startup-image\" media=\"(device-width: 768px) and (device-height: 1024px) and (orientation: portrait) and (-webkit-device-pixel-ratio: 2)\" href=\"app/client/dist//icons/apple-touch-startup-image-1536x2008.png\">"],"files":["/icons/android-chrome-36x36.png","/icons/android-chrome-48x48.png","/icons/android-chrome-72x72.png","/icons/android-chrome-96x96.png","/icons/android-chrome-144x144.png","/icons/android-chrome-192x192.png","/icons/android-chrome-256x256.png","/icons/android-chrome-384x384.png","/icons/android-chrome-512x512.png","/icons/apple-touch-icon-57x57.png","/icons/apple-touch-icon-72x72.png","/icons/apple-touch-icon-76x76.png","/icons/apple-touch-icon-60x60.png","/icons/apple-touch-icon-120x120.png","/icons/apple-touch-icon-114x114.png","/icons/apple-touch-icon-152x152.png","/icons/apple-touch-icon-167x167.png","/icons/apple-touch-icon-144x144.png","/icons/apple-touch-icon-180x180.png","/icons/apple-touch-icon.png","/icons/apple-touch-icon-precomposed.png","/icons/coast-228x228.png","/icons/yandex-browser-50x50.png","/icons/mstile-70x70.png","/icons/mstile-144x144.png","/icons/mstile-150x150.png","/icons/mstile-310x150.png","/icons/mstile-310x310.png","/icons/favicon-16x16.png","/icons/favicon-32x32.png","/icons/favicon.ico","/icons/apple-touch-startup-image-320x460.png","/icons/apple-touch-startup-image-640x920.png","/icons/apple-touch-startup-image-640x1096.png","/icons/apple-touch-startup-image-748x1024.png","/icons/apple-touch-startup-image-768x1004.png","/icons/apple-touch-startup-image-750x1294.png","/icons/apple-touch-startup-image-1242x2148.png","/icons/apple-touch-startup-image-1182x2208.png","/icons/apple-touch-startup-image-1496x2048.png","/icons/apple-touch-startup-image-1536x2008.png","/icons/firefox_app_128x128.png","/icons/firefox_app_60x60.png","/icons/firefox_app_512x512.png","/icons/manifest.json","/icons/yandex-browser-manifest.json","/icons/browserconfig.xml","/icons/manifest.webapp"]}}
|
2
app/client/dist/js/app.js
vendored
2
app/client/dist/js/app.js
vendored
File diff suppressed because one or more lines are too long
@ -2,22 +2,26 @@
|
|||||||
* Your custom variables
|
* Your custom variables
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// screen size - 32px (ex. 1400 - 32 = 1368)
|
||||||
$grid-breakpoints: (
|
$grid-breakpoints: (
|
||||||
xs: 0,
|
xs: 0,
|
||||||
sm: 576px,
|
sm: 576px,
|
||||||
md: 768px,
|
md: 768px,
|
||||||
lg: 992px,
|
lg: 992px,
|
||||||
xl: 1200px,
|
xl: 1168px,
|
||||||
xxl: 1390px,
|
xxl: 1368px,
|
||||||
xxxl: 1590px,
|
xxxl: 1568px,
|
||||||
|
xxxxl: 1868px,
|
||||||
);
|
);
|
||||||
|
// screen size - (32px * 2) (ex. 1400 - 64 = 1336)
|
||||||
$container-max-widths: (
|
$container-max-widths: (
|
||||||
sm: 540px,
|
sm: 540px,
|
||||||
md: 720px,
|
md: 720px,
|
||||||
lg: 960px,
|
lg: 960px,
|
||||||
xl: 1140px,
|
xl: 1136px,
|
||||||
xxl: 1330px,
|
xxl: 1336px,
|
||||||
xxxl: 1560px,
|
xxxl: 1536px,
|
||||||
|
xxxxl: 1836px,
|
||||||
);
|
);
|
||||||
|
|
||||||
$font-family-base: 'Lato', sans-serif;
|
$font-family-base: 'Lato', sans-serif;
|
||||||
|
19
app/src/Extensions/HtmlEditorFieldExtension.php
Normal file
19
app/src/Extensions/HtmlEditorFieldExtension.php
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?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));
|
||||||
|
}
|
||||||
|
}
|
10
app/src/Extensions/UserDefinedForm_HiddenClass.php
Normal file
10
app/src/Extensions/UserDefinedForm_HiddenClass.php
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Site\Extensions;
|
||||||
|
|
||||||
|
use SilverStripe\ORM\HiddenClass;
|
||||||
|
use SilverStripe\UserForms\Model\UserDefinedForm;
|
||||||
|
|
||||||
|
class UserDefinedForm_HiddenClass extends UserDefinedForm implements HiddenClass
|
||||||
|
{
|
||||||
|
}
|
@ -43,6 +43,12 @@ class Page extends SiteTree
|
|||||||
return $this->_cached['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;
|
$this->_cached['summary'.$wordsToDisplay] = false;
|
||||||
return $this->_cached['summary'.$wordsToDisplay];
|
return $this->_cached['summary'.$wordsToDisplay];
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
namespace Site\Templates;
|
namespace Site\Templates;
|
||||||
|
|
||||||
use A2nt\ProgressiveWebApp\Controllers\ServiceWorkerController;
|
|
||||||
use SilverStripe\Core\Manifest\ModuleManifest;
|
use SilverStripe\Core\Manifest\ModuleManifest;
|
||||||
use SilverStripe\View\SSViewer;
|
use SilverStripe\View\SSViewer;
|
||||||
use SilverStripe\View\TemplateGlobalProvider;
|
use SilverStripe\View\TemplateGlobalProvider;
|
||||||
@ -44,7 +43,6 @@ class WebpackTemplateProvider implements TemplateGlobalProvider
|
|||||||
'WebpackJS' => 'loadJS',
|
'WebpackJS' => 'loadJS',
|
||||||
'ResourcesURL' => 'resourcesURL',
|
'ResourcesURL' => 'resourcesURL',
|
||||||
'ProjectName' => 'themeName',
|
'ProjectName' => 'themeName',
|
||||||
'SWVersion' => 'swVersion'
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,7 +102,7 @@ class WebpackTemplateProvider implements TemplateGlobalProvider
|
|||||||
{
|
{
|
||||||
return self::isActive() && strpos($path, '//') === false ?
|
return self::isActive() && strpos($path, '//') === false ?
|
||||||
self::_toDevServerPath($path) :
|
self::_toDevServerPath($path) :
|
||||||
self::_toPublicPath($path);
|
self::toPublicPath($path);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static function _toDevServerPath($path): string
|
protected static function _toDevServerPath($path): string
|
||||||
@ -119,13 +117,13 @@ class WebpackTemplateProvider implements TemplateGlobalProvider
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static function _toPublicPath($path): string
|
public static function toPublicPath($path): string
|
||||||
{
|
{
|
||||||
$cfg = self::config();
|
$cfg = self::config();
|
||||||
return strpos($path, '//') === false ?
|
return strpos($path, '//') === false ?
|
||||||
Controller::join_links(
|
Controller::join_links(
|
||||||
self::projectName(),
|
self::projectName(),
|
||||||
$cfg['DIST'],
|
$cfg['dist'],
|
||||||
(strpos($path, '.css') ? 'css' : 'js'),
|
(strpos($path, '.css') ? 'css' : 'js'),
|
||||||
$path
|
$path
|
||||||
)
|
)
|
||||||
@ -136,11 +134,4 @@ class WebpackTemplateProvider implements TemplateGlobalProvider
|
|||||||
{
|
{
|
||||||
return Config::inst()->get(__CLASS__);
|
return Config::inst()->get(__CLASS__);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function swVersion()
|
|
||||||
{
|
|
||||||
if(class_exists(ServiceWorkerController::class)) {
|
|
||||||
return ServiceWorkerController::Version();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,32 +1,33 @@
|
|||||||
<div class="blog-post-info card">
|
<div class="blog-post-info row">
|
||||||
<div class="published-date">
|
|
||||||
<div class="day">$PublishDate.Format("d")</div>
|
|
||||||
<div class="month">$PublishDate.Format("MMM")</div>
|
|
||||||
</div>
|
|
||||||
<% if $FeaturedImage %>
|
<% if $FeaturedImage %>
|
||||||
|
<div class="col col-sm-3">
|
||||||
<div class="img card-img-top">
|
<div class="img card-img-top">
|
||||||
<a href="$Link">
|
|
||||||
<img
|
<img
|
||||||
src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
|
src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
|
||||||
data-lazy-src="$FeaturedImage.Fill(350,200).URL" alt="$Title.ATT"
|
data-lazy-src="$FeaturedImage.Fill(350,200).URL" alt="$Title.ATT"
|
||||||
/>
|
/>
|
||||||
</a>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
|
|
||||||
|
<div class="col">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title title">
|
<h3 class="card-title title">
|
||||||
<a href="$Link.ATT" title="Go to the $Title post">
|
|
||||||
$Title
|
$Title
|
||||||
</a>
|
</h3>
|
||||||
</h5>
|
|
||||||
|
<div class="published-date">
|
||||||
|
<span class="day">$PublishDate.Format("d")</span>
|
||||||
|
<span class="month">$PublishDate.Format("MMM")</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="card-text typography summary">
|
<div class="card-text typography summary">
|
||||||
$Summary
|
$Summary
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a href="{$Link}" class="btn btn-link"><%t SilverStripe\\Blog\\Model\\Blog.READMORE "Read More" %> »</a>
|
|
||||||
|
|
||||||
<% include SilverStripe\\Blog\\EntryMeta %>
|
<% include SilverStripe\\Blog\\EntryMeta %>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a href="{$Link}" class="btn btn-link stretched-link"><span class="sr-only">$Title</span></a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,7 +9,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<% else %>
|
<% else %>
|
||||||
<div class="elemental-area">
|
<div class="elemental-area">
|
||||||
|
<% if $ElementalArea.Elements.Count %>
|
||||||
$ElementalArea
|
$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>
|
</div>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
|
|
||||||
|
10
app/templates/Objects/ShareLinks.ss
Normal file
10
app/templates/Objects/ShareLinks.ss
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<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>
|
@ -3,50 +3,55 @@
|
|||||||
|
|
||||||
<div class="page-content">
|
<div class="page-content">
|
||||||
<div class="element">
|
<div class="element">
|
||||||
<div class="container blog-post-list">
|
<div class="$DefaultContainer">
|
||||||
|
|
||||||
<% if $ArchiveYear %>
|
<% if $ArchiveYear %>
|
||||||
<span class="action-title"><%t SilverStripe\\Blog\\Model\\Blog.Archive 'Archive' %>:</span>
|
<%t SilverStripe\\Blog\\Model\\Blog.Archive 'Archive' %>:
|
||||||
<% if $ArchiveDay %>
|
<% if $ArchiveDay %>
|
||||||
<h2 class="content-element__title subcategory">$ArchiveDate.Nice</h2>
|
<h2 class="subcategory">$ArchiveDate.Nice</h2>
|
||||||
<% else_if $ArchiveMonth %>
|
<% else_if $ArchiveMonth %>
|
||||||
<h2 class="content-element__title subcategory">$ArchiveDate.format('F, Y')</h2>
|
<h2 class="subcategory">$ArchiveDate.format('F, Y')</h2>
|
||||||
<% else %>
|
<% else %>
|
||||||
<h2 class="content-element__title subcategory">$ArchiveDate.format('Y')</h2>
|
<h2 class="subcategory">$ArchiveDate.format('Y')</h2>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
<% else_if $CurrentTag %>
|
<% else_if $CurrentTag %>
|
||||||
<h2 class="content-element__title subcategory">
|
<h2 class="subcategory"><%t SilverStripe\\Blog\\Model\\Blog.Tag 'Tag' %>: $CurrentTag.Title</h2>
|
||||||
<span class="action-title"><%t SilverStripe\\Blog\\Model\\Blog.Tag 'Tag' %>:</span>
|
|
||||||
$CurrentTag.Title
|
|
||||||
</h2>
|
|
||||||
<% else_if $CurrentCategory %>
|
<% else_if $CurrentCategory %>
|
||||||
<h2 class="content-element__title subcategory">
|
<h2 class="subcategory"><%t SilverStripe\\Blog\\Model\\Blog.Category 'Category' %>: $CurrentCategory.Title</h2>
|
||||||
<span class="action-title"><%t SilverStripe\\Blog\\Model\\Blog.Category 'Category' %>:</span>
|
|
||||||
$CurrentCategory.Title
|
|
||||||
</h2>
|
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<% if $PaginatedList.Exists %>
|
<% if $PaginatedList.Exists %>
|
||||||
<div class="row">
|
|
||||||
<% loop $PaginatedList %>
|
<% loop $PaginatedList %>
|
||||||
<div class="col-sm-3 col-md-3">
|
<div class="element">
|
||||||
|
<div class="$Top.DefaultContainer">
|
||||||
<% include BlogPostInfo %>
|
<% include BlogPostInfo %>
|
||||||
</div>
|
</div>
|
||||||
<% end_loop %>
|
|
||||||
</div>
|
</div>
|
||||||
|
<% end_loop %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<p class="alert alert-info">
|
<div class="element">
|
||||||
<%t SilverStripe\\Blog\\Model\\Blog.NoPosts 'There are no posts' %>
|
<div class="$DefaultContainer">
|
||||||
</p>
|
<p><%t SilverStripe\\Blog\\Model\\Blog.NoPosts 'There are no posts' %></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
|
|
||||||
|
<div class="element">
|
||||||
|
<div class="$DefaultContainer">
|
||||||
<% with $PaginatedList %>
|
<% with $PaginatedList %>
|
||||||
<% include Objects\Pagination %>
|
<% include Objects\Pagination %>
|
||||||
<% end_with %>
|
<% end_with %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<% if $CommentsForm %>
|
||||||
|
<div class="element">
|
||||||
|
<div class="$DefaultContainer">
|
||||||
$CommentsForm
|
$CommentsForm
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<% end_if %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
18
package.json
18
package.json
@ -30,10 +30,10 @@
|
|||||||
"ie>=11"
|
"ie>=11"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@a2nt/meta-lightbox": "^1.2.4",
|
"@a2nt/meta-lightbox": "^1.2.5",
|
||||||
"@a2nt/ss-bootstrap-ui-webpack-boilerplate": "^1.8.9",
|
"@a2nt/ss-bootstrap-ui-webpack-boilerplate": "^1.9.7",
|
||||||
"browserslist": "^4.11.1",
|
"browserslist": "^4.11.1",
|
||||||
"caniuse-lite": "^1.0.30001038",
|
"caniuse-lite": "^1.0.30001043",
|
||||||
"font-awesome": "^4.7.0",
|
"font-awesome": "^4.7.0",
|
||||||
"inputmask": "^5.0.3",
|
"inputmask": "^5.0.3",
|
||||||
"yarn": "^1.22.4"
|
"yarn": "^1.22.4"
|
||||||
@ -43,7 +43,7 @@
|
|||||||
"@babel/core": "^7.8.4",
|
"@babel/core": "^7.8.4",
|
||||||
"@babel/plugin-proposal-object-rest-spread": "^7.8.3",
|
"@babel/plugin-proposal-object-rest-spread": "^7.8.3",
|
||||||
"@babel/plugin-transform-react-jsx": "^7.9.4",
|
"@babel/plugin-transform-react-jsx": "^7.9.4",
|
||||||
"@babel/preset-env": "^7.9.0",
|
"@babel/preset-env": "^7.9.5",
|
||||||
"@google/markerclusterer": "^1.0.3",
|
"@google/markerclusterer": "^1.0.3",
|
||||||
"animate.css": "^3.7.0",
|
"animate.css": "^3.7.0",
|
||||||
"autoprefixer": "^9.7.4",
|
"autoprefixer": "^9.7.4",
|
||||||
@ -63,7 +63,7 @@
|
|||||||
"core-util-is": "^1.0.2",
|
"core-util-is": "^1.0.2",
|
||||||
"croppie": "^2.6.4",
|
"croppie": "^2.6.4",
|
||||||
"cross-env": "^5.2.1",
|
"cross-env": "^5.2.1",
|
||||||
"css-loader": "^3.4.2",
|
"css-loader": "^3.5.2",
|
||||||
"eslint": "^4.18.1",
|
"eslint": "^4.18.1",
|
||||||
"eslint-plugin-import": "^2.20.2",
|
"eslint-plugin-import": "^2.20.2",
|
||||||
"eslint-plugin-jquery": "^1.5.1",
|
"eslint-plugin-jquery": "^1.5.1",
|
||||||
@ -76,21 +76,21 @@
|
|||||||
"foundation-emails": "^2.2.1",
|
"foundation-emails": "^2.2.1",
|
||||||
"gijgo": "^1.9.13",
|
"gijgo": "^1.9.13",
|
||||||
"hard-source-webpack-plugin": "^0.13.1",
|
"hard-source-webpack-plugin": "^0.13.1",
|
||||||
"html-webpack-plugin": "^4.0.4",
|
"html-webpack-plugin": "^4.2.0",
|
||||||
"imagemin-gifsicle": "^7.0.0",
|
"imagemin-gifsicle": "^7.0.0",
|
||||||
"imagemin-jpegtran": "^6.0.0",
|
"imagemin-jpegtran": "^6.0.0",
|
||||||
"imagemin-optipng": "^7.1.0",
|
"imagemin-optipng": "^7.1.0",
|
||||||
"imagemin-svgo": "^7.1.0",
|
"imagemin-svgo": "^7.1.0",
|
||||||
"imagemin-webpack": "^5.1.1",
|
"imagemin-webpack": "^5.1.1",
|
||||||
"jquery": "^3.4.1",
|
"jquery": "^3.5.0",
|
||||||
"jquery-hammerjs": "^2.0.0",
|
"jquery-hammerjs": "^2.0.0",
|
||||||
"jquery-hoverintent": "*",
|
"jquery-hoverintent": "*",
|
||||||
"jquery-zoom": "^1.7.21",
|
"jquery-zoom": "^1.7.21",
|
||||||
"jquery.appear": "^1.0.1",
|
"jquery.appear": "^1.0.1",
|
||||||
"laravel-mix": "^4.1.2",
|
"laravel-mix": "^4.1.2",
|
||||||
"loglevel": "^1.6.7",
|
"loglevel": "^1.6.8",
|
||||||
"lost": "^8.3.1",
|
"lost": "^8.3.1",
|
||||||
"mapbox-gl": "^1.9.0",
|
"mapbox-gl": "^1.9.1",
|
||||||
"material-design-color": "^2.3.2",
|
"material-design-color": "^2.3.2",
|
||||||
"mini-css-extract-plugin": "^0.9.0",
|
"mini-css-extract-plugin": "^0.9.0",
|
||||||
"node-sass": "^4.13.1",
|
"node-sass": "^4.13.1",
|
||||||
|
Loading…
Reference in New Issue
Block a user