commit e6855d924d8ba4a1425d45b4cd1e4dbbccce61d7
parent df7d8ab49b082d8fac94eb2e8e35210356bab81e
Author: Marcel <mtrnord1@gmail.com>
Date: Mon, 15 Jun 2020 00:17:06 +0200
Use webp image instead of jpg (except safari because they dont support webp...)
Took 5 minutes
Diffstat:
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/static/custom-css.scss b/static/custom-css.scss
@@ -162,7 +162,7 @@ li {
width: 100vw;
height: 100vh;
- background: url(images/login_bg.jpg) no-repeat center center fixed;
+ background: url(images/login_bg.webp) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
@@ -170,6 +170,12 @@ li {
filter: blur(5px);
}
+/* Safari 7.1+ */
+
+_::-webkit-full-page-media, _:future, :root .login-page-bg {
+ background: url(images/login_bg.jpg) no-repeat center center fixed;
+}
+
.login-bg {
position: relative;
width: 481px;
@@ -289,7 +295,7 @@ input.login-input {
font-size: 24px !important;
color: white;
position: absolute;
- bottom: calc(50% - 19px*2);
+ bottom: calc(50% - 19px * 2);
left: 16px;
}
diff --git a/static/images/login_bg.webp b/static/images/login_bg.webp
Binary files differ.
diff --git a/webpack.config.js b/webpack.config.js
@@ -22,7 +22,7 @@ module.exports = (env, argv) => {
module: {
rules: [
{
- test: /\.(png|jpe?g|gif)$/i,
+ test: /\.(png|jpe?g|gif|webp)$/i,
loader: 'file-loader',
options: {
name: '[name].[ext]',