Skip to content
Snippets Groups Projects
Commit f9bf27ec authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Avoid referencing the private assets path in the main template

This way we can change it more easily in the future
parent 2d6015d9
Branches
No related tags found
No related merge requests found
Pipeline #11202 passed
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Favicons --> <!-- Favicons -->
<link rel="shortcut icon" type="image/x-icon" href="<%= geturl('local/vpu-signature/favicon.ico') %>"> <link rel="shortcut icon" type="image/x-icon" href="<%= getprivateurl('favicon.ico') %>">
<link rel="icon" type="image/svg+xml" href="<%= geturl('local/vpu-signature/favicon.svg') %>" sizes="any"> <link rel="icon" type="image/svg+xml" href="<%= getprivateurl('favicon.svg') %>" sizes="any">
<% if (environment === "local") { -%> <% if (environment === "local") { -%>
<!-- XXX: Disable adoptedStyleSheets so that lit-element doesn't use it and we can edit CSS in the Chrome dev tools --> <!-- XXX: Disable adoptedStyleSheets so that lit-element doesn't use it and we can edit CSS in the Chrome dev tools -->
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<!-- Loading spinner --> <!-- Loading spinner -->
<script type="module"> <script type="module">
import {Spinner} from '<%= geturl('local/vpu-signature/spinner.js') %>'; import {Spinner} from '<%= getprivateurl('spinner.js') %>';
customElements.define('vpu-loading-spinner', Spinner); customElements.define('vpu-loading-spinner', Spinner);
</script> </script>
...@@ -31,10 +31,10 @@ ...@@ -31,10 +31,10 @@
<meta name="google" content="notranslate"> <meta name="google" content="notranslate">
<!-- Preload fonts --> <!-- Preload fonts -->
<link rel="preload" href="<%= geturl('local/vpu-signature/fonts/SourceSansPro-Light.otf.woff2') %>" as="font" type="font/woff2" crossorigin> <link rel="preload" href="<%= getprivateurl('fonts/SourceSansPro-Light.otf.woff2') %>" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="<%= geturl('local/vpu-signature/fonts/SourceSansPro-Regular.otf.woff2') %>" as="font" type="font/woff2" crossorigin> <link rel="preload" href="<%= getprivateurl('fonts/SourceSansPro-Regular.otf.woff2') %>" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="<%= geturl('local/vpu-signature/fonts/SourceSansPro-Semibold.otf.woff2') %>" as="font" type="font/woff2" crossorigin> <link rel="preload" href="<%= getprivateurl('fonts/SourceSansPro-Semibold.otf.woff2') %>" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="<%= geturl('local/vpu-signature/fonts/SourceSansPro-Bold.otf.woff2') %>" as="font" type="font/woff2" crossorigin> <link rel="preload" href="<%= getprivateurl('fonts/SourceSansPro-Bold.otf.woff2') %>" as="font" type="font/woff2" crossorigin>
<!-- Matomo --> <!-- Matomo -->
<script type="text/javascript"> <script type="text/javascript">
...@@ -86,28 +86,28 @@ ...@@ -86,28 +86,28 @@
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
font-weight: 300; font-weight: 300;
src: url('<%= geturl('local/vpu-signature/fonts/SourceSansPro-Light.otf.woff2') %>') format('woff2'); src: url('<%= getprivateurl('fonts/SourceSansPro-Light.otf.woff2') %>') format('woff2');
font-display: block; font-display: block;
} }
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
font-weight: 400; font-weight: 400;
src: url('<%= geturl('local/vpu-signature/fonts/SourceSansPro-Regular.otf.woff2') %>') format('woff2'); src: url('<%= getprivateurl('fonts/SourceSansPro-Regular.otf.woff2') %>') format('woff2');
font-display: block; font-display: block;
} }
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
font-weight: 600; font-weight: 600;
src: url('<%= geturl('local/vpu-signature/fonts/SourceSansPro-Semibold.otf.woff2') %>') format('woff2'); src: url('<%= getprivateurl('fonts/SourceSansPro-Semibold.otf.woff2') %>') format('woff2');
font-display: block; font-display: block;
} }
@font-face { @font-face {
font-family: 'Source Sans Pro'; font-family: 'Source Sans Pro';
font-weight: 700; font-weight: 700;
src: url('<%= geturl('local/vpu-signature/fonts/SourceSansPro-Bold.otf.woff2') %>') format('woff2'); src: url('<%= getprivateurl('fonts/SourceSansPro-Bold.otf.woff2') %>') format('woff2');
font-display: block; font-display: block;
} }
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
><vpu-loading-spinner></vpu-loading-spinner></vpu-app-signature> ><vpu-loading-spinner></vpu-loading-spinner></vpu-app-signature>
<!-- Error handling for too old browsers --> <!-- Error handling for too old browsers -->
<script src="<%= geturl('local/vpu-signature/browser-check.js') %>" defer></script> <script src="<%= getprivateurl('browser-check.js') %>" defer></script>
<noscript>Diese Applikation benötigt Javascript / This application requires Javascript</noscript> <noscript>Diese Applikation benötigt Javascript / This application requires Javascript</noscript>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -212,6 +212,9 @@ export default { ...@@ -212,6 +212,9 @@ export default {
geturl: (p) => { geturl: (p) => {
return url.resolve(basePath, p); return url.resolve(basePath, p);
}, },
getprivateurl: (p) => {
return url.resolve(`${basePath}local/${pkg.name}/`, p);
},
entryPointURL: entryPointURL, entryPointURL: entryPointURL,
keyCloakServer: keyCloakServer, keyCloakServer: keyCloakServer,
keyCloakBaseURL: keyCloakBaseURL, keyCloakBaseURL: keyCloakBaseURL,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment