From 26ac862befb195a9e03e0d554dbe1480d2e55775 Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Fri, 9 Oct 2026 17:42:43 +0300 Subject: Foobar --- website.templ | 416 +++++++++++----------------------------------------------- 1 file changed, 74 insertions(+), 342 deletions(-) (limited to 'website.templ') diff --git a/website.templ b/website.templ index bec1453..53992f7 100644 --- a/website.templ +++ b/website.templ @@ -1,7 +1,5 @@ package main -import "flag" - templ HeadComponent(title string, description string) { @@ -142,7 +140,7 @@ templ Nav(path string) { { path } @NavLink("/", "home") - for _, dir := range []string{"skills", "projects", "blogs"} { + for _, dir := range []string{"projects", "info", "blogs"} { @NavLink("/"+dir, dir) } @NavLink("/shell", "shell") @@ -250,8 +248,8 @@ func footerClass(connected bool) string { return style } -templ SkillsPage(style Style) { - @TerminalLayout(style, "/home/kyren/skills.md") { +templ InfoPage(style Style) { + @TerminalLayout(style, "/home/kyren/info.md") { @TerminalStack(false, "") { @TerminalBorder("Info", "", "") { @@ -264,15 +262,13 @@ 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 + Slug string + Title string + Category string + Desc string + Icon templ.Component + Tags []ProjectTag + Links []ProjectLink } type ProjectTag struct { @@ -281,8 +277,9 @@ type ProjectTag struct { } type ProjectLink struct { - URL string - Icon templ.Component + Icon templ.Component + Label string + URL string } type FlagshipInfo struct { @@ -303,43 +300,6 @@ type Stat struct { Value string } -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"), - // Icon: IconKrypton(), - 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: "", -} - -var flagship FlagshipInfo = FlagshipInfo{ - Version: "Sprout.0 2026-08-13", - Downloads: []Download{ - {"linux-amd64", "https://foobar", "23 MB"}, - // {"linux-arm64", "https://foobar", "52 MB"}, - // {"macos-arm64", "https://fooshit", "47 MB"}, - {"windows-amd64", "https://fooshit", "65.7 MB"}, - }, - // Stats: []Stat{{"lines of code", "18.7k"}}, - Snippet: ` -io :: import "core/io"; - -main :: proc() { - io.printf("Hello, %s", "world"); -} -`, -} - var versionBeforeDownloads = false const flagshipClasses = "[--border-py:1.25rem] border-(--accent)! bg-white/[0.03] shadow-[0_0_1.5rem_color-mix(in_srgb,var(--accent)_25%,transparent)]" @@ -356,14 +316,10 @@ templ FlagshipProject(project Project, extra string) { { tag.Name } } - @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)") + for _, link := range project.Links { + @IconLink(link.URL, link.Label, "") { + @link.Icon + } } @@ -431,271 +387,6 @@ templ IconArchive(color string) { } } -const flagshipClassesV4 = "[--border-py:1.25rem] border-(--accent)! bg-white/[0.03] shadow-[0_0_1.5rem_color-mix(in_srgb,var(--accent)_25%,transparent)]" - -templ FlagshipProjectV4(project Project, extra string) { - @TerminalBorder("", "", flagshipClasses+" "+extra) { -
-
-
- @project.Icon - { project.Title } - { project.Category } - for _, tag := range project.Tags { - { tag.Name } - } - - @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 }

- if len(project.Downloads) > 0 || project.Version != "" { -
- for _, d := range project.Downloads { - @DownloadButton(d) - } - if project.Version != "" { - { project.Version } - } -
- } - if len(project.Stats) > 0 { -
- for _, stat := range project.Stats { - - { stat.Value } - { stat.Label } - - } -
- } -
- if project.Snippet != "" { -
- example - @CopyPre(project.Snippet, "text-[80%] leading-[normal]") { - { project.Snippet } - } -
- } -
- } -} - -templ DownloadButtonV4(d Download) { - - @IconDownload("text-(--primary)") - { d.Label } - -} - -templ IconDownload(color string) { - @Icon(color) { - - - - } -} - -const flagshipClassesV3 = "[--border-py:1.25rem] border-(--primary)! bg-white/[0.03] shadow-[0_0_1.5rem_color-mix(in_srgb,var(--primary)_25%,transparent)]" - -templ FlagshipProjectV3(project Project, extra string) { - @TerminalBorder("", "", flagshipClasses+" "+extra) { -
-
-
- @project.Icon - { project.Title } - { project.Version } - { project.Category } - for _, tag := range project.Tags { - { tag.Name } - } - - @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 }

- if project.Install != "" { - @CopyPre(project.Install, "text-[85%] leading-[normal]") { - { "$ " + project.Install } - } - } - if project.Devlog != nil { - - { "latest devlog: " + project.Devlog.Title } - - } -
- if project.Snippet != "" { -
- example - @CopyPre(project.Snippet, "text-[80%] leading-[normal]") { - { project.Snippet } - } -
- } -
- } -} - -templ FlagshipProjectV2(project Project, extra string) { - @TerminalBorder(project.Version, "", flagshipClasses+" "+extra) { -
-
-
- @project.Icon - { project.Title } - { project.Category } - for _, tag := range project.Tags { - { tag.Name } - } - - @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 }

-
- for i, stage := range project.Pipeline { - if i > 0 { - → - } - { stage } - } -
-
- for _, stat := range project.Stats { -
- { stat.Value } - { stat.Label } -
- } -
-
- if project.Snippet != "" { -
- example - @CopyPre(project.Snippet, "text-[80%] leading-[normal]") { - { project.Snippet } - } -
- } -
- } -} - -templ FlagshipProjectV1(project Project) { -
- -
-
- - FLAGSHIP BUILD - | - { project.Status } -
-
- if project.CgitURL != "" { - [cgit] - } - if project.GithubURL != "" { - [github] - } -
-
- -
-

- { 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... } @@ -748,14 +439,10 @@ templ ProjectItem(project Project, extra string) { // { 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)") + for _, link := range project.Links { + @IconLink(link.URL, link.Label, "") { + @link.Icon + } } @@ -790,7 +477,7 @@ templ ProjectsPage(style Style, projects []Project, pinned int) { } templ NotFoundPage(style Style, path string) { - @TerminalLayout(style, "404") { + @TerminalLayout(style, path) { @TerminalStack(true, "") { @TerminalBorder("Shell", "", "") { @@ -920,18 +607,63 @@ templ IconUptime(color string) { } } +templ IconEko(color string) { + @Icon(color) { + + } +} + +templ IconTrident(color string) { + @Icon(color) { + + + + + } +} + +templ IconDotfiles(color string) { + @Icon(color) { + + } +} + +templ IconVideo(color string) { + @Icon(color) { + // + + } +} + +templ IconJetbrains(color string) { + @Icon(color) { + + + + + + + + + + + + + } +} + func row(icon func(color string) templ.Component, color, label, value string) FetchRow { return FetchRow{Icon: icon(color), Color: color, Label: label, Value: value} } var fetchRows = []FetchRow{ // row(IconTerminal, "text-(--secondary)", "Terminal", "Ghostty & Zsh"), - 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(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", "Asleep"), // row(IconCpu, "--extra", "Hardware", "..."), } @@ -968,7 +700,7 @@ templ Fastfetch(rows []FetchRow) { } templ Icon(color string) { -