feat: legacy import — packs, examples, lab, themes, docs, lineage

Import from agentic-semantic-web/ into restructured repo:
- 7 packs (apache, caddy, flask, hugo, nginx, pandoc, python)
- shared error pages (403-503)
- 17 lab experiments (boilerplate, charts, misc)
- 31 example pages (charts, components, content, layout, vault)
- 2 themes (garden, trentuna stub)
- 4 docs (llms.txt, vocabulary, philosophy, agent-directive)
- lineage.md (Pico/Open Props/Charts.css history)
- Hugo mounts for lab/ and examples/

All agentic.css references updated to asw.css.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ludo 2026-04-11 16:57:39 +02:00
parent e9895cf90d
commit 86464f3e21
Signed by: ludo
GPG key ID: F6E479DEFAB84D6E
100 changed files with 14700 additions and 4 deletions

160
packs/caddy/browse.html Normal file
View file

@ -0,0 +1,160 @@
{{/*
ASW Caddy Browse Template
Go HTML template for Caddy's file_server browse directive.
Usage in Caddyfile:
file_server browse {
browse {
template_file /path/to/agentic-semantic-web/packs/caddy/browse.html
}
}
Template variables:
.Name — directory name (last segment of path)
.Path — current URL path, e.g. "/files/"
.Files — []FileInfo entries, each with:
.Name, .URL, .Size, .ModTime, .IsDir, .IsSymlink
*/}}
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/asw/asw.css">
<title>{{.Name}} — Directory listing</title>
<style>
body { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1; padding: 2rem; max-width: 90ch; margin: 0 auto; width: 100%; }
.listing {
width: 100%;
border-collapse: collapse;
font-family: var(--asw-font-mono);
font-size: 0.875rem;
}
.listing th {
text-align: left;
padding: 0.5rem 0.75rem;
border-bottom: 1px solid var(--asw-border);
color: var(--asw-text-muted);
font-weight: 500;
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.06em;
}
.listing td {
padding: 0.4rem 0.75rem;
border-bottom: 1px solid color-mix(in srgb, var(--asw-border) 40%, transparent);
color: var(--asw-text-secondary);
vertical-align: middle;
}
.listing tr:hover td { background: color-mix(in srgb, var(--asw-bg-elevated) 60%, transparent); }
.listing .col-name a {
color: var(--asw-accent);
text-decoration: none;
display: flex;
align-items: center;
gap: 0.5em;
}
.listing .col-name a:hover { text-decoration: underline; }
.listing .col-size { text-align: right; color: var(--asw-text-muted); }
.listing .col-modified { white-space: nowrap; color: var(--asw-text-muted); }
.icon { font-size: 0.85em; opacity: 0.7; }
.dir-icon::before { content: "📁"; }
.file-icon::before { content: "📄"; }
.parent-icon::before { content: "⬆️"; font-size: 0.8em; }
.path-breadcrumb {
font-family: var(--asw-font-mono);
font-size: 0.875rem;
color: var(--asw-text-muted);
margin-bottom: 1rem;
}
.path-breadcrumb a { color: var(--asw-accent); text-decoration: none; }
.path-breadcrumb a:hover { text-decoration: underline; }
.path-breadcrumb span { color: var(--asw-text-muted); }
</style>
</head>
<body>
<nav>
<ul><li><a href="/"><strong>Home</strong></a></li></ul>
<ul><li><span data-text="dim">browse</span></li></ul>
</nav>
<main>
<h1>{{.Name}}</h1>
<p class="path-breadcrumb">
{{/* Breadcrumb — split path and link each segment */}}
<a href="/">/</a>
{{- $parts := splitList "/" (trimSuffix "/" .Path) -}}
{{- $acc := "" -}}
{{- range $i, $part := $parts -}}
{{- if $part -}}
{{- $acc = printf "%s/%s" $acc $part -}}
<span>/</span><a href="{{$acc}}/">{{$part}}</a>
{{- end -}}
{{- end -}}
</p>
<table class="listing">
<thead>
<tr>
<th class="col-name">Name</th>
<th class="col-size">Size</th>
<th class="col-modified">Modified</th>
</tr>
</thead>
<tbody>
{{/* Parent directory link */}}
{{if ne .Path "/"}}
<tr>
<td class="col-name">
<a href="../">
<span class="icon parent-icon"></span>
..
</a>
</td>
<td class="col-size"></td>
<td class="col-modified"></td>
</tr>
{{end}}
{{/* Directory entries first */}}
{{range .Files}}{{if .IsDir}}
<tr>
<td class="col-name">
<a href="{{.URL}}">
<span class="icon dir-icon"></span>
{{.Name}}/
</a>
</td>
<td class="col-size"></td>
<td class="col-modified">{{.ModTime.Format "2006-01-02 15:04"}}</td>
</tr>
{{end}}{{end}}
{{/* File entries */}}
{{range .Files}}{{if not .IsDir}}
<tr>
<td class="col-name">
<a href="{{.URL}}">
<span class="icon file-icon"></span>
{{.Name}}
</a>
</td>
<td class="col-size">{{humanizeBytes .Size}}</td>
<td class="col-modified">{{.ModTime.Format "2006-01-02 15:04"}}</td>
</tr>
{{end}}{{end}}
</tbody>
</table>
</main>
<footer>
<p>Styled with <a href="/asw/">Agentic Semantic Web</a></p>
</footer>
</body>
</html>

