mirror of
https://github.com/Babibubebon/lodc2022-culture-art.git
synced 2024-09-23 01:14:20 +09:00
36 lines
846 B
HTML
36 lines
846 B
HTML
<div>
|
|
{{ with .Get "endpoint" }}
|
|
<p>
|
|
Endpoint: <code>{{ . }}</code>
|
|
</p>
|
|
{{ end }}
|
|
<div id="yasgui-{{ .Get "id" }}"></div>
|
|
</div>
|
|
|
|
<script>
|
|
yasgui["{{ .Get "id" }}"] = new Yasgui(document.getElementById("yasgui-{{ .Get "id" }}"), {
|
|
requestConfig: {{ dict "endpoint" (.Get "endpoint") }},
|
|
persistenceId: "{{ .Get "id" }}",
|
|
autofocus: false,
|
|
copyEndpointOnNewTab: false,
|
|
yasqe: {
|
|
theme: "{{ .Site.Params.CodeMirrorTheme }}",
|
|
{{ with .Inner }}
|
|
value: {{ trim . "\n" }}
|
|
{{ end }}
|
|
},
|
|
});
|
|
</script>
|
|
|
|
<style>
|
|
{{- if .Get "endpoint" }}
|
|
#yasgui-{{ .Get "id" }} .yasgui .autocompleteWrapper {
|
|
display: none !important;
|
|
}
|
|
{{- end -}}
|
|
{{ if not (default true (.Get "tab")) }}
|
|
#yasgui-{{ .Get "id" }} .yasgui .tabsList {
|
|
display: none !important;
|
|
}
|
|
{{- end }}
|
|
</style>
|