Compare commits

...

6 Commits

  1. 52
      assets/_lowry.scss
  2. 2
      assets/index.js
  3. 1
      assets/style.css
  4. 2
      assets/style.scss
  5. BIN
      img/bg-lowry01.jpg
  6. BIN
      img/bg-lowry02.jpg
  7. BIN
      img/bg-lowry03.jpg
  8. BIN
      img/bg-lowry04.jpg
  9. 8459
      package-lock.json
  10. 5
      package.json
  11. 5
      tmpl/login.html
  12. 90
      webpack.config.js

52
assets/_lowry.scss

@ -0,0 +1,52 @@
/*$body-bg: rgb(250,250,250);
$body-color: rgb(90,90,90);
$theme-colors: (
"primary": rgba(90,150,200,1);
"secondary":rgba(130,160,180,1);
"success":rgba(100,200,150,1);
"danger": rgba(200,40,40,1);
"warning":rgba(200,200,70,1);
"info":rgba(170,200,230,1);
"light":rgba(230,230,230,1);
"dark":rgba(70,70,70,1);
"white":rgba(250,250,250,1);
);
*/
.progress-bar {
background-color: $primary;
}
.progress-bar-success {
background-color: $success;
}
.progress-bar-warning {
background-color: $warning;
}
.progress-bar-danger {
background-color: $danger;
}
body{
&.login{
background-image:url('../img/bg-lowry01.jpg');
background-color:transparent;
background-repeat: no-repeat ;
background-position:center center;
background-attachment: fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
}
.logosd em{
display:none;
}
.logosd::before{
content:'';
display:block;
background:url('../img/sd_nb.svg') no-repeat center center;
padding:0 30%;
min-height:5rem;
opacity:0.5;
}

2
assets/index.js

@ -1,5 +1,5 @@
import "bootstrap";
import "./style.css";
import "./style.scss";
import $ from "jquery"
window.jQuery = $;
window.$ = $;

1
assets/style.css

@ -1 +0,0 @@
@import '~bootstrap/dist/css/bootstrap.min.css';

2
assets/style.scss

@ -0,0 +1,2 @@
@import '~bootstrap/scss/bootstrap';
@import 'lowry.scss';

BIN
img/bg-lowry01.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 81 KiB

BIN
img/bg-lowry02.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 99 KiB

BIN
img/bg-lowry03.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

BIN
img/bg-lowry04.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 89 KiB

8459
package-lock.json generated

File diff suppressed because it is too large Load Diff

5
package.json

@ -18,10 +18,15 @@
"popper.js": "^1.12.3"
},
"devDependencies": {
"@svgr/core": "^4.1.0",
"autoprefixer": "^7.1.3",
"css-loader": "^0.28.7",
"expose-loader": "^0.7.5",
"extract-text-webpack-plugin": "^3.0.0",
"file-loader": "^3.0.1",
"node-sass": "^4.5.3",
"postcss-loader": "^3.0.0",
"sass-loader": "^7.1.0",
"style-loader": "^0.18.2",
"webpack": "^3.5.5"
}

5
tmpl/login.html

@ -1,6 +1,6 @@
{{template "header.html"}}
{{template "header_close.html"}}
</head>
<body class="login">
<div class="container">
<br />
<div class="row justify-content-center">
@ -24,5 +24,4 @@
</form>
</div>
</div>
{{template "footer.html"}}

90
webpack.config.js

@ -6,34 +6,64 @@ const path = require('path');
module.exports = {
entry: [
'jquery',
'./assets/index.js'
'./assets/index.js',
],
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist')
},
module: {
rules: [
// https://github.com/webpack-contrib/extract-text-webpack-plugin#extracting-sass-or-less
{
test: /\.css$/,
test: /\.scss$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: 'css-loader'
})
fallback: 'style-loader',
use: ['css-loader', 'sass-loader']
})
},
//https://webpack.js.org/loaders/file-loader/
{
test: /\.(png|jpg|gif)$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'img/',
},
},
],
},
//https://github.com/smooth-code/svgr/tree/master/packages/webpack
{
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
issuer: {
test: /\.jsx?$/
},
use: ['babel-loader', '@svgr/webpack', 'file-loader']
},
{
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'img/',
},
},
{
test: require.resolve('jquery'),
use: [{
loader: 'expose-loader',
options: 'jQuery'
},
{
loader: 'expose-loader',
options: '$'
}]
}
]},
loader: 'expose-loader',
options: 'jQuery'
},
{
loader: 'expose-loader',
options: '$'
}]
}
]
},
plugins: [
require('autoprefixer'),
new webpack.ProvidePlugin({
@ -42,7 +72,35 @@ module.exports = {
'window.jQuery': 'jquery',
Popper: ['popper.js', 'default']
}),
new ExtractTextPlugin("style.css")
new ExtractTextPlugin('style.css')
]
};
//
//
//
//https://getbootstrap.com/docs/4.0/getting-started/webpack/
// loaders: [
// {
// test: /\.scss$/,
// use: [{
// loader: 'style-loader', // inject CSS to page
// }, {
// loader: 'css-loader', // translates CSS into CommonJS modules
// }, {
// loader: 'postcss-loader', // Run post css actions
// options: {
// plugins: function () { // post css plugins, can be exported to postcss.config.js
// return [
// require('precss'),
// require('autoprefixer')
// ];
// }
// }
// }, {
// loader: 'sass-loader' // compiles Sass to CSS
// }]
// }
// ],

Loading…
Cancel
Save