hal/hal-core/resources/web/main_index.tmpl

115 lines
3.8 KiB
Cheetah

<!--
~ The MIT License (MIT)
~
~ Copyright (c) 2025 Ziver Koc
~
~ Permission is hereby granted, free of charge, to any person obtaining a copy
~ of this software and associated documentation files (the "Software"), to deal
~ in the Software without restriction, including without limitation the rights
~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
~ copies of the Software, and to permit persons to whom the Software is
~ furnished to do so, subject to the following conditions:
~
~ The above copyright notice and this permission notice shall be included in
~ all copies or substantial portions of the Software.
~
~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
~ THE SOFTWARE.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>HAL</title>
<!-- Bootstrap core CSS -->
<link href="css/lib/bootstrap.min.css" rel="stylesheet">
<link href="css/lib/bootstrap-switch.min.css" rel="stylesheet">
<link href="css/lib/c3.min.css" rel="stylesheet">
<link href="css/hal.css" rel="stylesheet">
<script src="js/lib/jquery-1.11.3.min.js"></script>
<script src="js/lib/bootstrap.min.js"></script>
<script src="js/lib/bootstrap-switch.min.js"></script>
<script src="js/lib/moment.js"></script>
<script src="js/hal.js"></script>
<!-- <script src="js/hal_alert.js"></script> -->
<!-- charts -->
<script src="js/lib/d3.min.js"></script>
<script src="js/lib/force-graph.min.js"></script>
<script src="js/lib/c3.min.js"></script>
</head>
<body>
{{navigation}}
<div class="container-fluid">
<div class="row">
{{#side_navigation}}
{{side_navigation}}
<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
{{/side_navigation}}
{{^side_navigation}}<div class="main">{{/side_navigation}}
<div id="alert-container"></div>
<div id="app"></div>
{{content}}
</div>
</div>
</div>
<script type="importmap">
{
"imports": {
"vue": "./js/vue/lib/vue.esm-browser.js",
"vue-router": "./js/vue/lib/vue-router.esm-browser.js",
"@vue/devtools-api": "https://unpkg.com/@vue/devtools-api@6.4.5/lib/esm/index.js",
{{#javascriptModules}}"{{.getModuleName()}}": "{{.getScriptPath()}}",
{{/javascriptModules}}
"App": "./js/vue/App.js"
}
}
</script>
<script type="module">
import { createApp } from 'vue'
import { createRouter, createWebHistory } from 'vue-router'
{{#javascriptPages}}import {{.getModuleName()}} from '{{.getModuleName()}}'
{{/javascriptPages}}
import App from 'App'
const app = createApp(App);
const router = createRouter({
history: createWebHistory(),
routes: [
{{#javascriptPages}}{ name: "{{.getModuleName()}}", path: "{{.getPage()}}", component: {{.getModuleName()}} },
{{/javascriptPages}}
]
});
app.use(router);
app.mount('#app');
</script>
</body>
</html>