From 8317add5309944c25b18527bdf07dafe7e8735cd Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 24 Oct 2026 08:22:14 +0000 Subject: [PATCH] Evaluate abap2UI5 as a standalone site One static page for the people who approve abap2UI5: the problem it answers, when to use it and when RAP or Fiori Elements, what the organization keeps, where it runs, what it costs (with the cost calculator), the objections a review board raises, who runs it, and how to evaluate it in a week. Built with Astro into dist/, published by GitHub Pages at https://abap2ui5.github.io/test-docs/ - build and tests on every pull request, deploy on main and weekly (the counted figures are read from the framework README at build time). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_018pzBTy4Fu41dBw89fEtCVg --- .github/workflows/pages.yml | 60 + .gitignore | 3 + .nvmrc | 1 + AGENTS.md | 48 + CLAUDE.md | 6 + README.md | 33 +- astro.config.mjs | 22 + package-lock.json | 3915 ++++++++++++++++++++++++++ package.json | 21 + public/apple-touch-icon.png | Bin 0 -> 20568 bytes public/calc.js | 50 + public/favicon.png | Bin 0 -> 5711 bytes public/fonts/NOTICE.md | 9 + public/fonts/inter-roman-latin.woff2 | Bin 0 -> 67792 bytes public/logo.png | Bin 0 -> 8082 bytes public/walkthrough-preview.webp | Bin 0 -> 22254 bytes src/components/CostCalculator.astro | 96 + src/components/Icon.astro | 21 + src/components/Stats.astro | 17 + src/layouts/Page.astro | 82 + src/lib/facts.mjs | 51 + src/pages/index.astro | 335 +++ src/styles/global.css | 387 +++ test/site.test.mjs | 63 + 24 files changed, 5218 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/pages.yml create mode 100644 .gitignore create mode 100644 .nvmrc create mode 100644 AGENTS.md create mode 100644 CLAUDE.md create mode 100644 astro.config.mjs create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 public/apple-touch-icon.png create mode 100644 public/calc.js create mode 100644 public/favicon.png create mode 100644 public/fonts/NOTICE.md create mode 100644 public/fonts/inter-roman-latin.woff2 create mode 100644 public/logo.png create mode 100644 public/walkthrough-preview.webp create mode 100644 src/components/CostCalculator.astro create mode 100644 src/components/Icon.astro create mode 100644 src/components/Stats.astro create mode 100644 src/layouts/Page.astro create mode 100644 src/lib/facts.mjs create mode 100644 src/pages/index.astro create mode 100644 src/styles/global.css create mode 100644 test/site.test.mjs diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 0000000..59498e7 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,60 @@ +# Build, test and publish the page to GitHub Pages at +# https://abap2ui5.github.io/test-docs/. +# +# On a pull request it builds and tests only. On main it also deploys; the +# weekly run picks up the counted figures from the framework README +# (src/lib/facts.mjs), which change without a commit here. +# +# Needs Settings → Pages → Source: "GitHub Actions" once. +name: pages + +on: + push: + branches: [main] + pull_request: + schedule: + - cron: "17 6 * * 1" + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: pages-${{ github.ref }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + with: + node-version-file: .nvmrc + cache: npm + - run: npm ci + - run: npm run check + env: + ASTRO_TELEMETRY_DISABLED: "1" + - if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' + uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0 + - if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' + uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 + with: + path: dist + + deploy: + if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' + needs: build + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ddce69b --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +node_modules/ +dist/ +.astro/ diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..2bd5a0a --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +22 diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..7d0ce25 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,48 @@ +# AGENTS.md + +Evaluate abap2UI5: one static page for the people who approve abap2UI5, +published at https://abap2ui5.github.io/test-docs/ by GitHub Pages. A +standalone site — its own repository, build and deployment — and nothing in +it depends on abap2UI5/docs or abap2UI5/playground at build time. + +## Layout + +| Path | Purpose | +| --- | --- | +| `src/pages/index.astro` | The page: the text of every section, as data at the top and markup below | +| `src/layouts/Page.astro` | The document: head, the Content-Security-Policy, the header with the section links, the foot | +| `src/components/` | `Stats` (the figures under the hero), `CostCalculator` (the sheet, after the manual's), `Icon` (inline marks) | +| `public/calc.js` | The cost calculator in the browser - the page's one script; the calculator reads correctly without it | +| `src/lib/facts.mjs` | Reads the counted figures from the framework README's `facts:start` block at build time (`EVALUATE_README` names a local file, else raw GitHub); a failed read costs the counts, never the build | +| `src/styles/global.css` | The one stylesheet; light and dark follow the system | +| `public/` | Font (Inter, self-hosted), logo, icons, the screenshot | +| `test/site.test.mjs` | `node:test` over the built `dist/index.html` | +| `.github/workflows/pages.yml` | Build + test on every PR; deploy on main and weekly (the figures move without a commit here) | + +## Commands + +```bash +npm ci +npm run dev # dev server, http://localhost:4321/test-docs/ +npm run build # dist/ +npm test # the tests, against dist/ - build first +npm run check # build + test, what CI runs +``` + +## Rules + +- **The eight section ids are addresses.** `/docs/evaluate` redirects here + with its `#fragment`, and the framework's README links `#what-you-keep` and + `#when-to-use-it-and-when-not`. Reword a heading freely; keep the `id`. + `test/site.test.mjs` names all eight. +- **One script, as a file.** The policy is `script-src 'self'`: `public/calc.js` + and nothing inline, no `on…=` handler. Everything else works without it - the + FAQ is `
`, the header is anchors, the calculator's sheet is in the + page. No inline `style=""` either (`style-src 'self'`) — a class in `global.css`. +- **Nothing from another origin.** No CDN, no web font service, no analytics; + the font and the images are in `public/`. +- **No number typed by hand.** The counts come from the framework README. +- **Toolchain:** Node 22 (`.nvmrc`, `engines`), every dependency pinned + exactly (astro 7.3.8), actions pinned to commits. +- The site is written for people. Links into the manual are absolute + (`https://abap2ui5.github.io/docs/...`). diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..6dcf474 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,6 @@ +# CLAUDE.md + +All project guidance lives in **[AGENTS.md](AGENTS.md)** — the layout, the +commands and the rules. + +Read `AGENTS.md` before making any change. diff --git a/README.md b/README.md index 0dc1c3b..4398a8d 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,31 @@ -# test-docs -test +# Evaluate abap2UI5 + +The page for the people who approve abap2UI5 rather than build with it — IT +management, architecture boards, product owners, SAP Basis and internal audit: +the problem it answers, when to use it and when RAP, what your organization +keeps, where it runs, what it costs, the objections a review board raises, and +how to evaluate it on one real screen in a week. + +**→ https://abap2ui5.github.io/test-docs/** + +A standalone site, independent of the +[documentation](https://abap2ui5.github.io/docs/) and the +[playground](https://abap2ui5.github.io/playground/): its own repository, +build and deployment. Built with [Astro](https://astro.build) into one static +page; its one script is the cost calculator's. + +## Run it + +```bash +npm ci +npm run dev # http://localhost:4321/test-docs/ +npm run check # build + tests, what CI runs +``` + +Edit the text in `src/pages/index.astro`. The counted figures under the hero +are read at build time from the framework README and are never typed here. + +## License + +MIT, see [LICENSE](LICENSE). Inter is under the SIL Open Font License +([public/fonts/NOTICE.md](public/fonts/NOTICE.md)). diff --git a/astro.config.mjs b/astro.config.mjs new file mode 100644 index 0000000..abb3ade --- /dev/null +++ b/astro.config.mjs @@ -0,0 +1,22 @@ +// Evaluate abap2UI5 - one static page, published by GitHub Pages at +// https://abap2ui5.github.io/test-docs/ (.github/workflows/pages.yml). +// +// Static output only: no client component, no island. The page's one script +// is the cost calculator's public/calc.js, loaded as a file; the policy is +// `script-src 'self'` (src/layouts/Page.astro), and test/site.test.mjs fails a +// build with any other script. +import { defineConfig } from "astro/config"; + +export default defineConfig({ + site: "https://abap2ui5.github.io", + base: "/test-docs/", + trailingSlash: "ignore", + build: { + format: "directory", + assets: "assets", + // one stylesheet file, cached, rather than a