Commit 6a2d437c05
Unsigned
Layout: unified · split
theme/static/styles.css +38 −291
| @@ -1,334 +1,81 @@ | |||
| 1 | body { | 1 | body { |
| 2 | border: 3px solid black; | 2 | font-family: Menlo, Consolas, Monaco, Adwaita Mono, Liberation Mono, Lucida Console, monospace; |
| 3 | display: flex; | 3 | font-size: 0.85rem; |
| 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; | ||
| 6 | line-height: 1.5; | 4 | line-height: 1.5; |
| 7 | margin: 0 auto; | 5 | margin: 0 auto; |
| 8 | height: 100%; | ||
| 9 | max-width: 50em; | 6 | max-width: 50em; |
| 10 | min-height: 100vh; | ||
| 11 | } | ||
| 12 | |||
| 13 | main { | ||
| 14 | flex: 1 0 auto; | ||
| 15 | margin-left: 1rem; | ||
| 16 | margin-right: 1rem; | ||
| 17 | } | 7 | } |
| 18 | 8 | ||
| 19 | footer { | 9 | body { |
| 20 | padding: 1rem; | 10 | padding: 1rem; |
| 21 | } | 11 | } |
| 22 | 12 | ||
| 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 | |||
| 42 | footer { | 13 | footer { |
| 43 | background-color: black; | 14 | margin: 1rem 0; |
| 44 | border-top: 3px solid black; | ||
| 45 | color: white; | ||
| 46 | } | ||
| 47 | |||
| 48 | footer a { | ||
| 49 | color: white; | ||
| 50 | } | 15 | } |
| 51 | 16 | ||
| 52 | nav { | 17 | nav { |
| 53 | width: 100vw; | 18 | align-items: center; |
| 54 | border-bottom: 3px solid black; | ||
| 55 | display: flex; | 19 | display: flex; |
| 56 | justify-content: center; | 20 | justify-content: space-around; |
| 57 | background-color: #0066ff; | 21 | margin: 1rem 0; |
| 58 | } | 22 | } |
| 59 | 23 | ||
| 60 | nav ul { | 24 | nav ul { |
| 61 | list-style: none; | 25 | display: flex; |
| 26 | list-style-type: none; | ||
| 62 | margin: 0; | 27 | margin: 0; |
| 63 | padding: 0; | 28 | padding: 0; |
| 64 | display: flex; | ||
| 65 | width: 100%; | 29 | width: 100%; |
| 66 | } | 30 | } |
| 67 | 31 | ||
| 68 | nav ul li { | 32 | nav ul li { |
| 69 | flex: 1; | ||
| 70 | } | ||
| 71 | |||
| 72 | nav a { | ||
| 73 | display: block; | ||
| 74 | width: 100%; | ||
| 75 | padding: 0.75rem 0; | ||
| 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; | ||
| 88 | } | ||
| 89 | |||
| 90 | nav a:hover, | ||
| 91 | nav a:focus { | ||
| 92 | background-color: #004fcc; | ||
| 93 | outline: none; | ||
| 94 | } | ||
| 95 | |||
| 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 { | ||
| 125 | border: 1px solid black; | ||
| 126 | } | ||
| 127 | |||
| 128 | thead { | ||
| 129 | background-color: blue; | ||
| 130 | color: white; | ||
| 131 | font-weight: bold; | ||
| 132 | } | ||
| 133 | |||
| 134 | blockquote { | ||
| 135 | border: 3px solid black; | ||
| 136 | margin: 0; | ||
| 137 | margin-bottom: 1rem; | ||
| 138 | padding: 1rem; | ||
| 139 | background-color: blue; | ||
| 140 | color: white; | ||
| 141 | } | ||
| 142 | |||
| 143 | blockquote p { | ||
| 144 | margin: 0; | ||
| 145 | padding: 0; | ||
| 146 | } | ||
| 147 | |||
| 148 | time { | ||
| 149 | font-family: Menlo, Consolas, Monaco, Adwaita Mono, Liberation Mono, Lucida Console, monospace; | ||
| 150 | font-size: 0.85rem; | ||
| 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%; | 33 | height: 100%; |
| 34 | margin-bottom: 0.5rem; | ||
| 35 | margin-right: 1rem; | ||
| 36 | text-align: center; | ||
| 173 | } | 37 | } |
| 174 | 38 | ||
| 175 | section { | 39 | img { |
| 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%; | ||
| 254 | } | ||
| 255 | } | ||
| 256 | |||
| 257 | table { | ||
| 258 | width: 100%; | ||
| 259 | max-width: 100%; | 40 | max-width: 100%; |
| 260 | border-collapse: collapse; | ||
| 261 | table-layout: auto; | ||
| 262 | } | 41 | } |
| 263 | 42 | ||
| 264 | th, | 43 | pre { |
| 265 | td { | 44 | border: 1px solid black; |
| 266 | word-break: break-word; | 45 | overflow: scroll; |
| 267 | overflow-wrap: anywhere; | ||
| 268 | padding: 0.5rem; | 46 | padding: 0.5rem; |
| 269 | } | 47 | } |
| 270 | 48 | ||
| 271 | thead { | 49 | :not(pre) > code { |
| 272 | background-color: blue; | 50 | color: red; |
| 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 | } | 51 | } |
| 285 | 52 | ||
| 286 | html, | 53 | .skip-link { |
| 287 | body { | 54 | height: 1px; |
| 288 | box-sizing: border-box; | 55 | left: -10000px; |
| 289 | } | 56 | overflow: hidden; |
| 290 | 57 | position: absolute; | |
| 291 | *, | 58 | top: auto; |
| 292 | *::before, | 59 | width: 1px; |
| 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 | } | 60 | } |
| 306 | 61 | ||
| 307 | body { | 62 | .skip-link:focus { |
| 308 | overflow-x: hidden; | 63 | height: auto; |
| 64 | position: static; | ||
| 65 | width: auto; | ||
| 309 | } | 66 | } |
| 310 | 67 | ||
| 311 | @media (max-width: 480px) { | 68 | @media (prefers-color-scheme: dark) { |
| 312 | nav ul { | 69 | body { |
| 313 | flex-direction: row !important; | 70 | background-color: #000000; |
| 314 | flex-wrap: nowrap; | 71 | color: #dfdfdf; |
| 315 | overflow-x: auto; | ||
| 316 | -webkit-overflow-scrolling: touch; | ||
| 317 | } | 72 | } |
| 318 | 73 | ||
| 319 | nav a { | 74 | a { |
| 320 | padding-left: 0.5rem; | 75 | color: #67c0ff; |
| 321 | padding-right: 0.5rem; | ||
| 322 | } | 76 | } |
| 323 | } | ||
| 324 | 77 | ||
| 325 | .post { | 78 | pre { |
| 326 | align-items: center; | 79 | border-color: white; |
| 327 | display: flex; | 80 | } |
| 328 | margin: 0.5rem 0; | ||
| 329 | } | ||
| 330 | |||
| 331 | .post time { | ||
| 332 | flex-shrink: 0; | ||
| 333 | margin-right: 1rem; | ||
| 334 | } | 81 | } |
theme/templates/post.html +4 −17
| @@ -8,23 +8,10 @@ | |||
| 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 class="post-metadata"> | 11 | <section> |
| 12 | <div class="meta-row"> | 12 | <b>Title</b>: {{ post.title }} |
| 13 | <span class="meta-label">Title:</span> | 13 | <br><b>Date</b>: <time datetime='{{ post.date|strftime("%Y-%m-%d") }}'>{{ post.date|strftime("%Y-%m-%d %H:%M:%S") }}</time> |
| 14 | <span class="meta-value">{{ post.title }}</span> | 14 | <br><b>Description</b>: {{ post.description }} |
| 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> | ||
| 28 | </section> | 15 | </section> |
| 29 | <section>{{ post.html | safe }}</section> | 16 | <section>{{ post.html | safe }}</section> |
| 30 | <div class="reply-link"><a href="mailto:hello@cleberg.net">Reply via email →</a></div> | 17 | <div class="reply-link"><a href="mailto:hello@cleberg.net">Reply via email →</a></div> |