this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

🎨 Auto-format code [skip ci]

+50 -53
+49 -49
src/components/LocalFileLink.astro
··· 1 - --- 2 - type Props = { 3 - href: string; 4 - title: string; 5 - text: string; 6 - keybind?: string; 7 - openWith: "vscode" | "vnd.gwennlbh.explorer"; 8 - }; 9 - 10 - const { href, title, text, keybind, openWith } = Astro.props; 11 - --- 12 - 13 - <script> 14 - document.querySelectorAll("a[data-keybind]").forEach((el) => { 15 - window.addEventListener("keypress", (e) => { 16 - if (!(el instanceof HTMLAnchorElement)) return; 17 - if (e.key === el.dataset.keybind) { 18 - window.location.href = el.href; 19 - } 20 - }); 21 - }); 22 - </script> 23 - 24 - <a 25 - data-keybind={keybind} 26 - class="edit-button" 27 - href={[ 28 - openWith === "vscode" ? "vscode://file" : "vnd.gwennlbh.explorer.exe:", 29 - href 30 - .replace("/home/uwun/", "C:/Users/ewen/") 31 - .replace("~/", "C:/Users/ewen/") 32 - .replaceAll("/", "\\"), 33 - ].join("/")} 34 - title={title} 35 - > 36 - {text} 37 - </a> 38 - 39 - <style> 40 - a.edit-button { 41 - color: transparent; 42 - margin-left: 1em; 43 - text-decoration: none; 44 - } 45 - 46 - a.edit-button:hover { 47 - color: var(--primary, black); 48 - } 49 - </style> 1 + --- 2 + type Props = { 3 + href: string; 4 + title: string; 5 + text: string; 6 + keybind?: string; 7 + openWith: "vscode" | "vnd.gwennlbh.explorer"; 8 + }; 9 + 10 + const { href, title, text, keybind, openWith } = Astro.props; 11 + --- 12 + 13 + <script> 14 + document.querySelectorAll("a[data-keybind]").forEach((el) => { 15 + window.addEventListener("keypress", (e) => { 16 + if (!(el instanceof HTMLAnchorElement)) return; 17 + if (e.key === el.dataset.keybind) { 18 + window.location.href = el.href; 19 + } 20 + }); 21 + }); 22 + </script> 23 + 24 + <a 25 + data-keybind={keybind} 26 + class="edit-button" 27 + href={[ 28 + openWith === "vscode" ? "vscode://file" : "vnd.gwennlbh.explorer.exe:", 29 + href 30 + .replace("/home/uwun/", "C:/Users/ewen/") 31 + .replace("~/", "C:/Users/ewen/") 32 + .replaceAll("/", "\\"), 33 + ].join("/")} 34 + title={title} 35 + > 36 + {text} 37 + </a> 38 + 39 + <style> 40 + a.edit-button { 41 + color: transparent; 42 + margin-left: 1em; 43 + text-decoration: none; 44 + } 45 + 46 + a.edit-button:hover { 47 + color: var(--primary, black); 48 + } 49 + </style>
+1 -4
src/pages/works/[work].astro
··· 84 84 85 85 const firstMediaBlock = blocks.find((b) => b.type === "media"); 86 86 87 - const folderPath = entry.data.source 88 - .split("\\") 89 - .slice(0, -2) 90 - .join("\\"); 87 + const folderPath = entry.data.source.split("\\").slice(0, -2).join("\\"); 91 88 --- 92 89 93 90 <Layout colors={colors}>