Drupal: optimizacija slik na webp

This commit is contained in:
Robert 2021-02-05 10:38:23 +01:00
parent 740157b6ba
commit 5a1c2df73f
35 changed files with 90 additions and 27 deletions

View File

@ -375,8 +375,8 @@ a {
-webkit-align-items: center; -webkit-align-items: center;
-ms-flex-align: center; -ms-flex-align: center;
align-items: center; align-items: center;
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.5))), url('../images/kva2.jpg'); /*background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.5))), url('../images/kva2.jpg');*/
background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/kva2.jpg'); /*background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/kva2.jpg');*/
background-position: 0px 0px, 50% 50%; background-position: 0px 0px, 50% 50%;
background-size: auto, cover; background-size: auto, cover;
background-attachment: scroll, fixed; background-attachment: scroll, fixed;
@ -457,8 +457,8 @@ a {
-ms-flex-align: center; -ms-flex-align: center;
align-items: center; align-items: center;
background-color: #8b8b8b; background-color: #8b8b8b;
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.5))), url('../images/kv1.jpg'); /*background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.5))), url('../images/kv1.jpg');*/
background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/kv1.jpg'); /*background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/kv1.jpg');*/
background-position: 0px 0px, 50% 50%; background-position: 0px 0px, 50% 50%;
background-size: auto, cover; background-size: auto, cover;
background-attachment: scroll, fixed; background-attachment: scroll, fixed;

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -0,0 +1,15 @@
#!/bin/bash
PARAMS=('-m 6 -q 70 -mt -af -progress')
if [ $# -ne 0 ]; then
PARAMS=$@;
fi
cd $(pwd)
shopt -s nullglob nocaseglob extglob
for FILE in *.@(jpg|jpeg|tif|tiff|png); do
cwebp $PARAMS "$FILE" -o "${FILE%.*}".webp;
done

View File

@ -20,28 +20,54 @@
} }
/* 1KA V ŠTEVILKAH */ /* 1KA V ŠTEVILKAH */
.section.blue-section.nums { .section {
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.5))), url('/tema1ka/img/ozadje_1ka_v_stevilkah.jpg'); &.blue-section {
background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/tema1ka/img/ozadje_1ka_v_stevilkah.jpg'); /* MNENJE */
} &.mnenja {
.testimonial {
min-height: 130px;
}
/* MNENJE */ .mask {
.section.blue-section.mnenja { border-right: 1px solid #FFFFFF;
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.5))), url('/tema1ka/img/ozadje_mnenje.jpg'); }
background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/tema1ka/img/ozadje_mnenje.jpg');
.testimonial { .slide-mnenje {
min-height: 130px; border: none;
} }
.mask{ }
border-right: 1px solid #FFFFFF;
}
.slide-mnenje{
border: none;
} }
} }
//Modernizer
.no-webp{
.section.blue-section.nums {
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.5))), url('/tema1ka/img/ozadje_1ka_v_stevilkah.jpg');
background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/tema1ka/img/ozadje_1ka_v_stevilkah.jpg');
}
.section.blue-section.mnenja {
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.5))), url('/tema1ka/img/ozadje_mnenje.jpg');
background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/tema1ka/img/ozadje_mnenje.jpg');
}
}
.webp{
.section.blue-section.nums {
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.5))), url('/tema1ka/img/ozadje_1ka_v_stevilkah.webp');
background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/tema1ka/img/ozadje_1ka_v_stevilkah.webp');
}
.section.blue-section.mnenja {
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.5))), url('/tema1ka/img/ozadje_mnenje.webp');
background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/tema1ka/img/ozadje_mnenje.webp');
}
}
/* VARNOST */ /* VARNOST */
.varnost .flexcol img { .varnost .flexcol img {
width: 100%; width: 100%;

View File

@ -1,8 +1,5 @@
/* KV slider */ /* KV slider */
.kv { .kv {
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.5))), url('/tema1ka/img/ozadje_slider.jpg');
background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/tema1ka/img/ozadje_slider.jpg');
.odpri-prijavo{ .odpri-prijavo{
font-size: 20px; font-size: 20px;
line-height: 20px; line-height: 20px;
@ -11,14 +8,39 @@
.innerkv { .innerkv {
height: 240px; height: 240px;
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.2)), to(rgba(0, 0, 0, 0.2))), url('/tema1ka/img/kva4.jpg');
background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('/tema1ka/img/kva4.jpg');
} }
.kv-title-copy { .kv-title-copy {
padding: 0px; padding: 0px;
border-left: none; border-left: none;
} }
// Modernizer
.no-webp {
.kv {
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.5))), url('/tema1ka/img/ozadje_slider.jpg');
background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/tema1ka/img/ozadje_slider.jpg');
}
.innerkv {
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.2)), to(rgba(0, 0, 0, 0.2))), url('/tema1ka/img/kva4.jpg');
background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('/tema1ka/img/kva4.jpg');
}
}
.webp{
.kv {
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.5))), url('/tema1ka/img/ozadje_slider.webp');
background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/tema1ka/img/ozadje_slider.webp');
}
.innerkv {
background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0.2)), to(rgba(0, 0, 0, 0.2))), url('/tema1ka/img/kva4.jwebp');
background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('/tema1ka/img/kva4.webp');
}
}
//figure.testimonial { //figure.testimonial {
// position: relative; // position: relative;