refactor(website): move UI text out of scripts before translation

Prepare the website for localized pages without changing what English
readers see:

- Add --font-sans and --font-mono tokens and use them for every font stack.
- Read copy feedback from the shared #copy-status element, restore each
  Copy button's own label, and build the GitHub star label from header
  data attributes with Intl.PluralRules and Intl.NumberFormat for the
  page language.
- Move the percent demo, dinosaur game and speed-check messages into
  data-msg-* attributes on the home page and dino lab.
- Render the skip link from the shared header template.
- Fix the lowercase Ghidra macOS/Linux copy-button label.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Kaoru0822
2026-10-11 07:09:16 +00:00
co-authored by Claude Opus 5.5
parent 21650455a9
commit 3d34185171
25 changed files with 372 additions and 86 deletions
+14 -2
View File
@@ -54,9 +54,10 @@
<script src="../../assets/main.js" defer></script>
</head>
<body id="top">
<a class="skip-link" href="#main">Skip to content</a>
<!-- website:header:start -->
<!-- prettier-ignore -->
<a class="skip-link" href="#main">Skip to content</a>
<!-- prettier-ignore -->
<header class="site-header">
<div class="container header-inner">
<a class="brand" href="../../" aria-label="REA home"
@@ -76,6 +77,8 @@
href="https://github.com/morluto/rea"
aria-label="REA on GitHub"
title="REA on GitHub"
data-label-one="REA on GitHub ({count} star)"
data-label-other="REA on GitHub ({count} stars)"
>
<svg
width="22"
@@ -435,7 +438,16 @@
</div>
</div>
</footer>
<p class="sr-only" id="copy-status" role="status" aria-live="polite"></p>
<p
class="sr-only"
id="copy-status"
role="status"
aria-live="polite"
data-copied="Copied"
data-selected="Selected"
data-status-copied="Code copied to clipboard."
data-status-selected="Code selected. Use your keyboard to copy it."
></p>
<a class="back-to-top" href="#top" aria-label="Back to top">
<span aria-hidden="true">↑</span> Top
</a>