| 1 | {{define "base.html"}}<!doctype html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta charset="UTF-8" /> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 6 | <title>{{block "title" .}}Easel{{end}}</title> |
| 7 | <link rel="apple-touch-icon" sizes="180x180" href="/static/apple-touch-icon.png"> |
| 8 | <link rel="icon" type="image/png" sizes="32x32" href="/static/favicon-32x32.png"> |
| 9 | <link rel="icon" type="image/png" sizes="16x16" href="/static/favicon-16x16.png"> |
| 10 | <link rel="manifest" href="/static/site.webmanifest"> |
| 11 | <link rel="icon" href="/static/favicon.ico"> |
| 12 | <meta property="og:title" content="Easel"> |
| 13 | <meta property="og:description" content="A daily painting from the Art Institute of Chicago"> |
| 14 | <meta property="og:image" content="/static/og.png"> |
| 15 | <meta property="og:type" content="website"> |
| 16 | <meta name="theme-color" content="#121113" /> |
| 17 | <link rel="stylesheet" href="/assets/darkmatter.css" /> |
| 18 | <link rel="stylesheet" href="/static/styles.css" /> |
| 19 | <meta name="description" content="A daily painting from the Art Institute of Chicago" /> |
| 20 | <link rel="alternate" type="application/atom+xml" title="Easel — Daily Artwork" href="/feed.xml" /> |
| 21 | </head> |
| 22 | <body> |
| 23 | <header class="header"> |
| 24 | <a href="/" class="logo">EASEL</a> |
| 25 | <nav class="links"> |
| 26 | <a href="/">today</a> |
| 27 | <a href="/archive">archive</a> |
| 28 | <a href="/feed.xml">rss</a> |
| 29 | </nav> |
| 30 | </header> |
| 31 | <main> |
| 32 | {{block "content" .}}{{end}} |
| 33 | </main> |
| 34 | </body> |
| 35 | </html>{{end}} |
| 36 | |
| 37 | {{define "artwork"}} |
| 38 | <article class="artwork"> |
| 39 | <figure class="artwork-figure"> |
| 40 | <img src="{{.ImageURL}}" alt="{{.Title}}" loading="lazy" /> |
| 41 | </figure> |
| 42 | <header class="artwork-meta"> |
| 43 | <p class="artwork-date">{{.Date}}</p> |
| 44 | <h2 class="artwork-title"> |
| 45 | <a href="{{.SourceURL}}" target="_blank" rel="noopener noreferrer"><em>{{.Title}}</em></a> |
| 46 | </h2> |
| 47 | {{if .ArtistDisplay}}<p class="artwork-artist">{{.ArtistDisplay}}</p>{{end}} |
| 48 | </header> |
| 49 | <dl class="artwork-details"> |
| 50 | {{if .DateDisplay}}<dt>Date</dt><dd>{{.DateDisplay}}</dd>{{end}} |
| 51 | {{if .PlaceOfOrigin}}<dt>Origin</dt><dd>{{.PlaceOfOrigin}}</dd>{{end}} |
| 52 | {{if .MediumDisplay}}<dt>Medium</dt><dd>{{.MediumDisplay}}</dd>{{end}} |
| 53 | {{if .Dimensions}}<dt>Dimensions</dt><dd>{{.Dimensions}}</dd>{{end}} |
| 54 | {{if .CreditLine}}<dt>Credit</dt><dd>{{.CreditLine}}</dd>{{end}} |
| 55 | </dl> |
| 56 | {{if .Description}}<div class="artwork-description">{{.DescriptionHTML}}</div> |
| 57 | {{else if .ShortDescription}}<p class="artwork-description">{{.ShortDescription}}</p> |
| 58 | {{end}} |
| 59 | </article> |
| 60 | {{end}} |