diff options
| -rw-r--r-- | public/scrollbar.js | 21 | ||||
| -rw-r--r-- | website.templ | 2 | ||||
| -rw-r--r-- | website_templ.go | 130 |
3 files changed, 78 insertions, 75 deletions
diff --git a/public/scrollbar.js b/public/scrollbar.js index 2218b55..b297d76 100644 --- a/public/scrollbar.js +++ b/public/scrollbar.js @@ -1,4 +1,8 @@ function initScrollbox(box) { + // Guard against double-initialization + if (box.dataset.initialized) return; + box.dataset.initialized = "true"; + const area = box.querySelector("[data-scroll-area]"); const track = box.querySelector("[data-scroll-track]"); const thumb = box.querySelector("[data-scroll-thumb]"); @@ -51,23 +55,26 @@ function initScrollbox(box) { document.querySelectorAll("[data-scrollbox]").forEach(initScrollbox); -// Vim style j/k scrolling +document.addEventListener("htmx:afterSettle", () => { + document.querySelectorAll("[data-scrollbox]").forEach(initScrollbox); +}); + document.addEventListener("keydown", (e) => { - // Don't scroll in input elements - const tag = document.activeElement.tagName; + const tag = document.activeElement?.tagName; if ( ["INPUT", "TEXTAREA", "SELECT"].includes(tag) || - document.activeElement.isContentEditable + document.activeElement?.isContentEditable ) { return; } - // Only work for "j" and "k", no ctrl/alt/shift if (e.ctrlKey || e.altKey || e.metaKey) return; + if (e.key !== "j" && e.key !== "k") return; - const dir = key === "j" ? step : -step; - const scrollTarget = document.scrollingElement || document.documentElement; const scrollAmount = 100; // in pixels + const dir = e.key === "j" ? scrollAmount : -scrollAmount; + const scrollTarget = document.scrollingElement || document.documentElement; + if (scrollTarget && scrollTarget.scrollHeight > scrollTarget.clientHeight) { scrollTarget.scrollBy({ top: dir, behavior: "auto" }); } else { diff --git a/website.templ b/website.templ index 7df619d..39c9481 100644 --- a/website.templ +++ b/website.templ @@ -24,6 +24,7 @@ templ HeadComponent(title string, description string) { <script src="/public/scrollbar.js" defer></script> <script src="/public/my_uptime.js" defer></script> <script src="/public/footnotes.js" defer></script> + <script src="/public/shell.js" defer></script> <link rel="preload" href="/public/styles/style.css" as="style"/> <link rel="stylesheet" href="/public/styles/style.css"/> <script src="https://unpkg.com/htmx.org@1.9.10" defer></script> @@ -797,7 +798,6 @@ templ ShellPage(style Style) { </div> </div> } - <script src="/public/shell.js" defer></script> } } diff --git a/website_templ.go b/website_templ.go index 8918a7a..d9f52f2 100644 --- a/website_templ.go +++ b/website_templ.go @@ -81,7 +81,7 @@ func HeadComponent(title string, description string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "\"><meta property=\"og:type\" content=\"website\"><meta property=\"og:url\" content=\"https://kyren.codes/\"><meta property=\"og:image\" content=\"https://kyren.codes/public/image.png\"><meta property=\"og:image:alt\" content=\"a cyan sphere with a dark background\"><meta property=\"og:site_name\" content=\"Kyren's Website\"><script src=\"/public/copy.js\" defer></script><script src=\"/public/theme.js\" defer></script><script src=\"/public/scrollbar.js\" defer></script><script src=\"/public/my_uptime.js\" defer></script><script src=\"/public/footnotes.js\" defer></script><link rel=\"preload\" href=\"/public/styles/style.css\" as=\"style\"><link rel=\"stylesheet\" href=\"/public/styles/style.css\"><script src=\"https://unpkg.com/htmx.org@1.9.10\" defer></script>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 5, "\"><meta property=\"og:type\" content=\"website\"><meta property=\"og:url\" content=\"https://kyren.codes/\"><meta property=\"og:image\" content=\"https://kyren.codes/public/image.png\"><meta property=\"og:image:alt\" content=\"a cyan sphere with a dark background\"><meta property=\"og:site_name\" content=\"Kyren's Website\"><script src=\"/public/copy.js\" defer></script><script src=\"/public/theme.js\" defer></script><script src=\"/public/scrollbar.js\" defer></script><script src=\"/public/my_uptime.js\" defer></script><script src=\"/public/footnotes.js\" defer></script><script src=\"/public/shell.js\" defer></script><link rel=\"preload\" href=\"/public/styles/style.css\" as=\"style\"><link rel=\"stylesheet\" href=\"/public/styles/style.css\"><script src=\"https://unpkg.com/htmx.org@1.9.10\" defer></script>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -145,7 +145,7 @@ func BlogItem(header string, blog Blog, extra string) templ.Component { var templ_7745c5c3_Var8 templ.SafeURL templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL("/blogs/" + blog.Slug)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 45, Col: 49} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 46, Col: 49} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) if templ_7745c5c3_Err != nil { @@ -158,7 +158,7 @@ func BlogItem(header string, blog Blog, extra string) templ.Component { var templ_7745c5c3_Var9 string templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(blog.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 47, Col: 17} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 48, Col: 17} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) if templ_7745c5c3_Err != nil { @@ -171,7 +171,7 @@ func BlogItem(header string, blog Blog, extra string) templ.Component { var templ_7745c5c3_Var10 string templ_7745c5c3_Var10, templ_7745c5c3_Err = templ.JoinStringErrs(blog.Desc) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 49, Col: 45} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 50, Col: 45} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var10)) if templ_7745c5c3_Err != nil { @@ -219,7 +219,7 @@ func Link(href string, newTab bool) templ.Component { var templ_7745c5c3_Var12 templ.SafeURL templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(href)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 57, Col: 28} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 58, Col: 28} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) if templ_7745c5c3_Err != nil { @@ -353,7 +353,7 @@ func TerminalBorderForBlog(header string, footer string, extra string, enable bo var templ_7745c5c3_Var19 string templ_7745c5c3_Var19, templ_7745c5c3_Err = templ.JoinStringErrs(header) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 76, Col: 132} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 77, Col: 132} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var19)) if templ_7745c5c3_Err != nil { @@ -366,7 +366,7 @@ func TerminalBorderForBlog(header string, footer string, extra string, enable bo var templ_7745c5c3_Var20 string templ_7745c5c3_Var20, templ_7745c5c3_Err = templ.JoinStringErrs(footer) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 77, Col: 149} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 78, Col: 149} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var20)) if templ_7745c5c3_Err != nil { @@ -458,7 +458,7 @@ func TerminalBorder(header string, footer string, extra string) templ.Component var templ_7745c5c3_Var25 string templ_7745c5c3_Var25, templ_7745c5c3_Err = templ.JoinStringErrs(header) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 94, Col: 137} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 95, Col: 137} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var25)) if templ_7745c5c3_Err != nil { @@ -471,7 +471,7 @@ func TerminalBorder(header string, footer string, extra string) templ.Component var templ_7745c5c3_Var26 string templ_7745c5c3_Var26, templ_7745c5c3_Err = templ.JoinStringErrs(footer) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 95, Col: 140} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 96, Col: 140} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var26)) if templ_7745c5c3_Err != nil { @@ -583,7 +583,7 @@ func TerminalBorderWithCopy(header string, footer string, extra string, text str var templ_7745c5c3_Var30 templ.SafeURL templ_7745c5c3_Var30, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(href)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 113, Col: 33} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 114, Col: 33} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var30)) if templ_7745c5c3_Err != nil { @@ -609,7 +609,7 @@ func TerminalBorderWithCopy(header string, footer string, extra string, text str var templ_7745c5c3_Var31 string templ_7745c5c3_Var31, templ_7745c5c3_Err = templ.ResolveAttributeValue(text) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 117, Col: 26} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 118, Col: 26} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var31) if templ_7745c5c3_Err != nil { @@ -645,7 +645,7 @@ func TerminalBorderWithCopy(header string, footer string, extra string, text str var templ_7745c5c3_Var32 string templ_7745c5c3_Var32, templ_7745c5c3_Err = templ.ResolveAttributeValue(text) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 125, Col: 42} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 126, Col: 42} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var32) if templ_7745c5c3_Err != nil { @@ -701,7 +701,7 @@ func CopyPre(text string, preClass string) templ.Component { var templ_7745c5c3_Var34 string templ_7745c5c3_Var34, templ_7745c5c3_Err = templ.ResolveAttributeValue(text) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 134, Col: 39} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 135, Col: 39} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var34) if templ_7745c5c3_Err != nil { @@ -773,7 +773,7 @@ func NavLink(href string, label string) templ.Component { var templ_7745c5c3_Var38 templ.SafeURL templ_7745c5c3_Var38, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(href)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 143, Col: 30} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 144, Col: 30} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var38)) if templ_7745c5c3_Err != nil { @@ -786,7 +786,7 @@ func NavLink(href string, label string) templ.Component { var templ_7745c5c3_Var39 string templ_7745c5c3_Var39, templ_7745c5c3_Err = templ.JoinStringErrs(label) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 143, Col: 87} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 144, Col: 87} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var39)) if templ_7745c5c3_Err != nil { @@ -828,7 +828,7 @@ func Nav(path string) templ.Component { var templ_7745c5c3_Var41 string templ_7745c5c3_Var41, templ_7745c5c3_Err = templ.JoinStringErrs(path) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 148, Col: 14} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 149, Col: 14} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var41)) if templ_7745c5c3_Err != nil { @@ -888,7 +888,7 @@ func TerminalLayout(style Style, path string) templ.Component { var templ_7745c5c3_Var43 string templ_7745c5c3_Var43, templ_7745c5c3_Err = templruntime.SanitizeStyleAttributeValues(styleToCss(style)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 161, Col: 42} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 162, Col: 42} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var43)) if templ_7745c5c3_Err != nil { @@ -1033,7 +1033,7 @@ func HomePage(style Style, latestBlog *Blog) templ.Component { var templ_7745c5c3_Var51 string templ_7745c5c3_Var51, templ_7745c5c3_Err = templ.JoinStringErrs(fingerprint) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 194, Col: 21} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 195, Col: 21} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var51)) if templ_7745c5c3_Err != nil { @@ -1300,7 +1300,7 @@ func HomePage(style Style, latestBlog *Blog) templ.Component { var templ_7745c5c3_Var63 string templ_7745c5c3_Var63, templ_7745c5c3_Err = templ.JoinStringErrs(sshKey) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 243, Col: 12} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 244, Col: 12} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var63)) if templ_7745c5c3_Err != nil { @@ -1427,7 +1427,7 @@ func FlagshipProject(project Project, extra string) templ.Component { var templ_7745c5c3_Var66 templ.SafeURL templ_7745c5c3_Var66, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL("/projects/" + project.Slug)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 308, Col: 57} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 309, Col: 57} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var66)) if templ_7745c5c3_Err != nil { @@ -1440,7 +1440,7 @@ func FlagshipProject(project Project, extra string) templ.Component { var templ_7745c5c3_Var67 string templ_7745c5c3_Var67, templ_7745c5c3_Err = templ.JoinStringErrs(project.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 308, Col: 173} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 309, Col: 173} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var67)) if templ_7745c5c3_Err != nil { @@ -1453,7 +1453,7 @@ func FlagshipProject(project Project, extra string) templ.Component { var templ_7745c5c3_Var68 string templ_7745c5c3_Var68, templ_7745c5c3_Err = templ.JoinStringErrs(project.Category) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 309, Col: 65} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 310, Col: 65} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var68)) if templ_7745c5c3_Err != nil { @@ -1489,7 +1489,7 @@ func FlagshipProject(project Project, extra string) templ.Component { var templ_7745c5c3_Var71 string templ_7745c5c3_Var71, templ_7745c5c3_Err = templ.JoinStringErrs(tag.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 311, Col: 136} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 312, Col: 136} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var71)) if templ_7745c5c3_Err != nil { @@ -1535,7 +1535,7 @@ func FlagshipProject(project Project, extra string) templ.Component { var templ_7745c5c3_Var73 string templ_7745c5c3_Var73, templ_7745c5c3_Err = templ.JoinStringErrs(project.Desc) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 321, Col: 55} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 322, Col: 55} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var73)) if templ_7745c5c3_Err != nil { @@ -1586,7 +1586,7 @@ func FlagshipProject(project Project, extra string) templ.Component { var templ_7745c5c3_Var74 string templ_7745c5c3_Var74, templ_7745c5c3_Err = templ.JoinStringErrs(stat.Value) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 339, Col: 61} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 340, Col: 61} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var74)) if templ_7745c5c3_Err != nil { @@ -1599,7 +1599,7 @@ func FlagshipProject(project Project, extra string) templ.Component { var templ_7745c5c3_Var75 string templ_7745c5c3_Var75, templ_7745c5c3_Err = templ.JoinStringErrs(stat.Label) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 340, Col: 47} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 341, Col: 47} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var75)) if templ_7745c5c3_Err != nil { @@ -1639,7 +1639,7 @@ func FlagshipProject(project Project, extra string) templ.Component { var templ_7745c5c3_Var77 string templ_7745c5c3_Var77, templ_7745c5c3_Err = templ.JoinStringErrs(flagship.Snippet) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 350, Col: 24} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 351, Col: 24} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var77)) if templ_7745c5c3_Err != nil { @@ -1699,7 +1699,7 @@ func VersionTag(project Project) templ.Component { var templ_7745c5c3_Var79 string templ_7745c5c3_Var79, templ_7745c5c3_Err = templ.JoinStringErrs(flagship.Version) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 361, Col: 50} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 362, Col: 50} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var79)) if templ_7745c5c3_Err != nil { @@ -1755,7 +1755,7 @@ func DownloadButton(download Download) templ.Component { var templ_7745c5c3_Var82 templ.SafeURL templ_7745c5c3_Var82, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(download.URL)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 370, Col: 37} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 371, Col: 37} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var82)) if templ_7745c5c3_Err != nil { @@ -1801,7 +1801,7 @@ func DownloadButton(download Download) templ.Component { var templ_7745c5c3_Var84 string templ_7745c5c3_Var84, templ_7745c5c3_Err = templ.JoinStringErrs(download.Label) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 383, Col: 24} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 384, Col: 24} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var84)) if templ_7745c5c3_Err != nil { @@ -1819,7 +1819,7 @@ func DownloadButton(download Download) templ.Component { var templ_7745c5c3_Var85 string templ_7745c5c3_Var85, templ_7745c5c3_Err = templ.JoinStringErrs(download.Size) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 385, Col: 45} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 386, Col: 45} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var85)) if templ_7745c5c3_Err != nil { @@ -1918,7 +1918,7 @@ func IconLink(href string, label string, extra string) templ.Component { var templ_7745c5c3_Var90 templ.SafeURL templ_7745c5c3_Var90, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(href)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 399, Col: 30} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 400, Col: 30} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var90)) if templ_7745c5c3_Err != nil { @@ -1931,7 +1931,7 @@ func IconLink(href string, label string, extra string) templ.Component { var templ_7745c5c3_Var91 string templ_7745c5c3_Var91, templ_7745c5c3_Err = templ.ResolveAttributeValue(label) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 399, Col: 93} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 400, Col: 93} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var91) if templ_7745c5c3_Err != nil { @@ -1944,7 +1944,7 @@ func IconLink(href string, label string, extra string) templ.Component { var templ_7745c5c3_Var92 string templ_7745c5c3_Var92, templ_7745c5c3_Err = templ.ResolveAttributeValue(label) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 399, Col: 109} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 400, Col: 109} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var92) if templ_7745c5c3_Err != nil { @@ -2320,7 +2320,7 @@ func ProjectItem(project Project, extra string) templ.Component { var templ_7745c5c3_Var108 templ.SafeURL templ_7745c5c3_Var108, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL(projectURL(project))) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 466, Col: 47} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 467, Col: 47} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var108)) if templ_7745c5c3_Err != nil { @@ -2343,7 +2343,7 @@ func ProjectItem(project Project, extra string) templ.Component { var templ_7745c5c3_Var109 string templ_7745c5c3_Var109, templ_7745c5c3_Err = templ.JoinStringErrs(project.Title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 472, Col: 21} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 473, Col: 21} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var109)) if templ_7745c5c3_Err != nil { @@ -2356,7 +2356,7 @@ func ProjectItem(project Project, extra string) templ.Component { var templ_7745c5c3_Var110 string templ_7745c5c3_Var110, templ_7745c5c3_Err = templ.JoinStringErrs(project.Category) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 473, Col: 65} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 474, Col: 65} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var110)) if templ_7745c5c3_Err != nil { @@ -2392,7 +2392,7 @@ func ProjectItem(project Project, extra string) templ.Component { var templ_7745c5c3_Var113 string templ_7745c5c3_Var113, templ_7745c5c3_Err = templ.JoinStringErrs(tag.Name) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 475, Col: 136} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 476, Col: 136} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var113)) if templ_7745c5c3_Err != nil { @@ -2438,7 +2438,7 @@ func ProjectItem(project Project, extra string) templ.Component { var templ_7745c5c3_Var115 string templ_7745c5c3_Var115, templ_7745c5c3_Err = templ.JoinStringErrs(project.Desc) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 488, Col: 40} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 489, Col: 40} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var115)) if templ_7745c5c3_Err != nil { @@ -2629,7 +2629,7 @@ func NotFoundPage(style Style, path string) templ.Component { var templ_7745c5c3_Var124 string templ_7745c5c3_Var124, templ_7745c5c3_Err = templ.JoinStringErrs(path) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 523, Col: 20} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 524, Col: 20} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var124)) if templ_7745c5c3_Err != nil { @@ -2642,7 +2642,7 @@ func NotFoundPage(style Style, path string) templ.Component { var templ_7745c5c3_Var125 string templ_7745c5c3_Var125, templ_7745c5c3_Err = templ.JoinStringErrs(path[1:]) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 524, Col: 32} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 525, Col: 32} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var125)) if templ_7745c5c3_Err != nil { @@ -2677,7 +2677,7 @@ func NotFoundPage(style Style, path string) templ.Component { var templ_7745c5c3_Var127 string templ_7745c5c3_Var127, templ_7745c5c3_Err = templ.JoinStringErrs(">") if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 530, Col: 17} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 531, Col: 17} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var127)) if templ_7745c5c3_Err != nil { @@ -2702,7 +2702,7 @@ func NotFoundPage(style Style, path string) templ.Component { var templ_7745c5c3_Var129 string templ_7745c5c3_Var129, templ_7745c5c3_Err = templ.JoinStringErrs("cd -") if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 533, Col: 16} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 534, Col: 16} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var129)) if templ_7745c5c3_Err != nil { @@ -2721,7 +2721,7 @@ func NotFoundPage(style Style, path string) templ.Component { var templ_7745c5c3_Var130 string templ_7745c5c3_Var130, templ_7745c5c3_Err = templ.JoinStringErrs(">") if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 541, Col: 17} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 542, Col: 17} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var130)) if templ_7745c5c3_Err != nil { @@ -2746,7 +2746,7 @@ func NotFoundPage(style Style, path string) templ.Component { var templ_7745c5c3_Var132 string templ_7745c5c3_Var132, templ_7745c5c3_Err = templ.JoinStringErrs("cd $HOME") if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 544, Col: 20} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 545, Col: 20} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var132)) if templ_7745c5c3_Err != nil { @@ -3768,7 +3768,7 @@ func Fastfetch(rows []FetchRow) templ.Component { var templ_7745c5c3_Var174 string templ_7745c5c3_Var174, templ_7745c5c3_Err = templ.JoinStringErrs(branch(i, len(rows))) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 745, Col: 52} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 746, Col: 52} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var174)) if templ_7745c5c3_Err != nil { @@ -3807,7 +3807,7 @@ func Fastfetch(rows []FetchRow) templ.Component { var templ_7745c5c3_Var177 string templ_7745c5c3_Var177, templ_7745c5c3_Err = templ.JoinStringErrs(row.Label) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 747, Col: 53} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 748, Col: 53} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var177)) if templ_7745c5c3_Err != nil { @@ -3820,7 +3820,7 @@ func Fastfetch(rows []FetchRow) templ.Component { var templ_7745c5c3_Var178 string templ_7745c5c3_Var178, templ_7745c5c3_Err = templ.ResolveAttributeValue(row.Label) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 748, Col: 23} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 749, Col: 23} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ_7745c5c3_Var178) if templ_7745c5c3_Err != nil { @@ -3833,7 +3833,7 @@ func Fastfetch(rows []FetchRow) templ.Component { var templ_7745c5c3_Var179 string templ_7745c5c3_Var179, templ_7745c5c3_Err = templ.JoinStringErrs(row.Value) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 748, Col: 37} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 749, Col: 37} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var179)) if templ_7745c5c3_Err != nil { @@ -4037,7 +4037,7 @@ func BlogNav(label string, blog *Blog, extra string) templ.Component { var templ_7745c5c3_Var188 templ.SafeURL templ_7745c5c3_Var188, templ_7745c5c3_Err = templ.JoinURLErrs(templ.SafeURL("/blogs/" + blog.Slug)) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 777, Col: 49} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 778, Col: 49} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var188)) if templ_7745c5c3_Err != nil { @@ -4050,7 +4050,7 @@ func BlogNav(label string, blog *Blog, extra string) templ.Component { var templ_7745c5c3_Var189 string templ_7745c5c3_Var189, templ_7745c5c3_Err = templ.JoinStringErrs(blog.Slug) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 777, Col: 106} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `website.templ`, Line: 778, Col: 106} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var189)) if templ_7745c5c3_Err != nil { @@ -4139,10 +4139,6 @@ func ShellPage(style Style) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 185, "<script src=\"/public/shell.js\" defer></script>") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } return nil }) templ_7745c5c3_Err = TerminalLayout(style, "/bin/bash").Render(templ.WithChildren(ctx, templ_7745c5c3_Var191), templ_7745c5c3_Buffer) @@ -4174,12 +4170,12 @@ func ShellLines(lines []string) templ.Component { templ_7745c5c3_Var193 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 186, "<div class=\"flex flex-col\">") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 185, "<div class=\"flex flex-col\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, line := range lines { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 187, "<span>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 186, "<span>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4192,12 +4188,12 @@ func ShellLines(lines []string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 188, "</span>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 187, "</span>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 189, "</div>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 188, "</div>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4238,7 +4234,7 @@ func ShellEntry(cmd string, output templ.Component) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 190, "<div class=\"min-w-0 w-full\">") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 189, "<div class=\"min-w-0 w-full\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4246,7 +4242,7 @@ func ShellEntry(cmd string, output templ.Component) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 191, "</div>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 190, "</div>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4281,7 +4277,7 @@ func ShellText(text string) templ.Component { templ_7745c5c3_Var197 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 192, "<p>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 191, "<p>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4294,7 +4290,7 @@ func ShellText(text string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 193, "</p>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 192, "</p>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4323,12 +4319,12 @@ func ShellHelp(names []string) templ.Component { templ_7745c5c3_Var199 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 194, "<div class=\"flex flex-col\">") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 193, "<div class=\"flex flex-col\">") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } for _, name := range names { - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 195, "<span>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 194, "<span>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -4341,12 +4337,12 @@ func ShellHelp(names []string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 196, "</span>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 195, "</span>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 197, "</div>") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 196, "</div>") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } |
