Flashcards
Write question :: answer lines and study them as cards that flip.
What it shows
Study with flashcards written as plain lines, question :: answer.
What you learn
A block named after a plugin, cards with a next date written back, new cards a day, a block whose name differs from its plugin, a study timer, a line rule for an opening line.
Try this
- Flip "até logo" and grade it Good, and its next date is written at the end of its line.
- Add "boa noite :: good evening, good night" to the first deck, and it joins the new cards.
Portuguese before the trip
Ten minutes a day until the flight, getting around first and the café after.
Click a card to turn it over, then grade it Again, Hard, Good or Easy, or press 1 to 4. Lisbon has its own words at the café: an espresso is uma bica, and a small beer is uma imperial.
Ten minutes before work
Two rounds of cards with a short break between them. Press Start, and the timer chimes when it is time to stop.
How it's made
- A deck is a fenced block named
flashcards. Each line in it is a card,bom dia :: good morning, and the#line names the deck. Printed, a deck is a list of questions and answers. - Your progress is in the text. Grading a card writes its next date at the end of its line, after a
~. In~ 2026-11-26 4dthe card is due on 26 November, four days after its last review. A card without one is new, andnew: 4brings in four new cards a day. - The timer is a block named
pomodoro, which the rules block hands to the timer plugin. Each line is a phase and its length. - The layout is a
:::: decksblock that sets the two decks side by side,set style sanswithset heading-font Fraunces, and two colours in a palette for the line above the title.
Try it yourself
- Add
boa noite :: good evening, good nightto the first deck. It joins the new cards. - Change the
~ 2026-12-03 9dafter "por favor" to~ 2026-11-01 9d. The card is due again, and the count of cards due today grows by one. - Delete
~ 2026-11-24 3dfrom "olá". The card is new again. - In the timer, add a line
repeat 2underCards 4m. The timer runs the three phases twice.
Next: Interactive lesson puts cards beside a map and a table; Card games draws playing cards from short codes.
~~~ selfscribe
# Lesson: Study with flashcards written as plain lines, question :: answer.
# You learn: a block named after a plugin, cards with a next date written back, new cards a day, a block whose name differs from its plugin, a study timer, a line rule for an opening line.
# Try this: flip "até logo" and grade it Good, and its next date is written at the end of its line.
# Try this: add "boa noite :: good evening, good night" to the first deck, and it joins the new cards.
# summary: Write question :: answer lines and study them as cards that flip.
# category: study
# tags: interactive, simple, school
# uses: quiz
use markdown
set title Flashcards
set style sans
set heading-font Fraunces
# ---- Colours, each with its shade for dark pages ----------------------------------------
palette
tile #1d4e9e dark #8db4ff
tram #e0a100 dark #ffd25a
# ---- "```flashcards": one card per line, the question, two colons, the answer ----------
block ``` flashcards ... ``` -> flashcards verbatim
# ---- "```pomodoro": a study timer; the block's name need not be the plugin's ------------
block ``` pomodoro ... ``` -> timer verbatim
# ---- ":::: decks" ... "::::": the decks side by side, as many as fit ----------------------
block :::: decks ... :::: -> div.decks { display: grid; grid-template-columns: repeat(auto-fit, minmax(20em, 1fr)); gap: 0.6em 1.6em; align-items: start; margin: 0.4em 0 1em } as sd-decks
# ---- "lead …" at the start of a line: a larger, quieter opening paragraph ---------------
line lead _ -> p.lead { font-size: 1.12em; opacity: 0.8; margin-top: -0.4em } as sd-lead
# ---- "trip …": the line of small capitals above the title --------------------------------
line trip _ -> div.trip { font: 700 0.74em/1 var(--doc-font-ui); letter-spacing: 0.16em; text-transform: uppercase; color: var(--tile); border-top: 3px solid var(--tram); padding-top: 0.8em; width: fit-content; margin-bottom: -2.6em } as sd-trip
~~~
trip Lisbon · 12 to 16 March 2027
# Portuguese before the trip
lead Ten minutes a day until the flight, getting around first and the café after.
:::: decks
```flashcards
# Getting by
new: 4
olá :: hello ~ 2026-11-24 3d
obrigado / obrigada :: thank you, said by a man / by a woman ~ 2026-11-25 6d
por favor :: please ~ 2026-12-03 9d
desculpe :: sorry, excuse me ~ 2026-11-23 1d 230%
bom dia :: good morning ~ 2026-11-26 4d
boa tarde :: good afternoon
até logo :: see you later
fala inglês? :: do you speak English?
não percebo :: I don't understand
quanto custa? :: how much is it?
onde fica a estação? :: where is the station?
```
```flashcards
# At the café
uma bica :: an espresso, as Lisbon says it
um galão :: a milky coffee in a tall glass
um pastel de nata :: a custard tart
uma imperial :: a small glass of draught beer
água sem gás :: still water
a conta, por favor :: the bill, please
```
::::
Click a card to turn it over, then grade it Again, Hard, Good or Easy, or press 1 to 4. Lisbon has its own words at the café: an espresso is uma bica, and a small beer is uma imperial.
## Ten minutes before work
Two rounds of cards with a short break between them. Press Start, and the timer chimes when it is time to stop.
```pomodoro
# Before work
Cards 5m
Break 1m
Cards 4m
```
---
## How it's made
- **A deck** is a fenced block named `flashcards`. Each line in it is a card, `bom dia :: good morning`, and the `#` line names the deck. Printed, a deck is a list of questions and answers.
- **Your progress is in the text.** Grading a card writes its next date at the end of its line, after a `~`. In `~ 2026-11-26 4d` the card is due on 26 November, four days after its last review. A card without one is new, and `new: 4` brings in four new cards a day.
- **The timer** is a block named `pomodoro`, which the rules block hands to the timer plugin. Each line is a phase and its length.
- **The layout** is a `:::: decks` block that sets the two decks side by side, `set style sans` with `set heading-font Fraunces`, and two colours in a palette for the line above the title.
## Try it yourself
1. Add `boa noite :: good evening, good night` to the first deck. It joins the new cards.
2. Change the `~ 2026-12-03 9d` after "por favor" to `~ 2026-11-01 9d`. The card is due again, and the count of cards due today grows by one.
3. Delete `~ 2026-11-24 3d` from "olá". The card is new again.
4. In the timer, add a line `repeat 2` under `Cards 4m`. The timer runs the three phases twice.
Next: *Interactive lesson* puts cards beside a map and a table; *Card games* draws playing cards from short codes.