mirror of
https://github.com/roots/wp-packages
synced 2026-07-22 02:10:54 +08:00
Replace Go's html/template with CloudyKit/jet/v6 for server-rendered templates. Jet provides first-class parameterized blocks, template inheritance via extends/yield, and C-like expressions — eliminating the dict helper workarounds that html/template required for reusable components. Add components.html with four reusable Jet blocks: - shell(command, variant, class) — copyable command boxes (replaces ~16 duplicated instances across 6 templates) - notice(variant, class) with yield content — alert boxes with variant-based styling and content slots - input(icon, name, ...) — form inputs with icon and keyboard hint - pagination(pager, class) — pagination controls driven by pre-computed buildPagination() data Key changes: - templates.go: embed.FS loader for Jet, function registration via AddGlobal, buildPagination() helper, render() using VarMap - handlers.go: simplified render calls (no more template combinations) - router.go: *jet.Set replaces *templateSet - All 13 templates converted to Jet syntax (extends/block/yield) - Tailwind scanning unaffected (templates remain .html files) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
14 lines
745 B
HTML
14 lines
745 B
HTML
{{extends "layout.html"}}
|
|
{{block title()}}Page Not Found — WP Packages{{end}}
|
|
{{block meta_seo()}}
|
|
<meta name="robots" content="noindex">
|
|
{{end}}
|
|
{{block json_ld()}}{{end}}
|
|
{{block og_meta()}}{{end}}
|
|
{{block body()}}
|
|
<div class="mx-auto max-w-6xl px-4 sm:px-6 lg:px-8 py-24 text-center">
|
|
<h1 class="text-4xl font-bold text-gray-900 mb-4">{{if Gone}}Package Removed{{else}}Page Not Found{{end}}</h1>
|
|
<p class="text-gray-500 mb-8">{{if Gone}}This package has been removed from WP Packages.{{else}}The page you're looking for doesn't exist.{{end}}</p>
|
|
<a href="/" class="inline-flex items-center rounded-lg bg-brand-primary px-4 py-2 text-sm font-medium text-white hover:bg-brand-primary/85 transition-colors">Browse packages</a>
|
|
</div>
|
|
{{end}}
|