oficina / slides Public

Design draft 1: the editor, tidied (for Paul's approval)

Paul went through the live editor and a clickable mockup on 2026-11-16.
This records what he decided: the desk in Docs' grey and the strip as
its own surface; New slide pinned to the strip's foot; the inspector as
Docs' floating card, following the selection, with the marks in it; a
three-icon view switch; notes as a floating card that closes to an
icon; a phone frame at phone height; and a slide's On a phone setting
(document, letterboxed, arranged).

The mockup he approved is beside the design. Nothing here is built, and
nothing is approved yet.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev 123623234f99ecb019b688249022d622a61aadb5 parent cb30df5
2 files changed, +753 −0
  • docs/superpowers/specs/2026-11-16-editor-tidy-design.md +456 −0
  • docs/superpowers/specs/2026-11-16-editor-tidy-mockup.html +297 −0
diff --git a/docs/superpowers/specs/2026-11-16-editor-tidy-design.md b/docs/superpowers/specs/2026-11-16-editor-tidy-design.md
new file mode 100644
index 0000000..1834027
--- /dev/null
+++ b/docs/superpowers/specs/2026-11-16-editor-tidy-design.md
@@ -0,0 +1,456 @@
+# πŸ€– Slides: the editor, tidied β€” design
+
+Design, 2026-11-16, **draft 1. For Paul's approval; nothing here is
+approved yet.** Written by Claude Fable 5.2 on branch
+`design/editor-tidy`, cut from `origin/main` at `cb30df5`, from a
+conversation with Paul on 16 November in which he went through the
+live editor and a clickable mockup, change by change.
+
+The mockup he approved ("good enough to proceed for now") is beside
+this file: `2026-11-16-editor-tidy-mockup.html`. Open it in a browser.
+Where this text and the mockup disagree, this text wins, and the
+disagreement is a bug in the text to report.
+
+This is the first slice of a larger piece of work, levelling Slides up
+until the talk Paul gave at HalfStack Vienna on 16 November could have
+been made and rehearsed in it (Β§9). It stands alone: it ships without
+any of the rest.
+
+It builds on, and does not restate:
+
+- the Slides design, `2026-09-07-slides-design.md` (cited as **Β§n of
+ the main spec**), in particular its Β§0.1 (one tree), Β§2.2 and Β§2.5
+ (a slide's `phone` and a block's phone overrides) and Β§3.2 (the
+ editor);
+- `AGENTS.md`: the one rule, the seams, the fixtures rule, the font
+ rule ("never a flash"), and the UX conventions.
+
+---
+
+## 0. Intent
+
+The editor works, but it does not look or behave like the rest of the
+suite, and parts of it get in the way. Paul's words, on the live site:
+"The creme background is weird and the thumbnail doesn't show the
+slides centered." "The left nav should be distinct from the canvas,
+and the canvas should probably match Docs's grey canvas." The
+inspector "shouldn't have an 'Inspector' title", "should be dynamic
+according to whether the presentation document is focussed, or what
+element is clicked", and "causes the whole page to scroll." And of
+Docs' inspector: "we should be consistent."
+
+**Success** is that someone who knows Docs sits down at Slides and
+finds the same desk, the same floating inspector and the same buttons,
+and that the inspector always shows the options for the thing they
+last clicked and nothing else.
+
+### 0.1 Goals
+
+1. The editor's desk, strip, inspector, buttons and notes look and
+ behave like Docs'.
+2. The inspector follows the selection: a box, the slide, or the deck.
+3. Nothing in the editor makes the page itself scroll.
+4. The phone view is a phone: phone height, and showing what a reader
+ on a phone would see.
+5. A slide can say how it shows on a phone (Β§6).
+
+### 0.2 Non-goals
+
+- Anything in the presenter, the viewer, the remote or the export.
+- New kinds of block, steps, layouts beyond the eight that exist,
+ scenes, video. Those are later slices (Β§9).
+- Changing Docs. Docs is the reference; it moves onto the shared parts
+ this slice adds to estilo in its own time (Β§7).
+- A dark theme for the editor's chrome beyond what estilo already
+ gives it.
+
+### 0.3 Anti-goals (failure even if it works)
+
+- **A second inspector.** A formatting toolbar that survives beside
+ the inspector, or options for the slide showing while a box is
+ selected, is the confusion this slice removes.
+- **A control that looks like Docs' and behaves differently.** If
+ Format toggles a card in Docs, it toggles a card here, from the same
+ place in the bar, with the same keyboard behaviour.
+- **A lost word or a flash.** Moving the notes and the inspector must
+ not add a path around the save queue or the font gate
+ (`AGENTS.md`).
+- **A phone view that lies.** The phone frame must show what the
+ viewer serves at phone width for that slide's setting, not an
+ editor-only picture.
+
+---
+
+## 1. Calls this design makes
+
+Paul's decisions are marked **Paul**. The rest are the session's
+calls, listed so they can be reversed in one place.
+
+| # | Call | Whose | Rejected alternative |
+|---|---|---|---|
+| E1 | The inspector is **Docs' floating card**: over the top right of the desk, shown and hidden by a **Format** button in the bar. | Paul ("more similar to the Docs inspector, e.g. floating") | A full-height docked panel with accordion sections (the first mockup). |
+| E2 | The card shows **one thing at a time, by selection**: a box's options; or, with nothing selected, the slide's, with the deck's under a rule. | Paul ("dynamic according to … what element is clicked") | Deck, Slide and Block all listed at once, as today. |
+| E3 | **Character formatting lives in the card**, in a box's options. The stage toolbar keeps only the view switch. | Paul ("This should all be in the inspector") | The B / I / code / highlight / link pill above the stage. |
+| E4 | The view switch is **three icons, one lit**: desktop, phone, both. | Paul ("we need the third state") | Two on/off toggles (tried in the mockup; confusing). |
+| E5 | Notes are **a floating card at the foot of the desk** with an Γ— to close. Closed, they are **a small icon** in the desk's corner, with a dot when the slide has notes. | Paul | A switch in the toolbar and a pane under the stage, as today; a docked panel that folds to a one-line strip. |
+| E6 | **New slide is pinned to the foot of the strip**, one pill with the layout chevron joined to it. | Paul asked; session proposed the pin | At the end of the list, scrolling away. |
+| E7 | The desk is **Docs' grey**, taken from Docs' own value, and the strip is its own surface. | Paul | The warm ground the editor has today. |
+| E8 | A slide's **On a phone** setting has three values: document, letterboxed, arranged (Β§6). | Paul ("an option, to either show on the phone letterboxed, or to position elements separately for the vertical view") | Today's two values, and only on canvas slides. |
+| E9 | The shared look (the floating card, its groups and segmented controls, the desk colour) goes into **estilo**, and Slides uses it from there. Docs is not changed in this slice. | Session | Copying Docs' rules into Slides (two copies drift); changing Docs now (a second app at risk for a Slides slice). |
+| E10 | The deck's **title is edited in the bar**; **unused images** moves to the File menu. Neither is in the card. | Session | Keeping every deck field in the card (it would be long again). |
+| E11 | In the phone frame, a document slide is followed by **the next slides, dimmed**, so the frame is full and true. | Session; shown to Paul in the mockup | The slide's content alone at the top of an empty frame. |
+
+---
+
+## 2. The page
+
+Three regions and nothing else: the bar across the top, the strip down
+the start edge, and the desk filling the rest. The inspector and the
+notes float over the desk; they are not regions.
+
+```
+β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
+β”‚ β–£ Title Saved β†Ά β†· [✎ Format] [Share…] [Present] P β”‚
+β”‚ File Edit Insert Slide View Help β”‚
+β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
+β”‚ 1 β–­ β”‚ [β–­ β–― β–­β–―] β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
+β”‚ 2 β–­ β”‚ β”‚ the inspector β”‚ β”‚
+β”‚ 3 β–­ β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ (one of three) β”‚ β”‚
+β”‚ 4 β–­ β”‚ β”‚ the slide β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
+β”‚ … β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
+│─────────│ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
+β”‚[+ New βŒ„]β”‚ β”‚ Notes Γ— β”‚ β”‚
+β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
+```
+
+- **The page never scrolls.** The editor is as tall as the window. The
+ strip scrolls inside itself, the stage scrolls inside itself when a
+ frame does not fit, and the inspector and notes scroll inside
+ themselves (Β§4, Β§5).
+- **The desk** is Docs' grey (`--docs-desk` today; E9 names it in
+ estilo). The slide lies on it with Docs' paper shadow, as now.
+- **The strip** is a surface of its own (the bar's surface), with a
+ hairline on its desk edge.
+- **New slide** sits in a foot that does not scroll, under the list.
+ It is one pill: the button, and the chevron that opens the layouts
+ as pictures, joined. Behaviour is unchanged (the button adds the
+ layout that usually follows the current slide; the chevron picks).
+ The picker opens upward from the chevron.
+- **The bar** is estilo's stacked bar as today. Its controls, in
+ order: the save line, undo and redo in one pill, **Format**,
+ **Share…**, **Present**, the suite switcher, the account. Buttons
+ are estilo's pills, as in Docs: Format is the soft-tinted toggle,
+ Share… is outlined, Present is the filled one. The bar's
+ "Inspector" toggle is replaced by Format.
+- **The view switch** is the only thing on the stage's toolbar: three
+ icon buttons in one pill, exactly one lit, each with a tooltip and
+ an accessible name (Desktop; Phone; Both, side by side). It is
+ still three radios underneath (Β§3.2 of the main spec), and the View
+ menu's three items stay.
+
+---
+
+## 3. The deck list
+
+- The page's ground is the same grey as the editor's desk. The warm
+ gradient goes.
+- A deck's cover shows its first slide **centred** in the card. Today
+ the slide's content sits off-centre in the cover; that is a bug.
+ The builder finds whether it is the cover's box or the thumbnail's
+ own picture, and fixes it where it is wrong.
+
+---
+
+## 4. The inspector
+
+A floating card, as in Docs: a white rounded card with a soft shadow,
+over the top right of the desk. It has **no title**. Inside are small
+labelled groups, with no accordion and no sections to fold.
+
+- **Format** in the bar shows and hides it, and remembers the choice
+ as the bar's Inspector toggle does today. It is lit while the card
+ shows.
+- **The stage keeps clear of it.** While the card shows, the stage
+ reserves the card's width, so a frame is never under it; when it is
+ hidden, the frame re-centres in the whole desk.
+- **It stops short of the foot of the desk and scrolls inside
+ itself.** It never makes the page scroll.
+- **From 64rem only**, as Docs' is. Narrower than that, the card
+ becomes what Docs' does at that width (the builder reads Docs and
+ matches it), and Format is in the menu sheet's place.
+
+### 4.1 What it shows
+
+Exactly one of these, decided by what was last clicked:
+
+| Selection | The card shows |
+|---|---|
+| A box (click it, or put the caret in it) | That kind of box's options (Β§4.2) |
+| Nothing (click the desk, or a slide in the strip) | The slide's options, then a rule, then the deck's (Β§4.3) |
+
+The card changes when the selection changes, and at no other time. It
+does not change because someone else selected something.
+
+### 4.2 A box's options
+
+Every option that exists for a box today stays; this slice moves
+them, it does not add or remove any, except that the marks join them.
+Groups, in Docs' order where Docs has the same group:
+
+| Kind | Groups |
+|---|---|
+| Heading | **Style** (level; font; size) Β· **Text** (bold, italic, link) Β· **Alignment** Β· **Colour** |
+| Text | **Style** (size) Β· **Text** (bold, italic, code, highlight, link) Β· **Alignment** Β· **Colour** |
+| List | Text's groups, and **List** (bullet or numbered) |
+| Quote | Text's groups |
+| Image | **Image** (replace; fit) Β· **Description** (alt text) |
+| A box on a canvas slide | Its kind's groups, and **Box** (position and size, as today) |
+
+- The **Text** group is the marks that sat in the pill above the
+ stage. Each is a toggle that shows the state of the selection, and
+ is disabled when the selection cannot take it, exactly as the pill's
+ buttons are now. Their keyboard shortcuts are unchanged.
+- In phone view, changing an option that has a phone override writes
+ the override, as today (Β§2.5 of the main spec), and the card says
+ so with the phone-override badge that exists today.
+
+The mockup also shows an **Appears** group (with the slide, or on a
+press) and, on the slide, **In the talk** (always, or full mode only).
+Those belong to the steps slice (Β§9) and are **not built here**. They
+are in the mockup to show where they will go.
+
+### 4.3 The slide's and the deck's options
+
+- **Slide**: template; layout (flow or canvas); background;
+ **On a phone** (Β§6).
+- **Deck**, under a rule: theme; heading font; accent colour.
+- The deck's title is edited by clicking it in the bar (E10).
+- "Unused images" is an item in the File menu that opens what the
+ inspector's row opens today (E10).
+
+---
+
+## 5. Notes
+
+- **Open**, the notes are a floating card along the foot of the desk,
+ inset from its edges, in the same style as the inspector. It has the
+ word Notes, an **Γ—** that closes it, and the notes themselves, which
+ are the same editable field as today, bound the same way.
+- **It keeps clear of the inspector**: it stops short of the card's
+ width while the card shows. The stage reserves the notes' height,
+ so a frame is never under them.
+- **Its height is adjustable** by dragging its top edge, between two
+ lines and half the desk; taller notes scroll inside it. The height
+ is remembered.
+- **Closed**, the notes are a small icon button in the desk's bottom
+ start corner. A dot on it means this slide has notes. Its accessible
+ name says so in words, never by the dot alone.
+- **Show notes** stays in the View menu and does the same thing as
+ the Γ— and the icon. The switch above the stage goes.
+- Open or closed is remembered as the switch's state is today.
+
+---
+
+## 6. The phone view, and On a phone
+
+### 6.1 The frame
+
+In phone view the stage shows a phone: a frame of a phone's
+proportions, as tall as the stage allows. It is no longer a card the
+height of its content. In Both, the desktop frame and the phone frame
+sit side by side.
+
+### 6.2 On a phone
+
+Each slide says how it shows on a phone. Three values:
+
+| Value | On a phone the slide is… | Today |
+|---|---|---|
+| **Document** | reflowed into the reading column; the next slide follows it down the page | flow slides always; canvas slides when `phone` is `reflow` |
+| **Letterboxed** | the whole 16:9 slide, scaled to the phone's width | canvas slides by default (`inherit`) |
+| **Arranged** | a tall page of its own, each box placed for the phone | does not exist |
+
+- The default is today's behaviour: a flow slide is Document, a
+ canvas slide is Letterboxed. A deck made before this slice looks
+ the same after it.
+- **Letterboxed becomes available to flow slides.** The viewer at
+ phone width draws that slide's desktop rendering scaled to fit,
+ as it does for a canvas slide.
+- **Arranged is new.** The slide gets a second frame, a tall one, and
+ each box may have a place in it. In the editor, with the phone frame
+ showing, a box drags and resizes in that frame and nowhere else.
+ A box with no place of its own yet is put at the foot of the page
+ in reading order.
+
+### 6.3 What this reverses, and its cost
+
+Ruling 2 of the main spec (Paul, 2026-09-07) chose reflow and
+scale-to-fit and rejected "a hand-authored second layout per slide".
+Arranged is that, for the slides that opt in. Paul asked for it on
+16 November knowing so. The cost is drift: a slide's phone
+arrangement can fall behind when its desktop side changes. This slice
+contains it by placing a new box at the foot of the phone page (never
+hiding it), and the later check slice (Β§9) reports arranged slides
+whose boxes were placed that way.
+
+### 6.4 In the phone frame
+
+The frame shows what the viewer serves at phone width for this slide
+and its setting:
+
+- **Document**: this slide, then the slides after it, dimmed, since a
+ phone reader scrolls on into them (E11). Only this slide is
+ editable.
+- **Letterboxed**: the 16:9 slide scaled to the frame's width,
+ centred.
+- **Arranged**: the tall page.
+
+### 6.5 Two steps
+
+On a phone is a model change (a slide's `phone` gains values; a box's
+phone override gains a place in the tall frame; the viewer learns two
+renderings). The rest of this design is the editor's own chrome. So
+this slice is built in two steps, each shippable:
+
+1. **The chrome** (Β§2 to Β§5, Β§6.1, Β§6.4 for today's two behaviours).
+ The On a phone control appears with the values that work today for
+ that slide: a canvas slide has Document and Letterboxed; a flow
+ slide has Document only.
+2. **The phone settings** (Β§6.2): Letterboxed for flow slides, then
+ Arranged. Both through the core's ops under the fixtures rule,
+ with the drive API and the agent verbs taking the same values, so
+ a person and an agent can still never do different things.
+
+---
+
+## 7. Where the shared parts live
+
+Docs' inspector, its segmented controls and its desk colour are rules
+inside Docs' own page today. This slice puts the parts Slides needs
+into estilo, as named parts beside `chrome` and `menu`, with estilo's
+float tokens (`--estilo-float-radius` and its padding):
+
+- the floating card and its labelled groups;
+- the segmented control (filled, with the tinted and outlined
+ selected state) and the icon toggle;
+- the desk colour, as a token both apps read.
+
+Slides is the first user. Docs keeps its own rules and is moved onto
+the shared parts later, as its own change, checked against Docs'
+tests. Until then the two must look the same, and a visual check in
+this slice holds that (Β§8).
+
+---
+
+## 8. Constraints and testing
+
+Constraints, from `AGENTS.md`, that bind this slice in particular:
+
+- **The stage is not a second renderer.** The phone frame and the
+ desktop frame show the server's HTML for that slide and viewport.
+- **Never a flash.** The card, the notes and the frames appear in
+ their final layout; nothing moves when a font arrives.
+- **Every string is a catalog key**, in every locale the editor has.
+ New strings here: Format, Notes, Close notes, Show notes (this
+ slide has notes), Desktop, Phone, Both side by side, On a phone,
+ Document, Letterboxed, Arranged. Removed: the Inspector title and
+ its bar label.
+- **Accessible by construction.** Icon-only buttons have names; the
+ view switch is radios; the notes' dot is never the only signal;
+ focus order is bar, strip, stage, notes, inspector; the card and the
+ notes are reachable and operable from the keyboard; WCAG 2.2 AA
+ contrast on the grey desk.
+- **Icons are lucide, inline**, from `internal/slides/icons`.
+- **Vendored components where one exists** (`AGENTS.md`, UX
+ conventions): do not hand-roll a field or a switch.
+
+Tests, each written before the code it holds:
+
+- The page does not scroll: with a deck of forty slides, long notes
+ and every option showing, the document's scroll height equals the
+ window's, at 1280Γ—720 and 1920Γ—1080.
+- The card shows the options of the selection and no others, for
+ each kind of box, for nothing selected, and after each change of
+ selection; and does not change on another collaborator's selection.
+- Every option reachable before this slice is reachable after it
+ (a list of today's fields against the card's, by name).
+- The marks in the card toggle the same marks, with the same
+ shortcuts and the same disabled states, as the pill did.
+- Notes: open, close by Γ—, reopen by the icon, by the View menu and
+ by its shortcut; the dot is there exactly when the slide has notes;
+ typing in the floating card saves through the same queue (the
+ existing saving tests pass unchanged against it).
+- New slide stays in view with forty slides in the strip.
+- The view switch: one of three, by pointer and by keyboard; the
+ frames that show for each.
+- The phone frame is a phone's proportions and no taller than the
+ stage; for Document it shows the following slides.
+- On a phone, step 2: each value renders in the viewer at phone width
+ as Β§6.2 says; a deck made before the slice renders byte for byte
+ as it did; an arranged slide's new box is at the foot of the page;
+ the same three values through the drive API.
+- The deck list's cover is centred (the picture's content box is
+ centred in the cover, by measurement).
+- Slides' card beside Docs' card, in the browser gate: same radius,
+ shadow, group label size and segmented control metrics.
+
+---
+
+## 9. Where this sits
+
+Paul chose to revise the 11 November design
+(`design/presenter-and-rehearsal`, draft 4, unapproved) into one
+design for the whole of "this talk could have been made in Slides",
+with the HalfStack deck as its test. That revision is not this
+document. Its order of work, agreed in conversation:
+
+1. **This slice**: the editor, tidied.
+2. Steps and core/full, and the presenter.
+3. Scenes and video. Decided so far: a scene is code an agent writes,
+ run in a sealed frame with no network, told only the step, the
+ size and whether to reduce motion; presses stay with Slides; it is
+ stored as a fixed bundle with a named author; and it carries a
+ still picture per step, captured in the author's browser, which
+ the PDF, thumbnails, the phone view and the checks use.
+4. Rehearsal and requests.
+5. Checks, a storyboard, and the talk as prose (all the notes in
+ order, read-only, with word count and minutes; notes readable and
+ writable in one go by an agent; no "script" feature).
+6. Layouts.
+7. Offline.
+
+---
+
+## 10. Left to the builder
+
+- Reading Docs' inspector, bar and desk rules (`internal/docs/views/
+ show.html` at Docs' `origin/main`) and matching them; the exact
+ desk colour comes from there, not from the mockup, whose grey was
+ matched by eye.
+- The card's exact width, the notes' default height, the phone
+ frame's proportions and corner radius.
+- How the card and Format behave under 64rem, by reading Docs.
+- Which of estilo's existing parts the pills and toggles already are,
+ and what is genuinely new there.
+- The cause of the off-centre cover.
+- The tall frame's proportions for Arranged, and the op and the
+ override's shape, within Β§2.5 of the main spec and the fixtures
+ rule.
+
+## 11. Open questions for Paul
+
+1. **Arranged, now or later?** Step 2 of Β§6.5 can stop after
+ Letterboxed for flow slides, which is small, and leave Arranged
+ for when a deck needs it. Recommendation: build Letterboxed now and
+ Arranged with the scenes slice, when tall pages get their first
+ real use.
+2. **One slide to a screen on phones?** Letterboxed and Arranged
+ slides each fill a phone screen, while Document slides run on as a
+ page. In a deck that mixes them, a reader scrolls through both.
+ Is that right, or should a deck be one or the other throughout?
+3. **Frames with their own settings.** You asked whether the desktop
+ and phone views could have settings of their own, as artboards do
+ in Figma. A mockup exists (click the Desktop frame, the Phone
+ frame, a box, or the desk, and the card follows). You then said the
+ single Slide card with On a phone in it was fine for now. It is
+ left out of this slice. Keep it out, or add it to a later one?
diff --git a/docs/superpowers/specs/2026-11-16-editor-tidy-mockup.html b/docs/superpowers/specs/2026-11-16-editor-tidy-mockup.html
new file mode 100644
index 0000000..74a9ac3
--- /dev/null
+++ b/docs/superpowers/specs/2026-11-16-editor-tidy-mockup.html
@@ -0,0 +1,297 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<title>Slides editor: tidy-up mockup</title>
+<style>
+ :root{
+ --bg:#f5f6f8; --canvas:#e1e5ee; --surface:#fff; --surface-2:#eceef2; --line:#d5d9e2;
+ --text:#262a33; --muted:#565c69; --faint:#626875;
+ --accent:#924b00; --accent-soft:#feece0; --paper:#f9f6ef;
+ --ui:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
+ }
+ *{box-sizing:border-box}
+ html,body{margin:0;height:100%;background:#1b1d22;font-family:var(--ui);color:var(--text)}
+ [hidden]{display:none!important}
+ .cap{height:44px;display:flex;align-items:center;gap:16px;padding:0 16px;color:#dfe2e8;font-size:14px}
+ .cap b{color:#fff}
+ .cap .tabs{margin-left:auto;display:flex;gap:6px}
+ .cap button{font:inherit;color:#dfe2e8;background:#2a2d35;border:1px solid #3a3e48;border-radius:6px;padding:5px 12px;cursor:pointer}
+ .cap button[aria-pressed=true]{background:#fff;color:#1b1d22;border-color:#fff}
+ .app{height:calc(100% - 44px);display:none}
+ .app.on{display:grid}
+ svg.i{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
+
+ /* ---- the editor: bar, strip, canvas. The inspector floats over the canvas, as in Docs */
+ .ed{position:relative;grid-template-rows:60px minmax(0,1fr);grid-template-columns:188px minmax(0,1fr)}
+ .bar{grid-column:1/-1;display:flex;align-items:center;gap:10px;padding:0 16px;background:var(--surface);border-bottom:1px solid var(--line)}
+ .logo{width:30px;height:30px;border-radius:8px;background:var(--accent);display:grid;place-items:center;color:#fff;font-size:14px;font-weight:700}
+ .title{font-weight:650;font-size:15.5px;line-height:1.25}
+ .menus{font-size:13px;color:var(--muted);display:flex;gap:13px}
+ .bar .sp{flex:1}
+ .saved{font-size:13px;color:var(--faint);margin-right:4px}
+ .hist{display:flex;background:var(--surface-2);border-radius:999px;padding:2px}
+ .hist span{width:32px;height:30px;display:grid;place-items:center;color:var(--faint)}
+ .btn{font:inherit;font-size:13.5px;font-weight:600;border-radius:999px;padding:8px 16px;border:1px solid var(--line);background:var(--surface);color:var(--text);cursor:pointer;display:inline-flex;align-items:center;gap:7px}
+ .btn.pri{background:var(--accent);border-color:var(--accent);color:#fff;box-shadow:0 1px 2px rgb(0 0 0/.18),0 3px 8px rgb(0 0 0/.12)}
+ .btn.fmt{border-color:transparent;background:var(--surface-2);color:var(--muted)}
+ .btn.fmt[aria-pressed=true]{background:var(--accent-soft);color:var(--accent)}
+ .btn.fmt svg{width:16px;height:16px}
+ .who{width:30px;height:30px;border-radius:50%;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;font-size:12px;font-weight:700}
+
+ /* the strip: its own surface; New slide pinned at its foot */
+ .strip{background:var(--surface);border-right:1px solid var(--line);display:grid;grid-template-rows:minmax(0,1fr) auto;min-height:0}
+ .strip ol{list-style:none;margin:0;padding:12px 12px 4px;overflow:auto;display:grid;gap:10px;align-content:start}
+ .strip li{display:grid;grid-template-columns:18px 1fr;gap:6px;align-items:start;font-size:12px;color:var(--faint)}
+ .th{aspect-ratio:16/9;background:var(--paper);border:1px solid var(--line);border-radius:5px;display:grid;place-items:center;text-align:center;padding:8px}
+ .th span{font:600 12px/1.15 Georgia,serif;color:#222}
+ li.cur .th{outline:2px solid var(--accent);outline-offset:1px}
+ .add{display:flex;padding:10px 12px;border-top:1px solid var(--line);background:var(--surface)}
+ .add .btn{padding:7px 12px}
+ .add .btn:first-child{flex:1;justify-content:center;border-radius:999px 0 0 999px}
+ .add .ico{width:38px;padding:7px 10px 7px 8px;border-radius:0 999px 999px 0;margin-left:-1px;justify-content:center}
+ .add .ico svg{width:12px;height:12px;stroke:var(--muted);fill:none;stroke-width:2.2}
+
+ /* the canvas: Docs' grey desk */
+ .desk{position:relative;background:var(--canvas);display:grid;grid-template-rows:auto minmax(0,1fr);min-width:0;min-height:0}
+ .tools{display:flex;align-items:center;gap:10px;padding:14px 20px 0}
+ .pill{display:flex;gap:2px;background:var(--surface);border:1px solid var(--line);border-radius:9px;padding:3px}
+ .pill button{font:inherit;min-width:34px;height:30px;padding:0 7px;border:0;border-radius:6px;background:none;color:var(--muted);cursor:pointer;display:grid;place-items:center}
+ .pill button[aria-pressed=true]{background:var(--accent-soft);color:var(--accent)}
+ .stage{display:flex;gap:28px;align-items:center;justify-content:center;padding:20px;min-height:0;overflow:auto}
+ .desk.carded .stage{padding-right:316px}
+ .slide{flex:0 1 760px;aspect-ratio:16/9;background:var(--paper);border-radius:3px;box-shadow:0 0 0 1px rgb(0 0 0/.08),0 1px 2px rgb(0 0 0/.12),0 10px 28px rgb(0 0 0/.10);
+ display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:48px;text-align:center;min-width:0}
+ .slide h1{margin:0;font:700 clamp(22px,3.2vw,44px)/1.08 Georgia,serif;color:#1d1b17;padding:2px 6px;border-radius:2px;cursor:text}
+ .slide p{margin:0;font-size:clamp(12px,1.45vw,20px);line-height:1.3;color:#2a2823;max-width:28ch;padding:2px 6px;border-radius:2px;cursor:text}
+ .slide .sel{outline:2px solid var(--accent)}
+ .phone{flex:none;height:min(100%,560px);aspect-ratio:9/19.5;background:var(--paper);border-radius:22px;box-shadow:0 0 0 1px rgb(0 0 0/.1),0 0 0 6px #fff,0 0 0 7px rgb(0 0 0/.12),0 12px 28px rgb(0 0 0/.12);
+ padding:26px 16px;display:flex;flex-direction:column;gap:10px;text-align:center;overflow:hidden}
+ .phone{gap:0}
+ .phone h1{margin:0;font:700 19px/1.12 Georgia,serif;color:#1d1b17}
+ .phone h2{margin:0;font:700 16px/1.15 Georgia,serif;color:#1d1b17}
+ .phone p{margin:8px 0 0;font-size:12.5px;line-height:1.4;color:#2a2823}
+ /* on a phone a deck reads as a document: this slide, then the ones after it (dimmed here: they are not the one being edited) */
+ .pcur{padding-bottom:22px;outline:2px solid transparent}
+ /* letterboxed: the 16:9 slide, whole, scaled to the phone's width and centred */
+ .phone:has(.pfit:not([hidden])),.phone:has(.pown:not([hidden])){padding:0}
+ .pfit{height:100%;display:grid;align-content:center;background:#17181c}
+ .mini{aspect-ratio:16/9;background:var(--paper);display:grid;align-content:center;justify-items:center;gap:5px;padding:12px;text-align:center}
+ .mini b{font:700 14px/1.1 Georgia,serif;color:#1d1b17}
+ .mini span{font-size:12px;line-height:1.35;color:#2a2823;max-width:24ch}
+ /* arranged: a tall page of its own, each box placed for the phone */
+ .pown{position:relative;height:100%}
+ .pown .placed{position:absolute;left:18px;right:18px;margin:0;outline:1.5px dashed rgb(146 75 0/.55);outline-offset:5px;border-radius:2px}
+ .pown h1.placed{top:24%;font-size:30px;line-height:1.05;text-align:left}
+ .pown p.placed{top:58%;font-size:15px;line-height:1.4;text-align:left}
+ .pnext{padding:20px 0;border-top:1px solid rgb(0 0 0/.12);opacity:.45}
+
+ /* the notes: a floating card at the foot of the canvas, like the inspector's;
+ closed, one small icon in the canvas's corner */
+ .notes{position:absolute;left:20px;right:20px;bottom:16px;z-index:3;background:var(--surface);border-radius:14px;
+ box-shadow:0 0 0 1px rgb(0 0 0/.06),0 2px 6px rgb(0 0 0/.08),0 14px 34px rgb(0 0 0/.14)}
+ .desk.carded .notes{right:316px}
+ .notes.shut{display:none}
+ .notes .grip{height:10px;cursor:ns-resize;display:grid;place-items:center}
+ .notes .grip::before{content:"";width:36px;height:3px;border-radius:2px;background:var(--line)}
+ .notes .nh{display:flex;align-items:center;gap:8px;padding:2px 8px 4px 16px;font-size:12.5px;font-weight:650;color:var(--muted)}
+ .notes .nh button{margin-left:auto;width:30px;height:28px;border:0;border-radius:8px;background:none;color:var(--muted);cursor:pointer;display:grid;place-items:center}
+ .notes .nh button:hover{background:var(--surface-2)}
+ .notes .nh svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round}
+ .notes .nb{padding:0 16px 14px;font-size:14.5px;line-height:1.5;height:76px;overflow:auto}
+ .desk.noted .stage{padding-bottom:152px}
+ .nchip{position:absolute;left:20px;bottom:16px;width:40px;height:40px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--muted);
+ cursor:pointer;display:grid;place-items:center;box-shadow:0 1px 2px rgb(0 0 0/.08),0 4px 12px rgb(0 0 0/.08)}
+ .nchip i{position:absolute;right:-4px;top:-4px;width:11px;height:11px;border-radius:50%;background:var(--accent);border:2px solid var(--canvas)}
+
+ /* the inspector: Docs' floating card. One thing at a time, by what is selected;
+ it stops short of the foot of the canvas and scrolls inside itself */
+ .card{position:absolute;right:16px;top:16px;z-index:4;width:284px;max-height:calc(100% - 32px);overflow:auto;background:var(--surface);
+ border-radius:14px;padding:14px 14px 16px;display:grid;gap:14px;box-shadow:0 0 0 1px rgb(0 0 0/.06),0 2px 6px rgb(0 0 0/.08),0 14px 34px rgb(0 0 0/.14)}
+ .g{display:grid;gap:7px}
+ .g > label{font-size:12.5px;font-weight:650;color:var(--muted)}
+ .sel-box{height:34px;border:1px solid var(--line);border-radius:8px;display:flex;align-items:center;justify-content:space-between;padding:0 10px;font-size:13.5px;color:var(--text);background:var(--surface)}
+ .sel-box::after{content:"";width:7px;height:7px;border-right:1.8px solid var(--muted);border-bottom:1.8px solid var(--muted);transform:rotate(45deg) translateY(-2px)}
+ .two{display:grid;grid-template-columns:1fr 84px;gap:8px}
+ .seg{display:flex;gap:2px;border-radius:8px;overflow:hidden}
+ .seg span{flex:1;min-height:34px;padding:6px 8px;display:grid;place-items:center;text-align:center;font-size:13px;color:var(--text);background:var(--surface-2)}
+ .seg span.on{background:var(--accent-soft);color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);border-radius:8px 0 0 8px;font-weight:600}
+ .seg span.on:not(:first-child){border-radius:0}
+ .seg span.on:last-child{border-radius:0 8px 8px 0}
+ #ph span{font-size:12.5px;padding:6px 4px;cursor:pointer}
+ .seg b{font:700 15px Georgia,serif}.seg em{font:italic 15px Georgia,serif}
+ .sw{height:34px;border:1px solid var(--line);border-radius:8px;padding:4px;display:flex}
+ .sw i{flex:1;border-radius:5px;background:var(--accent)}
+ .rule{height:1px;background:var(--line);margin:2px -14px}
+
+ /* the layout picker: opens upward from the chevron beside New slide */
+ .lay{position:absolute;left:12px;bottom:58px;z-index:5;width:336px;padding:12px;background:var(--surface);border-radius:12px;
+ box-shadow:0 0 0 1px rgb(0 0 0/.06),0 2px 6px rgb(0 0 0/.1),0 14px 36px rgb(0 0 0/.16);display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
+ .lay h2{grid-column:1/-1;margin:0 0 2px;font-size:12.5px;font-weight:650;color:var(--muted)}
+ .lay button{font:inherit;font-size:12.5px;color:var(--text);background:none;border:1px solid transparent;border-radius:8px;padding:6px;cursor:pointer;display:grid;gap:6px;text-align:left}
+ .lay button.next{border-color:var(--accent);background:var(--accent-soft)}
+ .lay svg{width:100%;aspect-ratio:16/9;background:var(--paper);border:1px solid var(--line);border-radius:4px;fill:#3a3731;stroke:none}
+ .lay svg .q{fill:#b9b4a8}
+
+ /* ---- the deck list */
+ .list{grid-template-rows:60px minmax(0,1fr)}
+ .decks{background:var(--canvas);padding:44px 120px;overflow:auto}
+ .decks h1{margin:0 0 28px;font-size:34px;letter-spacing:-.02em}
+ .dk{width:250px}
+ .dk .th{border-radius:8px;box-shadow:0 1px 2px rgb(0 0 0/.08),0 6px 18px rgb(0 0 0/.07);padding:12px}
+ .dk .th span{font-size:15px}
+ .dk .th small{display:block;margin-top:5px;font:400 12px/1.3 var(--ui);color:#333}
+ .dk h2{margin:12px 0 2px;font-size:14.5px}
+ .dk p{margin:0;font-size:12.5px;color:var(--muted);line-height:1.5}
+</style>
+</head>
+<body>
+<div class="cap">
+ <span><b>Slides editor, tidied.</b> New: β€œOn a phone” in the Slide card (Document, Letterboxed, Arranged). Click each to see the phone change.</span>
+ <span class="tabs"><button data-tab="ed" aria-pressed="true">Editor</button><button data-tab="list" aria-pressed="false">Deck list</button></span>
+</div>
+
+<div class="app ed on" id="ed">
+ <header class="bar">
+ <div class="logo">S</div>
+ <div><div class="title">Welcome to Slides</div><div class="menus"><span>File</span><span>Edit</span><span>Insert</span><span>Slide</span><span>View</span><span>Help</span></div></div>
+ <span class="sp"></span><span class="saved">Saved</span>
+ <div class="hist"><span><svg class="i" viewBox="0 0 24 24"><path d="M9 14 4 9l5-5M4 9h10a6 6 0 0 1 0 12h-3"/></svg></span><span><svg class="i" viewBox="0 0 24 24"><path d="m15 14 5-5-5-5M20 9H10a6 6 0 0 0 0 12h3"/></svg></span></div>
+ <button class="btn fmt" id="fmt" aria-pressed="true"><svg class="i" viewBox="0 0 24 24"><path d="M4 20h4L19 9l-4-4L4 16zM13 7l4 4"/></svg>Format</button>
+ <button class="btn">Share…</button><button class="btn pri">Present</button>
+ <div class="who">P</div>
+ </header>
+
+ <nav class="strip">
+ <ol>
+ <li class="cur">1<div class="th"><span>Welcome to hello Slides</span></div></li>
+ <li>2<div class="th"><span>One idea a slide</span></div></li>
+ <li>3<div class="th"><span>Two columns</span></div></li>
+ <li>4<div class="th"><span>A picture</span></div></li>
+ <li>5<div class="th"><span>A quote</span></div></li>
+ <li>6<div class="th"><span>A list</span></div></li>
+ <li>7<div class="th"><span>Canvas</span></div></li>
+ <li>8<div class="th"><span>Thank you</span></div></li>
+ </ol>
+ <div class="add"><button class="btn">+ New slide</button><button class="btn ico" id="laybtn" title="Choose a layout" aria-label="Choose a layout"><svg viewBox="0 0 12 12"><path d="M2 4l4 4 4-4"/></svg></button></div>
+ </nav>
+
+ <div class="lay" id="lay" hidden><h2>Choose a layout</h2>
+ <button><svg viewBox="0 0 80 45" aria-hidden="true"><rect x="18" y="19" width="44" height="6" rx="1"/><rect class="q" x="26" y="29" width="28" height="3" rx="1"/></svg>Title</button>
+ <button class="next"><svg viewBox="0 0 80 45" aria-hidden="true"><rect x="8" y="7" width="34" height="5" rx="1"/><rect class="q" x="8" y="17" width="60" height="3" rx="1"/><rect class="q" x="8" y="23" width="54" height="3" rx="1"/><rect class="q" x="8" y="29" width="58" height="3" rx="1"/></svg>Title and text</button>
+ <button><svg viewBox="0 0 80 45" aria-hidden="true"><rect x="8" y="7" width="34" height="5" rx="1"/><circle cx="10" cy="18.5" r="1.5"/><rect class="q" x="15" y="17" width="48" height="3" rx="1"/><circle cx="10" cy="24.5" r="1.5"/><rect class="q" x="15" y="23" width="42" height="3" rx="1"/><circle cx="10" cy="30.5" r="1.5"/><rect class="q" x="15" y="29" width="46" height="3" rx="1"/></svg>Title and list</button>
+ <button><svg viewBox="0 0 80 45" aria-hidden="true"><rect x="8" y="7" width="34" height="5" rx="1"/><rect class="q" x="8" y="17" width="29" height="3" rx="1"/><rect class="q" x="8" y="23" width="26" height="3" rx="1"/><rect class="q" x="43" y="17" width="29" height="3" rx="1"/><rect class="q" x="43" y="23" width="25" height="3" rx="1"/></svg>Two columns</button>
+ <button><svg viewBox="0 0 80 45" aria-hidden="true"><rect x="8" y="19" width="40" height="7" rx="1"/></svg>Section</button>
+ <button><svg viewBox="0 0 80 45" aria-hidden="true"><rect class="q" x="0" y="0" width="80" height="45"/><rect x="8" y="33" width="30" height="5" rx="1"/></svg>Picture</button>
+ <button><svg viewBox="0 0 80 45" aria-hidden="true"><rect x="14" y="14" width="52" height="4" rx="1"/><rect x="14" y="21" width="44" height="4" rx="1"/><rect class="q" x="14" y="30" width="20" height="3" rx="1"/></svg>Quote</button>
+ <button><svg viewBox="0 0 80 45" aria-hidden="true"></svg>Blank</button>
+ </div>
+
+ <main class="desk carded noted" id="deskpane">
+ <div class="tools">
+ <div class="pill">
+ <button data-view="desktop" aria-pressed="true" title="Desktop" aria-label="Desktop"><svg class="i" viewBox="0 0 24 24"><rect x="3" y="4" width="18" height="12" rx="2"/><path d="M8 20h8M12 16v4"/></svg></button>
+ <button data-view="phone" aria-pressed="false" title="Phone" aria-label="Phone"><svg class="i" viewBox="0 0 24 24"><rect x="7" y="2.5" width="10" height="19" rx="2.5"/><path d="M11 18.5h2"/></svg></button>
+ <button data-view="both" aria-pressed="false" title="Both, side by side" aria-label="Both, side by side"><svg class="i" style="width:23px" viewBox="0 0 30 24"><rect x="2" y="5" width="16" height="11" rx="2"/><path d="M6 20h8M10 16v4"/><rect x="21" y="7" width="7" height="13" rx="1.8"/></svg></button>
+ </div>
+ </div>
+ <div class="stage" id="stage">
+ <section class="slide" id="desk"><h1 data-block="Heading">Welcome to hello Slides</h1><p data-block="Text">Eight slides that show what a deck is made of. Open the notes on each one.</p></section>
+ <section class="phone" id="phone" hidden>
+ <div class="pv" data-pv="doc"><div class="pcur"><h1>Welcome to hello Slides</h1><p>Eight slides that show what a deck is made of. Open the notes on each one.</p></div>
+ <div class="pnext"><h2>One idea a slide</h2><p>A heading and a few lines under it. On a phone the slides follow one another, like a document.</p></div>
+ <div class="pnext"><h2>Two columns</h2><p>Side by side on a desktop. One after the other here.</p></div>
+ <div class="pnext"><h2>A picture</h2><p>Full width, with its caption under it.</p></div></div>
+ <div class="pv pfit" data-pv="fit" hidden><div class="mini"><b>Welcome to hello Slides</b><span>Eight slides that show what a deck is made of. Open the notes on each one.</span></div></div>
+ <div class="pv pown" data-pv="own" hidden><h1 class="placed">Welcome to hello Slides</h1><p class="placed">Eight slides that show what a deck is made of. Open the notes on each one.</p></div>
+ </section>
+ </div>
+
+ <!-- the floating inspector: one of three, by what is selected -->
+ <aside class="card" id="card">
+ <div id="c-box" hidden style="display:grid;gap:14px">
+ <div class="g"><label>Style</label><div class="sel-box" id="style">Title</div>
+ <div class="two"><div class="sel-box" id="font">Theme’s heading</div><div class="sel-box" id="size">Large</div></div></div>
+ <div class="g"><label>Text</label><div class="seg"><span><b>B</b></span><span><em>I</em></span><span data-for="Text">&lt;&gt;</span><span data-for="Text"><svg class="i" viewBox="0 0 24 24"><path d="M4 20h7M14 4l6 6-8 8H8v-4z"/></svg></span><span><svg class="i" viewBox="0 0 24 24"><path d="M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1"/></svg></span></div></div>
+ <div class="g"><label>Alignment</label><div class="seg"><span><svg class="i" viewBox="0 0 24 24"><path d="M4 6h16M4 12h10M4 18h14"/></svg></span><span class="on"><svg class="i" viewBox="0 0 24 24"><path d="M4 6h16M7 12h10M5 18h14"/></svg></span><span><svg class="i" viewBox="0 0 24 24"><path d="M4 6h16M10 12h10M6 18h14"/></svg></span></div></div>
+ <div class="g"><label>Colour</label><div class="sw"><i style="background:#1d1b17"></i></div></div>
+ <div class="g"><label>Appears</label><div class="seg"><span class="on">With the slide</span><span>On a press</span></div></div>
+ </div>
+ <div id="c-slide" style="display:grid;gap:14px">
+ <div class="g"><label>Slide</label><div class="sel-box">Title</div><div class="seg"><span class="on">Flow</span><span>Canvas</span></div></div>
+ <div class="g"><label>Background</label><div class="sel-box">Theme’s</div></div>
+ <div class="g"><label>In the talk</label><div class="seg"><span class="on">Always</span><span>Full mode only</span></div></div>
+ <div class="g"><label>On a phone</label><div class="seg" id="ph"><span class="on" data-ph="doc">Document</span><span data-ph="fit">Letterboxed</span><span data-ph="own">Arranged</span></div></div>
+ <div class="rule"></div>
+ <div class="g"><label>Deck</label><div class="sel-box">Paper</div><div class="two"><div class="sel-box">Theme’s heading</div><div class="sw"><i></i></div></div></div>
+ </div>
+ </aside>
+
+ <section class="notes" id="notes">
+ <div class="grip" title="Drag to resize"></div>
+ <div class="nh">Notes<button id="nshut" title="Close notes" aria-label="Close notes"><svg viewBox="0 0 14 14"><path d="M3 3l8 8M11 3l-8 8"/></svg></button></div>
+ <div class="nb">The <b>title</b> template: one heading and one supporting line, centred. It is what a new deck opens on.</div>
+ </section>
+ <button class="nchip" id="nchip" hidden title="Show notes (this slide has notes)" aria-label="Show notes"><svg class="i" viewBox="0 0 24 24"><path d="M5 4h14v12H10l-5 4z"/><path d="M9 8.5h6M9 11.5h4"/></svg><i></i></button>
+ </main>
+</div>
+
+<div class="app list" id="list">
+ <header class="bar"><div class="logo">S</div><div class="title">Slides</div><span class="sp"></span><button class="btn pri">+ New deck</button><div class="who">P</div></header>
+ <div class="decks">
+ <h1>Decks</h1>
+ <div class="dk">
+ <div class="th"><div><span>Welcome to hello Slides</span><small>Eight slides that show what a deck is made of.</small></div></div>
+ <h2>Welcome to Slides</h2><p>2 days ago<br>8 slides Β· by paul@tito.io</p>
+ </div>
+ </div>
+</div>
+
+<script>
+ const $ = id => document.getElementById(id);
+ document.querySelectorAll('[data-tab]').forEach(b => b.onclick = () => {
+ document.querySelectorAll('[data-tab]').forEach(x => x.setAttribute('aria-pressed', x === b));
+ document.querySelectorAll('.app').forEach(a => a.classList.toggle('on', a.id === b.dataset.tab));
+ });
+ // the view: desktop, phone or both side by side; one of the three
+ document.querySelectorAll('[data-view]').forEach(b => b.onclick = () => {
+ document.querySelectorAll('[data-view]').forEach(x => x.setAttribute('aria-pressed', String(x === b)));
+ $('desk').hidden = b.dataset.view === 'phone'; $('phone').hidden = b.dataset.view === 'desktop';
+ });
+ // on a phone, this slide reads as a document, is letterboxed, or has an arrangement of its own
+ document.querySelectorAll('[data-ph]').forEach(b => b.onclick = () => {
+ document.querySelectorAll('[data-ph]').forEach(x => x.classList.toggle('on', x === b));
+ document.querySelectorAll('[data-pv]').forEach(x => { x.hidden = x.dataset.pv !== b.dataset.ph; });
+ if ($('phone').hidden) document.querySelector('[data-view=both]').click();
+ });
+ // notes fold to an icon
+ const notes = open => { $('notes').classList.toggle('shut', !open); $('nchip').hidden = open; $('deskpane').classList.toggle('noted', open); };
+ $('nshut').onclick = () => notes(false);
+ $('nchip').onclick = () => notes(true);
+ // the layouts
+ $('laybtn').onclick = e => { e.stopPropagation(); $('lay').hidden = !$('lay').hidden; };
+ document.addEventListener('click', e => { if (!$('lay').contains(e.target)) $('lay').hidden = true; });
+ // Format shows and hides the card, as in Docs
+ $('fmt').onclick = () => {
+ const on = $('fmt').getAttribute('aria-pressed') !== 'true';
+ $('fmt').setAttribute('aria-pressed', String(on)); $('card').hidden = !on; $('deskpane').classList.toggle('carded', on);
+ };
+ // the card follows the selection: a box's own options, or the slide's and the deck's
+ const KIND = { Heading: ['Title', 'Theme’s heading', 'Large'], Text: ['Body text', 'Theme’s body', 'Large'] };
+ const select = el => {
+ document.querySelectorAll('.sel').forEach(x => x.classList.remove('sel'));
+ $('c-box').hidden = !el; $('c-slide').hidden = !!el;
+ if (!el) return;
+ el.classList.add('sel');
+ const [style, font, size] = KIND[el.dataset.block];
+ $('style').textContent = style; $('font').textContent = font; $('size').textContent = size;
+ document.querySelectorAll('#c-box [data-for]').forEach(x => { x.hidden = x.dataset.for !== el.dataset.block; });
+ };
+ document.querySelectorAll('[data-block]').forEach(el => el.onclick = e => { e.stopPropagation(); select(el); });
+ $('stage').onclick = () => select(null);
+ $('card').onclick = e => e.stopPropagation();
+ $('notes').onclick = e => e.stopPropagation();
+</script>
+</body>
+</html>