Add some partials to load and create a Bergamot widget.
I've set up some infrastructure to build and host a bergamot JS file using Nix on static.danilafe.com. Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
3
layouts/shortcodes/bergamot_js_css.html
Normal file
3
layouts/shortcodes/bergamot_js_css.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<script src="{{ .Site.Params.bergamotJsUrl }}"></script>
|
||||
{{ $style := resources.Get "scss/bergamot.scss" | resources.ToCSS | resources.Minify }}
|
||||
<link rel="stylesheet" href="{{ $style.Permalink }}">
|
||||
7
layouts/shortcodes/bergamot_widget.html
Normal file
7
layouts/shortcodes/bergamot_widget.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<div id="{{ .Get "id" }}"></div>
|
||||
<script>
|
||||
var app = Elm.Main.init({
|
||||
node: document.getElementById('{{ .Get "id" }}'),
|
||||
flags: { rules: '{{- strings.Trim .Inner " \n" -}}', query: '{{ .Get "query" }}' }
|
||||
});
|
||||
</script>
|
||||
1
layouts/shortcodes/katex_component_js.html
Normal file
1
layouts/shortcodes/katex_component_js.html
Normal file
@@ -0,0 +1 @@
|
||||
<script type="module" src="{{ .Site.Params.katexExpressionJsUrl }}"></script>
|
||||
Reference in New Issue
Block a user