Update theme w/ more Bergamot affordances

Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
Danila Fedorin 2024-09-15 19:49:37 -07:00
parent 0766211d79
commit 2defe99c73
3 changed files with 21 additions and 2 deletions

View File

@ -0,0 +1,17 @@
{
{{ if . }}
{{ range $name := split . ";" }}
{{ if eq $name "query" }}
"Query": "query",
{{ else }}
{{ $pieces := split $name ":" }}
{{ $name := index $pieces 0 }}
{{ $modestring := index $pieces 1 }}
"{{ $name }}": { "custom": "{{ $modestring }}" },
{{ end }}
{{ end }}
{{ else }}
"Languge Term": { "custom": "Bergamot Object Language" },
"Query": "query",
{{ end }}
}

View File

@ -1,6 +1,8 @@
<div id="{{ .Get "id" }}"></div> <div id="{{ .Get "id" }}"></div>
<script> <script>
window.addEventListener('load', function() { window.addEventListener('load', function() {
window.Bergamot.run(null, '{{ .Get "id" }}', '{{ .Get "prompt" }}', '{{ .Inner }}', '{{ default "default" (.Get "rendering") }}', '{{ .Get "query" }}'); window.Bergamot.run(null, '{{ .Get "id" }}',
{{ partial "bergamotparseinputmodes.js" (.Get "modes") | safeJS }},
'{{ .Get "prompt" }}', '{{ .Inner }}', '{{ default "default" (.Get "rendering") }}', '{{ .Get "query" }}');
}); });
</script> </script>

@ -1 +1 @@
Subproject commit 84278b2e91c9bcfcc08b34c08daa355e7c8f336a Subproject commit aae8912c089e25e33b0f9f94196a09f5e9501323