app/views/V2App/app.scala.html (60 lines of code) (raw):
@(
title: String,
jsLocation: String,
cssLocation: String,
faviconLocation: String,
clientConfigJson: String,
isDev: Boolean,
maybePinboardUrl: Option[String],
maybeTelemetryUrl: Option[String]
)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="icon" type="image/png" sizes="32x32" href="@{faviconLocation}favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="@{faviconLocation}favicon-16x16.png" />
<link rel="shortcut icon" href="@{faviconLocation}favicon.ico" />
<title>@title</title>
<style>
*,
*:before,
*:after {
box-sizing: border-box;
}
html,
body,
.wrap {
height: 100%;
margin: 0;
padding: 0;
width: 100%;
}
</style>
</head>
<body>
<div class="wrap" id="react-mount"></div>
<div id="config" data-value="@clientConfigJson"></div>
<script type="module">window.global = window</script>
@if(isDev) {
<!-- Connect directly to Vite dev server in development -->
<!-- See https://vitejs.dev/guide/backend-integration.html -->
<script type="module">
import RefreshRuntime from 'http://localhost:5173/assets/fronts-client-v2/@@react-refresh'
RefreshRuntime.injectIntoGlobalHook(window)
window.$RefreshReg$ = () => {
}
window.$RefreshSig$ = () => (type) => type
window.__vite_plugin_react_preamble_installed__ = true
</script>
<script type="module" src="http://localhost:5173/assets/fronts-client-v2/@@vite/client"></script>
<script type="module" src="http://localhost:5173/assets/fronts-client-v2/src/index.tsx"></script>
} else {
<link rel="stylesheet" href="@cssLocation">
<script type="module" src="@jsLocation" type="application/javascript"></script>
}
@maybePinboardUrl.map { pinboardUrl =>
<script async defer src="@pinboardUrl"></script>
}
</body>
</html>