diff --git a/AGENTS.md b/AGENTS.md index 091c6e1..31bd9f0 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -18,7 +18,7 @@ keeps a redirect stub for every old address and one sidebar row leading here. | `src/content/essays/NN-slug.md` | One essay per file. Frontmatter: `title` (without the number), `number` (the place in reading order, = `NN`), `part`, `blurb` (the line in the index), optional `description` (meta) | | `src/lib/parts.ts` | The parts (id, title, lead) | | `src/lib/moved.ts` | Slugs of an earlier numbering and the essay each now is; each gets a page that refreshes to the new address | -| `src/pages/index.astro` | The index, one column at the essay measure: opening, the axis figure (HTML, not an image), every essay by part | +| `src/pages/index.astro` | The index, built as the home page: the title with the logo, then one group per part with its essays as tiles (`.hello`, `.group`, `.tiles`, `.tile` - the home page's classes and rules) | | `src/pages/[slug].astro` | The route for an essay (`src/components/Essay.astro`: its part, reading time, the other essays of the part, previous/next) and for a moved address (`src/components/Moved.astro`) | | `src/pages/rss.xml.ts` | The feed, in reading order | | `src/pages/search.json.ts` | What the family's search finds of this site: one entry per essay (title, line, headings, rarer words). abap2UI5/docs fetches it at build time into the one search index the home page and the playground read; the shape `{ site, url, entries: [{ title, text, headings, terms, url }] }` is the same on every site of the family | diff --git a/public/logo.png b/public/logo.png index 80a225e..d655f2e 100644 Binary files a/public/logo.png and b/public/logo.png differ diff --git a/src/pages/index.astro b/src/pages/index.astro index 17c8608..59c5605 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,85 +1,39 @@ --- -/* The index: what the series is, the one axis everything turns on, and the - * essays by part, in reading order - nothing else. One column at the measure - * of an essay, so the index and an essay share one left edge and one width. */ +/* The index, built as the home page (https://abap2ui5.github.io/) is: the + * title with the logo beside it, then one group per part - its name as the + * small uppercase heading, its essays as tiles. The classes and the rules + * are the home page's (.hello, .welcome, .group, .tiles, .tile). */ import Page from "../layouts/Page.astro"; import { getCollection } from "astro:content"; import { PARTS } from "../lib/parts"; const base = import.meta.env.BASE_URL; const essays = (await getCollection("essays")).sort((a, b) => a.data.number - b.data.number); -const href = (e: (typeof essays)[number]) => `${base}${e.id}/`; const count = essays.length; const description = `The ideas behind abap2UI5 in ${count} short technical essays: what it rests on, how it works under the app, a working day with it, where it belongs in the landscape and what running it takes.`; -/* the axis: three ways to put a UI5 screen in front of a user, by the moment - * the view is fixed - HTML rather than a picture, so it reflows on a phone - * and follows the reader's colour scheme */ -const AXIS = [ - { name: "UI5 Freestyle", when: "build time", what: "a file in a frontend project" }, - { name: "RAP / Fiori Elements", when: "activation time", what: "UI annotations on CDS" }, - { name: "abap2UI5", when: "request time", what: "a string from an ABAP class", hit: true }, -]; --- -
-

Insights

-

What happens when the ABAP server sends the screen instead of only the data.

-

- {count} short essays, each making a single claim and showing it in code wherever code can show it. Read one on its - own and it stands. Read them in order and the parts add up to the whole picture — what the - framework rests on, how it works under the app, what a working day with it looks like, - where it belongs in the landscape and what running it takes. They are the “why it works like - this” for a developer and an architect. -

-

- There is a good chance you will also pick up a few things about ABAP along the way. RTTS, the - dialog step, ENQUEUE, the selection screen, the ICF node, the launchpad: this - framework did not invent much, it just moved a lot of familiar furniture into a browser. -

-
- -
-
-

When the view is fixed

-
    - {AXIS.map((a) => ( -
  1. - {a.name} - {a.when} - {a.what} +
    +
    +

    Insights

    +

    What happens when the ABAP server sends the screen instead of only the data — in {count} short essays.

    +
    + +
    + {PARTS.map((part, i) => ( +
    +

    Part {i + 1} · {part.title}

    +
-
-
One axis: when the definition of the screen stops being changeable.
-
-

- Three ways to put a UI5 screen in front of a user on an ABAP stack, all three rendering in the - browser with the same controls. They differ in one thing: when the view is fixed. In abap2UI5 it - is a string an ABAP class produces for this request — and the next request may answer - differently. Everything else follows from that. -

- -
- {PARTS.map((part, i) => ( -
-
- Part {i + 1} -

{part.title}

-

{part.lead}

-
-
    - {essays.filter((e) => e.data.part === part.id).map((e) => ( -
  1. - - #{e.data.number} - {e.data.title} - {e.data.blurb} - -
  2. - ))} -
-
- ))} -
+ + + ))}
diff --git a/src/styles/global.css b/src/styles/global.css index 87c947a..06a8a41 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -35,6 +35,7 @@ --card: #ffffff; --code-bg: #f6f7f9; --radius: 12px; + --shadow: 0 1px 2px #0f172a0f, 0 8px 24px #0f172a0f; --width: 1100px; --measure: 680px; /* the home page's text column (.prose > * there) */ --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; @@ -60,6 +61,7 @@ --bg-alt: #131a29; --card: #172033; --code-bg: #131a29; + --shadow: 0 1px 2px #0000004d, 0 8px 24px #00000040; --tok-keyword: #f08ea0; --tok-string: #7fd6a4; --tok-comment: #8a94a6; @@ -117,45 +119,41 @@ main.wrap { padding-bottom: 32px; } .foot a { color: var(--muted); text-decoration: none; } .foot a:hover { color: var(--brand); } -/* ---- the index ------------------------------------------------------------ */ -/* One column at the measure of an essay: the index and an essay share one - * left edge and one width. The heading stands where the sister sites put - * theirs: 28px under the bar (24px on a phone), line height 1.15 */ -.measure-index > * { max-width: var(--measure); } -.hero { padding: 28px 0 0; } -.hero p:last-child { margin-bottom: 0; } -.hero h1 { margin: 0 0 16px; font-size: clamp(28px, 4vw, 40px); line-height: 1.15; } -.hero p { margin: 0 0 14px; font-size: 17px; line-height: 1.6; } -.hero p.lead { color: var(--ink); } -@media (max-width: 620px) { .hero { padding-top: 24px; } .hero p { font-size: 16px; } } - -/* the axis, in HTML: three columns side by side, stacked on a phone */ -.axis { margin: 28px 0 0; } -.axis-card { padding: 22px 24px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-alt); } -.axis-head { margin: 0 0 16px; color: var(--ink); font-size: 13.5px; font-weight: 700; } -.axis-cols { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } -.axis-cols li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; } -.axis-name { align-self: stretch; padding: 12px 8px; border: 1.5px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font-size: 14.5px; font-weight: 500; } -.axis-when { margin-top: 8px; color: var(--ink); font-size: 14px; font-weight: 700; } -.axis-what { color: var(--muted); font-size: 13px; line-height: 1.4; } -.axis-cols .hit .axis-name { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-strong); font-weight: 650; } -.axis-cols .hit .axis-when { color: var(--brand-strong); } -.axis figcaption { margin-top: 10px; text-align: center; color: var(--muted); font-size: 14px; } +/* ---- the index: the home page's, rule for rule -------------------------- */ +/* the title with the logo beside it, then a group per part with its essays + * as tiles - .hello, .welcome, .group, .tiles and .tile are the classes and + * the rules of https://abap2ui5.github.io/ */ +.hello { display: flex; align-items: center; gap: 24px; margin: 28px 0 40px; } +.hello-text { flex: auto; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; } +.welcome { margin: 0; color: var(--ink); font-size: clamp(28px, 4vw, 40px); font-weight: 700; line-height: 1.15; letter-spacing: -.025em; } +.hello-lead { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.6; } +.hello-logo { flex: none; align-self: flex-start; width: 104px; height: 104px; } @media (max-width: 620px) { - .axis-card { padding: 18px 16px 14px; } - .axis-cols { grid-template-columns: 1fr; gap: 14px; } - .axis-cols li { display: grid; grid-template-columns: minmax(0, 9.5rem) minmax(0, 1fr); column-gap: 14px; row-gap: 2px; align-items: center; text-align: left; } - .axis-name { grid-row: span 2; text-align: center; } - .axis-when { margin-top: 0; } + .hello { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; margin: 24px 0 28px; } + .hello-text { display: contents; } + .welcome { grid-area: 1 / 1; } + .hello-lead { grid-column: 1 / -1; } + .hello-logo { grid-area: 1 / 2; align-self: center; width: 64px; height: 64px; } +} +.group { margin: 0 0 36px; } +.group h2 { margin: 0 0 12px; color: var(--muted); font-size: 13px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; } +.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; } +.tiles li { min-width: 0; } +.tile { + position: relative; display: grid; align-content: start; gap: 4px; height: 100%; + padding: 14px 40px 14px 16px; border: 1px solid var(--line); border-radius: 12px; + background: var(--card); color: var(--text); text-decoration: none; + transition: border-color .15s, box-shadow .15s, transform .15s; } +.tile::after { content: "→"; position: absolute; top: 12px; right: 14px; color: var(--muted); font-size: 16px; opacity: .6; transition: color .15s, opacity .15s, transform .15s; } +.tile:hover { color: var(--text); border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); } +.tile:focus-visible { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); outline: none; } +.tile:hover::after, .tile:focus-visible::after { color: var(--brand); opacity: 1; transform: translate(3px); } +.tile strong { color: var(--ink); font-size: 16px; font-weight: 600; letter-spacing: -.01em; } +.tile .for { color: var(--brand); font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; } +.tile .text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; color: var(--muted); font-size: 14px; line-height: 1.5; } +@media (prefers-reduced-motion: reduce) { .tile, .tile::after { transition: none; } .tile:hover { transform: none; } } -.after-axis { margin: 16px 0 0; } -.parts { margin: 56px 0 0; } -.part { margin: 0 0 48px; } -.part header { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; margin-bottom: 16px; } -.part .part-no { color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; } -.part h2 { margin: 0; font-size: 22px; } -.part .lead { margin: 0; color: var(--muted); } /* an essay in a list: the number in its own column, the title, the line * under it - two lines at the measure rather than three columns */ .essays { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); } diff --git a/test/site.test.mjs b/test/site.test.mjs index 796831f..97d0898 100644 --- a/test/site.test.mjs +++ b/test/site.test.mjs @@ -145,9 +145,8 @@ test("the family's top line: the brand leads home, the breadcrumb marks the page }); test("the index lists every essay and every part", () => { - assert.equal((home.match(/class="essays"/g) || []).length, 6, "six parts"); - assert.doesNotMatch(home, /#${n}`), `#${n}`); + assert.equal((home.match(/class="group"/g) || []).length, 6, "six parts, one group each"); + for (const n of numbers) assert.match(home, new RegExp(`#${n}`), `#${n}`); }); test("no VitePress attribute syntax leaks into a page", () => {