diff --git a/AGENTS.md b/AGENTS.md index 31bd9f0..a274743 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, 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/index.astro` | The index, built as the home page: the title, the axis figure (HTML), then one group per part - the home page's heading, the part's line, its essays as a list - one column at the essay measure | | `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/src/pages/index.astro b/src/pages/index.astro index 59c5605..5401da1 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -1,8 +1,9 @@ --- -/* 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). */ +/* The index: the title as the home page (https://abap2ui5.github.io/) sets + * it, the axis everything turns on, then one group per part - its name as + * the home page's small uppercase heading, its line, and its essays as a + * list: number, title, blurb. One column at the measure of an essay, so the + * index and an essay share one left edge and one width. */ import Page from "../layouts/Page.astro"; import { getCollection } from "astro:content"; import { PARTS } from "../lib/parts"; @@ -10,30 +11,53 @@ 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 count = essays.length; +/* the axis everything turns on: three ways to put a UI5 screen in front of a + * user, by the moment the view is fixed - HTML, so it stacks 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 }, +]; 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.`; --- - +

Insights

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

-
+
+
+

When the view is fixed

+
    + {AXIS.map((a) => ( +
  1. + {a.name} + {a.when} + {a.what} +
  2. + ))} +
+
+
One axis: when the definition of the screen stops being changeable.
+
{PARTS.map((part, i) => (

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

- +
))}
diff --git a/src/styles/global.css b/src/styles/global.css index 06a8a41..e60df9a 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -35,7 +35,6 @@ --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; @@ -61,7 +60,6 @@ --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; @@ -120,39 +118,39 @@ main.wrap { padding-bottom: 32px; } .foot a:hover { color: var(--brand); } /* ---- 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 title, then a group per part with its line and its essays + * as a list - .hello, .welcome and .group are the classes and * the rules of https://abap2ui5.github.io/ */ -.hello { display: flex; align-items: center; gap: 24px; margin: 28px 0 40px; } +.hello { display: flex; align-items: center; gap: 24px; margin: 28px 0 32px; } .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) { - .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; + .hello { margin: 24px 0 28px; } + } +/* the axis, in HTML: a card as wide as the text, three columns side by + * side, stacked on a phone */ +.axis { margin: 0 0 40px; } +.axis-card { padding: 22px 24px 18px; border: 1px solid var(--line); border-radius: 12px; 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; } +@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; } } -.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; } } +.group { margin: 0 0 44px; } +.group-lead { margin: 0 0 14px; color: var(--muted); font-size: 15.5px; line-height: 1.6; } +.group h2 { margin: 0 0 8px; color: var(--muted); font-size: 13px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; } /* 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 */ diff --git a/test/site.test.mjs b/test/site.test.mjs index 97d0898..a862891 100644 --- a/test/site.test.mjs +++ b/test/site.test.mjs @@ -146,7 +146,7 @@ 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="group"/g) || []).length, 6, "six parts, one group each"); - for (const n of numbers) assert.match(home, new RegExp(`#${n}`), `#${n}`); + for (const n of numbers) assert.match(home, new RegExp(`#${n}`), `#${n}`); }); test("no VitePress attribute syntax leaks into a page", () => {