summaryrefslogtreecommitdiff
path: root/website.go
diff options
context:
space:
mode:
authorKyren223 <contact@kyren.codes>2026-10-09 03:40:03 +0300
committerKyren223 <contact@kyren.codes>2026-10-09 03:40:03 +0300
commitd3aa8982bfb70cda8d04130347e2a870aebd2d19 (patch)
treeebc477e34e054ed9d33fc78cef78c1841b51dcb9 /website.go
parent9b03d2790b8b8db1b5a6755b6130f37e5f7f2455 (diff)
New blog post and a bunch of unrelated website changes
Diffstat (limited to 'website.go')
-rw-r--r--website.go110
1 files changed, 62 insertions, 48 deletions
diff --git a/website.go b/website.go
index b8c0e76..fce6efc 100644
--- a/website.go
+++ b/website.go
@@ -23,6 +23,18 @@ import (
//go:embed public blogs
var embedded embed.FS
+func Color(color string) string {
+ var result string
+ if strings.HasPrefix(color, "#") {
+ result = fmt.Sprintf("text-[%v]", color)
+ } else if strings.HasPrefix(color, "--") {
+ result = fmt.Sprintf("text-(%v)", color)
+ } else {
+ result = color
+ }
+ return result
+}
+
func Assert(ok bool) {
if !ok {
panic("assertion failure")
@@ -252,53 +264,53 @@ func latestBlog(blogs []Blog) *Blog {
return &blogs[0]
}
-type Project struct {
- Name string
- Type string
- Desc []string
- Cmd string
- Link string
-}
-
-var projects = []Project{
- {
- Name: "CPU vs AI",
- Type: "Game (made with Zig)",
- Desc: []string{
- "A tower defense game where an AI chip on your motherboard",
- "generates bugs! Place CPUs to destroy the bugs!",
- "Don't let them corrupt your RAM!",
- },
- },
- {
- Name: "Eko",
- Type: "Social Media Platform",
- Desc: []string{
- "A terminal-native alternative",
- "to Discord for Terminal",
- "nerds!",
- },
- },
- {
- Name: "Trident",
- Type: "IntelliJ Plugin",
- Desc: []string{
- "A blazingly fast way to",
- "Navigate to your mosta used",
- "files. Minimize keystrokes",
- "and maximize productivity!",
- },
- },
- {
- Name: "Dotfiles",
- Type: "Configuration",
- Desc: []string{
- "My Linux configuration,",
- "includes Neovim, tmux and",
- "other programs.",
- },
- },
-}
+// type Project struct {
+// Name string
+// Type string
+// Desc []string
+// Cmd string
+// Link string
+// }
+//
+// var projects = []Project{
+// {
+// Name: "CPU vs AI",
+// Type: "Game (made with Zig)",
+// Desc: []string{
+// "A tower defense game where an AI chip on your motherboard",
+// "generates bugs! Place CPUs to destroy the bugs!",
+// "Don't let them corrupt your RAM!",
+// },
+// },
+// {
+// Name: "Eko",
+// Type: "Social Media Platform",
+// Desc: []string{
+// "A terminal-native alternative",
+// "to Discord for Terminal",
+// "nerds!",
+// },
+// },
+// {
+// Name: "Trident",
+// Type: "IntelliJ Plugin",
+// Desc: []string{
+// "A blazingly fast way to",
+// "Navigate to your mosta used",
+// "files. Minimize keystrokes",
+// "and maximize productivity!",
+// },
+// },
+// {
+// Name: "Dotfiles",
+// Type: "Configuration",
+// Desc: []string{
+// "My Linux configuration,",
+// "includes Neovim, tmux and",
+// "other programs.",
+// },
+// },
+// }
func styleHandler(cookie string, lookup func(string) (map[string]string, bool)) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
@@ -384,8 +396,9 @@ func handleUptimePing(w http.ResponseWriter, r *http.Request) {
func main() {
carbonightCat := Theme{
- primary: "#94e2d5",
+ // primary: "#94e2d5",
// secondary: "#b4befe",
+ primary: "#54D7A9",
secondary: "#BB91F0",
accent: "#74c7ec",
extra: "#a6e3a1",
@@ -474,6 +487,7 @@ func main() {
})
mux.HandleFunc("GET /projects", func(w http.ResponseWriter, r *http.Request) {
+ projects := []Project{p, p, p, p, p, p, p, p}
ProjectsPage(currentStyle(r), projects).Render(r.Context(), w)
})