shacl-vue/index.html
Stephan Heunis c581edb29c
All checks were successful
Deploy on webserver / Build docs and deploy (push) Successful in 45s
Build shacl-vue / build (push) Successful in 51s
Factor out markdown rendering and add config error dialog
These changes were prompted by the need to show an error message when shacl-vue
fails to load the specified config file correctly. Such an error message would
ideally be configurable, with markdown support. Adding markdown support to a new
dialog in the 'ShaclVue' component highlighted the fact that markdown functionality
was already duplicated across the 'MarkdownEditor' and the 'WizardEditor' components.

This was factored out by doing the following:
- creating a 'useMarkdown' composable with the common functionality, and using this
  in 'ShaclVue', 'MarkdownEditor', and 'WizardEditor'
- moving common css, specifically the 'markdown-render' class, into
  'src/assets/style.css', which can now be used anywhere in the app

Then, the configuration composable was updated to load a config error message from the
new build-time configuration option CONFIG_ERROR_TEXT. A build-time config is necessary
here because the nature of the config error means that a normal runtime config option
won't be available to be displayed. The CONFIG_ERROR_TEXT option has to be supplied via
the config yaml file, which is passed via the BUILD_CONFIG='path/to/config/file.yaml'
option supplied at build time.

If this build-time config option is not supplied, the config error message defaults to:
'
  There was a problem loading the configuraton source.
  Please reload the page, or contact the site administrator if the problem persists.
'

This new error will show up in a dialog when a user opens shacl-vue in their browser, if:
- the main config URL cannot be fetched successfully
- the external config URL cannot be fetched successfully
2026-11-10 22:31:33 +02:00

22 lines
825 B
HTML

<!doctype html>
<html lang="en">
<head>
<meta
http-equiv="Content-Security-Policy"
content="%CSP_CONTENT%"
/>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<link rel="stylesheet" type="text/css" href="/src/assets/style.css" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;300;400;500;700;900&display=swap">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title></title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>