Minor updates

This commit is contained in:
Tony Air 2020-04-20 17:01:08 +07:00
parent 7c4e33b30e
commit 5891ff3ff8
17 changed files with 279 additions and 163 deletions

View File

@ -28,3 +28,4 @@ SilverStripe\Forms\HTMLEditor\TinyMCEConfig:
SilverStripe\Control\Session:
cookie_secure: true
strict_user_agent_check: false
timeout: 604800

View File

@ -25,8 +25,8 @@ Dynamic\FlexSlider\Model\SlideImage:
- Site\Extensions\SlideImageExtension
SilverStripe\Core\Injector\Injector:
SilverStripe\UserForms\Model\UserDefinedForm:
class: Site\Extensions\CMSMain_HiddenClass
#SilverStripe\UserForms\Model\UserDefinedForm:
# class: Site\Extensions\UserDefinedForm_HiddenClass
SilverStripe\Security\MemberAuthenticator\LostPasswordHandler:
class: Site\Extensions\LostPasswordHandlerExtension
Sheadawson\Linkable\Forms\EmbeddedObjectField:
@ -35,19 +35,20 @@ SilverStripe\Core\Injector\Injector:
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
SilverStripe\UserForms\Model\UserDefinedForm:
extensions:
- Site\Extensions\UserDefinedFormExtension
DNADesign\ElementalUserForms\Model\ElementForm:
extensions:
- Site\Extensions\UserDefinedFormExtension
# Blog + Widgets module extensions
Page:
extensions:

View File

@ -1,79 +1,81 @@
---
Name: webapp-files
---
SilverStripe\Blog\Model\BlogPost:
featured_images_directory: 'blog-posts'
SilverStripe\Assets\Upload_Validator:
allowedExtensions:
- 'stl'
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'
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'

58
app/_config/us-locale.yml Normal file
View 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'

File diff suppressed because one or more lines are too long

View File

@ -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"]}}

File diff suppressed because one or more lines are too long

View File

@ -2,22 +2,26 @@
* Your custom variables
*/
// screen size - 32px (ex. 1400 - 32 = 1368)
$grid-breakpoints: (
xs: 0,
sm: 576px,
md: 768px,
lg: 992px,
xl: 1200px,
xxl: 1390px,
xxxl: 1590px,
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: 1140px,
xxl: 1330px,
xxxl: 1560px,
xl: 1136px,
xxl: 1336px,
xxxl: 1536px,
xxxxl: 1836px,
);
$font-family-base: 'Lato', sans-serif;

View 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));
}
}

View 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
{
}

View File

@ -43,6 +43,12 @@ class Page extends SiteTree
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];
}

View File

@ -7,7 +7,6 @@
namespace Site\Templates;
use A2nt\ProgressiveWebApp\Controllers\ServiceWorkerController;
use SilverStripe\Core\Manifest\ModuleManifest;
use SilverStripe\View\SSViewer;
use SilverStripe\View\TemplateGlobalProvider;
@ -44,7 +43,6 @@ class WebpackTemplateProvider implements TemplateGlobalProvider
'WebpackJS' => 'loadJS',
'ResourcesURL' => 'resourcesURL',
'ProjectName' => 'themeName',
'SWVersion' => 'swVersion'
];
}
@ -104,7 +102,7 @@ class WebpackTemplateProvider implements TemplateGlobalProvider
{
return self::isActive() && strpos($path, '//') === false ?
self::_toDevServerPath($path) :
self::_toPublicPath($path);
self::toPublicPath($path);
}
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();
return strpos($path, '//') === false ?
Controller::join_links(
self::projectName(),
$cfg['DIST'],
$cfg['dist'],
(strpos($path, '.css') ? 'css' : 'js'),
$path
)
@ -136,11 +134,4 @@ class WebpackTemplateProvider implements TemplateGlobalProvider
{
return Config::inst()->get(__CLASS__);
}
public static function swVersion()
{
if(class_exists(ServiceWorkerController::class)) {
return ServiceWorkerController::Version();
}
}
}

View File

@ -1,32 +1,33 @@
<div class="blog-post-info card">
<div class="published-date">
<div class="day">$PublishDate.Format("d")</div>
<div class="month">$PublishDate.Format("MMM")</div>
</div>
<div class="blog-post-info row">
<% if $FeaturedImage %>
<div class="col col-sm-3">
<div class="img card-img-top">
<a href="$Link">
<img
src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
data-lazy-src="$FeaturedImage.Fill(350,200).URL" alt="$Title.ATT"
/>
</a>
<img
src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"
data-lazy-src="$FeaturedImage.Fill(350,200).URL" alt="$Title.ATT"
/>
</div>
</div>
<% end_if %>
<div class="card-body">
<h5 class="card-title title">
<a href="$Link.ATT" title="Go to the $Title post">
<div class="col">
<div class="card-body">
<h3 class="card-title title">
$Title
</a>
</h5>
</h3>
<div class="card-text typography summary">
$Summary
<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">
$Summary
</div>
<% include SilverStripe\\Blog\\EntryMeta %>
</div>
<a href="{$Link}" class="btn btn-link"><%t SilverStripe\\Blog\\Model\\Blog.READMORE "Read More" %> &raquo;</a>
<% include SilverStripe\\Blog\\EntryMeta %>
</div>
<a href="{$Link}" class="btn btn-link stretched-link"><span class="sr-only">$Title</span></a>
</div>

View File

