Compare commits

..

6 Commits

Author SHA1 Message Date
77dade1d1d Move all bergamot partials and shortcodes into theme
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-09-15 20:10:04 -07:00
d140422225 Update theme
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-09-15 20:05:46 -07:00
2defe99c73 Update theme w/ more Bergamot affordances
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-09-15 19:49:37 -07:00
0766211d79 Turn semantics post into page bundle
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-09-15 18:47:32 -07:00
b854eade3c Remove configs from website that are now defined in theme
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-09-15 18:46:23 -07:00
c6f34f8eaa Delete unused shortcodes
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-09-15 17:46:13 -07:00
8 changed files with 1 additions and 78 deletions

View File

@ -44,9 +44,6 @@ defaultContentLanguage = 'en'
languageCode = "en-us"
[params]
bergamotJsUrl = "https://static.danilafe.com/bergamot/bergamot.js"
bergamotObjectLanguageJsUrl = "https://static.danilafe.com/bergamot/objectlang.js"
katexJsUrl = "https://static.danilafe.com/katex/katex.min.js"
plausibleAnalyticsDomain = "danilafe.com"
githubUsername = "DanilaFe"
siteSourceUrl = "https://dev.danilafe.com/Web-Projects/blog-static/src/branch/master"

View File

@ -1,21 +0,0 @@
<div class="bergamot-exercise">
<details open>
<summary>
<span class="bergamot-exercise-label">
<span class="bergamot-exercise-number"></span>
{{ if or (eq (.Get "label") "") (eq (.Get "label") nil) }}{{ else }}({{ .Get "label" }}){{ end }}:
</span>
</summary>
{{ transform.Markdownify .Inner }}
<div class="bergamot-button-group">
{{ if or (eq (.Get "preset") "") (eq (.Get "preset") nil) }}
{{ else }}
<button class="bergamot-button bergamot-play" onclick='window.Bergamot.runPreset(this.parentElement, "bergamot-widget-container-{{ .Get "id" }}", "{{ .Get "preset" }}")'>{{ partial "icon.html" "play" }}Start Bergamot</button>
<button class="bergamot-button bergamot-close bergamot-hidden" onclick='window.Bergamot.close(this.parentElement, "bergamot-widget-container-{{ .Get "id" }}")'>{{ partial "icon.html" "x" }}Close Bergamot</button>
{{ end }}
</div>
<div id="bergamot-widget-container-{{ .Get "id" }}"></div>
</details>
</div>

View File

@ -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>

View File

@ -1,3 +0,0 @@
<script>
window.Bergamot.renderPresets['{{ .Get "name" }}'] = '{{ .Inner }}';
</script>

View File

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

View File

@ -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>

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