From d3aa8982bfb70cda8d04130347e2a870aebd2d19 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Fri, 9 Oct 2026 03:40:03 +0300 Subject: New blog post and a bunch of unrelated website changes --- website.templ | 286 +++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 255 insertions(+), 31 deletions(-) (limited to 'website.templ') diff --git a/website.templ b/website.templ index 1f4f636..88b8c40 100644 --- a/website.templ +++ b/website.templ @@ -5,7 +5,7 @@ templ HeadComponent(title string, description string) { - + @@ -16,7 +16,7 @@ templ HeadComponent(title string, description string) { - + @@ -29,7 +29,7 @@ templ HeadComponent(title string, description string) { } templ BlogItem(header string, blog Blog, extra string) { - @TerminalBorder(header, blog.Date.Format("January 2, 2006"), extra) { + @TerminalBorder(header, blog.Date.Format("January 2, 2006"), "bg-black/20 hover:bg-white/5 transition-colors duration-150 "+extra) {

@@ -61,10 +61,15 @@ templ TerminalStack(joined bool, extra string) { templ TerminalBorder(header string, footer string, extra string) {
- { header } - { footer } + { header } + { footer } { children... }
+ //
+ // { header } + // { footer } + // { children... } + //
} templ CopyIcon() { @@ -224,7 +229,7 @@ func footerClass(connected bool) string { templ SkillsPage(style Style) { @TerminalLayout(style, "/home/kyren/skills.md") { @TerminalStack(false, "") { - @TerminalBorder("Setup", "", "") { + @TerminalBorder("Info", "", "") { $ fastfetch @Fastfetch(fetchRows) @@ -234,17 +239,223 @@ templ SkillsPage(style Style) { } } +type Project struct { + Slug string // e.g. "my-game" + Title string // e.g. "MyGame" + Category string // e.g. "Game written in Zig" + Desc string // 1-2 line description/pitch + Tags []ProjectTag // ["Zig", "OpenGL", "Linux"] + Status string + Icon templ.Component + CgitURL string // e.g. "https://cgit.yourdomain.com/my-game" + GithubURL string // Fallback mirror link + IsFlagship bool + IsPinned bool +} + +type ProjectTag struct { + Name string + Color string +} + +type ProjectFLink struct { + URL string + Icon templ.Component +} + +var p Project = Project{ + Slug: "krypton", + Title: "Krypton", + Category: "Programming Language Compiler", + Desc: "A modern Minecraft creator event. As a developer, I helped with minor improvements to the cosmetics system. ", + Icon: IconCpu("text-[#F5A670] self-center"), + Status: "ON", + Tags: []ProjectTag{ + // {"Programming Language", Color("--extra")}, + // {"Compiler", Color("--extra")}, + {"C", Color("text-[#5874FF]")}, + {"LLVM", Color("text-[#FFFFFF]")}, + // {"Java", Color("#F5A670")}, + }, + CgitURL: "https://whatever", + GithubURL: "", + IsFlagship: true, + IsPinned: false, +} + +templ FlagshipProject(project Project) { +
+ + + +
+

+ { project.Title } +

+ { project.Category } +
+ +

{ project.Desc }

+ +
+
+ for _, tag := range project.Tags { + { tag.Name } + } +
+ + View Project Details → + +
+
+} + +templ PinnedGrid(projects []Project) { +
+
+ // Notable Projects
+
+ for i, project := range projects { + +
= 2) } + > +
+ +
+

+ { project.Title } +

+ { project.Category } +
+ +

{ project.Desc }

+
+ +
+
+ for _, tag := range project.Tags { + { tag.Name } + } +
+
+ if project.CgitURL != "" { + [cgit] + } + if project.GithubURL != "" { + [gh] + } +
+
+
+ } +
+
+ +} + +templ IconLink(href string, label string, extra string) { + + { children... } + +} + +templ IconGit(color string) { + @Icon(color) { + + + + + } +} + +templ IconGithub(color string) { + @Icon(color) { + + + } +} + +templ IconExternal(color string) { + @Icon(color) { + + + + } +} + +templ ProjectItem(project Project, extra string) { +
+ @TerminalBorder("", "", "[--border-py:0.25rem] py-2 text-[80%] bg-black/20 hover:bg-white/5 transition-colors duration-150"+" "+extra) { +
+
+ @project.Icon + { project.Title } + { project.Category } + for _, tag := range project.Tags { + { tag.Name } + } + // for _, tag := range project.Tags { + // { tag } + // } + + @IconLink("https://git.example.com/foo", "git", "") { + @IconGit("text-(--primary)") + } + @IconLink("https://github.com/foo", "github", "") { + @IconGithub("text-(--secondary)") + } + @IconLink("https://example.com", "website", "") { + @IconExternal("text-(--accent)") + } + +
+

{ project.Desc }

+
+ } +
+} + +func DoubleProject(project Project) Project { + project.Desc += project.Desc + return project +} + templ ProjectsPage(style Style, projects []Project) { @TerminalLayout(style, "/home/kyren/projects") { -

Items

-
-
    -
  • - foo - [ACTIVE] -
  • -
-
+ @FlagshipProject(p) + // @PinnedGrid(projects) + // All projects + @ScrollBox("") { + @TerminalStack(false, "mt-[0.5rem]") { + for i := 0; i < 1; i++ { + for i, project := range projects { + if i % 2 == 0 { + @ProjectItem(DoubleProject(project), "my-[-0.15rem]") + } else { + @ProjectItem(project, "my-[-0.15rem]") + } + } + } + } + } } } @@ -258,14 +469,27 @@ templ NotFoundPage(style Style, path string) {
} @TerminalBorder("", "", "") { -
- { ">" } - - @Link("/", false) { - { "cd $HOME" } - } - -
+ +
+ { ">" } + + @Link("javascript:history.back()", false) { + { "cd -" } + } + + + # Previous page + +
+
+ { ">" } + + @Link("/", false) { + { "cd $HOME" } + } + +
+
} } } @@ -372,13 +596,13 @@ func row(icon func(color string) templ.Component, color, label, value string) Fe var fetchRows = []FetchRow{ // row(IconTerminal, "text-(--secondary)", "Terminal", "Ghostty & Zsh"), - row(IconCode, "text-(--accent)", "Main Language", "C"), - row(IconScriptLang, "text-(--accent)", "Scripting Langs", "Go and Python"), - row(IconDebugger, "text-[#F16265]", "Debugger", "Raddebugger"), - row(IconMonitor, "text-[#54D7A9]", "Operating System", "Fedora KDE Linux"), - row(IconEditor, "text-[#54D7A9]", "Text Editor", "Neovim"), - row(IconUptime, "text-[#D8C44B]", "Uptime", GetMyUptime()), - // row(IconCpu, "text-(--extra)", "Hardware", "..."), + row(IconCode, "--accent", "Main Language", "C"), + row(IconScriptLang, "--accent", "Scripting Langs", "Go and Python"), + row(IconDebugger, "#F16265", "Debugger", "Raddebugger"), + row(IconMonitor, "#54D7A9", "Operating System", "Fedora KDE Linux"), + row(IconEditor, "#54D7A9", "Text Editor", "Neovim"), + row(IconUptime, "#D8C44B", "Uptime", "Asleep"), + // row(IconCpu, "--extra", "Hardware", "..."), } func branch(i, n int) string { @@ -414,7 +638,7 @@ templ Fastfetch(rows []FetchRow) { } templ Icon(color string) { -