Update theme w/ more Bergamot affordances
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
parent
0766211d79
commit
2defe99c73
17
layouts/partials/bergamotparseinputmodes.js
Normal file
17
layouts/partials/bergamotparseinputmodes.js
Normal 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 }}
|
||||||
|
}
|
|
@ -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
|
Loading…
Reference in New Issue
Block a user