Delete unused shortcodes
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
parent
0ba5799c75
commit
c6f34f8eaa
|
@ -1,10 +0,0 @@
|
|||
<script>
|
||||
window.addEventListener('load', function() {
|
||||
window.Bergamot.presets['{{ .Get "name" }}'] = {
|
||||
rules: '{{ .Inner }}',
|
||||
inputPrompt: '{{ .Get "prompt" }}',
|
||||
query: '{{ .Get "query" }}',
|
||||
renderPreset: '{{ default "default" (.Get "rendering") }}'
|
||||
};
|
||||
});
|
||||
</script>
|
|
@ -1,3 +0,0 @@
|
|||
<script>
|
||||
window.Bergamot.renderPresets['{{ .Get "name" }}'] = '{{ .Inner }}';
|
||||
</script>
|
|
@ -1,34 +0,0 @@
|
|||
<script defer src="{{ .Site.Params.katexJsUrl }}" crossorigin="anonymous"></script>
|
||||
<script defer>
|
||||
class KatexExpressionShim extends HTMLElement {
|
||||
static observedAttributes = ["expression", "katex-options"];
|
||||
targetSpan;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
}
|
||||
|
||||
doRender() {
|
||||
if (!this.targetSpan) return;
|
||||
|
||||
const options = this.hasAttribute("katex-options") ?
|
||||
this.getAttribute("katex-options") : {};
|
||||
katex.render(
|
||||
this.getAttribute("expression"),
|
||||
this.targetSpan,
|
||||
JSON.parse(options)
|
||||
);
|
||||
}
|
||||
|
||||
connectedCallback() {
|
||||
this.targetSpan = document.createElement('span');
|
||||
this.appendChild(this.targetSpan);
|
||||
this.doRender();
|
||||
}
|
||||
|
||||
attributeChangedCallback(name, oldValue, newValue) {
|
||||
this.doRender();
|
||||
}
|
||||
}
|
||||
customElements.define("katex-expression", KatexExpressionShim);
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user