From 2758093a37eb5232b6a55fe5e3032ea9ddc94500 Mon Sep 17 00:00:00 2001 From: Thomas Walker Lynch Date: Sun, 17 May 2026 11:52:27 +0000 Subject: [PATCH] copyright field into title --- developer/authored/RT/element/title.js | 14 +++++++++++++- developer/authored/RT/layout/article_tech_ref.js | 8 ++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/developer/authored/RT/element/title.js b/developer/authored/RT/element/title.js index fefd991..db821af 100644 --- a/developer/authored/RT/element/title.js +++ b/developer/authored/RT/element/title.js @@ -3,7 +3,7 @@ Generates a standard document header block. Usage: - + */ window.StyleRT = window.StyleRT || {}; @@ -14,6 +14,7 @@ window.StyleRT.title = function() { const title = el.getAttribute('title') || 'Untitled Document'; const author = el.getAttribute('author'); const date = el.getAttribute('date'); + const copyright = el.getAttribute('copyright'); if (debug.log) debug.log('title', `Generating title block: ${title}`); @@ -54,6 +55,17 @@ window.StyleRT.title = function() { container.appendChild(meta); } + // Copyright Row + if (copyright) { + const copy_div = document.createElement('div'); + copy_div.style.color = 'var(--rt-content-muted)'; + copy_div.style.fontSize = '0.9em'; + copy_div.style.marginTop = '0.5rem'; + // Automatically injects the copyright symbol + copy_div.innerHTML = `© ${copyright}`; + container.appendChild(copy_div); + } + // Replace the raw tag with the generated block el.replaceWith(container); }); diff --git a/developer/authored/RT/layout/article_tech_ref.js b/developer/authored/RT/layout/article_tech_ref.js index 47e6a78..0ac7fec 100644 --- a/developer/authored/RT/layout/article_tech_ref.js +++ b/developer/authored/RT/layout/article_tech_ref.js @@ -162,6 +162,14 @@ padding: 0.125rem 0.25rem; color: var(--rt-content-main); } + + rt-article img { + max-width: 100%; + height: auto; + display: block; + margin: 1.5rem auto; /* Centers the image */ + } + `; document.head.appendChild(style_node); }; -- 2.20.1