IMPR: Minor updates

This commit is contained in:
Tony Air 2021-04-28 22:34:53 +07:00
parent ca025220a7
commit 88cec555d3
7 changed files with 369 additions and 371 deletions

View File

@ -5,6 +5,7 @@ import '../scss/app.scss';
import MainUI from '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/_components/_main';
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/_ui/_ui.instagram.feed';
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/_ui/_ui.carousel';
import './_layout';
@ -30,5 +31,5 @@ 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)$/),
require.context('font-awesome', false, /\.(otf|eot|ttf|woff|woff2)$/),
);

View File

@ -1,4 +1,5 @@
@import '~@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/scss/_variables';
$white: #fff;
$black: #000;
$body-bg: #fff;
$body-color: #212529;
@ -29,8 +30,7 @@ $body-main-nav-link-hover-color: $body-color;
$body-main-nav-dropdown-hover-bg: $body-color;
$body-footer-footer-bg: $body-bg;
$font-family-base: 'Roboto',
$font-family-sans-serif;
$font-family-base: 'Roboto';
//
$full-body-min-width: map-get($grid-breakpoints, 'lg');
@ -72,3 +72,7 @@ $carousel-controls-zindex: 11;
$carousel-controls-shadow: 1px 1px $black;
$carousel-controls-hover-bg: transparentize($black, 0.4);
$carousel-slide-img-loading-max-height: 70vh;
@import '~@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/scss/_variables';
$font-family-base: 'Roboto',
$font-family-sans-serif;

View File

@ -41,6 +41,7 @@ class EmbeddedObjectExtension extends DataExtension
$url,
$matches
);
if (isset($matches[1])) {
$videoID = $matches[1];
$params = array_merge($params, [
@ -72,6 +73,7 @@ class EmbeddedObjectExtension extends DataExtension
$this->owner->EmbedHTML
);
}
}
if (stripos($this->owner->EmbedHTML, 'https://player.vimeo.com/video/') > 0) {
$url = $this->owner->getField('SourceURL');

View File

@ -6,7 +6,7 @@
<% else %>
<% if $Image || $ImageURL %>
<span class="img">
<img class="carosel__img"
<img class="carousel__img"
src="{$EmptyImgSrc}"
data-lazy-src="<% if $ImageURL %>$ImageURL<% else %>$Image.FocusFill($SlideWidth,$SlideHeight).URL<% end_if %>"
alt="<% if $Headline %>$Headline.XML<% end_if %>"

View File

@ -105,7 +105,7 @@ if (COMPRESS) {
plugins.push(
new ImageSpritePlugin({
exclude: /exclude|original|default-|icons|sprite|svg|logo|favicon/,
exclude: /exclude|original|default-|icons|sprite|logo|favicon/,
commentOrigin: false,
compress: COMPRESS,
extensions: ['png'],
@ -128,10 +128,8 @@ if (filesystem.existsSync(indexPath)) {
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>',
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>',
},
}),
);
@ -279,8 +277,7 @@ const cfg = merge(common, {
},
module: {
rules: [
{
rules: [{
test: /\.jsx?$/,
//exclude: /node_modules/,
use: {
@ -295,7 +292,9 @@ const cfg = merge(common, {
],
},
], //Preset used for env setup
plugins: [['@babel/transform-react-jsx']],
plugins: [
['@babel/transform-react-jsx']
],
cacheDirectory: true,
cacheCompression: true,
},
@ -303,8 +302,7 @@ const cfg = merge(common, {
},
{
test: /\.s?css$/,
use: [
{
use: [{
loader: MiniCssExtractPlugin.loader,
},
{
@ -325,35 +323,30 @@ const cfg = merge(common, {
],
},
{
test: /fontawesome([^.]+).(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
use: [
{
test: /fontawesome([^.]+).(ttf|otf|eot|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: [
{
use: [{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'fonts/',
publicPath: '../fonts/',
},
},
],
}, ],
},
{
test: /\.(png|webp|jpg|jpeg|gif|svg)$/,
use: [
{
use: [{
loader: 'img-optimize-loader',
options: {
name: '[name].[ext]',
@ -388,8 +381,7 @@ const cfg = merge(common, {
limit: 1,
},
},
},
],
}, ],
},
],
},

View File

@ -66,8 +66,7 @@ if (filesystem.existsSync(indexPath)) {
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>',
'<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>',
},
}),
);
@ -142,7 +141,7 @@ const config = merge(common, {
],
},
{
test: /fontawesome([^.]+).(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
test: /fontawesome([^.]+).(ttf|otf|eot|woff(2)?)(\?[a-z0-9]+)?$/,
use: [{
loader: 'url-loader',
}, ],