Runway 1.0.0

This commit is contained in:
Runway committed 2026-10-21 11:34:34 -06:00
commit dcf819146b
1372 files changed
+188168

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
<div id="rd-admin" class="card mt-3">
<div class="card-header">
<h3 id="rd-admin-title" class="card-title">Runway Demo — status &amp; notes</h3>
</div>
<div class="card-body">
<p id="rd-admin-count" class="mb-1">Notes: 0</p>
<p id="rd-admin-banner" class="text-secondary mb-1">Banner: —</p>
<p id="rd-admin-key" class="text-secondary mb-1">Analytics key: —</p>
<p id="rd-admin-token" class="text-secondary mb-1">Site token: —</p>
<p id="rd-admin-page" class="text-secondary mb-2">Demo page: —</p>
<ul id="rd-admin-list" class="mb-2">
<li id="rd-admin-note">note</li>
</ul>
<a id="rd-admin-console" href="/__admin/runway-demo" class="btn btn-sm btn-primary">Open the demo screen</a>
<a id="rd-admin-api" href="/demo/notes.json" class="btn btn-sm btn-outline-primary">Open /demo/notes.json</a>
</div>
</div>
+17
View File
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Decoupled logic for the admin fragment. The host renders it automatically BELOW the per-site settings form because
templates/admin.html exists (a filename convention — no descriptor entry). Fed by the plugin's own bean; tenantSiteId
comes from the console. The link to the demo screen shows only to a user who may open it: ${@authz.may(..)} is the
AccessCheck bean, the same check the screen's @PreAuthorize makes (hiding a link is UX; the screen still checks).
-->
<thlogic>
<attr sel="#rd-admin-title" th:text="#{runwaydemo.admin.title}"/>
<attr sel="#rd-admin-count" th:text="#{runwaydemo.admin.notes(${@runwayDemoAdminModel.noteCount(tenantSiteId)})}"/>
<attr sel="#rd-admin-banner" th:text="#{runwaydemo.admin.banner(${@runwayDemoAdminModel.bannerEnabled()})}"/>
<attr sel="#rd-admin-key" th:text="#{runwaydemo.admin.writeKey(${@runwayDemoAdminModel.analyticsKeyConfigured()})}"/>
<attr sel="#rd-admin-token" th:text="#{runwaydemo.admin.siteToken(${@runwayDemoAdminModel.siteTokenConfigured(tenantSiteId)})}"/>
<attr sel="#rd-admin-page" th:text="${@runwayDemoAdminModel.demoPagePath(tenantSiteId).isEmpty()} ? #{runwaydemo.admin.page.none} : #{runwaydemo.admin.page(${@runwayDemoAdminModel.demoPagePath(tenantSiteId)})}"/>
<attr sel="#rd-admin-note" th:each="n : ${@runwayDemoAdminModel.recentNotes(tenantSiteId)}" th:text="${n.text()}"/>
<attr sel="#rd-admin-console" th:if="${@authz.may('runway-demo|manage-notes')}" th:text="#{runwaydemo.card.console}"/>
</thlogic>
+194
View File
@@ -0,0 +1,194 @@
<!DOCTYPE html>
<html lang="en">
<head><meta charset="utf-8"><title>Runway demo</title></head>
<body>
<!-- The demo's console screen content (@ConsoleScreen). The kernel's shell layout pulls in #content by name. Markup
only: every binding is in console.th.xml. Every state-changing action is a POST form carrying the console's CSRF
token (.rd-csrf); the path check is a GET form because it only reads. -->
<div id="content">
<div class="page-header d-print-none mb-3">
<div class="row align-items-center">
<div class="col">
<div class="page-pretitle" id="rd-pretitle">Site</div>
<h2 class="page-title" id="rd-heading">Runway demo</h2>
</div>
</div>
</div>
<div id="rd-flash" class="alert alert-success" role="status"><span id="rd-flash-text">done</span></div>
<div id="rd-error" class="alert alert-danger" role="alert"><span id="rd-error-text">error</span></div>
<div class="row row-cards">
<!-- PluginInfo + RunwaySpi: who am I, built against what, running on what. -->
<div class="col-md-6">
<div class="card">
<div class="card-header"><h3 class="card-title" id="rd-about-title">This plugin</h3></div>
<div class="card-body">
<p class="mb-1"><span id="rd-version-label">Version</span>: <code id="rd-version">2.0.1</code></p>
<p class="mb-1"><span id="rd-built-label">Built against SPI</span>: <code id="rd-built">0.6.0</code></p>
<p class="mb-0"><span id="rd-running-label">Running on SPI</span>: <code id="rd-running">0.6.0</code></p>
</div>
</div>
</div>
<!-- SitePages: the starter page, installed through the site's editorial rules. -->
<div class="col-md-6">
<div class="card">
<div class="card-header"><h3 class="card-title" id="rd-page-title">Demo page</h3></div>
<div class="card-body">
<p class="text-secondary" id="rd-page-desc">A ready-made page carrying the notice and feedback
widgets.</p>
<p id="rd-page-installed" class="mb-0"><span id="rd-page-at">Installed at</span>
<a id="rd-page-link" href="/demo"><code id="rd-page-path">/demo</code></a></p>
<form id="rd-page-form" method="post" action="/__admin/runway-demo/install-page" class="m-0">
<input class="rd-csrf" type="hidden" name="_csrf" value="">
<button type="submit" class="btn btn-primary" id="rd-page-install">Install the demo page</button>
</form>
</div>
</div>
</div>
<!-- PluginSiteFiles (+ siteData.personal): the per-site notes. -->
<div class="col-md-6">
<div class="card">
<div class="card-header">
<h3 class="card-title" id="rd-notes-title">Notes</h3>
<span class="ms-auto text-secondary" id="rd-notes-count">0</span>
</div>
<div class="card-body">
<p class="text-secondary small" id="rd-notes-desc">Kept in the plugin's own folder of this site;
declared personal data, so transfer copies leave them out.</p>
<form id="rd-note-form" method="post" action="/__admin/runway-demo/notes" class="mb-3">
<input class="rd-csrf" type="hidden" name="_csrf" value="">
<label class="form-label" for="rd-note-text" id="rd-note-label">New note</label>
<textarea class="form-control mb-2" id="rd-note-text" name="text" rows="2"
maxlength="1000"></textarea>
<button type="submit" class="btn btn-outline-primary" id="rd-note-add">Add note</button>
</form>
<ul class="list-unstyled mb-0" id="rd-note-list">
<li id="rd-note-row" class="mb-2">
<span class="badge bg-secondary-lt rd-note-origin">console</span>
<span class="rd-note-text">text</span>
<div class="text-secondary small rd-note-at">time</div>
</li>
</ul>
</div>
</div>
</div>
<!-- ContentSource + ContentChanges: the showcase page. -->
<div class="col-md-6">
<div class="card">
<div class="card-header"><h3 class="card-title" id="rd-show-title">Showcase page</h3></div>
<div class="card-body">
<p class="text-secondary small" id="rd-show-desc">Served by the plugin's content source. Publishing
or unpublishing announces the change, so routing, sitemaps and search follow at once.</p>
<div id="rd-show-live" class="mb-3">
<p class="mb-1"><span id="rd-show-at">Published at</span>
<a id="rd-show-link" href="/demo/showcase"><code id="rd-show-path">/demo/showcase</code></a></p>
<blockquote class="text-secondary" id="rd-show-text">text</blockquote>
<form id="rd-show-unpublish" method="post" action="/__admin/runway-demo/showcase/unpublish"
class="m-0">
<input class="rd-csrf" type="hidden" name="_csrf" value="">
<button type="submit" class="btn btn-outline-danger btn-sm" id="rd-show-unpublish-btn">Unpublish</button>
</form>
</div>
<p class="text-secondary" id="rd-show-none">Nothing is published.</p>
<form id="rd-show-form" method="post" action="/__admin/runway-demo/showcase" class="m-0">
<input class="rd-csrf" type="hidden" name="_csrf" value="">
<label class="form-label" for="rd-show-input" id="rd-show-label">Showcase text</label>
<textarea class="form-control mb-2" id="rd-show-input" name="text" rows="2"
maxlength="2000"></textarea>
<button type="submit" class="btn btn-outline-primary" id="rd-show-publish">Publish</button>
</form>
</div>
</div>
</div>
<!-- ContentCatalogView: the site's published content surface, the path check, the manual refresh. -->
<div class="col-12">
<div class="card">
<div class="card-header">
<h3 class="card-title" id="rd-cat-title">Content surface</h3>
<span class="ms-auto text-secondary" id="rd-cat-total">0</span>
</div>
<div class="card-body">
<form id="rd-check-form" method="get" action="/__admin/runway-demo" class="row g-2 mb-3">
<div class="col-auto">
<label class="visually-hidden" for="rd-check-path" id="rd-check-label">Path</label>
<input class="form-control" id="rd-check-path" name="path" placeholder="/about">
</div>
<div class="col-auto">
<button type="submit" class="btn btn-outline-secondary" id="rd-check-btn">Check a path</button>
</div>
</form>
<p id="rd-check-result" class="mb-3"><code id="rd-check-echo">/about</code>
<span id="rd-check-unsafe" class="badge bg-red-lt">unsafe</span>
<span id="rd-check-servable" class="badge bg-green-lt">servable</span>
<span id="rd-check-reserved" class="badge bg-yellow-lt">not servable</span>
<span id="rd-check-owner">owned by page</span>
<span id="rd-check-free">no published page owns it</span></p>
<div class="table-responsive">
<table class="table table-sm">
<thead>
<tr>
<th id="rd-cat-h-source">Source</th>
<th id="rd-cat-h-id">Item</th>
<th id="rd-cat-h-path">Path</th>
</tr>
</thead>
<tbody>
<tr id="rd-cat-row">
<td class="rd-cat-source">pages</td>
<td class="rd-cat-id">about</td>
<td class="rd-cat-path">/about</td>
</tr>
</tbody>
</table>
</div>
<form id="rd-cat-refresh" method="post" action="/__admin/runway-demo/catalog/refresh" class="m-0">
<input class="rd-csrf" type="hidden" name="_csrf" value="">
<button type="submit" class="btn btn-sm btn-outline-secondary" id="rd-cat-refresh-btn">Refresh the listing</button>
</form>
</div>
</div>
</div>
<!-- SiteEventListener: what this node saw change, with the URLs before and after. -->
<div class="col-12">
<div class="card">
<div class="card-header"><h3 class="card-title" id="rd-act-title">Recent changes</h3></div>
<div class="card-body">
<p class="text-secondary" id="rd-act-empty">No change seen since the platform started.</p>
<div class="table-responsive" id="rd-act-table">
<table class="table table-sm">
<thead>
<tr>
<th id="rd-act-h-at">When</th>
<th id="rd-act-h-cause">Cause</th>
<th id="rd-act-h-item">Item</th>
<th id="rd-act-h-before">URLs before</th>
<th id="rd-act-h-after">URLs after</th>
<th id="rd-act-h-local">Here</th>
</tr>
</thead>
<tbody>
<tr id="rd-act-row">
<td class="rd-act-at text-nowrap">time</td>
<td class="rd-act-cause">page</td>
<td class="rd-act-item">pages:about</td>
<td class="rd-act-before">/about</td>
<td class="rd-act-after">/about</td>
<td class="rd-act-local">yes</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<p class="mt-3"><a id="rd-help" href="/__plugin/runway-demo/static/notes-help.html" target="_blank" rel="noopener">Help</a></p>
</div>
</body>
</html>
+108
View File
@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Decoupled logic of the demo's console screen. `rd` is the Screen record the controller put in the model; besides it,
the template uses only what a console screen may rely on: tenantSiteId, _csrf, ${@authz.may(..)} and #{..} messages.
`//` reaches nested elements of an iterated row. Form actions are constants in the markup (th:action and th:attr run
in a restricted context); every POST form's hidden .rd-csrf field carries the console session's CSRF token.
-->
<thlogic>
<attr sel="#rd-pretitle" th:text="${rd.site().displayName()}"/>
<attr sel="#rd-heading" th:text="#{runwaydemo.console.heading}"/>
<attr sel="#rd-flash" th:if="${runwayDemoFlash != null}"/>
<attr sel="#rd-flash-text" th:text="${runwayDemoFlash}"/>
<attr sel="#rd-error" th:if="${runwayDemoError != null}"/>
<attr sel="#rd-error-text" th:text="${runwayDemoError}"/>
<attr sel=".rd-csrf"
th:attr="name=${_csrf != null ? _csrf.parameterName : '_csrf'},value=${_csrf != null ? _csrf.token : ''}"/>
<!-- This plugin -->
<attr sel="#rd-about-title" th:text="#{runwaydemo.console.about}"/>
<attr sel="#rd-version-label" th:text="#{runwaydemo.console.version}"/>
<attr sel="#rd-version" th:text="${rd.pluginVersion()}"/>
<attr sel="#rd-built-label" th:text="#{runwaydemo.console.builtSpi}"/>
<attr sel="#rd-built" th:text="${rd.builtSpi()}"/>
<attr sel="#rd-running-label" th:text="#{runwaydemo.console.runningSpi}"/>
<attr sel="#rd-running" th:text="${rd.runningSpi()}"/>
<!-- Demo page (SitePages) -->
<attr sel="#rd-page-title" th:text="#{runwaydemo.console.page}"/>
<attr sel="#rd-page-desc" th:text="#{runwaydemo.console.page.desc}"/>
<attr sel="#rd-page-installed" th:if="${!rd.starterPath().isEmpty()}"/>
<attr sel="#rd-page-at" th:text="#{runwaydemo.console.page.at}"/>
<attr sel="#rd-page-link" th:href="${rd.starterPath()}"/>
<attr sel="#rd-page-path" th:text="${rd.starterPath()}"/>
<attr sel="#rd-page-form" th:if="${rd.starterPath().isEmpty()}"/>
<attr sel="#rd-page-install" th:text="#{runwaydemo.console.page.install}"/>
<!-- Notes (PluginSiteFiles) -->
<attr sel="#rd-notes-title" th:text="#{runwaydemo.console.notes}"/>
<attr sel="#rd-notes-count" th:text="${rd.noteCount()}"/>
<attr sel="#rd-notes-desc" th:text="#{runwaydemo.console.notes.desc}"/>
<attr sel="#rd-note-label" th:text="#{runwaydemo.console.note.new}"/>
<attr sel="#rd-note-add" th:text="#{runwaydemo.console.note.add}"/>
<attr sel="#rd-note-row" th:each="n : ${rd.notes()}"/>
<attr sel="#rd-note-row//.rd-note-origin" th:text="${n.origin()}"/>
<attr sel="#rd-note-row//.rd-note-text" th:text="${n.text()}"/>
<attr sel="#rd-note-row//.rd-note-at" th:text="${n.createdAt()}"/>
<!-- Showcase (ContentSource + ContentChanges) -->
<attr sel="#rd-show-title" th:text="#{runwaydemo.console.showcase}"/>
<attr sel="#rd-show-desc" th:text="#{runwaydemo.console.showcase.desc}"/>
<attr sel="#rd-show-live" th:if="${rd.showcaseText() != null}"/>
<attr sel="#rd-show-at" th:text="#{runwaydemo.console.showcase.at}"/>
<attr sel="#rd-show-path" th:text="${rd.showcasePath()}"/>
<attr sel="#rd-show-text" th:text="${rd.showcaseText()}"/>
<attr sel="#rd-show-unpublish-btn" th:text="#{runwaydemo.console.showcase.unpublish}"/>
<attr sel="#rd-show-none" th:if="${rd.showcaseText() == null}" th:text="#{runwaydemo.console.showcase.empty}"/>
<attr sel="#rd-show-label" th:text="#{runwaydemo.console.showcase.text}"/>
<attr sel="#rd-show-publish" th:text="#{runwaydemo.console.showcase.publish}"/>
<!-- Content surface (ContentCatalogView) -->
<attr sel="#rd-cat-title" th:text="#{runwaydemo.console.catalog}"/>
<attr sel="#rd-cat-total" th:text="${rd.catalogTotal()}"/>
<attr sel="#rd-check-label" th:text="#{runwaydemo.console.check.path}"/>
<attr sel="#rd-check-path" th:value="${rd.pathCheck() != null ? rd.pathCheck().path() : ''}"/>
<attr sel="#rd-check-btn" th:text="#{runwaydemo.console.check}"/>
<attr sel="#rd-check-result" th:if="${rd.pathCheck() != null}"/>
<attr sel="#rd-check-echo" th:text="${rd.pathCheck() != null ? rd.pathCheck().path() : ''}"/>
<attr sel="#rd-check-unsafe" th:if="${rd.pathCheck() != null and !rd.pathCheck().safe()}"
th:text="#{runwaydemo.console.check.unsafe}"/>
<attr sel="#rd-check-servable" th:if="${rd.pathCheck() != null and rd.pathCheck().servable()}"
th:text="#{runwaydemo.console.check.servable}"/>
<attr sel="#rd-check-reserved" th:if="${rd.pathCheck() != null and rd.pathCheck().safe() and !rd.pathCheck().servable()}"
th:text="#{runwaydemo.console.check.reserved}"/>
<attr sel="#rd-check-owner" th:if="${rd.pathCheck() != null and rd.pathCheck().ownerSlug() != null}"
th:text="#{runwaydemo.console.check.owner(${rd.pathCheck() != null ? rd.pathCheck().ownerSlug() : ''})}"/>
<attr sel="#rd-check-free" th:if="${rd.pathCheck() != null and rd.pathCheck().safe() and rd.pathCheck().ownerSlug() == null}"
th:text="#{runwaydemo.console.check.free}"/>
<attr sel="#rd-cat-h-source" th:text="#{runwaydemo.console.catalog.source}"/>
<attr sel="#rd-cat-h-id" th:text="#{runwaydemo.console.catalog.item}"/>
<attr sel="#rd-cat-h-path" th:text="#{runwaydemo.console.catalog.path}"/>
<attr sel="#rd-cat-row" th:each="c : ${rd.catalog()}" th:classappend="${c.own() ? 'table-active' : ''}"/>
<attr sel="#rd-cat-row//.rd-cat-source" th:text="${c.source()}"/>
<attr sel="#rd-cat-row//.rd-cat-id" th:text="${c.id()}"/>
<attr sel="#rd-cat-row//.rd-cat-path" th:text="${c.path()}"/>
<attr sel="#rd-cat-refresh-btn" th:text="#{runwaydemo.console.catalog.refresh}"/>
<!-- Recent changes (SiteEventListener) -->
<attr sel="#rd-act-title" th:text="#{runwaydemo.console.activity}"/>
<attr sel="#rd-act-empty" th:if="${rd.activity().isEmpty()}" th:text="#{runwaydemo.console.activity.empty}"/>
<attr sel="#rd-act-table" th:if="${!rd.activity().isEmpty()}"/>
<attr sel="#rd-act-h-at" th:text="#{runwaydemo.console.activity.at}"/>
<attr sel="#rd-act-h-cause" th:text="#{runwaydemo.console.activity.cause}"/>
<attr sel="#rd-act-h-item" th:text="#{runwaydemo.console.activity.item}"/>
<attr sel="#rd-act-h-before" th:text="#{runwaydemo.console.activity.before}"/>
<attr sel="#rd-act-h-after" th:text="#{runwaydemo.console.activity.after}"/>
<attr sel="#rd-act-h-local" th:text="#{runwaydemo.console.activity.local}"/>
<attr sel="#rd-act-row" th:each="a : ${rd.activity()}"/>
<attr sel="#rd-act-row//.rd-act-at" th:text="${a.at()}"/>
<attr sel="#rd-act-row//.rd-act-cause" th:text="${a.cause()}"/>
<attr sel="#rd-act-row//.rd-act-item" th:text="${a.item()}"/>
<attr sel="#rd-act-row//.rd-act-before" th:text="${#strings.listJoin(a.previousUrls(), ', ')}"/>
<attr sel="#rd-act-row//.rd-act-after" th:text="${#strings.listJoin(a.currentUrls(), ', ')}"/>
<attr sel="#rd-act-row//.rd-act-local" th:text="${a.local()} ? #{runwaydemo.console.yes} : #{runwaydemo.console.no}"/>
<attr sel="#rd-help" th:text="#{runwaydemo.console.help}"/>
</thlogic>
+9
View File
@@ -0,0 +1,9 @@
<div id="rd-card" class="card">
<div class="card-body">
<h3 id="rd-card-title" class="card-title">Runway Demo</h3>
<p id="rd-card-notes" class="mb-1">Notes: 0</p>
<p id="rd-card-spi" class="text-secondary small mb-2">SPI —</p>
<a id="rd-card-console" href="/__admin/runway-demo" class="btn btn-sm btn-primary">Open the demo screen</a>
<a id="rd-card-link" href="/demo/hello.txt" class="btn btn-sm btn-outline-primary">Try /demo/hello.txt</a>
</div>
</div>
+12
View File
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Decoupled logic for the tenant dashboard card (gated in plugin.yml by "runway-demo|manage-notes"). A fragment may rely
on tenantSiteId, _csrf, ${@<own bean>…}, ${@authz.may('…')} and #{…} messages — nothing else in the console's model —
so everything it shows comes from this plugin's own bean, ${@runwayDemoAdminModel…}. Zero Thymeleaf in the .html.
-->
<thlogic>
<attr sel="#rd-card-title" th:text="|Runway Demo · ${@runwayDemoAdminModel.siteName(tenantSiteId)}|"/>
<attr sel="#rd-card-notes" th:text="#{runwaydemo.card.notes(${@runwayDemoAdminModel.noteCount(tenantSiteId)})}"/>
<attr sel="#rd-card-spi" th:text="#{runwaydemo.card.versions(${@runwayDemoAdminModel.pluginVersion()},${@runwayDemoAdminModel.builtSpi()},${@runwayDemoAdminModel.runningSpi()})}"/>
<attr sel="#rd-card-console" th:text="#{runwaydemo.card.console}"/>
</thlogic>
+22
View File
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Showcase</title>
<!-- Static preview head only — replaced at render by the TENANT's master head (the seam contract). -->
</head>
<body>
<header id="site-header">Site header (from the master at render)</header>
<main id="content">
<article class="rw-demo-showcase">
<h1 id="showcase-title">Showcase</h1>
<div id="showcase-body">
<p>The showcase text renders here.</p>
</div>
</article>
</main>
<footer id="site-footer">Site footer (from the master at render)</footer>
</body>
</html>
+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
The body template of the demo's ContentSource (ContentRef.bodyTemplate = __plugin__/runway-demo/showcase). It may rely
on exactly the documented render model: ${master} (the tenant's master to wrap in), ${content.*} (id, sourceKey,
title, description, bodyHtml, attributes, updatedAt), ${locale} and ${urls[..]}. The tenant's chrome comes from the
master through its seams, by the ${master} VARIABLE (never a literal __plugin__/… or master name), so this file is
byte-identical for every tenant. bodyHtml is already escaped by DemoShowcaseSource, hence th:utext.
-->
<thlogic>
<attr sel="head" th:replace="~{${master} :: head}"/>
<attr sel="#site-header" th:replace="~{${master} :: #site-header}"/>
<attr sel="#site-footer" th:replace="~{${master} :: #site-footer}"/>
<attr sel="#showcase-title" th:text="${content.title}"/>
<attr sel="#showcase-body" th:utext="${content.bodyHtml}"/>
</thlogic>