fix(website): improve page loading, image labels, and legacy redirects

This commit is contained in:
morluto committed 2026-11-21 09:42:32 -05:00
1 parent f27aa1ad90
commit e1c37d68a4
53 files changed
+2520 -2170

No files matched your search

+27 -1
View File
@@ -6,7 +6,7 @@ import sys
import xml.etree.ElementTree as ET
from zipfile import ZIP_DEFLATED, ZipFile, ZipInfo
from website import PageMetadata, page_url
from website import SITE_ORIGIN, PageMetadata, page_url
from website_agents import prepare_discovery, prepare_markdown
@@ -77,8 +77,34 @@ def prepare_notes_example(site):
print(f"Prepared examples/notes-example.zip ({len(EXAMPLE_FILES)} files).")
def prepare_redirects(site):
"""Publish permanent Cloudflare redirects and equivalent static Pages links."""
routes = {
"showcases": ("showcase", "REA showcases"),
"environments": ("guides/rl-environments", "Build RL environments"),
}
rules = []
for alias, (target, title) in routes.items():
rules.extend(f"/{alias}{suffix} /{target}/ 301" for suffix in ("", "/"))
directory = site / alias
directory.mkdir()
directory.joinpath("index.html").write_text(
f'<!doctype html><html lang="en"><head><meta charset="utf-8">\n'
f'<title>{title}</title><meta name="robots" content="noindex">\n'
f'<link rel="canonical" href="{SITE_ORIGIN}/{target}/">\n'
f'<meta http-equiv="refresh" content="0; url=../{target}/"></head>\n'
f'<body><h1><a href="../{target}/">{title}</a></h1></body></html>\n',
encoding="utf-8",
)
(site / "_redirects").write_text("\n".join(rules) + "\n", encoding="utf-8")
def prepare_assets(site):
"""Finish the shared publish artifact before it replaces the current preview."""
from rcssmin import cssmin
stylesheet = site / "assets/styles.css"
stylesheet.write_text(cssmin(stylesheet.read_text(encoding="utf-8")), encoding="utf-8")
prepare_redirects(site)
prepare_sharing_image(site)
prepare_sitemap(site)
prepare_notes_example(site)
+6 -6
View File
@@ -909,7 +909,7 @@ class WebsiteTranslationChecks(unittest.TestCase):
arabic.feed((site / "ar/faq/index.html").read_text())
self.assertEqual(arabic.lang, "ar")
def test_every_reading_page_loads_theme_before_styles(self):
def test_reading_pages_set_the_initial_theme_and_defer_external_scripts(self):
site = ROOT / "website/_site"
english_pages = reading_pages(ROOT / "website/public")
self.assertTrue(english_pages)
@@ -924,12 +924,12 @@ class WebsiteTranslationChecks(unittest.TestCase):
self.assertEqual(len(colors), 1)
self.assertEqual(colors[0].attrs.get("content"), "#ffffff")
self.assertNotIn("media", colors[0].attrs)
theme = [node for node in doc.nodes if node.tag == "script" and (node.attrs.get("src") or "").endswith("/assets/theme.js")]
self.assertEqual(len(theme), 1)
for deferred in ("defer", "async", "type"):
self.assertNotIn(deferred, theme[0].attrs)
scripts = [node for node in doc.nodes if node.tag == "script"]
for node in scripts:
if node.attrs.get("src"):
self.assertTrue("defer" in node.attrs or "async" in node.attrs or node.attrs.get("type") == "module")
stylesheet = next(node for node in doc.nodes if node.tag == "link" and node.attrs.get("rel") == "stylesheet")
self.assertLess(theme[0].start, stylesheet.start)
self.assertTrue(any(node.start < stylesheet.start and "src" not in node.attrs and "type" not in node.attrs for node in scripts))
toggle = [node for node in doc.nodes if "data-theme-toggle" in node.attrs]
self.assertEqual(len(toggle), 1)
self.assertEqual(toggle[0].tag, "button")
+7 -4
View File
@@ -559,10 +559,13 @@ def render_page(root, source_path, language, messages, available, figures, page_
payload = json.dumps(runtime, ensure_ascii=False).replace("<", "\\u003c").replace("&", "\\u0026")
# Only Korean editions request the font stylesheet; English fallbacks keep
# their system fonts. The variable face also supplies the site's 650 weight.
font_stylesheet = (
'<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100..900&amp;display=swap" />\n '
if code == "ko" else ""
)
font_stylesheet = ""
if code == "ko":
href = "https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@100..900&amp;display=swap"
font_stylesheet = (
f"""<link rel="preload" as="style" fetchpriority="low" href="{href}" onload="this.onload=null;this.rel='stylesheet'" />"""
f'<noscript><link rel="stylesheet" href="{href}" /></noscript>\n '
)
source = source.replace("</head>", f'{font_stylesheet}<script id="website-messages" type="application/json">{payload}</script>\n </head>')
return source
+7 -3
View File
@@ -17,7 +17,7 @@ frontend framework or bundler. A build generates all editions in
Korean editions load the variable Noto Sans KR webfont through Google Fonts
(`fonts.googleapis.com` and `fonts.gstatic.com`) so the preferred Korean font
does not depend on fonts installed on the reader's PC. Other editions keep
system fonts. Text remains visible while the font loads (`display=swap`), and
system fonts. The Korean font stylesheet loads at low priority. Text remains visible while the font loads (`display=swap`), and
local Korean fonts are used if Google Fonts is unavailable. The stylesheet is
added during translation rendering; generated `_site/` pages are not authored.
@@ -335,8 +335,8 @@ language editions and tabs on the same host. If storage is blocked, the button
still works for the current page. Without JavaScript, the site stays light and
the button stays hidden.
The shared `theme` head region loads `assets/theme.js` before the stylesheet so a
saved choice applies before the first paint. That script owns the resolved
The shared `theme` head region applies the saved choice inline before the first
paint. The deferred `assets/theme.js` then synchronizes the resolved
`data-theme`, browser `theme-color` and `website-theme-change` event. The CSS
palette, embedded SVGs and dinosaur canvas follow that choice. Keep the theme
region in the page scaffold and run `sync` after editing its template.
@@ -617,6 +617,10 @@ Verify <https://rea.tools/>, <https://rea.tools/guides/javascript/>,
resolve correctly. The root README and browser guide use `https://rea.tools/`
as the public website URL.
The build minifies the shared stylesheet. It also publishes permanent redirects
from `/showcases` to `/showcase/` and from `/environments` to
`/guides/rl-environments/`. GitHub Pages serves static redirects for the same URLs.
Production publication uses the synchronized GitHub Actions workflow below.
Local Wrangler commands above publish only the separate preview Worker.
+5
View File
@@ -5588,6 +5588,11 @@ msgctxt "page:index.html"
msgid "Name the operands and check both operator paths."
msgstr "قم بتسمية المعاملات وتحقق من كلا مساري المشغل."
#: website/public/index.html:524
msgctxt "page:index.html"
msgid "An analyst thinking at a computer"
msgstr "محلل يفكر في الكمبيوتر"
#: website/public/index.html:520 website/public/index.html:447
msgctxt "page:index.html"
msgid "Illustrative expert reasoning"
+5
View File
@@ -8647,6 +8647,11 @@ msgctxt "page:index.html"
msgid "Name the operands and check both operator paths."
msgstr ""
#: website/public/index.html:524
msgctxt "page:index.html"
msgid "An analyst thinking at a computer"
msgstr "Анализатор размишлява пред компютър"
#: website/public/index.html:522 website/public/index.html:449
msgctxt "page:index.html"
msgid "Illustrative expert reasoning"
+5
View File
@@ -5829,6 +5829,11 @@ msgctxt "page:index.html"
msgid "Name the operands and check both operator paths."
msgstr "Benennen Sie die Operanden und überprüfen Sie beide Operatorpfade."
#: website/public/index.html:524
msgctxt "page:index.html"
msgid "An analyst thinking at a computer"
msgstr "Ein Analytiker, der an einem Computer denkt"
#: website/public/index.html:520 website/public/index.html:447
msgctxt "page:index.html"
msgid "Illustrative expert reasoning"
+5
View File
@@ -7835,6 +7835,11 @@ msgid "Name the operands and check both operator paths."
msgstr ""
"Προσδιορίστε τους τελεστέους και ελέγξτε και τις δύο διαδρομές τελεστών."
#: website/public/index.html:524
msgctxt "page:index.html"
msgid "An analyst thinking at a computer"
msgstr "Ένας αναλυτής σκέφτεται μπροστά σε έναν υπολογιστή"
#: website/public/index.html:520 website/public/index.html:447
msgctxt "page:index.html"
msgid "Illustrative expert reasoning"
+5
View File
@@ -5775,6 +5775,11 @@ msgctxt "page:index.html"
msgid "Name the operands and check both operator paths."
msgstr "Nombra los operandos y comprueba las rutas de ambos operadores."
#: website/public/index.html:524
msgctxt "page:index.html"
msgid "An analyst thinking at a computer"
msgstr "Un analista pensando ante un ordenador"
#: website/public/index.html:520 website/public/index.html:447
msgctxt "page:index.html"
msgid "Illustrative expert reasoning"
+5
View File
@@ -5640,6 +5640,11 @@ msgctxt "page:index.html"
msgid "Name the operands and check both operator paths."
msgstr "نام operands و بررسی هر دو مسیر اپراتور."
#: website/public/index.html:524
msgctxt "page:index.html"
msgid "An analyst thinking at a computer"
msgstr "یک تحلیلگر که در کامپیوتر فکر می کند"
#: website/public/index.html:520 website/public/index.html:447
msgctxt "page:index.html"
msgid "Illustrative expert reasoning"
+5
View File
@@ -5787,6 +5787,11 @@ msgctxt "page:index.html"
msgid "Name the operands and check both operator paths."
msgstr "Nommez les opérandes et vérifiez les deux chemins d'opérateur."
#: website/public/index.html:524
msgctxt "page:index.html"
msgid "An analyst thinking at a computer"
msgstr "Un analyste réfléchit devant son ordinateur"
#: website/public/index.html:520 website/public/index.html:447
msgctxt "page:index.html"
msgid "Illustrative expert reasoning"
+5
View File
@@ -5732,6 +5732,11 @@ msgctxt "page:index.html"
msgid "Name the operands and check both operator paths."
msgstr "Beri nama operan dan periksa kedua jalur operator."
#: website/public/index.html:524
msgctxt "page:index.html"
msgid "An analyst thinking at a computer"
msgstr "Seorang analis berpikir di depan komputer"
#: website/public/index.html:520 website/public/index.html:447
msgctxt "page:index.html"
msgid "Illustrative expert reasoning"
+5
View File
@@ -5759,6 +5759,11 @@ msgid "Name the operands and check both operator paths."
msgstr ""
"Assegnare un nome agli operandi e controllare entrambi i percorsi operatore."
#: website/public/index.html:524
msgctxt "page:index.html"
msgid "An analyst thinking at a computer"
msgstr "Un analista riflette davanti al computer"
#: website/public/index.html:520 website/public/index.html:447
msgctxt "page:index.html"
msgid "Illustrative expert reasoning"
+5
View File
@@ -5335,6 +5335,11 @@ msgctxt "page:index.html"
msgid "Name the operands and check both operator paths."
msgstr "オペランドに名前を付け、両方の演算子パスを確認します。"
#: website/public/index.html:524
msgctxt "page:index.html"
msgid "An analyst thinking at a computer"
msgstr "コンピュータで考えるアナリスト"
#: website/public/index.html:520 website/public/index.html:447
msgctxt "page:index.html"
msgid "Illustrative expert reasoning"
+5
View File
@@ -5335,6 +5335,11 @@ msgctxt "page:index.html"
msgid "Name the operands and check both operator paths."
msgstr "피연산자에 이름을 붙이고 두 연산자의 경로를 모두 확인합니다."
#: website/public/index.html:524
msgctxt "page:index.html"
msgid "An analyst thinking at a computer"
msgstr "컴퓨터 앞에서 생각하는 분석가"
#: website/public/index.html:520 website/public/index.html:447
msgctxt "page:index.html"
msgid "Illustrative expert reasoning"
+2036 -2028
View File
File diff suppressed because it is too large. Load diff
+5
View File
@@ -7927,6 +7927,11 @@ msgctxt "page:index.html"
msgid "Name the operands and check both operator paths."
msgstr ""
#: website/public/index.html:524
msgctxt "page:index.html"
msgid "An analyst thinking at a computer"
msgstr "കമ്പ്യൂട്ടറിനു മുന്നിലിരുന്ന് ചിന്തിക്കുന്ന ഒരു അനലിസ്റ്റ്"
#: website/public/index.html:520 website/public/index.html:447
msgctxt "page:index.html"
msgid "Illustrative expert reasoning"
+5
View File
@@ -5706,6 +5706,11 @@ msgctxt "page:index.html"
msgid "Name the operands and check both operator paths."
msgstr "Nazwij operandy i sprawdź obie ścieżki operatora."
#: website/public/index.html:524
msgctxt "page:index.html"
msgid "An analyst thinking at a computer"
msgstr "Analityk myślący przy komputerze"
#: website/public/index.html:520 website/public/index.html:447
msgctxt "page:index.html"
msgid "Illustrative expert reasoning"
+5
View File
@@ -5748,6 +5748,11 @@ msgctxt "page:index.html"
msgid "Name the operands and check both operator paths."
msgstr "Nomeie os operandos e verifique os dois caminhos do operador."
#: website/public/index.html:524
msgctxt "page:index.html"
msgid "An analyst thinking at a computer"
msgstr "Um analista a pensar num computador"
#: website/public/index.html:520 website/public/index.html:447
msgctxt "page:index.html"
msgid "Illustrative expert reasoning"
+5
View File
@@ -7927,6 +7927,11 @@ msgctxt "page:index.html"
msgid "Name the operands and check both operator paths."
msgstr ""
#: website/public/index.html:524
msgctxt "page:index.html"
msgid "An analyst thinking at a computer"
msgstr "Un analist se gândește în fața calculatorului"
#: website/public/index.html:520 website/public/index.html:447
msgctxt "page:index.html"
msgid "Illustrative expert reasoning"
+5
View File
@@ -5759,6 +5759,11 @@ msgctxt "page:index.html"
msgid "Name the operands and check both operator paths."
msgstr "Назовите операнды и проверьте оба пути к операторам."
#: website/public/index.html:524
msgctxt "page:index.html"
msgid "An analyst thinking at a computer"
msgstr "Аналитик, думающий за компьютером"
#: website/public/index.html:520 website/public/index.html:447
msgctxt "page:index.html"
msgid "Illustrative expert reasoning"
+5
View File
@@ -5604,6 +5604,11 @@ msgctxt "page:index.html"
msgid "Name the operands and check both operator paths."
msgstr "ตั้งชื่อตัวดำเนินการและตรวจสอบเส้นทางตัวดำเนินการทั้งสอง"
#: website/public/index.html:524
msgctxt "page:index.html"
msgid "An analyst thinking at a computer"
msgstr "นักวิเคราะห์คิดที่คอมพิวเตอร์"
#: website/public/index.html:520 website/public/index.html:447
msgctxt "page:index.html"
msgid "Illustrative expert reasoning"
+5
View File
@@ -5695,6 +5695,11 @@ msgctxt "page:index.html"
msgid "Name the operands and check both operator paths."
msgstr "İşlenenleri adlandırın ve her iki operatör yolunu da kontrol edin."
#: website/public/index.html:524
msgctxt "page:index.html"
msgid "An analyst thinking at a computer"
msgstr "Bilgisayarda düşünen bir analist"
#: website/public/index.html:520 website/public/index.html:447
msgctxt "page:index.html"
msgid "Illustrative expert reasoning"
+5
View File
@@ -5734,6 +5734,11 @@ msgctxt "page:index.html"
msgid "Name the operands and check both operator paths."
msgstr "Назвіть операнди та перевірте обидва шляхи до операторів."
#: website/public/index.html:524
msgctxt "page:index.html"
msgid "An analyst thinking at a computer"
msgstr "Аналітик, який думає за комп'ютером"
#: website/public/index.html:520 website/public/index.html:447
msgctxt "page:index.html"
msgid "Illustrative expert reasoning"
+5
View File
@@ -7927,6 +7927,11 @@ msgctxt "page:index.html"
msgid "Name the operands and check both operator paths."
msgstr ""
#: website/public/index.html:524
msgctxt "page:index.html"
msgid "An analyst thinking at a computer"
msgstr "Ek analyst computer ke saamne soch raha hai"
#: website/public/index.html:520 website/public/index.html:447
msgctxt "page:index.html"
msgid "Illustrative expert reasoning"
+5
View File
@@ -5706,6 +5706,11 @@ msgctxt "page:index.html"
msgid "Name the operands and check both operator paths."
msgstr "Đặt tên cho các toán hạng và kiểm tra cả hai đường dẫn toán tử."
#: website/public/index.html:524
msgctxt "page:index.html"
msgid "An analyst thinking at a computer"
msgstr "Một nhà phân tích suy nghĩ tại một máy tính"
#: website/public/index.html:520 website/public/index.html:447
msgctxt "page:index.html"
msgid "Illustrative expert reasoning"
+5
View File
@@ -5107,6 +5107,11 @@ msgctxt "page:index.html"
msgid "Name the operands and check both operator paths."
msgstr "确定操作数的含义,并检查两条运算路径。"
#: website/public/index.html:524
msgctxt "page:index.html"
msgid "An analyst thinking at a computer"
msgstr "在电脑前思考的分析师"
#: website/public/index.html:520 website/public/index.html:447
msgctxt "page:index.html"
msgid "Illustrative expert reasoning"
+5
View File
@@ -5116,6 +5116,11 @@ msgctxt "page:index.html"
msgid "Name the operands and check both operator paths."
msgstr "確定運算元的含義,並檢查兩條運算路徑。"
#: website/public/index.html:524
msgctxt "page:index.html"
msgid "An analyst thinking at a computer"
msgstr "在電腦前思考的分析師"
#: website/public/index.html:520 website/public/index.html:447
msgctxt "page:index.html"
msgid "Illustrative expert reasoning"
+1 -1
View File
@@ -1,4 +1,4 @@
// This small, blocking head script applies the theme before the first paint.
// Keep the theme in sync with user choices after the initial paint.
(() => {
const root = document.documentElement;
const system = window.matchMedia("(prefers-color-scheme: dark)");
+15 -6
View File
@@ -8,6 +8,21 @@
name="description"
content="Thoughts on reverse engineering, drawing on practical experience with REA and AI agents."
/>
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<script>
(() => {
let theme;
try { theme = localStorage.getItem("rea-theme"); } catch {}
if (theme !== "light" && theme !== "dark")
theme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
document.documentElement.dataset.theme = theme;
document.querySelector('meta[name="theme-color"]').content = theme === "dark" ? "#1e1e2e" : "#ffffff";
})();
</script>
<script defer src="../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="stylesheet" href="../assets/styles.css" />
<!-- website:sharing:start -->
<!-- prettier-ignore -->
<link rel="canonical" href="https://rea.tools/blog/" />
@@ -100,13 +115,7 @@
content="REA: Find out how software works. Reverse engineering with your coding agent."
/>
<!-- website:sharing:end -->
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<!-- Apply the saved theme before styles load, to avoid a flash on navigation. -->
<script src="../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="icon" href="../assets/favicon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="../assets/styles.css" />
<script src="../assets/main.js" defer></script>
</head>
<body id="top">
@@ -8,6 +8,21 @@
name="description"
content="What Touhou reconstruction taught me about general models, specialist models and learning to propose better hypotheses from compiler feedback."
/>
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<script>
(() => {
let theme;
try { theme = localStorage.getItem("rea-theme"); } catch {}
if (theme !== "light" && theme !== "dark")
theme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
document.documentElement.dataset.theme = theme;
document.querySelector('meta[name="theme-color"]').content = theme === "dark" ? "#1e1e2e" : "#ffffff";
})();
</script>
<script defer src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="stylesheet" href="../../assets/styles.css" />
<!-- website:sharing:start -->
<!-- prettier-ignore -->
<link rel="canonical" href="https://rea.tools/blog/reverse-engineering-models/" />
@@ -100,13 +115,7 @@
content="REA: Find out how software works. Reverse engineering with your coding agent."
/>
<!-- website:sharing:end -->
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<!-- Apply the saved theme before styles load, to avoid a flash on navigation. -->
<script src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="icon" href="../../assets/favicon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="../../assets/styles.css" />
<script src="../../assets/main.js" defer></script>
</head>
<body id="top">
@@ -8,6 +8,21 @@
name="description"
content="N0zoM1z0 reflects on manual reverse engineering, Touhou reconstruction with AI agents, and how knowledge compounds across TH08, TH095 and PC-98 TH04."
/>
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<script>
(() => {
let theme;
try { theme = localStorage.getItem("rea-theme"); } catch {}
if (theme !== "light" && theme !== "dark")
theme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
document.documentElement.dataset.theme = theme;
document.querySelector('meta[name="theme-color"]').content = theme === "dark" ? "#1e1e2e" : "#ffffff";
})();
</script>
<script defer src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="stylesheet" href="../../assets/styles.css" />
<!-- website:sharing:start -->
<!-- prettier-ignore -->
<link rel="canonical" href="https://rea.tools/blog/touhou-reconstruction/" />
@@ -100,13 +115,7 @@
content="REA: Find out how software works. Reverse engineering with your coding agent."
/>
<!-- website:sharing:end -->
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<!-- Apply the saved theme before styles load, to avoid a flash on navigation. -->
<script src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="icon" href="../../assets/favicon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="../../assets/styles.css" />
<script src="../../assets/main.js" defer></script>
</head>
<body id="top" class="blog-article">
+15 -6
View File
@@ -8,6 +8,21 @@
name="description"
content="Meet the people who contribute code, documentation, tests and ideas to REA."
/>
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<script>
(() => {
let theme;
try { theme = localStorage.getItem("rea-theme"); } catch {}
if (theme !== "light" && theme !== "dark")
theme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
document.documentElement.dataset.theme = theme;
document.querySelector('meta[name="theme-color"]').content = theme === "dark" ? "#1e1e2e" : "#ffffff";
})();
</script>
<script defer src="../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="stylesheet" href="../assets/styles.css" />
<!-- website:sharing:start -->
<!-- prettier-ignore -->
<link rel="canonical" href="https://rea.tools/contributors/" />
@@ -100,13 +115,7 @@
content="REA: Find out how software works. Reverse engineering with your coding agent."
/>
<!-- website:sharing:end -->
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<!-- Apply the saved theme before styles load, to avoid a flash on navigation. -->
<script src="../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="icon" href="../assets/favicon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="../assets/styles.css" />
<script src="../assets/main.js" defer></script>
<script type="module" src="../assets/contributors.js"></script>
</head>
+15 -6
View File
@@ -8,6 +8,21 @@
name="description"
content="Read the dinosaur game’s speed rule with REA, rebuild it, then change the speed and play."
/>
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<script>
(() => {
let theme;
try { theme = localStorage.getItem("rea-theme"); } catch {}
if (theme !== "light" && theme !== "dark")
theme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
document.documentElement.dataset.theme = theme;
document.querySelector('meta[name="theme-color"]').content = theme === "dark" ? "#1e1e2e" : "#ffffff";
})();
</script>
<script defer src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="stylesheet" href="../../assets/styles.css" />
<!-- website:sharing:start -->
<!-- prettier-ignore -->
<link rel="canonical" href="https://rea.tools/examples/dino-lab/" />
@@ -100,13 +115,7 @@
content="REA: Find out how software works. Reverse engineering with your coding agent."
/>
<!-- website:sharing:end -->
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<!-- Apply the saved theme before styles load, to avoid a flash on navigation. -->
<script src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="icon" href="../../assets/favicon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="../../assets/styles.css" />
<script src="../../assets/main.js" defer></script>
<script type="module" src="../../assets/dino-demo.js"></script>
</head>
+15 -6
View File
@@ -8,6 +8,21 @@
name="description"
content="Answers to common REA questions: installation, updates, analysis tools, coding agents, troubleshooting and sharing examples."
/>
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<script>
(() => {
let theme;
try { theme = localStorage.getItem("rea-theme"); } catch {}
if (theme !== "light" && theme !== "dark")
theme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
document.documentElement.dataset.theme = theme;
document.querySelector('meta[name="theme-color"]').content = theme === "dark" ? "#1e1e2e" : "#ffffff";
})();
</script>
<script defer src="../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="stylesheet" href="../assets/styles.css" />
<!-- website:sharing:start -->
<!-- prettier-ignore -->
<link rel="canonical" href="https://rea.tools/faq/" />
@@ -100,13 +115,7 @@
content="REA: Find out how software works. Reverse engineering with your coding agent."
/>
<!-- website:sharing:end -->
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<!-- Apply the saved theme before styles load, to avoid a flash on navigation. -->
<script src="../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="icon" href="../assets/favicon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="../assets/styles.css" />
<script src="../assets/main.js" defer></script>
</head>
<body id="top">
+15 -6
View File
@@ -8,6 +8,21 @@
name="description"
content="Try REA on a small Notes app. Set up your agent, ask where exported notes go, and check the CSV formatter with a sample title."
/>
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<script>
(() => {
let theme;
try { theme = localStorage.getItem("rea-theme"); } catch {}
if (theme !== "light" && theme !== "dark")
theme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
document.documentElement.dataset.theme = theme;
document.querySelector('meta[name="theme-color"]').content = theme === "dark" ? "#1e1e2e" : "#ffffff";
})();
</script>
<script defer src="../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="stylesheet" href="../assets/styles.css" />
<!-- website:sharing:start -->
<!-- prettier-ignore -->
<link rel="canonical" href="https://rea.tools/first-investigation/" />
@@ -100,13 +115,7 @@
content="REA: Find out how software works. Reverse engineering with your coding agent."
/>
<!-- website:sharing:end -->
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<!-- Apply the saved theme before styles load, to avoid a flash on navigation. -->
<script src="../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="icon" href="../assets/favicon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="../assets/styles.css" />
<script src="../assets/main.js" defer></script>
</head>
<body id="top">
+15 -6
View File
@@ -8,6 +8,21 @@
name="description"
content="Connect REA to your coding agent or inspect a local JavaScript or Electron app from the terminal. Setup, first questions and native provider guides."
/>
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<script>
(() => {
let theme;
try { theme = localStorage.getItem("rea-theme"); } catch {}
if (theme !== "light" && theme !== "dark")
theme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
document.documentElement.dataset.theme = theme;
document.querySelector('meta[name="theme-color"]').content = theme === "dark" ? "#1e1e2e" : "#ffffff";
})();
</script>
<script defer src="../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="stylesheet" href="../assets/styles.css" />
<!-- website:sharing:start -->
<!-- prettier-ignore -->
<link rel="canonical" href="https://rea.tools/get-started/" />
@@ -100,13 +115,7 @@
content="REA: Find out how software works. Reverse engineering with your coding agent."
/>
<!-- website:sharing:end -->
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<!-- Apply the saved theme before styles load, to avoid a flash on navigation. -->
<script src="../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="icon" href="../assets/favicon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="../assets/styles.css" />
<script src="../assets/main.js" defer></script>
</head>
<body id="top">
+15 -6
View File
@@ -8,6 +8,21 @@
name="description"
content="Observe a Notes export with REA: select a browser page, capture a click, inspect the request and follow the export script."
/>
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<script>
(() => {
let theme;
try { theme = localStorage.getItem("rea-theme"); } catch {}
if (theme !== "light" && theme !== "dark")
theme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
document.documentElement.dataset.theme = theme;
document.querySelector('meta[name="theme-color"]').content = theme === "dark" ? "#1e1e2e" : "#ffffff";
})();
</script>
<script defer src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="stylesheet" href="../../assets/styles.css" />
<!-- website:sharing:start -->
<!-- prettier-ignore -->
<link rel="canonical" href="https://rea.tools/guides/browser/" />
@@ -100,13 +115,7 @@
content="REA: Find out how software works. Reverse engineering with your coding agent."
/>
<!-- website:sharing:end -->
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<!-- Apply the saved theme before styles load, to avoid a flash on navigation. -->
<script src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="icon" href="../../assets/favicon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="../../assets/styles.css" />
<script src="../../assets/main.js" defer></script>
</head>
<body id="top">
+15 -6
View File
@@ -8,6 +8,21 @@
name="description"
content="Learn REA through short worked examples: a native calculation, an Electron CSV export and a browser request."
/>
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<script>
(() => {
let theme;
try { theme = localStorage.getItem("rea-theme"); } catch {}
if (theme !== "light" && theme !== "dark")
theme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
document.documentElement.dataset.theme = theme;
document.querySelector('meta[name="theme-color"]').content = theme === "dark" ? "#1e1e2e" : "#ffffff";
})();
</script>
<script defer src="../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="stylesheet" href="../assets/styles.css" />
<!-- website:sharing:start -->
<!-- prettier-ignore -->
<link rel="canonical" href="https://rea.tools/guides/" />
@@ -100,13 +115,7 @@
content="REA: Find out how software works. Reverse engineering with your coding agent."
/>
<!-- website:sharing:end -->
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<!-- Apply the saved theme before styles load, to avoid a flash on navigation. -->
<script src="../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="icon" href="../assets/favicon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="../assets/styles.css" />
<script src="../assets/main.js" defer></script>
</head>
<body id="top">
+15 -6
View File
@@ -8,6 +8,21 @@
name="description"
content="Trace a Notes CSV export through a renderer API, preload and IPC handler with REA. Includes downloadable example files and a verified analysis result."
/>
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<script>
(() => {
let theme;
try { theme = localStorage.getItem("rea-theme"); } catch {}
if (theme !== "light" && theme !== "dark")
theme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
document.documentElement.dataset.theme = theme;
document.querySelector('meta[name="theme-color"]').content = theme === "dark" ? "#1e1e2e" : "#ffffff";
})();
</script>
<script defer src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="stylesheet" href="../../assets/styles.css" />
<!-- website:sharing:start -->
<!-- prettier-ignore -->
<link rel="canonical" href="https://rea.tools/guides/javascript/" />
@@ -100,13 +115,7 @@
content="REA: Find out how software works. Reverse engineering with your coding agent."
/>
<!-- website:sharing:end -->
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<!-- Apply the saved theme before styles load, to avoid a flash on navigation. -->
<script src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="icon" href="../../assets/favicon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="../../assets/styles.css" />
<script src="../../assets/main.js" defer></script>
</head>
<body id="top">
+15 -6
View File
@@ -8,6 +8,21 @@
name="description"
content="Recover a native calculation with REA: inspect instructions, follow a caller, read constants and check reconstructed C."
/>
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<script>
(() => {
let theme;
try { theme = localStorage.getItem("rea-theme"); } catch {}
if (theme !== "light" && theme !== "dark")
theme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
document.documentElement.dataset.theme = theme;
document.querySelector('meta[name="theme-color"]').content = theme === "dark" ? "#1e1e2e" : "#ffffff";
})();
</script>
<script defer src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="stylesheet" href="../../assets/styles.css" />
<!-- website:sharing:start -->
<!-- prettier-ignore -->
<link rel="canonical" href="https://rea.tools/guides/native/" />
@@ -100,13 +115,7 @@
content="REA: Find out how software works. Reverse engineering with your coding agent."
/>
<!-- website:sharing:end -->
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<!-- Apply the saved theme before styles load, to avoid a flash on navigation. -->
<script src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="icon" href="../../assets/favicon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="../../assets/styles.css" />
<script src="../../assets/main.js" defer></script>
</head>
<body id="top">
@@ -8,6 +8,21 @@
name="description"
content="Turn a recorded web app session into a runnable environment for training and testing AI agents."
/>
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<script>
(() => {
let theme;
try { theme = localStorage.getItem("rea-theme"); } catch {}
if (theme !== "light" && theme !== "dark")
theme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
document.documentElement.dataset.theme = theme;
document.querySelector('meta[name="theme-color"]').content = theme === "dark" ? "#1e1e2e" : "#ffffff";
})();
</script>
<script defer src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="stylesheet" href="../../assets/styles.css" />
<!-- website:sharing:start -->
<!-- prettier-ignore -->
<link rel="canonical" href="https://rea.tools/guides/rl-environments/" />
@@ -100,13 +115,7 @@
content="REA: Find out how software works. Reverse engineering with your coding agent."
/>
<!-- website:sharing:end -->
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<!-- Apply the saved theme before styles load, to avoid a flash on navigation. -->
<script src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="icon" href="../../assets/favicon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="../../assets/styles.css" />
<script src="../../assets/main.js" defer></script>
</head>
<body id="top">
+18 -7
View File
@@ -8,6 +8,21 @@
name="description"
content="Reverse engineer apps, binaries and browser behavior with your coding agent. Follow clear guides and try interactive examples with REA."
/>
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<script>
(() => {
let theme;
try { theme = localStorage.getItem("rea-theme"); } catch {}
if (theme !== "light" && theme !== "dark")
theme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
document.documentElement.dataset.theme = theme;
document.querySelector('meta[name="theme-color"]').content = theme === "dark" ? "#1e1e2e" : "#ffffff";
})();
</script>
<script defer src="./assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="stylesheet" href="assets/styles.css" />
<!-- website:sharing:start -->
<!-- prettier-ignore -->
<link rel="canonical" href="https://rea.tools/" />
@@ -100,13 +115,7 @@
content="REA: Find out how software works. Reverse engineering with your coding agent."
/>
<!-- website:sharing:end -->
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<!-- Apply the saved theme before styles load, to avoid a flash on navigation. -->
<script src="./assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="icon" href="assets/favicon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="assets/styles.css" />
<script src="assets/main.js" defer></script>
<script type="module" src="assets/home.js"></script>
<script type="module" src="assets/dino-demo.js"></script>
@@ -515,7 +524,9 @@
<img
class="expert-illustration"
src="assets/figures/analyst-thinking.svg"
alt=""
alt="An analyst thinking at a computer"
title="Illustrative expert reasoning"
loading="lazy"
width="160"
height="120"
/>
+15 -6
View File
@@ -8,6 +8,21 @@
name="description"
content="Inspect the Aegis Android APK with REA, recover its six-digit login-code calculation and try a reconstruction with an adjustable clock."
/>
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<script>
(() => {
let theme;
try { theme = localStorage.getItem("rea-theme"); } catch {}
if (theme !== "light" && theme !== "dark")
theme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
document.documentElement.dataset.theme = theme;
document.querySelector('meta[name="theme-color"]').content = theme === "dark" ? "#1e1e2e" : "#ffffff";
})();
</script>
<script defer src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="stylesheet" href="../../assets/styles.css" />
<!-- website:sharing:start -->
<!-- prettier-ignore -->
<link rel="canonical" href="https://rea.tools/showcase/aegis/" />
@@ -100,13 +115,7 @@
content="REA: Find out how software works. Reverse engineering with your coding agent."
/>
<!-- website:sharing:end -->
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<!-- Apply the saved theme before styles load, to avoid a flash on navigation. -->
<script src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="icon" href="../../assets/favicon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="../../assets/styles.css" />
<script src="../../assets/main.js" defer></script>
<script type="module" src="../../assets/aegis-demo.js"></script>
</head>
+15 -6
View File
@@ -8,6 +8,21 @@
name="description"
content="Use REA to solve DownUnderCTF's masked squares flag checker. Find the checking functions, extract the masks and compare a recovered flag with the original program."
/>
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<script>
(() => {
let theme;
try { theme = localStorage.getItem("rea-theme"); } catch {}
if (theme !== "light" && theme !== "dark")
theme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
document.documentElement.dataset.theme = theme;
document.querySelector('meta[name="theme-color"]').content = theme === "dark" ? "#1e1e2e" : "#ffffff";
})();
</script>
<script defer src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="stylesheet" href="../../assets/styles.css" />
<!-- website:sharing:start -->
<!-- prettier-ignore -->
<link rel="canonical" href="https://rea.tools/showcase/ctf/" />
@@ -100,13 +115,7 @@
content="REA: Find out how software works. Reverse engineering with your coding agent."
/>
<!-- website:sharing:end -->
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<!-- Apply the saved theme before styles load, to avoid a flash on navigation. -->
<script src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="icon" href="../../assets/favicon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="../../assets/styles.css" />
<script src="../../assets/main.js" defer></script>
</head>
<body id="top">
+15 -6
View File
@@ -8,6 +8,21 @@
name="description"
content="Follow a DX-Ball reconstruction from binary analysis through REA to maintained C, original-x86 tests and matching compiled function bytes."
/>
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<script>
(() => {
let theme;
try { theme = localStorage.getItem("rea-theme"); } catch {}
if (theme !== "light" && theme !== "dark")
theme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
document.documentElement.dataset.theme = theme;
document.querySelector('meta[name="theme-color"]').content = theme === "dark" ? "#1e1e2e" : "#ffffff";
})();
</script>
<script defer src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="stylesheet" href="../../assets/styles.css" />
<!-- website:sharing:start -->
<!-- prettier-ignore -->
<link rel="canonical" href="https://rea.tools/showcase/dx-ball/" />
@@ -100,13 +115,7 @@
content="REA: Find out how software works. Reverse engineering with your coding agent."
/>
<!-- website:sharing:end -->
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<!-- Apply the saved theme before styles load, to avoid a flash on navigation. -->
<script src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="icon" href="../../assets/favicon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="../../assets/styles.css" />
<script src="../../assets/main.js" defer></script>
</head>
<body id="top">
+15 -6
View File
@@ -8,6 +8,21 @@
name="description"
content="Follow REA investigations through code, figures and demos: an Android authenticator, DX-Ball, Notion, TH04 and a DownUnderCTF flag checker."
/>
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<script>
(() => {
let theme;
try { theme = localStorage.getItem("rea-theme"); } catch {}
if (theme !== "light" && theme !== "dark")
theme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
document.documentElement.dataset.theme = theme;
document.querySelector('meta[name="theme-color"]').content = theme === "dark" ? "#1e1e2e" : "#ffffff";
})();
</script>
<script defer src="../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="stylesheet" href="../assets/styles.css" />
<!-- website:sharing:start -->
<!-- prettier-ignore -->
<link rel="canonical" href="https://rea.tools/showcase/" />
@@ -100,13 +115,7 @@
content="REA: Find out how software works. Reverse engineering with your coding agent."
/>
<!-- website:sharing:end -->
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<!-- Apply the saved theme before styles load, to avoid a flash on navigation. -->
<script src="../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="icon" href="../assets/favicon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="../assets/styles.css" />
<script src="../assets/main.js" defer></script>
</head>
<body id="top">
+15 -6
View File
@@ -8,6 +8,21 @@
name="description"
content="Follow Notion's clipboard API through Electron's preload, IPC wrappers and main process, with short code excerpts and a look at its rich clipboard format."
/>
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<script>
(() => {
let theme;
try { theme = localStorage.getItem("rea-theme"); } catch {}
if (theme !== "light" && theme !== "dark")
theme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
document.documentElement.dataset.theme = theme;
document.querySelector('meta[name="theme-color"]').content = theme === "dark" ? "#1e1e2e" : "#ffffff";
})();
</script>
<script defer src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="stylesheet" href="../../assets/styles.css" />
<!-- website:sharing:start -->
<!-- prettier-ignore -->
<link rel="canonical" href="https://rea.tools/showcase/notion/" />
@@ -100,13 +115,7 @@
content="REA: Find out how software works. Reverse engineering with your coding agent."
/>
<!-- website:sharing:end -->
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<!-- Apply the saved theme before styles load, to avoid a flash on navigation. -->
<script src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="icon" href="../../assets/favicon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="../../assets/styles.css" />
<script src="../../assets/main.js" defer></script>
</head>
<body id="top">
+15 -6
View File
@@ -8,6 +8,21 @@
name="description"
content="Inspect TH04's original 16-bit DOS code with REA. Follow the assembly and recovered C++ to see how a ring of bullets is spaced and aimed at the player."
/>
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<script>
(() => {
let theme;
try { theme = localStorage.getItem("rea-theme"); } catch {}
if (theme !== "light" && theme !== "dark")
theme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
document.documentElement.dataset.theme = theme;
document.querySelector('meta[name="theme-color"]').content = theme === "dark" ? "#1e1e2e" : "#ffffff";
})();
</script>
<script defer src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="stylesheet" href="../../assets/styles.css" />
<!-- website:sharing:start -->
<!-- prettier-ignore -->
<link rel="canonical" href="https://rea.tools/showcase/th04/" />
@@ -100,13 +115,7 @@
content="REA: Find out how software works. Reverse engineering with your coding agent."
/>
<!-- website:sharing:end -->
<!-- website:theme:start -->
<meta name="theme-color" content="#ffffff" />
<!-- Apply the saved theme before styles load, to avoid a flash on navigation. -->
<script src="../../assets/theme.js"></script>
<!-- website:theme:end -->
<link rel="icon" href="../../assets/favicon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="../../assets/styles.css" />
<script src="../../assets/main.js" defer></script>
</head>
<body id="top">
+2
View File
@@ -9,3 +9,5 @@ markdownify==1.2.3
PyYAML==6.0.3
# Rasterize the README contributor grid during a manual snapshot refresh.
Pillow==13.0.0
# Compress the shared first-paint stylesheet in the published build.
rcssmin==1.2.2
+2 -1
View File
@@ -250,7 +250,8 @@ the site follows the system preference; a manual choice is saved for later visit
and shared across pages and languages on that host. Without JavaScript, the site
uses the light palette and hides the switch.
`assets/theme.js` applies the choice before styles load and owns theme changes.
The theme template applies the initial choice before styles load. The deferred
`assets/theme.js` handles subsequent theme changes.
The stylesheet scopes the dark palette to `data-theme="dark"` on the root,
using [Catppuccin Mocha](https://github.com/catppuccin/palette) colors (MIT).
Any new fixed color needs a dark counterpart in that section. Keep selector
+3 -3
View File
@@ -6,12 +6,12 @@
<title>$title</title>
<meta name="description" content="$description" />
<meta name="robots" content="noindex" />
<!-- website:sharing:start -->
<!-- website:sharing:end -->
<!-- website:theme:start -->
<!-- website:theme:end -->
<link rel="icon" href="${base}assets/favicon.svg" type="image/svg+xml" />
<link rel="stylesheet" href="${base}assets/styles.css" />
<!-- website:sharing:start -->
<!-- website:sharing:end -->
<link rel="icon" href="${base}assets/favicon.svg" type="image/svg+xml" />
<script src="${base}assets/main.js" defer></script>
</head>
<body id="top">
+11 -2
View File
@@ -1,3 +1,12 @@
<meta name="theme-color" content="#ffffff" />
<!-- Apply the saved theme before styles load, to avoid a flash on navigation. -->
<script src="${base}assets/theme.js"></script>
<script>
(() => {
let theme;
try { theme = localStorage.getItem("rea-theme"); } catch {}
if (theme !== "light" && theme !== "dark")
theme = matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
document.documentElement.dataset.theme = theme;
document.querySelector('meta[name="theme-color"]').content = theme === "dark" ? "#1e1e2e" : "#ffffff";
})();
</script>
<script defer src="${base}assets/theme.js"></script>