Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
Binary file modified public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
96 changes: 25 additions & 71 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -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 },
];
---
<Page title={`abap2UI5 Insights — ${count} essays on one idea`} description={description} trail={[{ text: "Insights" }]}>
<section class="hero">
<h1>Insights</h1>
<p class="lead">What happens when the ABAP server sends the <em>screen</em> instead of only the data.</p>
<p>
{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.
</p>
<p>
There is a good chance you will also pick up a few things about ABAP along the way. RTTS, the
dialog step, <code>ENQUEUE</code>, 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.
</p>
</section>

<figure class="axis">
<div class="axis-card">
<p class="axis-head">When the view is fixed</p>
<ol class="axis-cols">
{AXIS.map((a) => (
<li class={a.hit ? "hit" : undefined}>
<span class="axis-name">{a.name}</span>
<span class="axis-when">{a.when}</span>
<span class="axis-what">{a.what}</span>
<div class="hello">
<div class="hello-text">
<h1 class="welcome">Insights</h1>
<p class="hello-lead">What happens when the ABAP server sends the <em>screen</em> instead of only the data — in {count} short essays.</p>
</div>
<img class="hello-logo" src={`${base}logo.png`} alt="" width="104" height="104">
</div>
{PARTS.map((part, i) => (
<section class="group" id={part.id}>
<h2>Part {i + 1} · {part.title}</h2>
<ul class="tiles">
{essays.filter((e) => e.data.part === part.id).map((e) => (
<li>
<a class="tile inside" href={`${base}${e.id}/`}>
<span class="for">#{e.data.number}</span>
<strong>{e.data.title}</strong>
<span class="text">{e.data.blurb.charAt(0).toUpperCase() + e.data.blurb.slice(1)}.</span>
</a>
</li>
))}
</ol>
</div>
<figcaption>One axis: when the definition of the screen stops being changeable.</figcaption>
</figure>
<p class="after-axis">
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.
</p>

<section class="parts" aria-label="The essays, in reading order">
{PARTS.map((part, i) => (
<section class="part" id={part.id}>
<header>
<span class="part-no">Part {i + 1}</span>
<h2>{part.title}</h2>
<p class="lead">{part.lead}</p>
</header>
<ol class="essays">
{essays.filter((e) => e.data.part === part.id).map((e) => (
<li>
<a href={href(e)}>
<span class="n">#{e.data.number}</span>
<span class="t">{e.data.title}</span>
<span class="d">{e.data.blurb}</span>
</a>
</li>
))}
</ol>
</section>
))}
</section>
</ul>
</section>
))}
</Page>
70 changes: 34 additions & 36 deletions src/styles/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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); }
Expand Down
5 changes: 2 additions & 3 deletions test/site.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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, /<img src="[^"]+\.svg"/, "the axis is HTML, not a picture");
for (const n of numbers) assert.match(home, new RegExp(`<span class="n">#${n}</span>`), `#${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(`<span class="for">#${n}</span>`), `#${n}`);
});

test("no VitePress attribute syntax leaks into a page", () => {
Expand Down
Loading