View file

@ -0,0 +1,51 @@
# ASW Caddy Directory Listing — Caddyfile snippet
#
# Caddy's `file_server browse` outputs its own HTML, but accepts a custom
# template file via `browse { template_file }`. The template is a Go HTML
# template with access to directory metadata and file entries.
#
# See: browse.html in this directory for the ASW-styled template.
# ── Option A: Custom template (recommended, Caddy v2.6+) ─────────────────────
#
# Full control over the listing HTML. Browse template receives:
# .Name — directory name (last path segment)
# .Path — current URL path (e.g. "/files/")
# .Files — []FileInfo, each with:
# .Name, .Size, .URL, .ModTime, .IsDir, .IsSymlink
handle /files/* {
root * /var/www/files
file_server browse {
index off
browse {
template_file /home/exedev/projects/agentic-semantic-web/packs/caddy/browse.html
}
}
}
# ── Option B: Default Caddy browse (quick, no custom template) ────────────────
#
# Uses Caddy's built-in file browser. Functional but unstyled.
# Upgrade to Option A when you want ASW aesthetics.
#
# handle /files/* {
# root * /var/www/files
# file_server browse
# }
# ── Example: expose the ASW repo itself for browsing ─────────────────────────
#
# example.com {
# handle /asw/browse/* {
# uri strip_prefix /asw/browse
# root * /home/exedev/projects/agentic-semantic-web
# file_server browse {
# browse {
# template_file /home/exedev/projects/agentic-semantic-web/packs/caddy/browse.html
# }
# }
# }
# }

View file

@ -0,0 +1,66 @@
# ASW Caddy Error Pages — Caddyfile snippet
#
# Paste this inside your site block (not at global scope).
# Adjust the root path to where your agentic-semantic-web repo lives.
#
# Assumes asw.css is served at /asw/asw.css
# (serve the agentic-semantic-web repo root as /asw/ — see README.md)
# ── Error pages ──────────────────────────────────────────────────────────────
#
# Caddy's handle_errors block intercepts any response with a matching
# status code before it reaches the client.
#
# Rewrite the path to the ASW static error page, then serve it from
# the agentic-semantic-web repo root.
handle_errors {
rewrite * /errors/{http.error.status_code}.html
file_server {
root /home/exedev/projects/agentic-semantic-web
}
}
# ── Serving asw.css ───────────────────────────────────────────────────────
#
# The error pages load asw.css from /asw/asw.css.
# Add this route to your site block so the CSS is reachable.
# (Skip if you already serve /asw/ from this repo elsewhere.)
handle /asw/* {
uri strip_prefix /asw
file_server {
root /home/exedev/projects/agentic-semantic-web
}
}
# ── Example site block ────────────────────────────────────────────────────────
#
# example.com {
# root * /var/www/html
# file_server
#
# handle /asw/* {
# uri strip_prefix /asw
# file_server {
# root /home/exedev/projects/agentic-semantic-web
# }
# }
#
# handle_errors {
# rewrite * /errors/{http.error.status_code}.html
# file_server {
# root /home/exedev/projects/agentic-semantic-web
# }
# }
# }
#
# Supported error codes (from errors/ directory):
# 400 — Bad Request
# 401 — Unauthorized
# 403 — Forbidden
# 404 — Not Found
# 500 — Internal Server Error
# 502 — Bad Gateway
# 503 — Service Unavailable