Photography template. Mosaic
A photo blog laid out in tiles, with the posts in a rhythm of large, tall, small and half pictures, each cut to its tile with the place, date and title under it, never on it, and posts that open with the picture whole and the facts beside the title.
Free and open source, built into Khalid.
khalid init blog --template mosaic
The home page, a post and a phone.
What it shows.
Mosaic is a template for a photo blog. The front page lays your posts out as tiles in a rhythm of sizes: a large picture beside a tall one, a row of three, two halves. Each picture is cut to its tile, and its place, date and title sit under it, never on it.
What the front page shows
- Your site's name and the
taglineon one line, and up to four numbers fromhero_statswhen you write them. - The mosaic: your posts as tiles. On a wide screen the tiles repeat a pattern of nine: a large tile beside a tall one, three equal tiles, two halves, then a tall tile beside a large one. A last row that would leave a gap is closed: one tile alone runs the full width, and two share it in halves. On a tablet the pattern is a full tile, two halves and three thirds; on a phone, a full tile and then two halves.
- Numbered page links, your call to action as a band, and the newsletter form.
Each tile shows a small square in your accent colour, the category and date, and the title. The larger tiles also show the summary, unless you turn tile_summaries off. The whole tile is one link.
When [[reader.home_sections]] lists sections, each section is a mosaic of its own.
What a post shows
- The picture first, the full width of the frame and never cropped. A tall picture keeps its shape, at most nearly the height of the screen. Its caption, such as a credit, sits under it.
- The title row, under the picture: the category, the title and the summary on one side, and the author, the date and the facts on the other.
- The story in one column, with a folded contents list for a long post.
- The tags, the share links and the author box.
- More pictures: the related posts as tiles in the same rhythm.
Its options.
Set any of these under [template.options]. An option you leave out takes the default shown.
| Option | Default | What it changes |
|---|---|---|
tagline |
none | One line beside your site's name on the front page. |
tile_summaries |
true |
The larger tiles show the post's summary under the title. |
photo_facts |
true |
A post shows its facts beside the title. |
hero_stats |
none | Up to four numbers under your name, each written number | what it counts. |
logo |
true |
The header shows your logo from [brand] logo in place of the site's name. |
dek |
true |
A post shows its description under its title. |
updated_note |
false |
An updated post says why it was updated, from its updated_note. |
cards |
"image" |
The shape of the cards on shared pages such as search: image, text, row, compact or ranked. |
pagination |
"numbered" |
numbered links to each page near this one; pages shows only newer and older. |
related_count |
5 |
How many related posts show as tiles under a post, from 3 to 10. |
contents |
"inline-folded" |
Where a long post's contents go: inline, inline-folded, side-end, side-start or none. |
header_search |
"button" |
What the header's search does on a served site: button, link or none. |
contents_numbers |
"none" |
How the contents are numbered: none, numbered or nested. |
share |
"end" |
Where a post shows its share links: none, top, end or both. |
share_networks |
["bluesky", "whatsapp", "email"] |
The networks the share links go to, in order. |
newsletter |
"home" |
Where the newsletter form shows: none, post, home or both. |
cta_band |
"home" |
Where the band with your call to action shows: none, post, home or both. |
cta_button |
false |
The header shows your call to action as a button. |
topic_tabs |
false |
Tabs on the front page, one per topic, each with its four newest posts. |
video_section |
false |
A row of the newest posts with a video. |
podcast_section |
false |
A row of the newest posts with a sound player. |
Deploy guides.
A free blog on Cloudflare
Build the blog as static pages and serve them on Cloudflare's free plan.
Running Khalid on a server
Run Khalid on your own server, beside your website or at its own address.
The full Mosaic guide
Sizes, spacing and every detail, in Khalid's docs.
Run your blog on Khalid.
Free and open source. One program, with SEO built in.