diff --git a/_docs/img/bridge.png b/_docs/img/bridge.png new file mode 100644 index 0000000..81b8b69 Binary files /dev/null and b/_docs/img/bridge.png differ diff --git a/_docs/img/bridge_added.png b/_docs/img/bridge_added.png new file mode 100644 index 0000000..f8e5261 Binary files /dev/null and b/_docs/img/bridge_added.png differ diff --git a/_docs/index.html b/_docs/index.html index 1c4e5da..a605d56 100644 --- a/_docs/index.html +++ b/_docs/index.html @@ -6,9 +6,11 @@
${escaped}`;
+ // If Prism or highlight.js is present, trigger highlighting
+ if (window.Prism && Prism.highlightElement) {
+ Prism.highlightElement(this.querySelector('code'));
+ } else if (window.hljs && hljs.highlightElement) {
+ hljs.highlightElement(this.querySelector('code'));
+ }
+ }
+}
+customElements.define('code-block', CodeBlock);
diff --git a/_docs/js/components/code-inline.js b/_docs/js/components/code-inline.js
new file mode 100644
index 0000000..a5f1627
--- /dev/null
+++ b/_docs/js/components/code-inline.js
@@ -0,0 +1,32 @@
+class CodeInline extends HTMLElement {
+ connectedCallback() {
+ // Get the code content as text
+ let code = this.textContent;
+
+ // Escape HTML special characters
+ code = code
+ .replace(/&/g, "&")
+ .replace(//g, ">");
+
+ // Highlight variables: $variable, {variable}, or %variable%
+ code = code.replace(/(\$[a-zA-Z_][\w]*)|(\{[^\}]+\})|(%[^%]+%)/g, match =>
+ `${match}`
+ );
+
+ // Get language attribute for potential syntax highlighting
+ const lang = this.getAttribute('lang') || '';
+ const langClass = lang ? `language-${lang}` : '';
+
+ this.innerHTML = `${code}`;
+
+ // If Prism or highlight.js is present, trigger highlighting
+ if (window.Prism && Prism.highlightElement) {
+ Prism.highlightElement(this.querySelector('code'));
+ } else if (window.hljs && hljs.highlightElement) {
+ hljs.highlightElement(this.querySelector('code'));
+ }
+ }
+}
+
+customElements.define('code-inline', CodeInline);
diff --git a/_docs/js/components/header.js b/_docs/js/components/header.js
index 9487930..8dadac3 100644
--- a/_docs/js/components/header.js
+++ b/_docs/js/components/header.js
@@ -9,6 +9,7 @@ class Header extends HTMLElement {
this.innerHTML = `