Commit be215575b8
Unsigned
Layout: unified · split
theme/static/styles.css +291 −38
| @@ -1,81 +1,334 @@ | |||
| 1 | body { | 1 | body { |
| 2 | font-family: Menlo, Consolas, Monaco, Adwaita Mono, Liberation Mono, Lucida Console, monospace; | 2 | border: 3px solid black; |
| 3 | font-size: 0.85rem; | 3 | display: flex; |
| 4 | flex-direction: column; | ||
| 5 | font-family: -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, Adwaita Sans, Cantarell, Ubuntu, roboto, noto, helvetica, arial, sans-serif; | ||
| 4 | line-height: 1.5; | 6 | line-height: 1.5; |
| 5 | margin: 0 auto; | 7 | margin: 0 auto; |
| 8 | height: 100%; | ||
| 6 | max-width: 50em; | 9 | max-width: 50em; |
| 10 | min-height: 100vh; | ||
| 7 | } | 11 | } |
| 8 | 12 | ||
| 9 | body { | 13 | main { |
| 14 | flex: 1 0 auto; | ||
| 15 | margin-left: 1rem; | ||
| 16 | margin-right: 1rem; | ||
| 17 | } | ||
| 18 | |||
| 19 | footer { | ||
| 10 | padding: 1rem; | 20 | padding: 1rem; |
| 11 | } | 21 | } |
| 12 | 22 | ||
| 23 | img { | ||
| 24 | max-width: 100%; | ||
| 25 | } | ||
| 26 | |||
| 27 | .skip-link { | ||
| 28 | height: 1px; | ||
| 29 | left: -10000px; | ||
| 30 | overflow: hidden; | ||
| 31 | position: absolute; | ||
| 32 | top: auto; | ||
| 33 | width: 1px; | ||
| 34 | } | ||
| 35 | |||
| 36 | .skip-link:focus { | ||
| 37 | height: auto; | ||
| 38 | position: static; | ||
| 39 | width: auto; | ||
| 40 | } | ||
| 41 | |||
| 13 | footer { | 42 | footer { |
| 14 | margin: 1rem 0; | 43 | background-color: black; |
| 44 | border-top: 3px solid black; | ||
| 45 | color: white; | ||
| 46 | } | ||
| 47 | |||
| 48 | footer a { | ||
| 49 | color: white; | ||
| 15 | } | 50 | } |
| 16 | 51 | ||
| 17 | nav { | 52 | nav { |
| 18 | align-items: center; | 53 | width: 100vw; |
| 54 | border-bottom: 3px solid black; | ||
| 19 | display: flex; | 55 | display: flex; |
| 20 | justify-content: space-around; | 56 | justify-content: center; |
| 21 | margin: 1rem 0; | 57 | background-color: #0066ff; |
| 22 | } | 58 | } |
| 23 | 59 | ||
| 24 | nav ul { | 60 | nav ul { |
| 25 | display: flex; | 61 | list-style: none; |
| 26 | list-style-type: none; | ||
| 27 | margin: 0; | 62 | margin: 0; |
| 28 | padding: 0; | 63 | padding: 0; |
| 64 | display: flex; | ||
| 29 | width: 100%; | 65 | width: 100%; |
| 30 | } | 66 | } |
| 31 | 67 | ||
| 32 | nav ul li { | 68 | nav ul li { |
| 33 | height: 100%; | 69 | flex: 1; |
| 34 | margin-bottom: 0.5rem; | 70 | } |
| 35 | margin-right: 1rem; | 71 | |
| 72 | nav a { | ||
| 73 | display: block; | ||
| 74 | width: 100%; | ||
| 75 | padding: 0.75rem 0; | ||
| 36 | text-align: center; | 76 | text-align: center; |
| 77 | font-size: 1rem; | ||
| 78 | font-weight: 600; | ||
| 79 | color: #fff; | ||
| 80 | background-color: inherit; | ||
| 81 | text-decoration: none; | ||
| 82 | cursor: pointer; | ||
| 83 | border: none; | ||
| 84 | border-radius: 0; | ||
| 85 | transition: background 0.2s ease, | ||
| 86 | color 0.2s ease, | ||
| 87 | transform 0.1s ease; | ||
| 37 | } | 88 | } |
| 38 | 89 | ||
| 39 | img { | 90 | nav a:hover, |
| 40 | max-width: 100%; | 91 | nav a:focus { |
| 92 | background-color: #004fcc; | ||
| 93 | outline: none; | ||
| 41 | } | 94 | } |
| 42 | 95 | ||
| 43 | pre { | 96 | nav a:focus-visible { |
| 97 | box-shadow: 0 0 0 3px rgba(0,102,255,.4); | ||
| 98 | } | ||
| 99 | |||
| 100 | nav a:active { | ||
| 101 | transform: translateY(1px); | ||
| 102 | } | ||
| 103 | |||
| 104 | nav ul li:hover a { | ||
| 105 | background-color: #fff; | ||
| 106 | color: #0066ff; | ||
| 107 | } | ||
| 108 | |||
| 109 | @media (max-width: 480px) { | ||
| 110 | nav a { | ||
| 111 | padding: 0.75rem 0; | ||
| 112 | } | ||
| 113 | |||
| 114 | nav ul { | ||
| 115 | flex-direction: row !important; | ||
| 116 | flex-wrap: nowrap; | ||
| 117 | overflow-x: auto; | ||
| 118 | -webkit-overflow-scrolling: touch; | ||
| 119 | } | ||
| 120 | } | ||
| 121 | |||
| 122 | table, | ||
| 123 | th, | ||
| 124 | td { | ||
| 44 | border: 1px solid black; | 125 | border: 1px solid black; |
| 45 | overflow: scroll; | ||
| 46 | padding: 0.5rem; | ||
| 47 | } | 126 | } |
| 48 | 127 | ||
| 49 | :not(pre) > code { | 128 | thead { |
| 50 | color: red; | 129 | background-color: blue; |
| 130 | color: white; | ||
| 131 | font-weight: bold; | ||
| 51 | } | 132 | } |
| 52 | 133 | ||
| 53 | .skip-link { | 134 | blockquote { |
| 54 | height: 1px; | 135 | border: 3px solid black; |
| 55 | left: -10000px; | 136 | margin: 0; |
| 56 | overflow: hidden; | 137 | margin-bottom: 1rem; |
| 57 | position: absolute; | 138 | padding: 1rem; |
| 58 | top: auto; | 139 | background-color: blue; |
| 59 | width: 1px; | 140 | color: white; |
| 60 | } | 141 | } |
| 61 | 142 | ||
| 62 | .skip-link:focus { | 143 | blockquote p { |
| 63 | height: auto; | 144 | margin: 0; |
| 64 | position: static; | 145 | padding: 0; |
| 65 | width: auto; | ||
| 66 | } | 146 | } |
| 67 | 147 | ||
| 68 | @media (prefers-color-scheme: dark) { | 148 | time { |
| 69 | body { | 149 | font-family: Menlo, Consolas, Monaco, Adwaita Mono, Liberation Mono, Lucida Console, monospace; |
| 70 | background-color: #000000; | 150 | font-size: 0.85rem; |
| 71 | color: #dfdfdf; | 151 | } |
| 152 | |||
| 153 | section { | ||
| 154 | border-bottom: 3px solid black; | ||
| 155 | } | ||
| 156 | |||
| 157 | .post time { | ||
| 158 | margin-right: 0.5rem; | ||
| 159 | } | ||
| 160 | |||
| 161 | pre { | ||
| 162 | border: 3px solid black; | ||
| 163 | background-color: lightgrey; | ||
| 164 | padding: 1rem; | ||
| 165 | max-width: 100%; | ||
| 166 | box-sizing: border-box; | ||
| 167 | overflow-x: auto; | ||
| 168 | white-space: pre; | ||
| 169 | } | ||
| 170 | |||
| 171 | main { | ||
| 172 | height: 100%; | ||
| 173 | } | ||
| 174 | |||
| 175 | section { | ||
| 176 | margin: 0 -1rem; | ||
| 177 | padding: 2rem; | ||
| 178 | } | ||
| 179 | |||
| 180 | .post:last-of-type { | ||
| 181 | margin-bottom: 2rem; | ||
| 182 | } | ||
| 183 | |||
| 184 | .reply-link { | ||
| 185 | padding: 2rem 0; | ||
| 186 | } | ||
| 187 | |||
| 188 | .reply-link a { | ||
| 189 | display: inline-block; | ||
| 190 | padding: 0.75rem 1.25rem; | ||
| 191 | font-size: 1rem; | ||
| 192 | font-weight: 600; | ||
| 193 | color: #fff; | ||
| 194 | background-color: #0066ff; | ||
| 195 | border: none; | ||
| 196 | text-decoration: none; | ||
| 197 | cursor: pointer; | ||
| 198 | transition: background 0.2s ease, | ||
| 199 | transform 0.1s ease; | ||
| 200 | } | ||
| 201 | |||
| 202 | reply-link a:hover, | ||
| 203 | reply-link a:focus { | ||
| 204 | background-color: #004fcc; | ||
| 205 | outline: none; | ||
| 206 | } | ||
| 207 | |||
| 208 | reply-link a:focus-visible { | ||
| 209 | box-shadow: 0 0 0 3px rgba(0,102,255,.4); | ||
| 210 | } | ||
| 211 | |||
| 212 | reply-link a:active { | ||
| 213 | transform: translateY(1px); | ||
| 214 | } | ||
| 215 | |||
| 216 | .post-metadata { | ||
| 217 | margin: 0 auto; | ||
| 218 | padding: 1rem; | ||
| 219 | margin: 0 -1rem; | ||
| 220 | } | ||
| 221 | |||
| 222 | .meta-row { | ||
| 223 | display: flex; | ||
| 224 | flex-direction: row; | ||
| 225 | flex-wrap: wrap; | ||
| 226 | align-items: baseline; | ||
| 227 | padding: 0.4rem 0; | ||
| 228 | border-bottom: 1px solid black; | ||
| 229 | } | ||
| 230 | |||
| 231 | .meta-row:last-of-type { | ||
| 232 | border-bottom: none; | ||
| 233 | } | ||
| 234 | |||
| 235 | .meta-label { | ||
| 236 | flex: 0 0 120px; | ||
| 237 | font-weight: bold; | ||
| 238 | color: #333; | ||
| 239 | } | ||
| 240 | |||
| 241 | .meta-value { | ||
| 242 | flex: 1 1 auto; | ||
| 243 | color: #555; | ||
| 244 | } | ||
| 245 | |||
| 246 | @media (max-width: 500px) { | ||
| 247 | .meta-label { | ||
| 248 | flex-basis: 100%; | ||
| 249 | margin-bottom: 0.2rem; | ||
| 250 | } | ||
| 251 | |||
| 252 | .meta-value { | ||
| 253 | flex-basis: 100%; | ||
| 72 | } | 254 | } |
| 255 | } | ||
| 256 | |||
| 257 | table { | ||
| 258 | width: 100%; | ||
| 259 | max-width: 100%; | ||
| 260 | border-collapse: collapse; | ||
| 261 | table-layout: auto; | ||
| 262 | } | ||
| 73 | 263 | ||
| 74 | a { | 264 | th, |
| 75 | color: #67c0ff; | 265 | td { |
| 266 | word-break: break-word; | ||
| 267 | overflow-wrap: anywhere; | ||
| 268 | padding: 0.5rem; | ||
| 269 | } | ||
| 270 | |||
| 271 | thead { | ||
| 272 | background-color: blue; | ||
| 273 | color: white; | ||
| 274 | font-weight: bold; | ||
| 275 | } | ||
| 276 | |||
| 277 | th, | ||
| 278 | td { | ||
| 279 | min-width: 60px; | ||
| 280 | } | ||
| 281 | |||
| 282 | .table-fixed { | ||
| 283 | table-layout: fixed; | ||
| 284 | } | ||
| 285 | |||
| 286 | html, | ||
| 287 | body { | ||
| 288 | box-sizing: border-box; | ||
| 289 | } | ||
| 290 | |||
| 291 | *, | ||
| 292 | *::before, | ||
| 293 | *::after { | ||
| 294 | box-sizing: inherit; | ||
| 295 | } | ||
| 296 | |||
| 297 | nav { | ||
| 298 | width: 100%; | ||
| 299 | max-width: 100%; | ||
| 300 | } | ||
| 301 | |||
| 302 | section > .inner { | ||
| 303 | margin: 0 -1rem; | ||
| 304 | padding: 2rem; | ||
| 305 | } | ||
| 306 | |||
| 307 | body { | ||
| 308 | overflow-x: hidden; | ||
| 309 | } | ||
| 310 | |||
| 311 | @media (max-width: 480px) { | ||
| 312 | nav ul { | ||
| 313 | flex-direction: row !important; | ||
| 314 | flex-wrap: nowrap; | ||
| 315 | overflow-x: auto; | ||
| 316 | -webkit-overflow-scrolling: touch; | ||
| 76 | } | 317 | } |
| 77 | 318 | ||
| 78 | pre { | 319 | nav a { |
| 79 | border-color: white; | 320 | padding-left: 0.5rem; |
| 321 | padding-right: 0.5rem; | ||
| 80 | } | 322 | } |
| 81 | } | 323 | } |
| 324 | |||
| 325 | .post { | ||
| 326 | align-items: center; | ||
| 327 | display: flex; | ||
| 328 | margin: 0.5rem 0; | ||
| 329 | } | ||
| 330 | |||
| 331 | .post time { | ||
| 332 | flex-shrink: 0; | ||
| 333 | margin-right: 1rem; | ||
| 334 | } | ||
theme/templates/post.html +17 −4
| @@ -8,10 +8,23 @@ | |||
| 8 | <meta property="og:description" content="{{ project_description }}" /> | 8 | <meta property="og:description" content="{{ project_description }}" /> |
| 9 | {% endif %} {% endblock %} {% block main %} | 9 | {% endif %} {% endblock %} {% block main %} |
| 10 | <article> | 10 | <article> |
| 11 | <section> | 11 | <section class="post-metadata"> |
| 12 | <b>Title</b>: {{ post.title }} | 12 | <div class="meta-row"> |
| 13 | <br><b>Date</b>: <time datetime='{{ post.date|strftime("%Y-%m-%d") }}'>{{ post.date|strftime("%Y-%m-%d %H:%M:%S") }}</time> | 13 | <span class="meta-label">Title:</span> |
| 14 | <br><b>Description</b>: {{ post.description }} | 14 | <span class="meta-value">{{ post.title }}</span> |
| 15 | </div> | ||
| 16 | |||
| 17 | <div class="meta-row"> | ||
| 18 | <span class="meta-label">Date:</span> | ||
| 19 | <time class="meta-value" datetime='{{ post.date | strftime("%Y-%m-%d") }}''> | ||
| 20 | {{ post.date | strftime("%Y-%m-%d %H:%M:%S") }} | ||
| 21 | </time> | ||
| 22 | </div> | ||
| 23 | |||
| 24 | <div class="meta-row"> | ||
| 25 | <span class="meta-label">Description:</span> | ||
| 26 | <span class="meta-value">{{ post.description }}</span> | ||
| 27 | </div> | ||
| 15 | </section> | 28 | </section> |
| 16 | <section>{{ post.html | safe }}</section> | 29 | <section>{{ post.html | safe }}</section> |
| 17 | <div class="reply-link"><a href="mailto:hello@cleberg.net">Reply via email →</a></div> | 30 | <div class="reply-link"><a href="mailto:hello@cleberg.net">Reply via email →</a></div> |