Examples
Set up a new React app in this folder with Vite, TypeScript and Mantine. It is Margins, an online quarterly about cities, architecture and the people who live in them.
Theme: we have no theme yet, and typography is our brand, so build the theme around type: a serif made for long reading for the article text, a high-contrast display serif for headlines, and a neutral sans-serif for navigation, captions and controls. Our accent color is brick red #b4442a. Light and dark color schemes.
Build the article page, where people read one long feature from the current issue.
Data, hard-coded and generated relative to today:
- the current issue: number 14, its season and theme ("Thresholds"), and the 6 articles in it with title, author, section and reading time
- the article: "The Stoop Is a Room", about front steps as shared space in cities, about 2500 words in sections with headings and subheadings; a standfirst, the author (name, photo, short bio), the publication date, the reading time, photos from Unsplash with captions and credits, two pull quotes, a block quote with its source, a numbered list, a small table (five cities and their share of row houses), and 8 footnotes
- 3 related articles from earlier issues with a photo, title and section
Page:
- a masthead with the logo, the issue number and season, links to the sections, a search and a subscribe button; it shrinks to a thin bar with the article title and a reading progress line once the reader scrolls into the article
- the article header: section, title, standfirst, author with photo, date and reading time, and a large lead photo with its caption
- the article body set for reading: a comfortable line length, a drop cap on the first paragraph, headings in the display serif, pull quotes that break the column, figures with captions and credits, a photo that runs wider than the text, and a table that stays readable on phones
- footnotes: numbered markers in the text; on wide screens the notes sit in the margin next to their line, on smaller screens a marker shows the note on click and all notes are listed at the end with links back to their markers
- a table of contents of the article's sections that follows the scroll on wide screens
- reading settings in a menu: text size (four steps), serif or sans-serif body text, line spacing (two steps) and light or dark color scheme (also on Cmd+J); the choices are kept after a reload
- after the article: the author's bio, share buttons and copy link, the 3 related articles and a newsletter signup with email validation
- the rest of the issue: the other articles of issue 14 as a list with their section, author and reading time
- the page works on phones and nothing scrolls the page sideways; it also prints cleanly: only the article, its photos and the notes