mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-06 08:22:24 +01:00
100 lines
4.3 KiB
HTML
100 lines
4.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<base href="{{ .base }}">
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="application-name" content="Filestash">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
|
|
<title></title>
|
|
<link rel="icon" href="{{ .favicon }}">
|
|
<script>{{ if eq .license "agpl" }}{{ template "loader-cat" }}{{ else }}{{ template "loader-basic" }}{{ end }}</script>
|
|
</head>
|
|
<body>
|
|
<div id="app">
|
|
<component-bootscreen></component-bootscreen>
|
|
</div>
|
|
|
|
<template id="head">
|
|
<link rel="stylesheet" href="custom.css">
|
|
</template>
|
|
<template id="body">
|
|
<script type="module">
|
|
import main from "./assets/{{ .version }}/lib/skeleton/index.js";
|
|
import routes from "./assets/{{ .version }}/boot/router_frontoffice.js";
|
|
|
|
main(document.getElementById("app"), routes, {
|
|
spinner: `<component-loader></component-loader>`,
|
|
beforeStart: import("{{ .base }}assets/{{ .version }}/boot/ctrl_boot_frontoffice.js"),
|
|
});
|
|
</script>
|
|
<component-modal></component-modal>
|
|
<component-notification></component-notification>
|
|
</template>
|
|
|
|
<script type="module">
|
|
async function ignitionSequence() {
|
|
window.VERSION = "{{ slice .version 0 7 }}::{{ .hash }}";
|
|
|
|
try {
|
|
if (!HTMLScriptElement.supports?.("importmap")) throw new Error("fastboot is not supported on this platform");
|
|
{{ load_asset "assets/boot/bundler_init.js" }}
|
|
await Promise.all(Array({{ .bundle_size }}).fill().map((_, i) => new Promise((resolve, reject) => document.head.appendChild(Object.assign(document.createElement("script"), {
|
|
type: "module",
|
|
src: `./assets/bundle.js?version=${window.VERSION}&chunk=${i+1}`,
|
|
onload: resolve,
|
|
onerror: reject,
|
|
})))));
|
|
{{ load_asset "assets/boot/bundler_complete.js" }}
|
|
} catch (err) { console.error(err); }
|
|
|
|
await Promise.all([
|
|
import("./assets/{{ .version }}/components/loader.js"),
|
|
import("./assets/{{ .version }}/components/modal.js"),
|
|
import("./assets/{{ .version }}/components/notification.js"),
|
|
import("./assets/{{ .version }}/helpers/loader.js").then(({ loadCSS }) => {
|
|
loadCSS(import.meta.url, "{{ .base }}assets/{{ .version }}/css/designsystem.css");
|
|
}),
|
|
]);
|
|
}
|
|
|
|
function liftoff() {
|
|
document.head.appendChild(document.querySelector("template#head").content);
|
|
document.body.appendChild(document.querySelector("template#body").content);
|
|
}
|
|
//
|
|
//
|
|
//
|
|
//
|
|
// /\
|
|
// / \
|
|
// || / \
|
|
// || /______\
|
|
// ||| |
|
|
// | | |
|
|
// | | |
|
|
// |__|________|
|
|
// |___________|
|
|
// | | |
|
|
// |__| || |\
|
|
// ||| || | \
|
|
// /||| || | \
|
|
// /_|||...||...|___\
|
|
// |||::::::::|
|
|
// || \::::::/
|
|
// || ||__||
|
|
// || ||
|
|
// || \\_______________
|
|
// _______________||______`---------------
|
|
// |
|
|
// | |
|
|
await ignitionSequence() // |
|
|
// |
|
|
liftoff() // |
|
|
// | |
|
|
// |_____________________________________________|
|
|
</script>
|
|
|
|
<noscript><div style="text-align:center;font-family:monospace;margin-top:5%;font-size:15px;"><h2>Error: Javascript is off</h2></div></noscript>
|
|
</body>
|
|
</html>
|