fix: lowercase BaseURL [filebrowser/filebrowser#522] (#40)
parent
cad2a989c1
commit
218e638f88
|
@ -16,7 +16,7 @@
|
|||
window.addEventListener('load', function() {
|
||||
if ('serviceWorker' in navigator &&
|
||||
(window.location.protocol === 'https:' || isLocalhost)) {
|
||||
navigator.serviceWorker.register('{{ .BaseURL }}/sw.js')
|
||||
navigator.serviceWorker.register('{{ .baseurl }}/sw.js')
|
||||
.then(function(registration) {
|
||||
// updatefound is fired if service-worker.js changes.
|
||||
registration.onupdatefound = function() {
|
||||
|
|
|
@ -119,7 +119,7 @@ var webpackConfig = merge(baseWebpackConfig, {
|
|||
new SWPrecacheWebpackPlugin({
|
||||
cacheId: 'File Browser',
|
||||
filename: 'sw.js',
|
||||
replacePrefix: '{{ .BaseURL }}/',
|
||||
replacePrefix: '{{ .baseurl }}/',
|
||||
staticFileGlobs: ['dist/**/*.{js,html,css}'],
|
||||
minify: true,
|
||||
stripPrefix: 'dist/'
|
||||
|
|
16
index.html
16
index.html
|
@ -6,29 +6,29 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
|
||||
<!-- Inject some variables -->
|
||||
<meta name="base" content="{{ .BaseURL }}">
|
||||
<meta name="base" content="{{ .baseurl }}">
|
||||
<meta name="staticgen" content="{{ .StaticGen }}">
|
||||
<meta name="noauth" content="{{ .NoAuth }}">
|
||||
<meta name="version" content="{{ .Version }}">
|
||||
<meta name="recaptcha" content="{{ .ReCaptchaKey }}">
|
||||
|
||||
<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="16x16" href="{{ .BaseURL }}/static/img/icons/favicon-16x16.png">
|
||||
<!--[if IE]><link rel="shortcut icon" href="{{ .BaseURL }}/static/img/icons/favicon.ico"><![endif]-->
|
||||
<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">
|
||||
<!--[if IE]><link rel="shortcut icon" href="{{ .baseurl }}/static/img/icons/favicon.ico"><![endif]-->
|
||||
|
||||
<!-- 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">
|
||||
|
||||
<!-- Add to home screen for Safari on iOS -->
|
||||
<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-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 -->
|
||||
<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">
|
||||
|
||||
<script>CSS = "{{ .CSS }}"</script>
|
||||
|
@ -40,7 +40,7 @@
|
|||
<% for (var chunk of webpack.chunks) {
|
||||
for (var file of chunk.files) {
|
||||
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>
|
||||
#loading {
|
||||
|
|
|
@ -3,17 +3,17 @@
|
|||
"short_name": "File Browser",
|
||||
"icons": [
|
||||
{
|
||||
"src": "{{ .BaseURL }}/static/img/icons/android-chrome-192x192.png",
|
||||
"src": "{{ .baseurl }}/static/img/icons/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "{{ .BaseURL }}/static/img/icons/android-chrome-512x512.png",
|
||||
"src": "{{ .baseurl }}/static/img/icons/android-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"start_url": "{{ .BaseURL }}/",
|
||||
"start_url": "{{ .baseurl }}/",
|
||||
"display": "standalone",
|
||||
"background_color": "#ffffff",
|
||||
"theme_color": "#455a64"
|
||||
|
|
|
@ -5,16 +5,16 @@
|
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<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="16x16" href="{{ .BaseURL }}/static/img/icons/favicon-16x16.png">
|
||||
<!--[if IE]><link rel="shortcut icon" href="{{ .BaseURL }}/static/img/icons/favicon.ico"><![endif]-->
|
||||
<link rel="manifest" href="{{ .BaseURL }}/static/manifest.json">
|
||||
<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">
|
||||
<!--[if IE]><link rel="shortcut icon" href="{{ .baseurl }}/static/img/icons/favicon.ico"><![endif]-->
|
||||
<link rel="manifest" href="{{ .baseurl }}/static/manifest.json">
|
||||
<meta name="theme-color" content="#455a64">
|
||||
<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-title" content="assets">
|
||||
<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">
|
||||
<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-TileColor" content="#455a64">
|
||||
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css">
|
||||
|
|
|
@ -5,16 +5,16 @@
|
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
<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="16x16" href="{{ .BaseURL }}/static/img/icons/favicon-16x16.png">
|
||||
<!--[if IE]><link rel="shortcut icon" href="{{ .BaseURL }}/static/img/icons/favicon.ico"><![endif]-->
|
||||
<link rel="manifest" href="{{ .BaseURL }}/static/manifest.json">
|
||||
<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">
|
||||
<!--[if IE]><link rel="shortcut icon" href="{{ .baseurl }}/static/img/icons/favicon.ico"><![endif]-->
|
||||
<link rel="manifest" href="{{ .baseurl }}/static/manifest.json">
|
||||
<meta name="theme-color" content="#455a64">
|
||||
<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-title" content="assets">
|
||||
<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">
|
||||
<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-TileColor" content="#455a64">
|
||||
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/7.0.0/normalize.min.css">
|
||||
|
|
Loading…
Reference in New Issue