@ -9,7 +9,15 @@
</div>
<% else %>
<div class="elemental-area">
$ElementalArea
<% 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 %>

View 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>

View File

@ -3,51 +3,56 @@
<div class="page-content">
<div class="element">
<div class="container blog-post-list">
<div class="$DefaultContainer">
<% if $ArchiveYear %>
<span class="action-title"><%t SilverStripe\\Blog\\Model\\Blog.Archive 'Archive' %>:</span>
<%t SilverStripe\\Blog\\Model\\Blog.Archive 'Archive' %>:
<% if $ArchiveDay %>
<h2 class="content-element__title subcategory">$ArchiveDate.Nice</h2>
<h2 class="subcategory">$ArchiveDate.Nice</h2>
<% else_if $ArchiveMonth %>
<h2 class="content-element__title subcategory">$ArchiveDate.format('F, Y')</h2>
<h2 class="subcategory">$ArchiveDate.format('F, Y')</h2>
<% else %>
<h2 class="content-element__title subcategory">$ArchiveDate.format('Y')</h2>
<h2 class="subcategory">$ArchiveDate.format('Y')</h2>
<% end_if %>
<% else_if $CurrentTag %>
<h2 class="content-element__title subcategory">
<span class="action-title"><%t SilverStripe\\Blog\\Model\\Blog.Tag 'Tag' %>:</span>
$CurrentTag.Title
</h2>
<h2 class="subcategory"><%t SilverStripe\\Blog\\Model\\Blog.Tag 'Tag' %>: $CurrentTag.Title</h2>
<% else_if $CurrentCategory %>
<h2 class="content-element__title subcategory">
<span class="action-title"><%t SilverStripe\\Blog\\Model\\Blog.Category 'Category' %>:</span>
$CurrentCategory.Title
</h2>
<h2 class="subcategory"><%t SilverStripe\\Blog\\Model\\Blog.Category 'Category' %>: $CurrentCategory.Title</h2>
<% end_if %>
</div>
</div>
<% if $PaginatedList.Exists %>
<div class="row">
<% loop $PaginatedList %>
<div class="col-sm-3 col-md-3">
<% include BlogPostInfo %>
</div>
<% end_loop %>
</div>
<% else %>
<p class="alert alert-info">
<%t SilverStripe\\Blog\\Model\\Blog.NoPosts 'There are no posts' %>
</p>
<% end_if %>
<% if $PaginatedList.Exists %>
<% loop $PaginatedList %>
<div class="element">
<div class="$Top.DefaultContainer">
<% include BlogPostInfo %>
</div>
</div>
<% end_loop %>
<% else %>
<div class="element">
<div class="$DefaultContainer">
<p><%t SilverStripe\\Blog\\Model\\Blog.NoPosts 'There are no posts' %></p>
</div>
</div>
<% end_if %>
<% with $PaginatedList %>
<% include Objects\Pagination %>
<% end_with %>
<div class="element">
<div class="$DefaultContainer">
<% with $PaginatedList %>
<% include Objects\Pagination %>
<% end_with %>
</div>
</div>
<% if $CommentsForm %>
<div class="element">
<div class="$DefaultContainer">
$CommentsForm
</div>
</div>
</div>
<% end_if %>
</div>
</div>
<%-- include SilverStripe\\Blog\\BlogSideBar --%>

View File

@ -30,10 +30,10 @@
"ie>=11"
],
"dependencies": {
"@a2nt/meta-lightbox": "^1.2.4",
"@a2nt/ss-bootstrap-ui-webpack-boilerplate": "^1.8.9",
"@a2nt/meta-lightbox": "^1.2.5",
"@a2nt/ss-bootstrap-ui-webpack-boilerplate": "^1.9.7",
"browserslist": "^4.11.1",
"caniuse-lite": "^1.0.30001038",
"caniuse-lite": "^1.0.30001043",
"font-awesome": "^4.7.0",
"inputmask": "^5.0.3",
"yarn": "^1.22.4"
@ -43,7 +43,7 @@
"@babel/core": "^7.8.4",
"@babel/plugin-proposal-object-rest-spread": "^7.8.3",
"@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",
"animate.css": "^3.7.0",
"autoprefixer": "^9.7.4",
@ -63,7 +63,7 @@
"core-util-is": "^1.0.2",
"croppie": "^2.6.4",
"cross-env": "^5.2.1",
"css-loader": "^3.4.2",
"css-loader": "^3.5.2",
"eslint": "^4.18.1",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jquery": "^1.5.1",
@ -76,21 +76,21 @@
"foundation-emails": "^2.2.1",
"gijgo": "^1.9.13",
"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-jpegtran": "^6.0.0",
"imagemin-optipng": "^7.1.0",
"imagemin-svgo": "^7.1.0",
"imagemin-webpack": "^5.1.1",
"jquery": "^3.4.1",
"jquery": "^3.5.0",
"jquery-hammerjs": "^2.0.0",
"jquery-hoverintent": "*",
"jquery-zoom": "^1.7.21",
"jquery.appear": "^1.0.1",
"laravel-mix": "^4.1.2",
"loglevel": "^1.6.7",
"loglevel": "^1.6.8",
"lost": "^8.3.1",
"mapbox-gl": "^1.9.0",
"mapbox-gl": "^1.9.1",
"material-design-color": "^2.3.2",
"mini-css-extract-plugin": "^0.9.0",
"node-sass": "^4.13.1",