This commit is contained in:
2026-08-15 21:23:25 +02:00
parent 814a9eb326
commit ebf97a0c1c
2 changed files with 84 additions and 47 deletions
+30
View File
@@ -0,0 +1,30 @@
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
Copyright (c) 28k8.moonweb.org
This work is licensed under the Creative Commons
Attribution-NonCommercial-ShareAlike 4.0 International License.
You are free to:
Share - copy and redistribute the material in any medium or format
Adapt - remix, transform, and build upon the material
Under the following terms:
Attribution - You must give appropriate credit, provide a link to the
license, and indicate if changes were made. You may do so in any
reasonable manner, but not in any way that suggests the licensor
endorses you or your use.
NonCommercial - You may not use the material for commercial purposes.
ShareAlike - If you remix, transform, or build upon the material, you
must distribute your contributions under the same license as the
original.
No additional restrictions - You may not apply legal terms or
technological measures that legally restrict others from doing
anything the license permits.
Full license text: https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode
+54 -47
View File
@@ -31,53 +31,52 @@ Cloudflare Pages, connected directly to this repo. Build command
## 🔄 Pre-Build System ## 🔄 Pre-Build System
Das Pre-Build-System lädt vor jedem Build externe Daten (JSON) und schreibt The pre-build system loads external data (JSON) before each build and writes
sie nach `src/data/`. Die JSON wird committed, sodass der Build nicht von it to `src/data/`. The JSON is committed, so the build does not depend on
externen Servern abhängt. external servers.
```bash ```bash
./prebuild.sh # alle Stages ./prebuild.sh # all stages
./prebuild.sh mods # nur MOD-Metadaten ./prebuild.sh mods # MOD metadata only
``` ```
**Wichtig:** `prebuild.sh` wird nur lokal ausgeführt, wenn sich externe Daten **Important:** `prebuild.sh` is only run locally when external data changes.
ändern. Das Ergebnis (JSON-Dateien in `src/data/`) wird ins Repo committed. The result (JSON files in `src/data/`) is committed to the repo.
In der CI/CD (`deploy.yml`) wird `npx astro build` direkt aufgerufen — das In CI/CD (`deploy.yml`), `npx astro build` is called directly — this
überspringt `prebuild.sh` bewusst, da die JSON-Daten bereits im Repo liegen. intentionally skips `prebuild.sh` since the JSON data is already in the repo.
Aktive Stages: Active stages:
| Stage | Script | Output | Beschreibung | | Stage | Script | Output | Description |
|---|---|---|---| |---|---|---|---|
| `mods` | `tools/fetch_mods.py` | `src/data/mods.json` | MOD-Metadaten von moonweb.org | | `mods` | `tools/fetch_mods.py` | `src/data/mods.json` | MOD metadata from moonweb.org |
Neuen Stage hinzufügen: Add a new stage:
1. 🐍 `tools/fetch_<name>.py` erstellen (Output: `src/data/<name>.json`) 1. 🐍 Create `tools/fetch_<name>.py` (output: `src/data/<name>.json`)
2. 🔧 Case-Block in `prebuild.sh` ergänzen 2. 🔧 Add case block in `prebuild.sh`
3. 🏗️ `npm run build` ruft automatisch `prebuild.sh` auf 3. 🏗️ `npm run build` automatically runs `prebuild.sh`
## 🎬 WelcomeBanner (Startseite) ## 🎬 WelcomeBanner (Start Screen)
Das "THE TEMPLE BBS"-Logo auf der Startseite wird als CP437-Text mit The "THE TEMPLE BBS" logo on the start screen is rendered as CP437 text with
Typewriter-Animation dargestellt. Der Text kommt aus einer echten a typewriter animation. The text comes from a real CP437 file and is rendered
CP437-Datei und wird mit einem IBM-VGA-Webfont gerendert. with an IBM VGA webfont.
### 📁 Dateien ### 📁 Files
| Datei | Zweck | | File | Purpose |
|---|---| |---|---|
| `source-assets/welcome.txt` | Original-Datei (CP437-kodiert) | | `source-assets/welcome.txt` | Original file (CP437 encoded) |
| `source-assets/welcome-utf8.txt` | UTF-8-Version, wird von Astro eingelesen | | `source-assets/welcome-utf8.txt` | UTF-8 version, read by Astro |
| `src/components/WelcomeBanner.astro` | Komponente (Rendering + Animation) | | `src/components/WelcomeBanner.astro` | Component (rendering + animation) |
| `public/fonts/Px437_IBM_VGA_8x16.woff2` | CP437-Webfont (6.6 KB) | | `public/fonts/Px437_IBM_VGA_8x16.woff2` | CP437 webfont (6.6 KB) |
| `public/fonts/Px437_IBM_VGA_8x16.ttf` | Font als Fallback | | `public/fonts/Px437_IBM_VGA_8x16.ttf` | Font as fallback |
| `src/styles/global.css:2` | `@font-face`-Definition | | `src/styles/global.css:2` | `@font-face` definition |
### 🤔 Warum zwei Textdateien? ### 🤔 Why two text files?
Node.js unterstützt `cp437` nicht in `TextDecoder`. Die Original-Datei Node.js does not support `cp437` in `TextDecoder`. The original file
wird daher per Python in UTF-8 konvertiert und die `.txt`-Datei mit is converted to UTF-8 via Python and the `.txt` file is saved alongside it.
abgespeichert. Bei Änderungen an `welcome.txt` muss die UTF-8-Version When `welcome.txt` is changed, the UTF-8 version must be regenerated:
neu generiert werden:
```bash ```bash
python3 -c " python3 -c "
@@ -86,27 +85,35 @@ with open('source-assets/welcome-utf8.txt','w',encoding='utf-8') as f: f.write(d
" "
``` ```
### ⏱️ Animation anpassen ### ⏱️ Adjusting the animation
In `src/components/WelcomeBanner.astro`, Zeile 24-26: In `src/components/WelcomeBanner.astro`, lines 24-26:
```javascript ```javascript
const BASE = 8; // Basis-delay pro Zeichen (ms) const BASE = 8; // base delay per character (ms)
const FAST = 4; // Delay für Leerzeichen (ms) const FAST = 4; // delay for spaces (ms)
const HARD_PAUSES: [number, number][] = [[34, 400], [98, 350]]; const HARD_PAUSES: [number, number][] = [[34, 400], [98, 350]];
// [Zeichen-Position, Pause in ms] // [character position, pause in ms]
``` ```
- **`BASE`/`FAST`** kleiner = schneller - **`BASE`/`FAST`** smaller = faster
- **`HARD_PAUSES`** = 2 bewusste Pausen mitten in einer Zeile. - **`HARD_PAUSES`** = 2 deliberate pauses in the middle of a line.
Position 34 ≈ Mitte der 1. Zeile, Position 98 ≈ Mitte der 2. Zeile. Position 34 ≈ middle of line 1, position 98 ≈ middle of line 2.
Werte an Text anpassen wenn sich die Zeilenlängen ändern. Adjust values if line lengths change.
### 🔤 Font ### 🔤 Font
`Px437 IBM VGA 8x16` von int10h.org (Oldschool PC Font Pack v2.2, `Px437 IBM VGA 8x16` from int10h.org (Oldschool PC Font Pack v2.2,
CC BY-SA 4.0). Enthält 288 Glyphs inkl. aller CP437-Block-Zeichen CC BY-SA 4.0). Contains 288 glyphs including all CP437 block characters
(█, ▄, ▀, ▌, ▐, ░, ▒, ▓) und Box-Drawing-Zeichen. (█, ▄, ▀, ▌, ▐, ░, ▒, ▓) and box-drawing characters.
Der Font ist über `--font-ansi` in `global.css` verfügbar und wird The font is available via `--font-ansi` in `global.css` and is also
auch von den ANSI-Art-Bannern (`ansiArt.ts`) genutzt. used by the ANSI art banners (`ansiArt.ts`).
## 📜 License
[![CC BY-NC-SA 4.0](https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc-sa/4.0/)
This work is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/).
See [LICENSE](LICENSE) for the full text.