more gulp versioning and move img folder

This commit is contained in:
Felix Schulze 2019-11-08 02:17:07 +01:00
parent 19b65412be
commit 0ac1f250b8
46 changed files with 28 additions and 27 deletions

View File

@ -240,8 +240,9 @@ var copyFiles = function (done) {
// updates version in all assets // updates version in all assets
var updateAssetVersion = function (done) { var updateAssetVersion = function (done) {
return src('src/copy/**/*.{php,html}') return src('src/copy/**/**/*.{php,html}')
.pipe(hashsrc({build_dir:paths.input,src_path:"/",hash_len:"6",query_name:"v"})) .pipe(hashsrc({build_dir:paths.input,src_path:"/",hash_len:"6",query_name:"v"}))
.pipe(hashsrc({build_dir:paths.input,src_path:"/",hash_len:"6",query_name:"v",exts:[".json"]}))
.pipe(dest(paths.output)); .pipe(dest(paths.output));
}; };
// Watch for changes to the src directory // Watch for changes to the src directory

View File

@ -14,7 +14,7 @@
<link rel='preconnect' href='https://cdnjs.cloudflare.com' crossorigin> <link rel='preconnect' href='https://cdnjs.cloudflare.com' crossorigin>
<link rel='preconnect' href='https://pagead2.googlesyndication.com' crossorigin> <link rel='preconnect' href='https://pagead2.googlesyndication.com' crossorigin>
<script async src="js/modernizer-webp.js"></script> <script async src="js/modernizer-webp.js"></script>
<link rel="stylesheet" async href="css/main.min.css"> <link rel="stylesheet" async href="css/main.css">
<link rel='preload' async href='img/background85.webp' as='image' type='image/webp'> <link rel='preload' async href='img/background85.webp' as='image' type='image/webp'>
<link disabled class="lateLoader" rel='stylesheet' defer href='https://fonts.googleapis.com/icon?family=Material+Icons'> <link disabled class="lateLoader" rel='stylesheet' defer href='https://fonts.googleapis.com/icon?family=Material+Icons'>
<link rel="stylesheet" defer href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.2/css/materialize.min.css"> <link rel="stylesheet" defer href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.2/css/materialize.min.css">

View File

Before

Width:  |  Height:  |  Size: 280 KiB

After

Width:  |  Height:  |  Size: 280 KiB

View File

@ -24,7 +24,7 @@ echo "
<link disabled class='lateLoader' rel='stylesheet' defer href='https://fonts.googleapis.com/icon?family=Material+Icons'> <link disabled class='lateLoader' rel='stylesheet' defer href='https://fonts.googleapis.com/icon?family=Material+Icons'>
<link rel='stylesheet' defer href='https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.2/css/materialize.min.css'> <link rel='stylesheet' defer href='https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.2/css/materialize.min.css'>
<script data-ad-client='ca-pub-5143923140938916' defer src='https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'></script> <script data-ad-client='ca-pub-5143923140938916' defer src='https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'></script>
<link rel='stylesheet' async href='css/main.min.css'> <link rel='stylesheet' async href='css/main.css'>
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src='https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js'></script> <script src='https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js'></script>

View File

@ -22,8 +22,8 @@
<link rel='preconnect' href='https://cdnjs.cloudflare.com' crossorigin> <link rel='preconnect' href='https://cdnjs.cloudflare.com' crossorigin>
<link rel='preconnect' href='https://pagead2.googlesyndication.com' crossorigin> <link rel='preconnect' href='https://pagead2.googlesyndication.com' crossorigin>
<script async src="/js/modernizer-webp.js"></script> <script async src="/js/modernizer-webp.js"></script>
<link rel="stylesheet" async href="/css/main.min.css"> <link rel="stylesheet" async href="/css/main.css">
<link rel='preload' async href='/img/background85.webp' as='image' type='image/webp'> <link rel="preload" async href="/img/background85.webp" as="image" type="image/webp">
<link rel="stylesheet" defer href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.2/css/materialize.min.css"> <link rel="stylesheet" defer href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.2/css/materialize.min.css">
<script data-ad-client="ca-pub-5143923140938916" defer src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script data-ad-client="ca-pub-5143923140938916" defer src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
@ -39,17 +39,17 @@
FAVICON FAVICON
XXXXXXX XXXXXXX
--> -->
<link href="img/favicon/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180"> <link href="/img/favicon/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180">
<link href="img/favicon/favicon-32x32.png" rel="icon" sizes="32x32" type="image/png"> <link href="/img/favicon/favicon-32x32.png" rel="icon" sizes="32x32" type="image/png">
<link href="img/favicon/favicon-16x16.png" rel="icon" sizes="16x16" type="image/png"> <link href="/img/favicon/favicon-16x16.png" rel="icon" sizes="16x16" type="image/png">
<link href="img/favicon/manifest.json" rel="manifest"> <link href="/img/favicon/manifest.json" rel="manifest">
<link color="#2b5797" href="img/favicon/safari-pinned-tab.svg" rel="mask-icon"> <link color="#2b5797" href="/img/favicon/safari-pinned-tab.svg" rel="mask-icon">
<link href="img/favicon/favicon.ico" rel="shortcut icon"> <link href="/img/favicon/favicon.ico" rel="shortcut icon">
<meta content="Meritv&auml;rde" name="apple-mobile-web-app-title"> <meta content="Meritv&auml;rde" name="apple-mobile-web-app-title">
<meta content="Meritv&auml;rde" name="application-name"> <meta content="Meritv&auml;rde" name="application-name">
<meta content="#2b5797" name="msapplication-TileColor"> <meta content="#2b5797" name="msapplication-TileColor">
<meta content="img/favicon/mstile-144x144.png" name="msapplication-TileImage"> <meta content="/img/favicon/mstile-144x144.png" name="msapplication-TileImage">
<meta content="img/favicon/browserconfig.xml" name="msapplication-config"> <meta content="/img/favicon/browserconfig.xml" name="msapplication-config">
<meta name="theme-color" content="#27233a"> <meta name="theme-color" content="#27233a">
<meta name="msvalidate.01" content="A8E903A05A7CA699D918AE4DA58E910E" /> <meta name="msvalidate.01" content="A8E903A05A7CA699D918AE4DA58E910E" />

View File

@ -13,19 +13,19 @@ self.addEventListener('install', function(e) {
'/Samhäll', '/Samhäll',
'/Teknik', '/Teknik',
'/Kontakt', '/Kontakt',
'/assets/css/main.min.css', '/css/main.min.css',
'/assets/img/tips.jpg ', '/img/tips.jpg ',
'/assets/img/background.jpg ', '/img/background.jpg ',
'/assets/img/background85.webp ', '/img/background85.webp ',
'/assets/img/favicon/manifest.json', '/img/favicon/manifest.json',
'/assets/img/favicon/android-chrome-192x192.png', '/img/favicon/android-chrome-192x192.png',
'/assets/img/favicon/favicon-32x32.png', '/img/favicon/favicon-32x32.png',
'/assets/img/favicon/favicon-16x16.png', '/img/favicon/favicon-16x16.png',
'/assets/img/favicon/favicon.ico', '/img/favicon/favicon.ico',
'/assets/js/softscrollscript.js', '/js/softscrollscript.js',
'/assets/js/material.min.js', '/js/material.min.js',
'/assets/js/smallScript.js', '/js/smallScript.js',
'/assets/js/modernizer-webp.js', '/js/modernizer-webp.js',
'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js', 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js',
'https://fonts.googleapis.com/icon?family=Material+Icons', 'https://fonts.googleapis.com/icon?family=Material+Icons',
'https://fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2', 'https://fonts.gstatic.com/s/materialicons/v48/flUhRq6tzZclQEJ-Vdg-IuiaDsNc.woff2',
@ -50,4 +50,4 @@ self.addEventListener('fetch', function(event) {
return response || fetch(event.request); return response || fetch(event.request);
}) })
); );
}); });

View File

Before

Width:  |  Height:  |  Size: 418 KiB

After

Width:  |  Height:  |  Size: 418 KiB

BIN
src/img/background85.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 MiB

After

Width:  |  Height:  |  Size: 3.7 MiB

View File

Before

Width:  |  Height:  |  Size: 5.9 MiB

After

Width:  |  Height:  |  Size: 5.9 MiB

View File

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 69 KiB

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

View File

Before

Width:  |  Height:  |  Size: 727 B

After

Width:  |  Height:  |  Size: 727 B

View File

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 7.0 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View File

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB