Refactor architecture into eight components and consolidate reliability work
Build and publish container images / images (push) Successful in 9m34s
Release container images / release (push) Successful in 36s

Extract Grammaratur, Dregarnuhr, Geduldh, Mestionora, Ordoschnellic, Schutzaria, Kunstzeal and Seheweit behind compatible application contracts.

Include accumulated editor resilience, navigation and theme UX, remote CLI, storage/schema and DR groundwork, tests and design/operations documentation.

Verified: uncached full Go suite; go vet ./...; race tests for all eight components; 11 targeted Chromium tests; Node suites; 19 Python CLI tests; reproducible editor build. No push, release tag or deployment in this checkpoint.
This commit is contained in:
Anya Tokugawa committed 2026-11-01 15:23:31 +09:00
1 parent 9dd425f765
commit d5d21b7841
302 files changed
+20037 -3492

No files matched your search

+2 -1
View File
@@ -1,8 +1,9 @@
{{ define "anonymous_view.gohtml" }}<!doctype html>
<html lang="{{ .Locale }}"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1"><title>{{ .Title }} · {{ .WikiName }}</title>
{{ template "social-metadata" . }}
<script type="module" src="/static/js/code-highlight.js?v=1"></script>
<link rel="stylesheet" href="/static/css/main.css"><link rel="stylesheet" href="/static/css/theme/base.css">{{ if .ThemeCSS }}<link rel="stylesheet" href="{{ .ThemeCSS }}">{{ end }}
<style>.public-document img,.public-document video{max-width:100%;max-height:85vh}.public-document iframe{width:100%;height:85vh;border:0}.public-document pre{overflow:auto}</style></head>
<body class="{{ .Theme }}"><main class="public-document">{{ template "public-navigation" . }}
<section id="public-content" tabindex="-1">{{ if .HTML }}<article>{{ .HTML }}</article>{{ else if eq .Media "image" }}<img src="{{ .RawURL }}" alt="{{ .Title }}">{{ else if eq .Media "pdf" }}<iframe src="{{ .RawURL }}" title="{{ .Title }}"></iframe>{{ else if eq .Media "audio" }}<audio src="{{ .RawURL }}" controls preload="metadata"></audio>{{ else if eq .Media "video" }}<video src="{{ .RawURL }}" controls preload="metadata"></video>{{ else if .Text }}<pre>{{ .Text }}</pre>{{ end }}</section>
<section id="public-content" tabindex="-1">{{ if .HTML }}<article class="page-html">{{ .HTML }}</article>{{ else if eq .Media "image" }}<img src="{{ .RawURL }}" alt="{{ .Title }}">{{ else if eq .Media "pdf" }}<iframe src="{{ .RawURL }}" title="{{ .Title }}"></iframe>{{ else if eq .Media "audio" }}<audio src="{{ .RawURL }}" controls preload="metadata"></audio>{{ else if eq .Media "video" }}<video src="{{ .RawURL }}" controls preload="metadata"></video>{{ else if .Text }}<pre><code class="language-{{ .CodeLanguage }}">{{ .Text }}</code></pre>{{ end }}</section>
</main><script src="/static/js/public-navigation.js?v=3" defer></script></body></html>{{ end }}
+70 -8
View File
@@ -1,9 +1,10 @@
{{ define "browser.gohtml" }}
<!DOCTYPE html>
<html lang="en">
<html lang="{{ .Locale }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Browser</title>
<link rel="stylesheet" href="/static/css/fonts.css">
@@ -58,9 +59,25 @@
.browser-main {
padding: 1rem;
min-width: 0;
overflow: auto;
}
.browser-address { display:flex; gap:.35rem; align-items:center; flex:1; min-width:8rem; max-width:42rem; margin:0 .8rem; }
.browser-address input { flex:1; min-width:0; width:100%; font-family:monospace; background:var(--input-bg); color:var(--fg); border:1px solid var(--border-soft); border-radius:.3rem; padding:.4rem .6rem; }
.browser-address-error { color:var(--danger,#c34747); margin:0; position:absolute; top:100%; background:var(--bg); }
.topbar:has(.browser-address){position:relative}.browser-main{padding-bottom:4.5rem}
@media(max-width:1100px){.topbar .browser-address{display:none}}
.browser-create-dialog { box-sizing:border-box; width:min(32rem,calc(100vw - 2rem)); color:var(--fg); background:var(--bg); border:1px solid var(--border-soft); border-radius:.6rem; padding:1rem; }
.browser-create-dialog::backdrop { background:rgb(0 0 0 / .45); }
.browser-create-dialog h2 { font-size:1.1rem; margin:0 0 .8rem; }
.browser-create-dialog label { display:grid; gap:.35rem; }
.browser-create-dialog [hidden] { display:none !important; }
.browser-create-dialog input { box-sizing:border-box; width:100%; padding:.5rem; color:var(--input-fg); background:var(--input-bg); border:1px solid var(--border-soft); }
.browser-create-dialog p { font-size:.85rem; }
.browser-create-dialog footer { display:flex; justify-content:flex-end; gap:.5rem; }
.browser-empty { color:var(--muted); }
.browser-toolbar {
display: flex;
gap: 0.5rem;
@@ -259,7 +276,7 @@
position: fixed;
z-index: 1200;
left: 1rem;
bottom: 1rem;
bottom: max(4.5rem, calc(env(safe-area-inset-bottom) + 4rem));
width: min(22rem, calc(100vw - 2rem));
display: grid;
gap: .45rem;
@@ -371,10 +388,24 @@
display: none;
}
@media(max-width:800px){
.browser-page .topbar{flex-wrap:wrap;gap:.3rem;padding:.5rem}
.browser-page .topbar .brand{flex:1 0 100%}
.browser-page .topbar>nav{order:5;flex:1 0 100%;flex-wrap:nowrap;overflow:auto;gap:0}
.browser-page .topbar>nav>a{font-size:.85rem;padding:.25rem .4rem}
.browser-page .topbar .city-map-launch{margin:0;flex-shrink:0}
.browser-page .topbar>button{flex-shrink:0}
.browser-layout,.browser-layout.no-sidebar,.browser-layout.no-preview,.browser-layout.no-sidebar.no-preview{display:block;min-height:calc(100dvh - 8rem)}
.browser-layout .browser-sidebar,.browser-layout .browser-preview,.browser-layout .resize-handle{display:none}
.browser-layout.mobile-sidebar .browser-sidebar,.browser-layout.mobile-preview .browser-preview{display:block;position:fixed;inset:8rem .5rem 4.5rem;z-index:60;box-sizing:border-box;border:1px solid var(--border);background:var(--bg);box-shadow:0 1rem 2rem #0006}
.browser-main{padding:.65rem .65rem 4.5rem}
.browser-grid{grid-template-columns:repeat(auto-fill,minmax(8rem,1fr))}
}
</style>
</head>
<body>
<body class="browser-page">
<header class="topbar">
<div class="brand">
@@ -386,6 +417,12 @@
<a href="{{ .ResolvedHref }}">{{ .Label }}</a>
{{ end }}
</nav>
<form class="browser-address" data-browser-address data-path="{{ .Path }}" data-invalid-label="{{ T "browser.invalid" }}" data-edit-label="{{ T "children.edit" }}" data-open-label="{{ T "children.open" }}">
<button type="button" class="icon-button" data-browser-up title="{{ T "browser.up" }}" aria-label="{{ T "browser.up" }}">↑</button>
<input name="address" value="{{ .Path }}" aria-label="{{ T "browser.address" }}" aria-describedby="browser-address-error" autocomplete="off" spellcheck="false" required>
<button type="submit" class="icon-button" title="{{ T "browser.go" }}" aria-label="{{ T "browser.go" }}">↵</button>
<span id="browser-address-error" class="browser-address-error" role="alert"></span>
</form>
{{ template "auth-menu" . }}</header>
<main id="browser-layout" class="browser-layout">
@@ -422,6 +459,9 @@
<div class="browser-toolbar">
<button type="button" class="icon-button" data-browser-create="vi" title="{{ T "browser.new" }}" aria-label="{{ T "browser.new" }}"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" aria-hidden="true"><path d="M14 2H5v20h14V7zM14 2v5h5M8 14h8m-4-4v8"/></svg></button>
<button type="button" class="icon-button" data-browser-create="cd" title="{{ T "browser.folder" }}" aria-label="{{ T "browser.folder" }}"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" aria-hidden="true"><path d="M3 7V4h7l2 3h9v13H3zM8 13h8m-4-4v8"/></svg></button>
<a
href="/v/upload?path={{ .Path }}{{ if ne .Path "/" }}/{{ end }}"
class="icon-button"
@@ -474,9 +514,7 @@
</div>
<div class="browser-path">
{{ .Path }}
</div>
{{ if not .Entries }}<p class="browser-empty">{{ T "browser.empty" }}</p>{{ end }}
<div id="browser-grid" class="browser-grid">
@@ -614,6 +652,12 @@ function toggleSidebar() {
const layout =
document.getElementById("browser-layout")
if (matchMedia('(max-width:800px)').matches) {
layout.classList.toggle('mobile-sidebar')
layout.classList.remove('mobile-preview')
return
}
layout.classList.toggle("no-sidebar")
localStorage.setItem(
@@ -626,6 +670,13 @@ function togglePreview() {
const layout =
document.getElementById("browser-layout")
if (matchMedia('(max-width:800px)').matches) {
layout.classList.toggle('mobile-preview')
layout.classList.remove('mobile-sidebar')
updatePaneButtons()
return
}
layout.classList.toggle("no-preview")
localStorage.setItem(
@@ -645,7 +696,7 @@ function updatePaneButtons() {
if (previewBtn) {
const hidden =
layout.classList.contains("no-preview")
matchMedia('(max-width:800px)').matches ? !layout.classList.contains('mobile-preview') : layout.classList.contains("no-preview")
previewBtn.textContent =
hidden ? "◨" : "◧"
@@ -902,7 +953,7 @@ async function ctxPaste() {
clipboard = null
}
if (!clipboard?.paths?.length) return
const directory = document.querySelector(".browser-path").textContent.trim() || "/"
const directory = document.querySelector("[data-browser-address]").dataset.path || "/"
for (const sourcePath of clipboard.paths) {
const basename = sourcePath.replace(/\/+$/, "").split("/").pop()
const sourceDirectory = sourcePath.slice(0, sourcePath.lastIndexOf("/")) || "/"
@@ -1061,6 +1112,17 @@ restoreViewMode()
restorePanes()
</script>
<script src="/static/js/browser-interactions.js?v=1"></script>
<dialog class="browser-create-dialog" data-browser-create-dialog aria-labelledby="browser-create-title">
<form>
<h2 id="browser-create-title">{{ T "browser.new" }}</h2>
<label>{{ T "browser.name" }}<input name="path" autocomplete="off" spellcheck="false" required></label>
<label data-browser-format>{{ T "browser.format" }}<select name="format"><option value="wiki">{{ T "browser.wiki" }}</option><option value="plain">{{ T "browser.plain" }}</option></select></label>
<p>{{ T "browser.create_help" }}</p>
<p>{{ T "browser.folder_help" }}</p>
<p class="browser-address-error" role="alert"></p>
<footer><button type="button" data-browser-create-cancel>{{ T "picker.cancel" }}</button><button type="submit">{{ T "children.open" }}</button></footer>
</form>
</dialog>
</body>
</html>
+1 -1
View File
@@ -21,4 +21,4 @@
</div><p class="muted" data-city-plan-result role="status"></p></details></section>{{ end }}
<section data-city-menu-panel="settings" hidden><h2>{{ T "city.map_controls" }}</h2><section class="city-toolbar"><button type="button" data-city-action="zoom-in" aria-label="{{ T "city.zoom_in" }}">+</button><button type="button" data-city-action="zoom-out" aria-label="{{ T "city.zoom_out" }}">−</button><button type="button" data-city-action="reset">{{ T "city.reset" }}</button><label><input type="checkbox" data-city-labels checked> {{ T "city.labels" }}</label><span class="muted" data-city-version></span>{{ if not .PublicNavigation }}<form class="city-locality-search" action="/v/search" method="get" data-city-locality-search><input type="hidden" name="locality" value="domain"><input type="hidden" name="locality_id" value=""><input name="q" placeholder="{{ T "search.folder_placeholder" }}" required><button type="submit" aria-label="{{ T "search.submit" }}">⌕</button></form>{{ end }}</section><p>{{ T "city.explore_help" }}</p><p>{{ T "city.keyboard_help" }}</p><header class="topbar city-menu-account">{{ template "auth-menu" . }}</header></section>
{{ template "city-governance" . }}</div></div></dialog>
<script src="/static/js/city-generator-client.js?v=1" defer></script><script src="/static/js/city-navigation.js?v=1" defer></script><script src="/static/js/city-estates.js?v=3" defer></script><script src="/static/js/city-menu.js?v=1" defer></script><script src="/static/js/city-organizer.js?v=2" defer></script><script src="/static/js/city-map.js?v=21" defer></script></body></html>{{ end }}
<script src="/static/js/city-generator-client.js?v=1" defer></script><script src="/static/js/city-navigation.js?v=1" defer></script><script src="/static/js/city-estates.js?v=4" defer></script><script src="/static/js/city-menu.js?v=1" defer></script><script src="/static/js/city-organizer.js?v=3" defer></script><script src="/static/js/city-map.js?v=22" defer></script></body></html>{{ end }}
+3 -3
View File
@@ -1,11 +1,11 @@
{{ define "city_node.gohtml" }}<!doctype html>
<html lang="{{ .Locale }}"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>{{ .Node.Title }} · {{ .WikiName }}</title>
<title>{{ .Node.DisplayTitle }} · {{ .WikiName }}</title>
{{ template "social-metadata" . }}
<link rel="stylesheet" href="/static/css/main.css"><link rel="stylesheet" href="/static/css/theme/base.css"><link rel="stylesheet" href="{{ .ThemeCSS }}"><link rel="stylesheet" href="/static/css/city-graph.css">
</head><body><header class="topbar"><div class="brand"><a href="/">{{ .WikiName }}</a></div><a href="/v/city">{{ T "city.map" }}</a>{{ template "auth-menu" . }}</header>
<main class="container"><nav class="breadcrumbs"><a href="/v/city">{{ T "city.map" }}</a>{{ if .Node.Quartier }}<span class="breadcrumb-sep">/</span><a href="{{ .QuartierHref }}">{{ .Node.Quartier.Title }}</a>{{ end }}{{ if .Node.Street }}<span class="breadcrumb-sep">/</span><a href="{{ .StreetHref }}">{{ .Node.Street.Title }}</a>{{ end }}<span class="breadcrumb-sep">/</span><span>{{ .Node.Title }}</span></nav>
<article class="city-node-detail"><p class="muted">{{ .Node.Kind }} · {{ .Node.State }}</p><header><h1>{{ .Node.Title }}</h1>{{ template "city-governance" . }}</header><p>{{ .Node.Description }}</p>
<main class="container"><nav class="breadcrumbs"><a href="/v/city">{{ T "city.map" }}</a>{{ if .Node.Quartier }}<span class="breadcrumb-sep">/</span><a href="{{ .QuartierHref }}">{{ .Node.Quartier.Title }}</a>{{ end }}{{ if .Node.Street }}<span class="breadcrumb-sep">/</span><a href="{{ .StreetHref }}">{{ .Node.Street.Title }}</a>{{ end }}<span class="breadcrumb-sep">/</span><span>{{ .Node.DisplayTitle }}</span></nav>
<article class="city-node-detail"><p class="muted">{{ .Node.Kind }} · {{ .Node.State }}</p><header><h1>{{ .Node.DisplayTitle }}</h1>{{ template "city-governance" . }}</header><p>{{ .Node.Description }}</p>
<dl><dt>UUID</dt><dd><code>{{ .Node.UUID }}</code></dd><dt>{{ T "config.name" }}</dt><dd>{{ .Node.Name }}</dd><dt>Path</dt><dd>{{ if .CanPlan }}<form class="city-path-form" data-city-path-form data-kind="{{ .Node.Kind }}" data-uuid="{{ .Node.UUID }}"><input name="path_prefix" value="{{ .Node.PathPrefix }}" required><button type="submit">{{ T "config.save" }}</button><span class="muted" data-city-path-result></span></form>{{ else }}<code>{{ .Node.PathPrefix }}</code>{{ end }}</dd><dt>Version</dt><dd>{{ .Node.Version }}</dd></dl>
{{ if eq .Node.Kind "spot" }}<h2>Pages</h2><ul>{{ range .Pages }}<li><a href="{{ .Href }}">{{ if .Label }}{{ .Label }}{{ else if .Path }}{{ .Path }}{{ else }}{{ .PageUUID }}{{ end }}</a> <span class="muted">{{ .EdgeType }}</span></li>{{ else }}<li>—</li>{{ end }}</ul>{{ end }}
<p><a href="{{ .MapHref }}">{{ T "city.show_on_map" }}</a></p></article></main>
+4 -1
View File
@@ -1165,7 +1165,10 @@ Vim
<div class="table-scroll"><table class="recent-table"><thead><tr><th>{{ T "auth.display_name" }}</th><th>{{ T "auth.email" }}</th><th>{{ T "config.status" }}</th><th>{{ T "config.operations" }}</th></tr></thead><tbody>{{ range .AuthPrincipals }}<tr><td>{{ .DisplayName }}</td><td>{{ .Email }}</td><td>{{ T (printf "auth.state_%s" .State) }}</td><td><form method="post" action="/-/sys/config/auth"><input type="hidden" name="action" value="principal_state"><input type="hidden" name="principal_uuid" value="{{ .UUID }}"><select name="state"><option value="active" {{ if eq .State "active" }}selected{{ end }}>{{ T "auth.state_active" }}</option><option value="readonly" {{ if eq .State "readonly" }}selected{{ end }}>{{ T "auth.state_readonly" }}</option><option value="suspended" {{ if eq .State "suspended" }}selected{{ end }}>{{ T "auth.state_suspended" }}</option><option value="quarantined" {{ if eq .State "quarantined" }}selected{{ end }}>{{ T "auth.state_quarantined" }}</option></select><button>{{ T "config.save" }}</button></form></td></tr>{{ else }}<tr><td colspan="4">—</td></tr>{{ end }}</tbody></table></div>
</section>
<section id="panel-auth-sessions" class="config-section config-panel"><h1>{{ T "auth.sessions" }}</h1><div class="table-scroll"><table class="recent-table"><thead><tr><th>{{ T "auth.account" }}</th><th>{{ T "auth.auth_time" }}</th><th>{{ T "auth.last_seen" }}</th><th>{{ T "auth.expires" }}</th><th>MFA</th><th></th></tr></thead><tbody>{{ range .AuthSessions }}<tr><td>{{ .DisplayName }}</td><td>{{ formatUnixMS .AuthTimeMS }}</td><td>{{ formatUnixMS .LastSeenAtMS }}</td><td>{{ formatUnixMS .ExpiresAtMS }}</td><td>{{ .MFALevel }}</td><td><form method="post" action="/-/sys/config/auth"><input type="hidden" name="action" value="revoke_session"><input type="hidden" name="session_uuid" value="{{ .UUID }}"><button>{{ T "auth.revoke" }}</button></form></td></tr>{{ else }}<tr><td colspan="6">—</td></tr>{{ end }}</tbody></table></div>
<section id="panel-auth-sessions" class="config-section config-panel"><h1>{{ T "auth.sessions" }}</h1>
<form method="post" action="/-/sys/config/auth" class="auth-account-form"><input type="hidden" name="action" value="save_session_policy"><label>{{ T "auth.session_minutes" }}<input type="number" name="session_minutes" value="{{ .AuthSessionMinutes }}" min="5" max="43200" step="1" required aria-describedby="session-policy-help"></label><button>{{ T "config.save" }}</button></form>
<p id="session-policy-help" class="muted">{{ T "auth.session_policy_help" }}</p>
<div class="table-scroll"><table class="recent-table"><thead><tr><th>{{ T "auth.account" }}</th><th>{{ T "auth.auth_time" }}</th><th>{{ T "auth.last_seen" }}</th><th>{{ T "auth.expires" }}</th><th>MFA</th><th></th></tr></thead><tbody>{{ range .AuthSessions }}<tr><td>{{ .DisplayName }}</td><td>{{ formatUnixMS .AuthTimeMS }}</td><td>{{ formatUnixMS .LastSeenAtMS }}</td><td>{{ formatUnixMS .ExpiresAtMS }}</td><td>{{ .MFALevel }}</td><td><form method="post" action="/-/sys/config/auth"><input type="hidden" name="action" value="revoke_session"><input type="hidden" name="session_uuid" value="{{ .UUID }}"><button>{{ T "auth.revoke" }}</button></form></td></tr>{{ else }}<tr><td colspan="6">—</td></tr>{{ end }}</tbody></table></div>
</section>
<section id="panel-events" class="config-section config-panel"><h1>{{ T "config.event_definitions" }}</h1>
<form method="post" action="/-/sys/config"><input type="hidden" name="section" value="scheduler-preview"><button type="submit">{{ T "config.generate_previews" }}</button></form>
+17 -26
View File
@@ -28,13 +28,13 @@
<script
type="module"
src="/static/vendor/codemirror/editor.bundle.js"
src="/static/vendor/codemirror/editor.bundle.js?v=command-ux-1"
></script>
<link
rel="stylesheet"
href="/static/vendor/codemirror/editor.css"
href="/static/vendor/codemirror/editor.css?v=priority-ux-1"
>
</head>
@@ -51,6 +51,10 @@
<div class="editor-head-left">
<button type="button" class="editor-action-icon" data-editor-action="tools" title="{{ T "editor.tools" }}" aria-label="{{ T "editor.tools" }}">+</button>
<button type="button" class="editor-action-icon" data-editor-action="language" title="{{ T "editor.language" }}" aria-label="{{ T "editor.language" }}">文</button>
<button type="button" class="editor-action-icon" data-editor-action="restore" title="{{ T "editor.restore" }}" aria-label="{{ T "editor.restore" }}">↶</button>
<a
href="#"
class="editor-action-icon"
@@ -124,7 +128,7 @@
<div class="editor-head-right">
{{ if ne .EditType "code" }}
{{ if and (ne .EditType "code") (ne .EditType "plain") }}
<button
type="button"
class="editor-format-icon {{ if eq .EditType "html" }}active{{ end }}"
@@ -197,6 +201,9 @@
data-preview-default="{{ .EditorPreviewDefault }}"
data-syntax="{{ .EditorSyntax }}"
data-autocomplete="{{ .EditorAutocomplete }}"
data-base-revision="{{ .BaseRevision }}"
data-domain="{{ .Context.Domain.UUID }}"
data-owner="{{ if .AuthUser }}{{ .AuthUser.UUID }}{{ end }}"
></div>
<div
@@ -207,12 +214,13 @@
<span id="editor-vim-mode">
MODE
</span>
<span>
<span id="editor-format-status">
{{ .EditType }}
</span>
</div>
<div class="editor-status-right">
<span id="editor-save-status" role="status" aria-live="polite"></span>
<span id="editor-cursor">
Ln 1, Col 1
</span>
@@ -228,6 +236,7 @@ Ln 1, Col 1
</div>
<textarea hidden id="editor-base">{{ .BaseBody }}</textarea>
<input
type="hidden"
id="object-uuid"
@@ -262,7 +271,8 @@ Ln 1, Col 1
</main>
<script src="/static/js/editor.js?v=inert-v1"></script>
<script src="/static/js/editor-core.js?v=priority-ux-1"></script>
<script src="/static/js/editor.js?v=priority-ux-1"></script>
<script src="/static/js/path-actions.js"></script>
@@ -301,27 +311,7 @@ window.addEventListener(
setTimeout(() => cm.focus(), 0)
window.PagesWikiGetEditorText =
() => cm.state.doc.toString()
const syncTextarea =
() => {
textarea.value =
cm.state.doc.toString()
}
const oldSaveNow =
window.PagesEditor && window.PagesEditor.saveNow
if (oldSaveNow) {
window.PagesEditor.saveNow =
function() {
syncTextarea()
return oldSaveNow.apply(
window.PagesEditor,
arguments
)
}
}
() => window.PagesWikiCodeMirror.state.doc.toString()
}
)
@@ -430,6 +420,7 @@ window.addEventListener(
)
function switchEditorFormat(format) {
if (window.PagesEditor?.switchFormat) return window.PagesEditor.switchFormat(format)
const url =
new URL(location.href)
+2 -1
View File
@@ -13,6 +13,7 @@
<link rel="stylesheet" href="/static/css/home.css?v=11">
<link rel="stylesheet" href="{{ .ThemeCSS }}">
<script defer src="/static/js/content-viewer.js"></script>
<script defer src="/static/js/home-type-search.js?v=1"></script>
</head>
<body class="mode-home" style="--home-glass-opacity:{{ .HomeGlassOpacity }}%">
@@ -25,7 +26,7 @@
<form class="topbar-search" action="/v/search" method="get">
<input type="hidden" name="scope" value="/">
<input name="q" placeholder="{{ T "search.global_placeholder" }}" aria-label="{{ T "search.global_placeholder" }}">
<input name="q" data-home-type-search placeholder="{{ T "search.global_placeholder" }}" aria-label="{{ T "search.global_placeholder" }}">
</form>
<nav>
+2 -2
View File
@@ -17,7 +17,7 @@
<script defer src="/static/js/content-viewer.js"></script>
<script defer src="/static/js/viewer-shortcuts.js"></script>
{{ if eq .ContentView.Kind "code" }}
<script type="module" src="/static/vendor/codemirror/editor.bundle.js"></script>
<script type="module" src="/static/vendor/codemirror/editor.bundle.js?v=command-ux-1"></script>
<link rel="stylesheet" href="/static/vendor/codemirror/editor.css">
{{ end }}
</head>
@@ -133,7 +133,7 @@
</div>
{{ if .CitySpots }}<nav class="city-localities" aria-label="{{ T "city.localities" }}"><span>{{ if gt (len .CitySpots) 1 }}{{ T "city.magic_page" }}{{ else }}{{ T "city.spot" }}{{ end }}</span>{{ range .CitySpots }}<a href="/v/city/p/{{ .SpotName }}">{{ .SpotTitle }}</a>{{ end }}</nav>{{ end }}
{{ if .CitySpots }}<nav class="city-localities" aria-label="{{ T "city.localities" }}"><span>{{ if gt (len .CitySpots) 1 }}{{ T "city.magic_page" }}{{ else }}{{ T "city.spot" }}{{ end }}</span>{{ range .CitySpots }}<a href="/v/city/p/{{ .SpotName }}">{{ .DisplayTitle }}</a>{{ end }}</nav>{{ end }}
{{ if .GovernanceEndpoint }}{{ template "city-governance" . }}{{ end }}
<article class="page-html">
+1 -1
View File
@@ -1,6 +1,6 @@
{{ define "periodical_new.gohtml" }}<!doctype html>
<html lang="{{ .Locale }}"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>{{ .Title }} · {{ .WikiName }}</title>
<link rel="stylesheet" href="/static/css/main.css"><link rel="stylesheet" href="/static/css/theme/base.css"><link rel="stylesheet" href="{{ .ThemeCSS }}"><link rel="stylesheet" href="/static/css/content-viewer.css"><link rel="stylesheet" href="/static/vendor/codemirror/editor.css"><link rel="stylesheet" href="/static/css/periodicals.css?v=5"><script type="module" src="/static/vendor/codemirror/editor.bundle.js"></script></head>
<link rel="stylesheet" href="/static/css/main.css"><link rel="stylesheet" href="/static/css/theme/base.css"><link rel="stylesheet" href="{{ .ThemeCSS }}"><link rel="stylesheet" href="/static/css/content-viewer.css"><link rel="stylesheet" href="/static/vendor/codemirror/editor.css"><link rel="stylesheet" href="/static/css/periodicals.css?v=5"><script type="module" src="/static/vendor/codemirror/editor.bundle.js?v=command-ux-1"></script></head>
<body class="{{ .Theme }} mode-editor"><main class="periodical-shell" data-periodical-kind="{{ .Kind }}"><header class="topbar"><a href="/">{{ .WikiName }}</a><nav class="periodical-editor-actions">
<button type="button" class="editor-format-icon {{ if eq .EditType "html" }}active{{ end }}" data-editor-action="html" title="{{ T "editor.use_html" }}">HTML</button>
<button type="button" class="editor-format-icon {{ if eq .EditType "markdown" }}active{{ end }}" data-editor-action="markdown" title="{{ T "editor.use_markdown" }}">MD</button>
+1
View File
@@ -10,6 +10,7 @@
<link rel="stylesheet" href="/static/css/content-viewer.css">
<link rel="stylesheet" href="{{ .ThemeCSS }}">
<script defer src="/static/js/content-viewer.js"></script>
<script type="module" src="/static/js/code-highlight.js?v=1"></script>
<style>
html,
+10
View File
@@ -2,8 +2,18 @@
<body class="mode-view"><header class="topbar"><div class="brand"><a href="/">{{ .WikiName }}</a></div>{{ template "auth-menu" . }}</header><main class="container">
<section class="profile-card"><div class="profile-avatar">{{ if .Principal.HasAvatar }}<img src="/u/{{ .Principal.Username }}/_/avatar" alt="">{{ else }}{{ printf "%.1s" .Principal.DisplayName }}{{ end }}</div><div><h1>{{ .Principal.DisplayName }}{{ if and .AuthUser (eq .AuthUser.UUID .Principal.UUID) }} <a class="profile-edit-icon" href="/u/{{ .Principal.Username }}/_/edit" title="{{ T "auth.profile_edit" }}" aria-label="{{ T "auth.profile_edit" }}">✎</a>{{ end }}</h1><p class="profile-handle">{{ .Handle }}</p></div></section>
<style>.profile-edit-icon{font-size:.75em;color:var(--muted);text-decoration:none}.profile-edit-icon:hover{color:var(--link)}</style>
{{ if and (not .Editing) .ContactHref }}<p class="profile-phone"><a href="{{ .ContactHref }}" aria-label="{{ T "contact.phone" }}">☎ {{ .Contact.PhoneDisplay }}</a></p>{{ end }}
{{ if .Editing }}<h2>{{ T "auth.profile_edit" }}</h2>{{ if .Saved }}<p class="config-saved">✓ {{ T "config.saved" }}</p>{{ end }}
<form method="post" enctype="multipart/form-data" class="auth-profile-form"><input type="hidden" name="action" value="profile"><label>{{ T "auth.display_name" }}<input name="display_name" value="{{ .Principal.DisplayName }}" required></label><label>{{ T "auth.email" }}<input type="email" name="email" value="{{ .Principal.Email }}"></label><label>{{ T "auth.avatar" }}<input type="file" name="avatar" accept="image/png,image/jpeg,image/gif,image/webp"></label><button>{{ T "config.save" }}</button></form>
<h2 id="contact">{{ T "contact.title" }}</h2>
{{ if .ContactSaved }}<p class="config-saved" role="status">✓ {{ T "config.saved" }}</p>{{ end }}
<form method="post" class="auth-profile-form profile-contact-form"><input type="hidden" name="action" value="contact"><input type="hidden" name="contact_version" value="{{ .Contact.Version }}">
<label>{{ T "contact.phone" }}<input type="tel" name="phone" autocomplete="tel" maxlength="64" value="{{ .Contact.PhoneDisplay }}" aria-describedby="contact-help"></label>
<p class="muted" id="contact-help">{{ T "contact.help" }}</p>
<label>{{ T "auth.visibility" }}<select name="contact_visibility"><option value="private" {{ if eq .Contact.Visibility "private" }}selected{{ end }}>{{ T "auth.visibility_private" }}</option><option value="domain" {{ if eq .Contact.Visibility "domain" }}selected{{ end }}>{{ T "auth.visibility_domain" }}</option><option value="public" {{ if eq .Contact.Visibility "public" }}selected{{ end }}>{{ T "auth.visibility_public" }}</option></select></label>
<p class="muted">{{ T "contact.visibility_help" }}</p>
<label class="contact-confirm"><input type="checkbox" name="contact_confirm_public"><span>{{ T "contact.confirm" }}</span></label><button>{{ T "config.save" }}</button></form>
<style>.auth-profile-form.profile-contact-form{gap:.65rem}.profile-contact-form p{margin:0;font-size:.9rem;line-height:1.5}.auth-profile-form .contact-confirm{grid-template-columns:auto 1fr;align-items:start;gap:.5rem}.contact-confirm input{width:auto;margin:.25rem 0 0}.profile-contact-form input[type=tel],.profile-contact-form select{box-sizing:border-box;min-width:0;width:100%}</style>
<h2>{{ T "auth.security" }}</h2>{{ if .TOTPStatus }}<p class="muted">{{ T (printf "auth.totp_%s" .TOTPStatus) }}</p>{{ end }}
{{ if .TOTPEnabled }}<p>{{ T "auth.totp_enabled" }}</p><form method="post" enctype="multipart/form-data"><input type="hidden" name="action" value="totp_disable"><button>{{ T "auth.totp_disable" }}</button></form>
{{ else if .TOTPSecret }}<p>{{ T "auth.totp_scan_help" }}</p><p><code>{{ .TOTPSecret }}</code></p><details><summary>otpauth URI</summary><code class="totp-uri">{{ .TOTPUri }}</code></details><form method="post" enctype="multipart/form-data" class="auth-profile-form"><input type="hidden" name="action" value="totp_confirm"><label>{{ T "auth.totp_code" }}<input name="code" inputmode="numeric" pattern="[0-9]{6}" required></label><button>{{ T "auth.verify" }}</button></form>
+1
View File
@@ -3,6 +3,7 @@
<title>{{ .Title }}{{ if .Article }} · {{ .SiteTitle }}{{ end }}</title>
<link rel="stylesheet" href="/static/css/main.css"><link rel="stylesheet" href="/static/css/theme/base.css"><link rel="stylesheet" href="{{ .ThemeCSS }}"><link rel="stylesheet" href="/static/css/periodicals.css?v=6">
<link rel="alternate" type="application/rss+xml" title="{{ .SiteTitle }}" href="/rss.xml">
<script type="module" src="/static/js/code-highlight.js?v=1"></script>
{{ if .Canonical }}<link rel="canonical" href="{{ .Canonical }}"><meta property="og:url" content="{{ .Canonical }}"><meta property="og:type" content="article"><meta property="og:title" content="{{ .Title }}"><meta property="og:site_name" content="{{ .SiteTitle }}"><meta property="og:description" content="{{ .Description }}"><meta name="twitter:card" content="summary">{{ end }}</head>
<body class="{{ .Theme }}"><main class="periodical-shell" data-periodical-kind="{{ .Kind }}">
<header class="topbar"><a class="periodical-site-title" href="/">{{ .SiteTitle }}</a><nav><a href="/rss.xml" aria-label="RSS">RSS</a></nav></header>
+1 -1
View File
@@ -9,7 +9,7 @@
<link rel="stylesheet" href="/static/css/theme/base.css">
<link rel="stylesheet" href="/static/css/content-viewer.css">
<link rel="stylesheet" href="{{ .ThemeCSS }}">
<link rel="stylesheet" href="/static/css/search.css?v=3">
<link rel="stylesheet" href="/static/css/search.css?v=4">
<script defer src="/static/js/content-viewer.js"></script>
</head>
<body class="mode-search">
+3 -2
View File
@@ -20,7 +20,7 @@
<div class="home-search-combobox" data-home-search-suggest data-endpoint="/_/api/v1/search/suggest" data-page-label="{{ T "search.name" }}" data-file-label="{{ T "search.suggest_file" }}" data-quartier-label="{{ T "city.quartier" }}" data-street-label="{{ T "city.street" }}" data-spot-label="{{ T "city.spot" }}" data-direct-label="{{ T "search.suggest_direct" }}" data-all-label="{{ T "search.suggest_all" }}">
<form action="/v/search" method="get" role="search" autocomplete="off">
<input type="hidden" name="scope" value="/">
<input id="home-search-input" type="search" name="q" placeholder="{{ T "search.global_placeholder" }}" aria-label="{{ T "search.global_placeholder" }}" role="combobox" aria-autocomplete="list" aria-controls="home-search-suggestions" aria-expanded="false" spellcheck="false" required>
<input id="home-search-input" data-home-type-search type="search" name="q" placeholder="{{ T "search.global_placeholder" }}" aria-label="{{ T "search.global_placeholder" }}" role="combobox" aria-autocomplete="list" aria-controls="home-search-suggestions" aria-expanded="false" spellcheck="false" required>
<button type="submit" aria-label="{{ T "home.search" }}"><svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="10.5" cy="10.5" r="6.5"/><path d="m16 16 5 5"/></svg></button>
</form>
<div id="home-search-suggestions" class="home-search-suggestions" role="listbox" aria-label="{{ T "search.suggest_all" }}" hidden></div>
@@ -64,9 +64,10 @@
<button type="button" data-home-page-target="search" aria-current="page" aria-label="{{ T "home.search" }}"></button>
<button type="button" data-home-page-target="bookmarks" aria-label="{{ T "home.bookmarks" }}"></button>
</nav>
<script defer src="/static/js/home-pages.js?v=1"></script>
<script defer src="/static/js/home-pages.js?v=2"></script>
{{ end }}
<script defer src="/static/js/home-search-suggest.js?v=1"></script>
<script defer src="/static/js/home-type-search.js?v=1"></script>
</body>
</html>
{{ end }}
+21
View File
@@ -1,4 +1,14 @@
{{ define "auth-menu" }}
<script type="module" src="/static/js/code-highlight.js?v=1"></script>
{{ if .CommandEnabled }}
<form class="wiki-command-bar" data-command-bar data-command-path="{{ .CommandPath }}" data-browser="{{ .CommandBrowser }}" data-invalid="{{ T "browser.invalid" }}" data-unavailable="{{ T "command.unavailable" }}" data-empty="{{ T "command.empty" }}" data-more="{{ T "command.more" }}" {{ if not .CommandBrowser }}hidden{{ end }}>
<label for="wiki-command-input">›</label><input id="wiki-command-input" name="command" aria-label="{{ T "command.label" }}" placeholder="cd /path · vi file · view file" autocomplete="off" spellcheck="false" aria-describedby="wiki-command-status" aria-controls="wiki-command-suggestions" aria-expanded="false" role="combobox">
<button type="submit" title="{{ T "browser.go" }}" aria-label="{{ T "browser.go" }}">↵</button><button type="button" data-command-close title="Esc" aria-label="{{ T "command.close" }}">×</button>
<div class="wiki-command-suggestions" id="wiki-command-suggestions" role="listbox" hidden></div><small id="wiki-command-status" role="status" aria-live="polite"></small>
</form>
<link rel="stylesheet" href="/static/css/command-bar.css?v=1">
<script defer src="/static/js/browser-address.js?v=2"></script><script defer src="/static/js/command-bar.js?v=1"></script>
{{ end }}
<script src="/static/js/uuid.js?v=1" defer></script>
<link rel="stylesheet" href="/static/css/notifications.css?v=3">
<link rel="stylesheet" href="/static/css/notification-active.css?v=1">
@@ -15,6 +25,17 @@
<dialog class="calendar-upcoming-dialog" data-calendar-upcoming-dialog data-timezone="{{ .Timezone }}" aria-modal="true" aria-labelledby="calendar-upcoming-title"><div class="nav-modal-content"><header><h2 id="calendar-upcoming-title">{{ T "calendar.upcoming" }}</h2><button type="button" data-calendar-upcoming-close aria-label="Close">×</button></header><p data-calendar-upcoming-status role="status"></p><div class="calendar-upcoming-list" data-calendar-upcoming-list></div><footer><a href="/v/plan">{{ T "calendar.title" }} ↗</a></footer></div></dialog>
{{ end }}{{ end }}
<script src="/static/js/nav-modals.js?v=2" defer></script>
{{ if .QuickThemes }}
<details class="theme-picker" data-theme-picker data-default-css="{{ .DefaultThemeCSS }}" data-current-css="{{ .ThemeCSS }}" data-current-id="{{ .QuickThemeID }}" data-failed="{{ T "theme.failed" }}">
<summary title="{{ T "theme.quick" }}" aria-label="{{ T "theme.quick" }}">◐</summary>
<div class="theme-picker-panel"><label>{{ T "theme.quick" }}<select data-theme-select>
<option value="" data-css="{{ .DefaultThemeCSS }}" {{ if not .QuickThemeID }}selected{{ end }}>{{ T "theme.default" }}</option>
{{ range .QuickThemes }}<option value="{{ .ID }}" data-css="{{ .CSS }}" {{ if eq $.QuickThemeID .ID }}selected{{ end }}>{{ .Label }}</option>{{ end }}
</select></label><small>{{ T "theme.local" }}</small><span role="status" data-theme-status></span></div>
</details>
<link rel="stylesheet" href="/static/css/theme-picker.css?v=1">
<script defer src="/static/js/theme-picker.js?v=1"></script>
{{ end }}
<div class="auth-menu">
{{ if .AuthUser }}
<details><summary aria-label="{{ T "auth.profile" }}"><span class="auth-avatar">{{ if .AuthUser.HasAvatar }}<img src="/u/{{ .AuthUser.Username }}/_/avatar" alt="">{{ else }}{{ printf "%.1s" .AuthUser.DisplayName }}{{ end }}</span><span class="auth-user-name">{{ .AuthUser.DisplayName }}</span></summary>