1
0
Fork 0

Import existing project

This commit is contained in:
Caileb 2025-05-26 12:42:36 -05:00
parent 7887817595
commit 80b0cc4939
125 changed files with 16980 additions and 0 deletions

1
public/js/docs.js Normal file
View file

@ -0,0 +1 @@
import{highlightElement}from"https://unpkg.com/@speed-highlight/core@1.2.7/dist/index.js";document.addEventListener("DOMContentLoaded",()=>{initSyntaxHighlighting()});async function initSyntaxHighlighting(){try{const e=document.querySelectorAll(".code-example pre code");e.forEach(e=>{let t="html";const s=e.closest(".code-example");if(s){const e=s.querySelector(".code-label");if(e){const n=e.textContent.trim().toLowerCase();n==="css"&&(t="css"),(n==="js"||n==="javascript")&&(t="js"),(n==="go"||n==="golang")&&(t="go"),n==="json"&&(t="json"),n==="http"&&(t="http")}}const n=document.createElement("div");n.className=`shj-lang-${t}`,n.textContent=e.textContent;const o=e.parentElement;o.parentNode.replaceChild(n,o),highlightElement(n,t)})}catch(e){console.warn("Syntax highlighting failed to initialize:",e)}}