mirror of
https://github.com/a2nt/silverstripe-webpack.git
synced 2024-10-22 17:05:31 +02:00
IMPR: Minor updates
This commit is contained in:
parent
ca025220a7
commit
88cec555d3
@ -5,6 +5,7 @@ import '../scss/app.scss';
|
|||||||
|
|
||||||
import MainUI from '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/_components/_main';
|
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.instagram.feed';
|
||||||
|
import '@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/js/_ui/_ui.carousel';
|
||||||
|
|
||||||
import './_layout';
|
import './_layout';
|
||||||
|
|
||||||
@ -30,5 +31,5 @@ const images = importAll(
|
|||||||
require.context('../img/', false, /\.(png|jpe?g|svg)$/),
|
require.context('../img/', false, /\.(png|jpe?g|svg)$/),
|
||||||
);
|
);
|
||||||
const fontAwesome = importAll(
|
const fontAwesome = importAll(
|
||||||
require.context('font-awesome', false, /\.(otf|eot|svg|ttf|woff|woff2)$/),
|
require.context('font-awesome', false, /\.(otf|eot|ttf|woff|woff2)$/),
|
||||||
);
|
);
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
@import '~@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/scss/_variables';
|
$white: #fff;
|
||||||
|
$black: #000;
|
||||||
|
|
||||||
$body-bg: #fff;
|
$body-bg: #fff;
|
||||||
$body-color: #212529;
|
$body-color: #212529;
|
||||||
@ -29,8 +30,7 @@ $body-main-nav-link-hover-color: $body-color;
|
|||||||
$body-main-nav-dropdown-hover-bg: $body-color;
|
$body-main-nav-dropdown-hover-bg: $body-color;
|
||||||
$body-footer-footer-bg: $body-bg;
|
$body-footer-footer-bg: $body-bg;
|
||||||
|
|
||||||
$font-family-base: 'Roboto',
|
$font-family-base: 'Roboto';
|
||||||
$font-family-sans-serif;
|
|
||||||
//
|
//
|
||||||
|
|
||||||
$full-body-min-width: map-get($grid-breakpoints, 'lg');
|
$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-shadow: 1px 1px $black;
|
||||||
$carousel-controls-hover-bg: transparentize($black, 0.4);
|
$carousel-controls-hover-bg: transparentize($black, 0.4);
|
||||||
$carousel-slide-img-loading-max-height: 70vh;
|
$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;
|
||||||
|
@ -41,6 +41,7 @@ class EmbeddedObjectExtension extends DataExtension
|
|||||||
$url,
|
$url,
|
||||||
$matches
|
$matches
|
||||||
);
|
);
|
||||||
|
if (isset($matches[1])) {
|
||||||
$videoID = $matches[1];
|
$videoID = $matches[1];
|
||||||
|
|
||||||
$params = array_merge($params, [
|
$params = array_merge($params, [
|
||||||
@ -72,6 +73,7 @@ class EmbeddedObjectExtension extends DataExtension
|
|||||||
$this->owner->EmbedHTML
|
$this->owner->EmbedHTML
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (stripos($this->owner->EmbedHTML, 'https://player.vimeo.com/video/') > 0) {
|
if (stripos($this->owner->EmbedHTML, 'https://player.vimeo.com/video/') > 0) {
|
||||||
$url = $this->owner->getField('SourceURL');
|
$url = $this->owner->getField('SourceURL');
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
<% else %>
|
<% else %>
|
||||||
<% if $Image || $ImageURL %>
|
<% if $Image || $ImageURL %>
|
||||||
<span class="img">
|
<span class="img">
|
||||||
<img class="carosel__img"
|
<img class="carousel__img"
|
||||||
src="{$EmptyImgSrc}"
|
src="{$EmptyImgSrc}"
|
||||||
data-lazy-src="<% if $ImageURL %>$ImageURL<% else %>$Image.FocusFill($SlideWidth,$SlideHeight).URL<% end_if %>"
|
data-lazy-src="<% if $ImageURL %>$ImageURL<% else %>$Image.FocusFill($SlideWidth,$SlideHeight).URL<% end_if %>"
|
||||||
alt="<% if $Headline %>$Headline.XML<% end_if %>"
|
alt="<% if $Headline %>$Headline.XML<% end_if %>"
|
||||||
|
@ -105,7 +105,7 @@ if (COMPRESS) {
|
|||||||
|
|
||||||
plugins.push(
|
plugins.push(
|
||||||
new ImageSpritePlugin({
|
new ImageSpritePlugin({
|
||||||
exclude: /exclude|original|default-|icons|sprite|svg|logo|favicon/,
|
exclude: /exclude|original|default-|icons|sprite|logo|favicon/,
|
||||||
commentOrigin: false,
|
commentOrigin: false,
|
||||||
compress: COMPRESS,
|
compress: COMPRESS,
|
||||||
extensions: ['png'],
|
extensions: ['png'],
|
||||||
@ -128,10 +128,8 @@ if (filesystem.existsSync(indexPath)) {
|
|||||||
NODE_ENV: NODE_ENV,
|
NODE_ENV: NODE_ENV,
|
||||||
GRAPHQL_URL: conf['GRAPHQL_URL'],
|
GRAPHQL_URL: conf['GRAPHQL_URL'],
|
||||||
STATIC_URL: conf['STATIC_URL'],
|
STATIC_URL: conf['STATIC_URL'],
|
||||||
REACT_SCRIPTS:
|
REACT_SCRIPTS: NODE_ENV === 'production' ?
|
||||||
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>',
|
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
@ -279,8 +277,7 @@ const cfg = merge(common, {
|
|||||||
},
|
},
|
||||||
|
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [{
|
||||||
{
|
|
||||||
test: /\.jsx?$/,
|
test: /\.jsx?$/,
|
||||||
//exclude: /node_modules/,
|
//exclude: /node_modules/,
|
||||||
use: {
|
use: {
|
||||||
@ -295,7 +292,9 @@ const cfg = merge(common, {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
], //Preset used for env setup
|
], //Preset used for env setup
|
||||||
plugins: [['@babel/transform-react-jsx']],
|
plugins: [
|
||||||
|
['@babel/transform-react-jsx']
|
||||||
|
],
|
||||||
cacheDirectory: true,
|
cacheDirectory: true,
|
||||||
cacheCompression: true,
|
cacheCompression: true,
|
||||||
},
|
},
|
||||||
@ -303,8 +302,7 @@ const cfg = merge(common, {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.s?css$/,
|
test: /\.s?css$/,
|
||||||
use: [
|
use: [{
|
||||||
{
|
|
||||||
loader: MiniCssExtractPlugin.loader,
|
loader: MiniCssExtractPlugin.loader,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -325,35 +323,30 @@ const cfg = merge(common, {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /fontawesome([^.]+).(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
|
test: /fontawesome([^.]+).(ttf|otf|eot|woff(2)?)(\?[a-z0-9]+)?$/,
|
||||||
use: [
|
use: [{
|
||||||
{
|
|
||||||
loader: 'file-loader',
|
loader: 'file-loader',
|
||||||
options: {
|
options: {
|
||||||
name: '[name].[ext]',
|
name: '[name].[ext]',
|
||||||
outputPath: 'fonts/',
|
outputPath: 'fonts/',
|
||||||
publicPath: '../fonts/',
|
publicPath: '../fonts/',
|
||||||
},
|
},
|
||||||
},
|
}, ],
|
||||||
],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.(ttf|otf|eot|svg|woff(2)?)$/,
|
test: /\.(ttf|otf|eot|svg|woff(2)?)$/,
|
||||||
use: [
|
use: [{
|
||||||
{
|
|
||||||
loader: 'file-loader',
|
loader: 'file-loader',
|
||||||
options: {
|
options: {
|
||||||
name: '[name].[ext]',
|
name: '[name].[ext]',
|
||||||
outputPath: 'fonts/',
|
outputPath: 'fonts/',
|
||||||
publicPath: '../fonts/',
|
publicPath: '../fonts/',
|
||||||
},
|
},
|
||||||
},
|
}, ],
|
||||||
],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.(png|webp|jpg|jpeg|gif|svg)$/,
|
test: /\.(png|webp|jpg|jpeg|gif|svg)$/,
|
||||||
use: [
|
use: [{
|
||||||
{
|
|
||||||
loader: 'img-optimize-loader',
|
loader: 'img-optimize-loader',
|
||||||
options: {
|
options: {
|
||||||
name: '[name].[ext]',
|
name: '[name].[ext]',
|
||||||
@ -388,8 +381,7 @@ const cfg = merge(common, {
|
|||||||
limit: 1,
|
limit: 1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
}, ],
|
||||||
],
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -66,8 +66,7 @@ if (filesystem.existsSync(indexPath)) {
|
|||||||
GRAPHQL_URL: conf['GRAPHQL_URL'],
|
GRAPHQL_URL: conf['GRAPHQL_URL'],
|
||||||
STATIC_URL: conf['STATIC_URL'],
|
STATIC_URL: conf['STATIC_URL'],
|
||||||
REACT_SCRIPTS: NODE_ENV === 'production' ?
|
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.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.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: [{
|
use: [{
|
||||||
loader: 'url-loader',
|
loader: 'url-loader',
|
||||||
}, ],
|
}, ],
|
||||||
|
Loading…
Reference in New Issue
Block a user