-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
214 additions
and
121 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
html, | ||
body { | ||
margin: 0; | ||
padding: 0; } | ||
|
||
.current-slide { | ||
z-index: 1; } | ||
|
||
.page-active { | ||
background: #fff; } | ||
|
||
/*The height is required in order to see the image*/ | ||
.tidy__carousel-wrapper { | ||
position: relative; | ||
width: 100%; | ||
height: 100%; } | ||
|
||
.tidy__carousel { | ||
position: relative; | ||
height: 30vmin; | ||
width: 100%; | ||
margin: 0; | ||
padding: 0; | ||
z-index: 1; | ||
display: block; | ||
overflow: hidden; } | ||
|
||
.tidy__carousel .tidy__carousel-slide { | ||
position: absolute; | ||
width: inherit; | ||
height: inherit; | ||
display: inline-block; } | ||
|
||
.tidy__carousel .tidy__carousel-slide > * { | ||
width: inherit; | ||
height: inherit; | ||
display: block; | ||
user-drag: none; | ||
user-select: none; | ||
-moz-user-select: none; | ||
-webkit-user-drag: none; | ||
-webkit-user-select: none; | ||
-ms-user-select: none; } | ||
|
||
button.tidy__carousel-controller[data-carousel-controller] { | ||
position: absolute; | ||
transform: translateY(-50%); | ||
z-index: 1000; | ||
top: 50%; | ||
width: 44px; | ||
height: 44px; | ||
border-radius: 50%; | ||
background: #fff; | ||
border: none; | ||
z-index: 10; | ||
display: block; | ||
background: #fff; | ||
user-drag: none; | ||
user-select: none; | ||
-moz-user-select: none; | ||
-webkit-user-drag: none; | ||
-webkit-user-select: none; | ||
-ms-user-select: none; | ||
outline: none; | ||
cursor: pointer; } | ||
button.tidy__carousel-controller[data-carousel-controller] svg { | ||
position: absolute; | ||
left: 20%; | ||
top: 20%; | ||
width: 60%; | ||
height: 60%; | ||
cursor: pointer; | ||
user-drag: none; | ||
user-select: none; | ||
-moz-user-select: none; | ||
-webkit-user-drag: none; | ||
-webkit-user-select: none; | ||
-ms-user-select: none; } | ||
|
||
button.tidy__carousel-controller[data-carousel-controller~="left"] { | ||
left: 10px; } | ||
|
||
button.tidy__carousel-controller[data-carousel-controller~="right"] { | ||
right: 10px; } | ||
|
||
.tidy__carousel-pager[data-carousel-pager] { | ||
position: relative; | ||
margin: 0; | ||
padding: 0; | ||
z-index: 100; | ||
width: 100%; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
transform: translateY(-25px); | ||
user-drag: none; | ||
user-select: none; | ||
-moz-user-select: none; | ||
-webkit-user-drag: none; | ||
-webkit-user-select: none; | ||
-ms-user-select: none; } | ||
.tidy__carousel-pager[data-carousel-pager] .tidy__carousel-pager--page { | ||
margin: 0 5px; | ||
width: 10px; | ||
height: 10px; | ||
border-radius: 100%; | ||
border: 1px solid #f1f1f1; | ||
cursor: pointer; | ||
list-style-type: none; | ||
user-drag: none; | ||
user-select: none; | ||
-moz-user-select: none; | ||
-webkit-user-drag: none; | ||
-webkit-user-select: none; | ||
-ms-user-select: none; } | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,71 @@ | ||
const path = require('path'); | ||
const webpack = require('webpack'); | ||
const argv = process.argv; | ||
const idx_of_mode = argv.indexOf('--mode'); | ||
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); | ||
const TerserJSPlugin = require('terser-webpack-plugin'); | ||
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); | ||
|
||
const config = { | ||
name: 'client', | ||
mode: process.env.NODE_ENV || 'development', | ||
entry: ['./dev/index'], | ||
output: { | ||
publicPath: './dist', | ||
path: path.resolve(__dirname, 'dist'), | ||
filename: `tidy-carousel${argv[idx_of_mode ? idx_of_mode + 1 : 0] === 'production' ? '.min.js' : '.js'}`, | ||
library: 'TidyCarousel', | ||
libraryTarget: 'umd', | ||
libraryExport: 'default', | ||
globalObject: "typeof self !== 'undefined' ? self : this" | ||
}, | ||
performance: { | ||
maxEntrypointSize: 512000, | ||
maxAssetSize: 512000 | ||
}, | ||
plugins: [ | ||
new webpack.DefinePlugin({ "process.env.NODE_ENV": JSON.stringify("production") }), | ||
new webpack.optimize.ModuleConcatenationPlugin(), | ||
new webpack.NoEmitOnErrorsPlugin() | ||
], | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.scss/, | ||
use: [ | ||
{loader: "style-loader"}, | ||
{loader: "css-loader"}, | ||
{loader: "sass-loader", options: {includePaths: ["./dev/scss", './dev/sass']}} | ||
] | ||
}, | ||
{ | ||
test: /\.(png|jpg|gif)$/i, | ||
use: [ | ||
{ | ||
loader: 'url-loader', | ||
options: { | ||
fallback: 'responsive-loader', | ||
}, | ||
}, | ||
], | ||
} | ||
] | ||
}, | ||
module.exports = (env, argv) => { | ||
|
||
devServer: { | ||
contentBase: path.join(__dirname, 'dist'), | ||
compress: true, | ||
writeToDisk: true, | ||
port: 8080 | ||
} | ||
} | ||
return { | ||
name: 'client', | ||
mode: env === 'production' ? 'production' : 'development', | ||
entry: ['./dev/index'], | ||
output: { | ||
publicPath: '/dist', | ||
path: path.resolve(__dirname, 'dist'), | ||
pathinfo: false, | ||
filename: `tidy-carousel${env === 'production' ? '.min.js' : '.js'}`, | ||
library: 'TidyCarousel', | ||
libraryTarget: 'umd', | ||
libraryExport: 'default', | ||
globalObject: "typeof self !== 'undefined' ? self : this" | ||
}, | ||
performance: { | ||
maxEntrypointSize: 512000, | ||
maxAssetSize: 512000 | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js$/, | ||
include: path.resolve(__dirname, 'dev'), | ||
loader: 'babel-loader', | ||
}, | ||
{ | ||
test: /\.scss$/, | ||
use: [ | ||
{loader: MiniCssExtractPlugin.loader}, | ||
{loader: "css-loader"}, | ||
{loader: "sass-loader", options: {includePaths: ["./dev/scss", './dev/sass']}}, | ||
] | ||
}, | ||
{ | ||
test: /\.(png|jpg|gif)$/i, | ||
use: [ | ||
{ | ||
loader: 'url-loader', | ||
options: { | ||
fallback: 'responsive-loader', | ||
}, | ||
}, | ||
], | ||
} | ||
] | ||
}, | ||
|
||
module.exports = config; | ||
plugins: [ | ||
// new webpack.DefinePlugin({ "process.env.NODE_ENV": JSON.stringify("production") }), | ||
new MiniCssExtractPlugin({ | ||
filename: env === 'production' ? 'styles.min.css' : 'styles.css' | ||
}) | ||
], | ||
|
||
devServer: { | ||
contentBase: path.join(__dirname, 'dist'), | ||
compress: true, | ||
writeToDisk: true, | ||
port: 8080 | ||
} | ||
}; | ||
}; |