fix: lowercase BaseURL [filebrowser/filebrowser#522] (#40)

pull/739/head
Rene Kaufmann 2018-11-19 18:15:25 +01:00 committed by 1138-4EB
parent cad2a989c1
commit 218e638f88
6 changed files with 25 additions and 25 deletions

View File

@ -16,7 +16,7 @@
window.addEventListener('load', function() { window.addEventListener('load', function() {
if ('serviceWorker' in navigator && if ('serviceWorker' in navigator &&
(window.location.protocol === 'https:' || isLocalhost)) { (window.location.protocol === 'https:' || isLocalhost)) {
navigator.serviceWorker.register('{{ .BaseURL }}/sw.js') navigator.serviceWorker.register('{{ .baseurl }}/sw.js')
.then(function(registration) { .then(function(registration) {
// updatefound is fired if service-worker.js changes. // updatefound is fired if service-worker.js changes.
registration.onupdatefound = function() { registration.onupdatefound = function() {

View File

@ -119,7 +119,7 @@ var webpackConfig = merge(baseWebpackConfig, {
new SWPrecacheWebpackPlugin({ new SWPrecacheWebpackPlugin({
cacheId: 'File Browser', cacheId: 'File Browser',
filename: 'sw.js', filename: 'sw.js',
replacePrefix: '{{ .BaseURL }}/', replacePrefix: '{{ .baseurl }}/',
staticFileGlobs: ['dist/**/*.{js,html,css}'], staticFileGlobs: ['dist/**/*.{js,html,css}'],
minify: true, minify: true,
stripPrefix: 'dist/' stripPrefix: 'dist/'

View File

@ -6,29 +6,29 @@
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<!-- Inject some variables --> <!-- Inject some variables -->
<meta name="base" content="{{ .BaseURL }}"> <meta name="base" content="{{ .baseurl }}">
<meta name="staticgen" content="{{ .StaticGen }}"> <meta name="staticgen" content="{{ .StaticGen }}">
<meta name="noauth" content="{{ .NoAuth }}"> <meta name="noauth" content="{{ .NoAuth }}">
<meta name="version" content="{{ .Version }}"> <meta name="version" content="{{ .Version }}">
<meta name="recaptcha" content="{{ .ReCaptchaKey }}"> <meta name="recaptcha" content="{{ .ReCaptchaKey }}">
<title>File Browser</title> <title>File Browser</title>
<link rel="icon" type="image/png" sizes="32x32" href="{{ .BaseURL }}/static/img/icons/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="32x32" href="{{ .baseurl }}/static/img/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="{{ .BaseURL }}/static/img/icons/favicon-16x16.png"> <link rel="icon" type="image/png" sizes="16x16" href="{{ .baseurl }}/static/img/icons/favicon-16x16.png">
<!--[if IE]><link rel="shortcut icon" href="{{ .BaseURL }}/static/img/icons/favicon.ico"><![endif]--> <!--[if IE]><link rel="shortcut icon" href="{{ .baseurl }}/static/img/icons/favicon.ico"><![endif]-->
<!-- Add to home screen for Android and modern mobile browsers --> <!-- Add to home screen for Android and modern mobile browsers -->
<link rel="manifest" href="{{ .BaseURL }}/static/manifest.json"> <link rel="manifest" href="{{ .baseurl }}/static/manifest.json">
<meta name="theme-color" content="#2979ff"> <meta name="theme-color" content="#2979ff">
<!-- Add to home screen for Safari on iOS --> <!-- Add to home screen for Safari on iOS -->
<meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="assets"> <meta name="apple-mobile-web-app-title" content="assets">
<link rel="apple-touch-icon" href="{{ .BaseURL }}/static/img/icons/apple-touch-icon-152x152.png"> <link rel="apple-touch-icon" href="{{ .baseurl }}/static/img/icons/apple-touch-icon-152x152.png">
<!-- Add to home screen for Windows --> <!-- Add to home screen for Windows -->
<meta name="msapplication-TileImage" content="{{ .BaseURL }}/static/img/icons/msapplication-icon-144x144.png"> <meta name="msapplication-TileImage" content="{{ .baseurl }}/static/img/icons/msapplication-icon-144x144.png">
<meta name="msapplication-TileColor" content="#2979ff"> <meta name="msapplication-TileColor" content="#2979ff">
<script>CSS = "{{ .CSS }}"</script> <script>CSS = "{{ .CSS }}"</script>
@ -40,7 +40,7 @@
<% for (var chunk of webpack.chunks) { <% for (var chunk of webpack.chunks) {
for (var file of chunk.files) { for (var file of chunk.files) {
if (file.match(/\.(js|css)$/)) { %> if (file.match(/\.(js|css)$/)) { %>
<link rel="preload" href="{{ .BaseURL }}/<%= file %>" as="<%= file.match(/\.css$/)?'style':'script' %>"><% }}} %> <link rel="preload" href="{{ .baseurl }}/<%= file %>" as="<%= file.match(/\.css$/)?'style':'script' %>"><% }}} %>
<style> <style>
#loading { #loading {

View File

@ -3,17 +3,17 @@
"short_name": "File Browser", "short_name": "File Browser",
"icons": [ "icons": [
{ {
"src": "{{ .BaseURL }}/static/img/icons/android-chrome-192x192.png", "src": "{{ .baseurl }}/static/img/icons/android-chrome-192x192.png",
"sizes": "192x192", "sizes": "192x192",
"type": "image/png" "type": "image/png"
}, },
{ {
"src": "{{ .BaseURL }}/static/img/icons/android-chrome-512x512.png", "src": "{{ .baseurl }}/static/img/icons/android-chrome-512x512.png",
"sizes": "512x512", "sizes": "512x512",
"type": "image/png" "type": "image/png"
} }
], ],
"start_url": "{{ .BaseURL }}/", "start_url": "{{ .baseurl }}/",
"display": "standalone", "display": "standalone",
"background_color": "#ffffff", "background_color": "#ffffff",
"theme_color": "#455a64" "theme_color": "#455a64"

View File

@ -5,16 +5,16 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<title>File Browser</title> <title>File Browser</title>
<link rel="icon" type="image/png" sizes="32x32" href="{{ .BaseURL }}/static/img/icons/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="32x32" href="{{ .baseurl }}/static/img/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="{{ .BaseURL }}/static/img/icons/favicon-16x16.png"> <link rel="icon" type="image/png" sizes="16x16" href="{{ .baseurl }}/static/img/icons/favicon-16x16.png">
<!--[if IE]><link rel="shortcut icon" href="{{ .BaseURL }}/static/img/icons/favicon.ico"><![endif]--> <!--[if IE]><link rel="shortcut icon" href="{{ .baseurl }}/static/img/icons/favicon.ico"><![endif]-->
<link rel="manifest" href="{{ .BaseURL }}/static/manifest.json"> <link rel="manifest" href="{{ .baseurl }}/static/manifest.json">
<meta name="theme-color" content="#455a64"> <meta name="theme-color" content="#455a64">
<meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="assets"> <meta name="apple-mobile-web-app-title" content="assets">
<link rel="apple-touch-icon" href="{{ .BaseURL }}/static/img/icons/apple-touch-icon.png"> <link rel="apple-touch-icon" href="{{ .baseurl }}/static/img/icons/apple-touch-icon.png">
<meta name="msapplication-TileImage" content="{{ .BaseURL }}/static/img/icons/mstile-144x144.png"> <meta name="msapplication-TileImage" content="{{ .baseurl }}/static/img/icons/mstile-144x144.png">
<meta name="msapplication-TileColor" content="#455a64"> <meta name="msapplication-TileColor" content="#455a64">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css">

View File

@ -5,16 +5,16 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<title>{{ .File.Name }}</title> <title>{{ .File.Name }}</title>
<link rel="icon" type="image/png" sizes="32x32" href="{{ .BaseURL }}/static/img/icons/favicon-32x32.png"> <link rel="icon" type="image/png" sizes="32x32" href="{{ .baseurl }}/static/img/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="{{ .BaseURL }}/static/img/icons/favicon-16x16.png"> <link rel="icon" type="image/png" sizes="16x16" href="{{ .baseurl }}/static/img/icons/favicon-16x16.png">
<!--[if IE]><link rel="shortcut icon" href="{{ .BaseURL }}/static/img/icons/favicon.ico"><![endif]--> <!--[if IE]><link rel="shortcut icon" href="{{ .baseurl }}/static/img/icons/favicon.ico"><![endif]-->
<link rel="manifest" href="{{ .BaseURL }}/static/manifest.json"> <link rel="manifest" href="{{ .baseurl }}/static/manifest.json">
<meta name="theme-color" content="#455a64"> <meta name="theme-color" content="#455a64">
<meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="assets"> <meta name="apple-mobile-web-app-title" content="assets">
<link rel="apple-touch-icon" href="{{ .BaseURL }}/static/img/icons/apple-touch-icon.png"> <link rel="apple-touch-icon" href="{{ .baseurl }}/static/img/icons/apple-touch-icon.png">
<meta name="msapplication-TileImage" content="{{ .BaseURL }}/static/img/icons/mstile-144x144.png"> <meta name="msapplication-TileImage" content="{{ .baseurl }}/static/img/icons/mstile-144x144.png">
<meta name="msapplication-TileColor" content="#455a64"> <meta name="msapplication-TileColor" content="#455a64">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css">