Initial commit: chaosmith-site with blog
Static landing page + markdown blog served by Go. Goldmark renders posts in-memory, no database. Dockerfile + compose for podman deployment. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code <noreply@letta.com>
This commit is contained in:
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
/chaosmith-site
|
||||||
|
/tmp
|
||||||
|
*.log
|
||||||
|
.letta/
|
||||||
|
.directory
|
||||||
BIN
ABSTRACTS.png
Normal file
BIN
ABSTRACTS.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 MiB |
15
Dockerfile
Normal file
15
Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
FROM golang:1.26-alpine AS build
|
||||||
|
WORKDIR /src
|
||||||
|
COPY go.mod go.sum ./
|
||||||
|
RUN go mod download
|
||||||
|
COPY . .
|
||||||
|
RUN go build -o /chaosmith-site .
|
||||||
|
|
||||||
|
FROM alpine:3.21
|
||||||
|
RUN apk add --no-cache ca-certificates
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=build /chaosmith-site .
|
||||||
|
COPY index.html ABSTRACTS.png ./
|
||||||
|
COPY src/ ./src/
|
||||||
|
EXPOSE 8000
|
||||||
|
CMD ["./chaosmith-site"]
|
||||||
199
blog/routes.go
Normal file
199
blog/routes.go
Normal file
@@ -0,0 +1,199 @@
|
|||||||
|
package blog
|
||||||
|
|
||||||
|
import (
|
||||||
|
"html/template"
|
||||||
|
"log"
|
||||||
|
"net/http"
|
||||||
|
"strings"
|
||||||
|
)
|
||||||
|
|
||||||
|
const pageTpl = `<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>{{.Title}}</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&family=Inter:wght@300;500;700&display=swap" rel="stylesheet">
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--bg: #05030a;
|
||||||
|
--accent: #b574ff;
|
||||||
|
--accent-soft: rgba(181, 116, 255, 0.12);
|
||||||
|
--text: #f3f0ff;
|
||||||
|
--text-dim: #a9a3c4;
|
||||||
|
--border: rgba(255, 255, 255, 0.06);
|
||||||
|
}
|
||||||
|
* { box-sizing: border-box; }
|
||||||
|
body {
|
||||||
|
margin: 0; min-height: 100vh;
|
||||||
|
background: radial-gradient(circle at top, #1a1035 0, #05030a 55%);
|
||||||
|
color: var(--text);
|
||||||
|
font-family: "Inter", system-ui, sans-serif;
|
||||||
|
display: flex; justify-content: center;
|
||||||
|
}
|
||||||
|
.wrap { position: relative; z-index: 1; width: 100%; max-width: 820px; padding: 32px 20px 40px; }
|
||||||
|
header {
|
||||||
|
display: flex; justify-content: space-between; align-items: center;
|
||||||
|
gap: 24px; padding: 18px 22px; border-radius: 18px;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
background: linear-gradient(135deg, rgba(255,255,255,0.02), rgba(0,0,0,0.35));
|
||||||
|
backdrop-filter: blur(18px);
|
||||||
|
}
|
||||||
|
.logo-mark {
|
||||||
|
width: 44px; height: 44px; border-radius: 14px;
|
||||||
|
border: 1px solid rgba(181,116,255,0.7);
|
||||||
|
background: radial-gradient(circle at 20% 0, rgba(255,255,255,0.25), transparent 55%),
|
||||||
|
radial-gradient(circle at 80% 100%, rgba(181,116,255,0.9), transparent 60%);
|
||||||
|
display: flex; align-items: center; justify-content: center;
|
||||||
|
font-family: "JetBrains Mono", monospace; font-weight: 600; font-size: 20px;
|
||||||
|
}
|
||||||
|
.logo-mark a { color: inherit; text-decoration: none; }
|
||||||
|
nav { display: flex; gap: 16px; align-items: center; }
|
||||||
|
nav a { color: var(--text-dim); text-decoration: none; font-size: 13px; text-transform: uppercase; letter-spacing: 0.1em; }
|
||||||
|
nav a:hover { color: var(--accent); }
|
||||||
|
main { margin-top: 24px; }
|
||||||
|
.post-list { list-style: none; padding: 0; margin: 0; }
|
||||||
|
.post-list li { padding: 12px 0; border-top: 1px solid var(--border); }
|
||||||
|
.post-list li:first-child { border-top: 0; }
|
||||||
|
.post-list a { color: var(--text); text-decoration: none; font-size: 16px; }
|
||||||
|
.post-list a:hover { color: var(--accent); }
|
||||||
|
.article h1 { font-size: 28px; margin: 0 0 4px; }
|
||||||
|
.post-date { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 24px; }
|
||||||
|
.post-date-inline { font-size: 12px; color: var(--text-dim); }
|
||||||
|
.article p { line-height: 1.7; color: var(--text-dim); }
|
||||||
|
.article pre {
|
||||||
|
background: rgba(0,0,0,0.5); border: 1px solid var(--border);
|
||||||
|
border-radius: 12px; padding: 16px; overflow-x: auto;
|
||||||
|
}
|
||||||
|
.article code { font-family: "JetBrains Mono", monospace; font-size: 13px; }
|
||||||
|
.article a { color: var(--accent); }
|
||||||
|
.article img { max-width: 100%; border-radius: 12px; }
|
||||||
|
.article blockquote {
|
||||||
|
border-left: 3px solid var(--accent); margin: 0; padding: 4px 16px;
|
||||||
|
color: var(--text-dim);
|
||||||
|
}
|
||||||
|
.article h1, .article h2, .article h3 { color: var(--text); }
|
||||||
|
.article ul, .article ol { color: var(--text-dim); line-height: 1.7; }
|
||||||
|
footer { margin-top: 30px; font-size: 11px; color: var(--text-dim); display: flex; justify-content: space-between; padding: 4px 2px; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="wrap">
|
||||||
|
<header>
|
||||||
|
<div style="display:flex; gap:14px; align-items:center;">
|
||||||
|
<div class="logo-mark"><a href="/blog/">CS</a></div>
|
||||||
|
<nav>
|
||||||
|
<a href="/">Home</a>
|
||||||
|
<a href="/blog/">Blog</a>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<main>
|
||||||
|
{{if .Post.HTML}}
|
||||||
|
<article class="article">
|
||||||
|
<h1>{{.Post.Title}}</h1>
|
||||||
|
<time class="post-date">{{.Post.Date.Format "January 2, 2006"}}</time>
|
||||||
|
{{.Post.HTML | safehtml}}
|
||||||
|
</article>
|
||||||
|
{{else}}
|
||||||
|
<h1>Field Notes</h1>
|
||||||
|
{{if .Posts}}
|
||||||
|
<ul class="post-list">
|
||||||
|
{{range .Posts}}
|
||||||
|
<li>
|
||||||
|
<a href="/blog/posts/{{.Slug}}">{{.Title}}</a>
|
||||||
|
<span class="post-date-inline">{{.Date.Format "Jan 2, 2006"}}</span>
|
||||||
|
</li>
|
||||||
|
{{end}}
|
||||||
|
</ul>
|
||||||
|
{{else}}
|
||||||
|
<p style="color: var(--text-dim);">No posts yet.</p>
|
||||||
|
{{end}}
|
||||||
|
{{end}}
|
||||||
|
</main>
|
||||||
|
<footer>
|
||||||
|
<span>Running on self-hosted infrastructure.</span>
|
||||||
|
<span>Chaosmith Systems</span>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>`
|
||||||
|
|
||||||
|
type pageData struct {
|
||||||
|
Title string
|
||||||
|
Posts []Post
|
||||||
|
Post Post
|
||||||
|
ActiveSlug string
|
||||||
|
}
|
||||||
|
|
||||||
|
var tmpl *template.Template
|
||||||
|
|
||||||
|
func safehtml(s string) template.HTML {
|
||||||
|
return template.HTML(s)
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
var err error
|
||||||
|
tmpl, err = template.New("blog").Funcs(template.FuncMap{"safehtml": safehtml}).Parse(pageTpl)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func render(w http.ResponseWriter, data pageData) {
|
||||||
|
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||||
|
tmpl.Execute(w, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
func RegisterRoutes(mux *http.ServeMux, contentDir string) error {
|
||||||
|
store := NewStore()
|
||||||
|
if err := store.Load(contentDir); err != nil {
|
||||||
|
log.Printf("blog: warning: could not load posts from %s: %v", contentDir, err)
|
||||||
|
}
|
||||||
|
|
||||||
|
mux.HandleFunc("/blog/admin/reload", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
if r.Method != http.MethodPost {
|
||||||
|
http.Error(w, "POST only", http.StatusMethodNotAllowed)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if err := store.Load(contentDir); err != nil {
|
||||||
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
w.Write([]byte("reloaded\n"))
|
||||||
|
})
|
||||||
|
|
||||||
|
mux.HandleFunc("/blog/posts/", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
slug := strings.TrimPrefix(r.URL.Path, "/blog/posts/")
|
||||||
|
if slug == "" || strings.Contains(slug, "/") {
|
||||||
|
http.NotFound(w, r)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
p, ok := store.Get(slug)
|
||||||
|
if !ok {
|
||||||
|
http.NotFound(w, r)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
render(w, pageData{
|
||||||
|
Title: p.Title + " — Chaosmith Systems",
|
||||||
|
Posts: store.All(),
|
||||||
|
Post: p,
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
mux.HandleFunc("/blog/", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
if r.URL.Path != "/blog/" {
|
||||||
|
http.NotFound(w, r)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
render(w, pageData{
|
||||||
|
Title: "Chaosmith Systems — Field Notes",
|
||||||
|
Posts: store.All(),
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
log.Printf("blog: loaded %d post(s) from %s, mounted at /blog/", store.Count(), contentDir)
|
||||||
|
return nil
|
||||||
|
}
|
||||||
161
blog/store.go
Normal file
161
blog/store.go
Normal file
@@ -0,0 +1,161 @@
|
|||||||
|
package blog
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"os"
|
||||||
|
"path/filepath"
|
||||||
|
"regexp"
|
||||||
|
"sort"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
|
||||||
|
"github.com/yuin/goldmark"
|
||||||
|
)
|
||||||
|
|
||||||
|
type Post struct {
|
||||||
|
Slug string
|
||||||
|
Title string
|
||||||
|
Date time.Time
|
||||||
|
HTML string
|
||||||
|
}
|
||||||
|
|
||||||
|
type Store struct {
|
||||||
|
posts []Post
|
||||||
|
index map[string]int
|
||||||
|
}
|
||||||
|
|
||||||
|
func NewStore() *Store {
|
||||||
|
return &Store{index: make(map[string]int)}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *Store) Load(dir string) error {
|
||||||
|
entries, err := os.ReadDir(dir)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
s.posts = s.posts[:0]
|
||||||
|
s.index = make(map[string]int)
|
||||||
|
|
||||||
|
for _, e := range entries {
|
||||||
|
if e.IsDir() || !strings.HasSuffix(e.Name(), ".md") {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
path := filepath.Join(dir, e.Name())
|
||||||
|
raw, err := os.ReadFile(path)
|
||||||
|
if err != nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
slug := strings.TrimSuffix(e.Name(), ".md")
|
||||||
|
title, body, date := parseFrontMatter(raw, slug, path)
|
||||||
|
|
||||||
|
var buf bytes.Buffer
|
||||||
|
if err := goldmark.Convert(body, &buf); err != nil {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
s.index[slug] = len(s.posts)
|
||||||
|
s.posts = append(s.posts, Post{
|
||||||
|
Slug: slug,
|
||||||
|
Title: title,
|
||||||
|
Date: date,
|
||||||
|
HTML: buf.String(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// sort newest first
|
||||||
|
sort.Slice(s.posts, func(i, j int) bool {
|
||||||
|
return s.posts[i].Date.After(s.posts[j].Date)
|
||||||
|
})
|
||||||
|
for i, p := range s.posts {
|
||||||
|
s.index[p.Slug] = i
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *Store) All() []Post {
|
||||||
|
return s.posts
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *Store) Get(slug string) (Post, bool) {
|
||||||
|
i, ok := s.index[slug]
|
||||||
|
if !ok {
|
||||||
|
return Post{}, false
|
||||||
|
}
|
||||||
|
return s.posts[i], true
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *Store) Count() int {
|
||||||
|
return len(s.posts)
|
||||||
|
}
|
||||||
|
|
||||||
|
var h1Re = regexp.MustCompile(`(?m)^#\s+(.+)$`)
|
||||||
|
|
||||||
|
// Date formats we recognize on the line after the title
|
||||||
|
var dateFormats = []string{
|
||||||
|
"2006-01-02",
|
||||||
|
"January 2, 2006",
|
||||||
|
"Jan 2, 2006",
|
||||||
|
"02/01/2006",
|
||||||
|
}
|
||||||
|
|
||||||
|
// parseFrontMatter extracts the title from the first `# heading`,
|
||||||
|
// strips that line from the body, and tries to parse a date from
|
||||||
|
// the line immediately after. Falls back to file mod time.
|
||||||
|
func parseFrontMatter(raw []byte, slug, path string) (title string, body []byte, date time.Time) {
|
||||||
|
body = raw
|
||||||
|
|
||||||
|
// Extract title
|
||||||
|
m := h1Re.FindSubmatch(raw)
|
||||||
|
if len(m) >= 2 {
|
||||||
|
title = strings.TrimSpace(string(m[1]))
|
||||||
|
} else {
|
||||||
|
title = slug
|
||||||
|
}
|
||||||
|
|
||||||
|
// Strip the first `# title` line from body so it's not rendered twice
|
||||||
|
if loc := h1Re.FindIndex(raw); loc != nil {
|
||||||
|
// Find end of that line
|
||||||
|
lineEnd := loc[1]
|
||||||
|
// advance past newline
|
||||||
|
for lineEnd < len(raw) && (raw[lineEnd] == '\n' || raw[lineEnd] == '\r') {
|
||||||
|
lineEnd++
|
||||||
|
}
|
||||||
|
body = raw[lineEnd:]
|
||||||
|
}
|
||||||
|
|
||||||
|
// Try to parse date from first remaining line
|
||||||
|
date = fileModTime(path)
|
||||||
|
rest := strings.TrimSpace(string(body))
|
||||||
|
if rest != "" {
|
||||||
|
firstLine := rest
|
||||||
|
if idx := strings.IndexByte(rest, '\n'); idx >= 0 {
|
||||||
|
firstLine = strings.TrimSpace(rest[:idx])
|
||||||
|
}
|
||||||
|
for _, fmt := range dateFormats {
|
||||||
|
if t, err := time.Parse(fmt, firstLine); err == nil {
|
||||||
|
date = t
|
||||||
|
// strip the date line from body too
|
||||||
|
if idx := strings.IndexByte(string(body), '\n'); idx >= 0 {
|
||||||
|
body = body[idx+1:]
|
||||||
|
} else {
|
||||||
|
body = nil
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return title, body, date
|
||||||
|
}
|
||||||
|
|
||||||
|
func fileModTime(path string) time.Time {
|
||||||
|
info, err := os.Stat(path)
|
||||||
|
if err != nil {
|
||||||
|
return time.Now()
|
||||||
|
}
|
||||||
|
return info.ModTime()
|
||||||
|
}
|
||||||
16
content/posts/hello.md
Normal file
16
content/posts/hello.md
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# Hello World
|
||||||
|
|
||||||
|
2026-06-24
|
||||||
|
|
||||||
|
This is the first post on the blog. It uses **markdown** rendered via goldmark.
|
||||||
|
|
||||||
|
## Code blocks work too
|
||||||
|
|
||||||
|
```go
|
||||||
|
func main() {
|
||||||
|
println("controlled chaos")
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
- Bullet lists
|
||||||
|
- More bullets
|
||||||
8
docker-compose.yml
Normal file
8
docker-compose.yml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
services:
|
||||||
|
website:
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
volumes:
|
||||||
|
- ./content/posts:/app/content/posts
|
||||||
|
restart: unless-stopped
|
||||||
5
go.mod
Normal file
5
go.mod
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
module chaosmith-site
|
||||||
|
|
||||||
|
go 1.26.4
|
||||||
|
|
||||||
|
require github.com/yuin/goldmark v1.8.2
|
||||||
2
go.sum
Normal file
2
go.sum
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
github.com/yuin/goldmark v1.8.2 h1:kEGpgqJXdgbkhcOgBxkC0X0PmoPG1ZyoZ117rDVp4zE=
|
||||||
|
github.com/yuin/goldmark v1.8.2/go.mod h1:ip/1k0VRfGynBgxOz0yCqHrbZXhcjxyuS66Brc7iBKg=
|
||||||
441
index.html
Normal file
441
index.html
Normal file
@@ -0,0 +1,441 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>Chaosmith Systems</title>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta name="description"
|
||||||
|
content="Chaosmith Systems - engineering, music, and experimental tools forged from controlled chaos.">
|
||||||
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
|
<link
|
||||||
|
href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&family=Inter:wght@300;500;700&display=swap"
|
||||||
|
rel="stylesheet">
|
||||||
|
<style>
|
||||||
|
:root {
|
||||||
|
--bg: #05030a;
|
||||||
|
--bg-alt: #0b0614;
|
||||||
|
--accent: #b574ff;
|
||||||
|
--accent-soft: rgba(181, 116, 255, 0.12);
|
||||||
|
--text: #f3f0ff;
|
||||||
|
--text-dim: #a9a3c4;
|
||||||
|
--border: rgba(255, 255, 255, 0.06);
|
||||||
|
}
|
||||||
|
|
||||||
|
* {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
min-height: 100vh;
|
||||||
|
background: radial-gradient(circle at top, #1a1035 0, #05030a 55%);
|
||||||
|
color: var(--text);
|
||||||
|
font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
|
||||||
|
display: flex;
|
||||||
|
align-items: stretch;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.noise {
|
||||||
|
position: fixed;
|
||||||
|
inset: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
opacity: 0.12;
|
||||||
|
mix-blend-mode: soft-light;
|
||||||
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='noStitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.8'/%3E%3C/svg%3E");
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wrap {
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
width: 100%;
|
||||||
|
max-width: 1040px;
|
||||||
|
padding: 32px 20px 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: flex-start;
|
||||||
|
gap: 24px;
|
||||||
|
padding: 18px 22px;
|
||||||
|
border-radius: 18px;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.35));
|
||||||
|
backdrop-filter: blur(18px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.logo-mark {
|
||||||
|
width: 44px;
|
||||||
|
height: 44px;
|
||||||
|
border-radius: 14px;
|
||||||
|
border: 1px solid rgba(181, 116, 255, 0.7);
|
||||||
|
background:
|
||||||
|
radial-gradient(circle at 20% 0, rgba(255, 255, 255, 0.25), transparent 55%),
|
||||||
|
radial-gradient(circle at 80% 100%, rgba(181, 116, 255, 0.9), transparent 60%);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-family: "JetBrains Mono", monospace;
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 20px;
|
||||||
|
letter-spacing: 0.08em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand h1 {
|
||||||
|
margin: 0;
|
||||||
|
font-size: clamp(26px, 3vw, 30px);
|
||||||
|
letter-spacing: 0.12em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.brand span {
|
||||||
|
font-size: 14px;
|
||||||
|
color: var(--text-dim);
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-right {
|
||||||
|
text-align: right;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
padding: 6px 10px;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
font-size: 11px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.14em;
|
||||||
|
color: var(--text-dim);
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag-dot {
|
||||||
|
width: 7px;
|
||||||
|
height: 7px;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: radial-gradient(circle, #8cffc7 0, #1aff89 35%, #00c46d 100%);
|
||||||
|
box-shadow: 0 0 8px rgba(0, 255, 170, 0.8);
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-right p {
|
||||||
|
margin: 0;
|
||||||
|
font-size: 13px;
|
||||||
|
color: var(--text-dim);
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
margin-top: 24px;
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
|
||||||
|
gap: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 820px) {
|
||||||
|
main {
|
||||||
|
grid-template-columns: minmax(0, 1fr);
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-right {
|
||||||
|
text-align: left;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero {
|
||||||
|
padding: 22px;
|
||||||
|
border-radius: 18px;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
background:
|
||||||
|
radial-gradient(circle at 0 0, rgba(181, 116, 255, 0.18), transparent 60%),
|
||||||
|
linear-gradient(145deg, rgba(0, 0, 0, 0.85), rgba(8, 4, 22, 0.95));
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-title {
|
||||||
|
font-size: clamp(24px, 3.3vw, 30px);
|
||||||
|
margin: 0 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-sub {
|
||||||
|
margin: 0 0 18px;
|
||||||
|
font-size: 14px;
|
||||||
|
color: var(--text-dim);
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||||
|
gap: 10px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 640px) {
|
||||||
|
.hero-grid {
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.pill {
|
||||||
|
padding: 9px 10px;
|
||||||
|
border-radius: 13px;
|
||||||
|
background: rgba(0, 0, 0, 0.55);
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.05);
|
||||||
|
font-size: 12px;
|
||||||
|
color: var(--text-dim);
|
||||||
|
}
|
||||||
|
|
||||||
|
.pill span {
|
||||||
|
display: block;
|
||||||
|
font-size: 11px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.12em;
|
||||||
|
color: var(--accent);
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hero-footer {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 10px;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 9px 18px;
|
||||||
|
border-radius: 999px;
|
||||||
|
border: 0;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
font-family: inherit;
|
||||||
|
background: radial-gradient(circle at 0 0, #ffd0ff 0, #b574ff 40%, #5b38ff 100%);
|
||||||
|
color: #05030a;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-primary:hover {
|
||||||
|
filter: brightness(1.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.subnote {
|
||||||
|
font-size: 11px;
|
||||||
|
color: var(--text-dim);
|
||||||
|
max-width: 260px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.side {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
border-radius: 16px;
|
||||||
|
border: 1px solid var(--border);
|
||||||
|
background: linear-gradient(150deg, rgba(8, 5, 20, 0.96), rgba(4, 3, 10, 0.96));
|
||||||
|
padding: 16px 16px 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card h2 {
|
||||||
|
margin: 0 0 8px;
|
||||||
|
font-size: 14px;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.16em;
|
||||||
|
color: var(--text-dim);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card p {
|
||||||
|
margin: 0 0 12px;
|
||||||
|
font-size: 13px;
|
||||||
|
color: var(--text-dim);
|
||||||
|
}
|
||||||
|
|
||||||
|
.list {
|
||||||
|
list-style: none;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list li {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 10px;
|
||||||
|
padding: 6px 0;
|
||||||
|
border-top: 1px solid rgba(255, 255, 255, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
.list li:first-child {
|
||||||
|
border-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-label {
|
||||||
|
color: var(--text);
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-tag {
|
||||||
|
font-size: 11px;
|
||||||
|
color: var(--text-dim);
|
||||||
|
padding: 3px 8px;
|
||||||
|
border-radius: 999px;
|
||||||
|
background: var(--accent-soft);
|
||||||
|
}
|
||||||
|
|
||||||
|
.links {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chip {
|
||||||
|
font-size: 12px;
|
||||||
|
padding: 6px 10px;
|
||||||
|
border-radius: 999px;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||||
|
background: rgba(0, 0, 0, 0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.chip a {
|
||||||
|
color: var(--accent);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
margin-top: 20px;
|
||||||
|
font-size: 11px;
|
||||||
|
color: var(--text-dim);
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 10px;
|
||||||
|
padding: 4px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
footer span:last-child {
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<script src="src/thirdparty/htmx.min.js.js"></script>
|
||||||
|
<div class="noise"></div>
|
||||||
|
<div class="wrap">
|
||||||
|
<header>
|
||||||
|
<div style="display:flex; gap:14px; align-items:center;">
|
||||||
|
<div class="logo-mark">CS</div>
|
||||||
|
<div class="brand">
|
||||||
|
<h1>Chaosmith Systems</h1>
|
||||||
|
<span>Personal stack of tools, sound, and infrastructure.</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="header-right">
|
||||||
|
<div class="tag">
|
||||||
|
<div class="tag-dot"></div>
|
||||||
|
<span>Live node</span>
|
||||||
|
</div>
|
||||||
|
<p>One human. One domain. Too many projects.</p>
|
||||||
|
<p>Bus factor: <b>1</b></p>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<section class="hero">
|
||||||
|
<h2 class="hero-title">Forging systems from controlled chaos.</h2>
|
||||||
|
<p class="hero-sub">
|
||||||
|
Engineering, music, and experiments connected under one namespace.
|
||||||
|
This site is the central entry point to everything running on <strong>chaosmith.systems</strong>.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="hero-grid">
|
||||||
|
<div class="pill">
|
||||||
|
<span>Engineering</span>
|
||||||
|
Modular input devices, VR / XR tooling, custom infra.
|
||||||
|
</div>
|
||||||
|
<div class="pill">
|
||||||
|
<span>Audio</span>
|
||||||
|
Cinematic strings, deathstep textures, dreadful vibes.
|
||||||
|
</div>
|
||||||
|
<div class="pill">
|
||||||
|
<span>Labs</span>
|
||||||
|
Prototypes, agents, data stacks, weird side projects.
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="hero-footer">
|
||||||
|
<a class="btn-primary" href="/blog/">View blog</a>
|
||||||
|
<p class="subnote">
|
||||||
|
This is an evolving node. Expect broken links, work-in-progress bs,
|
||||||
|
and the occasional cursed experiment.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<aside class="side">
|
||||||
|
<div class="card" id="systems">
|
||||||
|
<h2>Currently in focus</h2>
|
||||||
|
<ul class="list">
|
||||||
|
<li>
|
||||||
|
<span class="list-label">ARCHON GRID</span>
|
||||||
|
<span class="list-tag">symbolic engine</span>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span class="list-label">Modular VR / XR input</span>
|
||||||
|
<span class="list-tag">hardware</span>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span class="list-label">Star Citizen tools</span>
|
||||||
|
<span class="list-tag">analytics</span>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<span class="list-label">Dreadscore / deathstep</span>
|
||||||
|
<span class="list-tag">music</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card">
|
||||||
|
<h2>Links & contact</h2>
|
||||||
|
<p>Later this block can link to projects, docs, and public repos hosted on subdomains.</p>
|
||||||
|
<div class="links">
|
||||||
|
<div class="chip"><a href="https://git.chaosmith.systems">Git repos</a></div>
|
||||||
|
<div class="chip"><a href="https://t.me/CyrnikBeerz">Telegram meme channel</a></div>
|
||||||
|
<div class="chip"><a href="matrix:u/@pierre:chaosmith.systems">Matrix: @pierre:chaosmith.systems</a></div>
|
||||||
|
<div class="chip"><a href="mailto:pierre@chaosmith.systems">Email: pierre@chaosmith.systems</a></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<img src="ABSTRACTS.png" style="box-shadow: 5px 10px; border: 3px double white;" />
|
||||||
|
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer>
|
||||||
|
<span>Running on self-hosted infrastructure.</span>
|
||||||
|
<!-- <span><iframe width="110" height="200" src="https://www.myinstants.com/instant/hl2-stalker-scream-30940/embed/" -->
|
||||||
|
<!-- frameborder="0" scrolling="no"></iframe></span> -->
|
||||||
|
<!-- <span>© -->
|
||||||
|
<script>document.write(new Date().getFullYear())</script> Chaosmith Systems
|
||||||
|
</span>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
26
main.go
Normal file
26
main.go
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"log"
|
||||||
|
"net/http"
|
||||||
|
|
||||||
|
"chaosmith-site/blog"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
mux := http.NewServeMux()
|
||||||
|
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
http.ServeFile(w, r, "index.html")
|
||||||
|
})
|
||||||
|
mux.HandleFunc("/ABSTRACTS.png", func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
http.ServeFile(w, r, "ABSTRACTS.png")
|
||||||
|
})
|
||||||
|
mux.Handle("/src/", http.StripPrefix("/src/", http.FileServer(http.Dir("src"))))
|
||||||
|
|
||||||
|
if err := blog.RegisterRoutes(mux, "content/posts"); err != nil {
|
||||||
|
log.Fatalf("blog: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
log.Println("listening on :8000")
|
||||||
|
http.ListenAndServe(":8000", mux)
|
||||||
|
}
|
||||||
1
src/thirdparty/htmx.min.js.js
vendored
Normal file
1
src/thirdparty/htmx.min.js.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user