Skip to content

feat: details and languages - #18

Open
victorbahl wants to merge 2 commits into
roaldnefs:mainfrom
victorbahl:feat/details-and-languages
Open

victorbahl wants to merge 2 commits into
roaldnefs:mainfrom
victorbahl:feat/details-and-languages

Conversation

@victorbahl

Copy link
Copy Markdown
Contributor

Hey Roald, a bigger one, in two commits you can take separately: details and languages.

What I like about a deck being plain HTML is that a slide doesn't have to stop at what a slide usually is. These are the two things I missed most.

Details: a "click for more"

I keep few words on my slides, and the rest for when someone asks:

<p>… <span data-detail="cost">it costs less</span> …</p>
<aside class="detail" id="cost">
  <h2>Where the saving comes from</h2>
</aside>
  • A click opens the detail, and so does Enter. Esc, ←, the close button or a click outside closes it; → closes it and goes on. The slide and its number don't move.
  • The presenter view follows it and shows its notes, or the slide's. Print gives each detail a page after its slide.
  • In the edit view details are smaller thumbnails under their slide, edited like a slide.
  • A public copy keeps them, without their notes or the skipped ones.
  • The engine only shows and hides a detail, the theme gives it its shape. Only an <aside class="detail"> is one.

Languages: one file, not one per language

My decks are usually in English, but sometimes my audience prefers them in their own language, and two files drift apart:

<html lang="en" data-langs="en fr">
…
<p lang="en">One line</p>
<p lang="fr">Une ligne</p>
<p>In every language</p>
  • L, a globe near the bottom-left corner or a data-set-lang button switches. The choice is kept per deck, and ?lang=fr sets it.
  • A text without a version in the language shown keeps the first one, so a slide has no holes. A build with a version per language is one press.
  • The notes, the presenter view, the page title and the print follow. A public copy keeps all the languages.
  • In the edit view you edit the language shown. Deleting, duplicating or moving a text does it in every language, and texts without a version are dimmed and counted.
  • The Suggest prompt asks for each change in every language.

A deck that uses neither stays as it is. The example deck gains a slide on each.

npm test: 13 node tests and 142 browser tests pass, 36 of them new.

data-detail="id" on an element opens the <aside class="detail" id="id">
of its slide, with a click or Enter. Esc, ←, its close button or a click
outside closes it; → closes it and goes on. The slide and its numbers do
not move.

The presenter view follows the open detail and shows its notes, or the
slide's. Print gives each detail a page after its slide. In the edit view
details are sub-thumbnails under their slide, edited like a slide, added
from a selected element. While one is open, Skip and Delete act on it: a
skipped detail stays in the file and does not open in the show or print.
A public copy keeps the details, without their notes or the skipped ones.
data-langs="en fr" on <html> lists the languages; lang="fr" on an element
shows it in French only. Elements side by side with a language each are
versions of one text; a text without the language shown keeps the first
one. L, a globe near the corner or a data-set-lang button switches; the
choice is kept per deck, and ?lang= sets it. A build with a version per
language is one press.

The notes, the presenter view and its panes, the page title and the print
follow the language, and a public copy keeps them all. In the edit view
you edit the language shown; deleting, duplicating or moving a text does
it in every language, and texts missing in the language shown are dimmed
and counted. The Suggest prompt asks for each change in every language.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant