Commit fed4e39
Eric Bower
·
2026-09-28 22:33:46 -0400 EDT
parent f18b96d
style(prose): design tweaks
4 files changed,
+445,
-145
+213,
-64
| ... | ... | @@ -18,6 +18,7 @@ | |
| 18 | 18 | :root { | |
| 19 | 19 | --line-height: 1.3rem; | |
| 20 | 20 | --grid-height: 0.65rem; | |
| 21 | + | --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; | |
| 21 | 22 | } | |
| 22 | 23 | ||
| 23 | 24 | @media (prefers-color-scheme: light) { |
| ... | ... | @@ -36,6 +37,7 @@ | |
| 36 | 37 | --hover: #c11e7a; | |
| 37 | 38 | --grey: #ccc; | |
| 38 | 39 | --grey-light: #6a708e; | |
| 40 | + | --green: #1a7f37; | |
| 39 | 41 | } | |
| 40 | 42 | } | |
| 41 | 43 |
| ... | ... | @@ -55,13 +57,13 @@ | |
| 55 | 57 | --hover: #ff80bf; | |
| 56 | 58 | --grey: #414558; | |
| 57 | 59 | --grey-light: #6a708e; | |
| 60 | + | --green: #50fa7b; | |
| 58 | 61 | } | |
| 59 | 62 | } | |
| 60 | 63 | ||
| 61 | 64 | html { | |
| 62 | 65 | background-color: var(--bg-color); | |
| 63 | 66 | color: var(--text-color); | |
| 64 | - | font-size: 16px; | |
| 65 | 67 | line-height: var(--line-height); | |
| 66 | 68 | font-family: | |
| 67 | 69 | -apple-system, |
| ... | ... | @@ -103,7 +105,8 @@ code, | |
| 103 | 105 | kbd, | |
| 104 | 106 | samp, | |
| 105 | 107 | pre { | |
| 106 | - | font-family: monospace; | |
| 108 | + | font-family: var(--font-mono); | |
| 109 | + | font-variant-numeric: tabular-nums; | |
| 107 | 110 | } | |
| 108 | 111 | ||
| 109 | 112 | code, |
| ... | ... | @@ -120,13 +123,11 @@ pre > code { | |
| 120 | 123 | } | |
| 121 | 124 | ||
| 122 | 125 | code { | |
| 123 | - | font-size: 90%; | |
| 124 | 126 | border-radius: 0.3rem; | |
| 125 | 127 | padding: 0.025rem 0.3rem; | |
| 126 | 128 | } | |
| 127 | 129 | ||
| 128 | 130 | pre { | |
| 129 | - | font-size: 0.8rem; | |
| 130 | 131 | border-radius: 1px; | |
| 131 | 132 | padding: var(--line-height); | |
| 132 | 133 | overflow-x: auto; |
| ... | ... | @@ -155,15 +156,48 @@ summary { | |
| 155 | 156 | h1, | |
| 156 | 157 | h2, | |
| 157 | 158 | h3, | |
| 158 | - | h4 { | |
| 159 | + | h4, | |
| 160 | + | h5, | |
| 161 | + | h6 { | |
| 159 | 162 | margin: 0; | |
| 160 | 163 | padding: 0; | |
| 161 | 164 | border: 0; | |
| 162 | - | font-style: normal; | |
| 163 | - | font-weight: inherit; | |
| 164 | - | font-size: inherit; | |
| 165 | + | font-family: var(--font-mono); | |
| 166 | + | font-weight: bold; | |
| 167 | + | } | |
| 168 | + | ||
| 169 | + | h1 { | |
| 170 | + | font-size: 1.6rem; | |
| 171 | + | line-height: calc(var(--line-height) * 1.5); | |
| 172 | + | margin-top: calc(var(--line-height) * 2.5); | |
| 173 | + | margin-bottom: var(--grid-height); | |
| 174 | + | } | |
| 175 | + | ||
| 176 | + | h2 { | |
| 177 | + | font-size: 1.3rem; | |
| 178 | + | line-height: var(--line-height); | |
| 179 | + | margin-top: calc(var(--line-height) * 2); | |
| 180 | + | margin-bottom: var(--grid-height); | |
| 181 | + | } | |
| 182 | + | ||
| 183 | + | h3 { | |
| 184 | + | font-size: 1.1rem; | |
| 185 | + | line-height: var(--line-height); | |
| 186 | + | margin-top: calc(var(--line-height) * 1.5); | |
| 187 | + | margin-bottom: var(--grid-height); | |
| 188 | + | } | |
| 189 | + | ||
| 190 | + | h4, | |
| 191 | + | h5, | |
| 192 | + | h6 { | |
| 193 | + | font-size: 1rem; | |
| 194 | + | line-height: var(--line-height); | |
| 195 | + | margin-top: var(--line-height); | |
| 196 | + | margin-bottom: var(--grid-height); | |
| 197 | + | color: var(--white-dark); | |
| 165 | 198 | } | |
| 166 | 199 | ||
| 200 | + | ||
| 167 | 201 | path { | |
| 168 | 202 | fill: var(--text-color); | |
| 169 | 203 | stroke: var(--text-color); |
| ... | ... | @@ -172,25 +206,45 @@ path { | |
| 172 | 206 | hr { | |
| 173 | 207 | color: inherit; | |
| 174 | 208 | border: 0; | |
| 175 | - | height: 2px; | |
| 176 | - | background: var(--grey); | |
| 177 | - | margin: calc(var(--grid-height) - 2px) auto; | |
| 209 | + | height: 1px; | |
| 210 | + | background: var(--grey-light); | |
| 211 | + | margin: calc(var(--grid-height) - 1px) auto; | |
| 212 | + | } | |
| 213 | + | ||
| 214 | + | hr.dashed { | |
| 215 | + | border: none; | |
| 216 | + | border-top: 1px dashed var(--grey-light); | |
| 217 | + | background: none; | |
| 218 | + | height: 0; | |
| 219 | + | margin: calc(var(--grid-height) - 1px) auto; | |
| 178 | 220 | } | |
| 179 | 221 | ||
| 180 | 222 | a { | |
| 181 | - | text-decoration: none; | |
| 182 | 223 | color: var(--link-color); | |
| 224 | + | text-decoration: underline; | |
| 225 | + | text-decoration-thickness: 1px; | |
| 226 | + | text-underline-offset: 2px; | |
| 227 | + | padding: 0 2px; | |
| 228 | + | border-radius: 1px; | |
| 229 | + | transition: background-color 0.1s ease, color 0.1s ease; | |
| 183 | 230 | } | |
| 184 | 231 | ||
| 185 | - | a:hover, | |
| 186 | - | a:visited:hover { | |
| 187 | - | text-decoration: underline; | |
| 232 | + | a:hover { | |
| 233 | + | background-color: var(--link-color); | |
| 234 | + | color: var(--bg-color); | |
| 235 | + | text-decoration: none; | |
| 188 | 236 | } | |
| 189 | 237 | ||
| 190 | 238 | a:visited { | |
| 191 | 239 | color: var(--visited); | |
| 192 | 240 | } | |
| 193 | 241 | ||
| 242 | + | a:visited:hover { | |
| 243 | + | background-color: var(--visited); | |
| 244 | + | color: var(--bg-color); | |
| 245 | + | text-decoration: none; | |
| 246 | + | } | |
| 247 | + | ||
| 194 | 248 | section { | |
| 195 | 249 | margin-bottom: 1.4rem; | |
| 196 | 250 | } |
| ... | ... | @@ -227,39 +281,73 @@ blockquote code { | |
| 227 | 281 | border: 1px solid var(--blockquote); | |
| 228 | 282 | } | |
| 229 | 283 | ||
| 230 | - | ul { | |
| 231 | - | padding: 0 0 0 var(--line-height); | |
| 284 | + | ul, | |
| 285 | + | ol { | |
| 286 | + | padding: 0 15px; | |
| 232 | 287 | list-style-position: inside; | |
| 233 | 288 | list-style-type: square; | |
| 234 | - | margin: var(--line-height) 0; | |
| 289 | + | margin: var(--grid-height) 0; | |
| 235 | 290 | } | |
| 236 | 291 | ||
| 237 | 292 | ul[style*="list-style-type: none;"] { | |
| 238 | 293 | padding: 0; | |
| 239 | 294 | } | |
| 240 | 295 | ||
| 241 | - | ol { | |
| 296 | + | ol ul, ol ol, ul ol, ul ul { | |
| 242 | 297 | padding: 0 0 0 var(--line-height); | |
| 243 | - | list-style-type: decimal; | |
| 244 | - | margin: var(--line-height) 0; | |
| 298 | + | margin: 0; | |
| 245 | 299 | } | |
| 246 | 300 | ||
| 247 | - | ol[style*="list-style-type: none;"] { | |
| 301 | + | li { | |
| 302 | + | margin: var(--grid-height) 0; | |
| 248 | 303 | padding: 0; | |
| 249 | 304 | } | |
| 250 | 305 | ||
| 251 | - | ol ul, ol ol, ul ol, ul ul { | |
| 252 | - | padding: 0 0 0 3ch; | |
| 253 | - | margin: 0; | |
| 306 | + | li::marker { | |
| 307 | + | line-height: 0; | |
| 308 | + | color: var(--grey-light); | |
| 254 | 309 | } | |
| 255 | 310 | ||
| 256 | - | li { | |
| 311 | + | li blockquote, | |
| 312 | + | li pre { | |
| 313 | + | display: inline-block; | |
| 257 | 314 | margin: 0; | |
| 258 | - | padding: 0; | |
| 315 | + | width: 100%; | |
| 259 | 316 | } | |
| 260 | 317 | ||
| 261 | - | li::marker { | |
| 262 | - | line-height: 0; | |
| 318 | + | li pre { | |
| 319 | + | padding: var(--grid-height); | |
| 320 | + | } | |
| 321 | + | ||
| 322 | + | [role="list"] { | |
| 323 | + | display: flex; | |
| 324 | + | flex-direction: column; | |
| 325 | + | gap: var(--grid-height); | |
| 326 | + | } | |
| 327 | + | ||
| 328 | + | [role="list"] [role="list"] { | |
| 329 | + | margin-left: 1.3rem; | |
| 330 | + | } | |
| 331 | + | ||
| 332 | + | [role="listitem"] { | |
| 333 | + | display: flex; | |
| 334 | + | align-items: flex-start; | |
| 335 | + | gap: 5px; | |
| 336 | + | } | |
| 337 | + | ||
| 338 | + | [role="listitem"]:has(pre, img, blockquote) { | |
| 339 | + | align-items: center; | |
| 340 | + | } | |
| 341 | + | ||
| 342 | + | table { | |
| 343 | + | border-collapse: collapse; | |
| 344 | + | margin: var(--line-height) 0; | |
| 345 | + | } | |
| 346 | + | ||
| 347 | + | th, | |
| 348 | + | td { | |
| 349 | + | border: 1px solid var(--white); | |
| 350 | + | padding: var(--grid-height); | |
| 263 | 351 | } | |
| 264 | 352 | ||
| 265 | 353 | footer { |
| ... | ... | @@ -301,8 +389,11 @@ sup { | |
| 301 | 389 | width: 100%; | |
| 302 | 390 | } | |
| 303 | 391 | ||
| 304 | - | .mono { | |
| 305 | - | font-family: monospace; | |
| 392 | + | .mono, | |
| 393 | + | time, | |
| 394 | + | nav { | |
| 395 | + | font-family: var(--font-mono); | |
| 396 | + | font-variant-numeric: tabular-nums; | |
| 306 | 397 | } | |
| 307 | 398 | ||
| 308 | 399 | .link-alt-hover, |
| ... | ... | @@ -315,6 +406,7 @@ sup { | |
| 315 | 406 | ||
| 316 | 407 | .link-alt-hover:visited:hover, | |
| 317 | 408 | .link-alt-hover:hover { | |
| 409 | + | background-color: transparent; | |
| 318 | 410 | text-decoration: underline; | |
| 319 | 411 | } | |
| 320 | 412 |
| ... | ... | @@ -328,6 +420,20 @@ sup { | |
| 328 | 420 | ||
| 329 | 421 | .link-alt:visited:hover, | |
| 330 | 422 | .link-alt:hover { | |
| 423 | + | background-color: transparent; | |
| 424 | + | text-decoration: underline; | |
| 425 | + | } | |
| 426 | + | ||
| 427 | + | .link-grey, | |
| 428 | + | .link-grey:visited { | |
| 429 | + | color: var(--grey-light); | |
| 430 | + | text-decoration: none; | |
| 431 | + | } | |
| 432 | + | ||
| 433 | + | .link-grey:hover, | |
| 434 | + | .link-grey:visited:hover { | |
| 435 | + | background-color: transparent; | |
| 436 | + | color: var(--text-color); | |
| 331 | 437 | text-decoration: underline; | |
| 332 | 438 | } | |
| 333 | 439 |
| ... | ... | @@ -336,19 +442,35 @@ sup { | |
| 336 | 442 | } | |
| 337 | 443 | ||
| 338 | 444 | .text-2xl { | |
| 339 | - | font-size: var(--line-height); | |
| 445 | + | font-size: 1.6rem; | |
| 446 | + | font-weight: bold; | |
| 447 | + | line-height: calc(var(--line-height) * 1.5); | |
| 448 | + | margin-bottom: var(--grid-height); | |
| 449 | + | } | |
| 450 | + | ||
| 451 | + | .text-xl { | |
| 452 | + | font-size: 1.3rem; | |
| 453 | + | font-weight: bold; | |
| 454 | + | line-height: var(--line-height); | |
| 455 | + | margin-bottom: var(--grid-height); | |
| 456 | + | } | |
| 457 | + | ||
| 458 | + | .text-lg { | |
| 459 | + | font-size: 1.1rem; | |
| 340 | 460 | font-weight: bold; | |
| 341 | 461 | line-height: var(--line-height); | |
| 342 | 462 | margin-bottom: var(--grid-height); | |
| 343 | - | text-transform: uppercase; | |
| 344 | 463 | } | |
| 345 | 464 | ||
| 346 | - | .text-xl, .text-lg, .text-md { | |
| 465 | + | .text-md { | |
| 347 | 466 | font-size: 1rem; | |
| 348 | 467 | font-weight: bold; | |
| 349 | 468 | line-height: var(--line-height); | |
| 350 | 469 | margin-bottom: var(--grid-height); | |
| 351 | - | text-transform: uppercase; | |
| 470 | + | } | |
| 471 | + | ||
| 472 | + | .text-right { | |
| 473 | + | text-align: right; | |
| 352 | 474 | } | |
| 353 | 475 | ||
| 354 | 476 | .text-sm { |
| ... | ... | @@ -563,13 +685,15 @@ sup { | |
| 563 | 685 | ||
| 564 | 686 | /* ==== MARKDOWN ==== */ | |
| 565 | 687 | ||
| 688 | + | .md > :first-child { | |
| 689 | + | margin-top: 0 !important; | |
| 690 | + | } | |
| 691 | + | ||
| 566 | 692 | .md h1, | |
| 567 | 693 | .md h2, | |
| 568 | 694 | .md h3, | |
| 569 | 695 | .md h4 { | |
| 570 | 696 | padding: 0; | |
| 571 | - | margin: 0; | |
| 572 | - | /* margin: 1.5rem 0 0.9rem 0; */ | |
| 573 | 697 | font-weight: bold; | |
| 574 | 698 | } | |
| 575 | 699 |
| ... | ... | @@ -581,25 +705,17 @@ sup { | |
| 581 | 705 | text-decoration: none; | |
| 582 | 706 | } | |
| 583 | 707 | ||
| 584 | - | h1 code, h2 code, h3 code, h4 code { | |
| 585 | - | text-transform: none; | |
| 586 | - | } | |
| 587 | - | ||
| 588 | - | .md h1 { | |
| 589 | - | font-size: 1rem; | |
| 590 | - | line-height: var(--line-height); | |
| 591 | - | margin-top: calc(var(--line-height) * 2); | |
| 592 | - | margin-bottom: var(--grid-height); | |
| 593 | - | text-transform: uppercase; | |
| 708 | + | .md h1 a:hover, | |
| 709 | + | .md h2 a:hover, | |
| 710 | + | .md h3 a:hover, | |
| 711 | + | .md h4 a:hover { | |
| 712 | + | background-color: transparent; | |
| 713 | + | color: var(--hover); | |
| 714 | + | text-decoration: underline; | |
| 594 | 715 | } | |
| 595 | 716 | ||
| 596 | - | .md h2, .md h3, .md h4 { | |
| 597 | - | font-size: 1rem; | |
| 598 | - | line-height: var(--line-height); | |
| 599 | - | margin-top: calc(var(--line-height) * 2); | |
| 600 | - | margin-bottom: var(--line-height); | |
| 601 | - | text-transform: uppercase; | |
| 602 | - | color: var(--white-dark); | |
| 717 | + | h1 code, h2 code, h3 code, h4 code { | |
| 718 | + | text-transform: none; | |
| 603 | 719 | } | |
| 604 | 720 | ||
| 605 | 721 | /* ==== HELPERS ==== */ |
| ... | ... | @@ -630,6 +746,11 @@ h1 code, h2 code, h3 code, h4 code { | |
| 630 | 746 | display: inline-block; | |
| 631 | 747 | } | |
| 632 | 748 | ||
| 749 | + | .btn:hover { | |
| 750 | + | background-color: var(--link-color); | |
| 751 | + | color: var(--bg-color); | |
| 752 | + | } | |
| 753 | + | ||
| 633 | 754 | .btn-link, | |
| 634 | 755 | .btn-link:visited { | |
| 635 | 756 | border: 2px solid var(--link-color); |
| ... | ... | @@ -640,26 +761,51 @@ h1 code, h2 code, h3 code, h4 code { | |
| 640 | 761 | display: inline-block; | |
| 641 | 762 | } | |
| 642 | 763 | ||
| 764 | + | .btn-link:hover, | |
| 765 | + | .btn-link:visited:hover { | |
| 766 | + | background-color: var(--link-color); | |
| 767 | + | color: var(--bg-color); | |
| 768 | + | text-decoration: none; | |
| 769 | + | } | |
| 770 | + | ||
| 643 | 771 | .box { | |
| 644 | - | border: 2px solid var(--grey-light); | |
| 772 | + | border: 1px solid var(--grey-light); | |
| 645 | 773 | padding: var(--grid-height); | |
| 774 | + | background-color: var(--pre); | |
| 646 | 775 | } | |
| 647 | 776 | ||
| 648 | 777 | .box-sm { | |
| 649 | - | border: 2px solid var(--grey-light); | |
| 778 | + | border: 1px solid var(--grey-light); | |
| 779 | + | padding: var(--grid-height); | |
| 780 | + | background-color: var(--pre); | |
| 781 | + | } | |
| 782 | + | ||
| 783 | + | .box-dashed { | |
| 784 | + | border: 1px dashed var(--grey-light); | |
| 650 | 785 | padding: var(--grid-height); | |
| 651 | 786 | } | |
| 652 | 787 | ||
| 653 | 788 | .box-alert { | |
| 654 | - | border: 2px solid var(--hover); | |
| 789 | + | border: 1px solid var(--hover); | |
| 655 | 790 | padding: var(--line-height); | |
| 656 | 791 | } | |
| 657 | 792 | ||
| 658 | 793 | .box-sm-alert { | |
| 659 | - | border: 2px solid var(--hover); | |
| 794 | + | border: 1px solid var(--hover); | |
| 660 | 795 | padding: var(--grid-height); | |
| 661 | 796 | } | |
| 662 | 797 | ||
| 798 | + | .text-green { | |
| 799 | + | color: var(--green); | |
| 800 | + | } | |
| 801 | + | ||
| 802 | + | .prompt, | |
| 803 | + | pre.cmd::before { | |
| 804 | + | content: "$ "; | |
| 805 | + | color: var(--green); | |
| 806 | + | font-weight: bold; | |
| 807 | + | } | |
| 808 | + | ||
| 663 | 809 | .list-none { | |
| 664 | 810 | list-style-type: none; | |
| 665 | 811 | } |
| ... | ... | @@ -693,7 +839,7 @@ h1 code, h2 code, h3 code, h4 code { | |
| 693 | 839 | ||
| 694 | 840 | @media only screen and (max-width: 40em) { | |
| 695 | 841 | body { | |
| 696 | - | padding: 0 1rem; | |
| 842 | + | padding: 0 var(--grid-height); | |
| 697 | 843 | } | |
| 698 | 844 | ||
| 699 | 845 | header { |
| ... | ... | @@ -705,11 +851,12 @@ h1 code, h2 code, h3 code, h4 code { | |
| 705 | 851 | } | |
| 706 | 852 | } | |
| 707 | 853 | ||
| 708 | - | #debug { | |
| 854 | + | body { | |
| 709 | 855 | position: relative; | |
| 710 | 856 | } | |
| 711 | 857 | ||
| 712 | - | #debug .debug-grid { | |
| 858 | + | /* | |
| 859 | + | .debug-grid { | |
| 713 | 860 | width: 100%; | |
| 714 | 861 | height: 100%; | |
| 715 | 862 | position: absolute; |
| ... | ... | @@ -717,10 +864,12 @@ h1 code, h2 code, h3 code, h4 code { | |
| 717 | 864 | left: 0; | |
| 718 | 865 | right: 0; | |
| 719 | 866 | bottom: 0; | |
| 720 | - | z-index: -1; | |
| 867 | + | z-index: 1000; | |
| 868 | + | pointer-events: none; | |
| 721 | 869 | background-image: | |
| 722 | - | repeating-linear-gradient(var(--code) 0 1px, transparent 1px 100%), | |
| 723 | - | repeating-linear-gradient(90deg, var(--code) 0 1px, transparent 1px 100%); | |
| 870 | + | repeating-linear-gradient(rgba(255, 121, 198, 0.18) 0 1px, transparent 1px 100%), | |
| 871 | + | repeating-linear-gradient(90deg, rgba(139, 233, 253, 0.10) 0 1px, transparent 1px 100%); | |
| 724 | 872 | background-size: 1ch var(--grid-height); | |
| 725 | 873 | margin: 0; | |
| 726 | 874 | } | |
| 875 | + | */ |
| ... | ... | @@ -1,9 +1,5 @@ | |
| 1 | 1 | {{define "marketing-footer"}} | |
| 2 | - | <footer> | |
| 3 | - | <hr /> | |
| 2 | + | <footer class="mono text-sm text-grey my-4"> | |
| 4 | 3 | <p class="font-italic">Built and maintained by <a href="https://pico.sh">pico.sh</a>.</p> | |
| 5 | - | <div> | |
| 6 | - | <a href="/rss.atom">rss</a> | |
| 7 | - | </div> | |
| 8 | 4 | </footer> | |
| 9 | 5 | {{end}} |
+18,
-12
| ... | ... | @@ -31,27 +31,33 @@ | |
| 31 | 31 | {{define "attrs"}}{{end}} | |
| 32 | 32 | ||
| 33 | 33 | {{define "body"}} | |
| 34 | - | <header class="text-center"> | |
| 35 | - | <h1 class="text-2xl font-bold">prose.sh</h1> | |
| 36 | - | <p class="text-lg">A blog platform for hackers</p> | |
| 37 | - | <div> | |
| 38 | - | <a href="https://pico.sh/prose" class="btn-link mt inline-block">LEARN MORE</a> | |
| 34 | + | <header> | |
| 35 | + | <h1>prose.sh</h1> | |
| 36 | + | <p>A blog platform for hackers</p> | |
| 37 | + | <div class="flex items-center gap my"> | |
| 38 | + | <span class="box-sm mono text-sm"><span class="text-green">$</span> ssh pico.sh</span> | |
| 39 | + | <a href="https://pico.sh/prose" class="mono">[docs]</a> | |
| 40 | + | <a href="/rss" class="mono">[rss]</a> | |
| 39 | 41 | </div> | |
| 40 | - | <hr class="mt-2" /> | |
| 41 | 42 | </header> | |
| 42 | 43 | ||
| 43 | 44 | <main> | |
| 45 | + | <div class="flex items-center text-sm text-grey mono my"> | |
| 46 | + | <span class="post-date">DATE</span> | |
| 47 | + | <span class="flex-1">POST</span> | |
| 48 | + | <span>SCORE</span> | |
| 49 | + | </div> | |
| 44 | 50 | {{range .Posts}} | |
| 45 | 51 | <article class="my"> | |
| 46 | 52 | <div class="flex items-center"> | |
| 47 | - | <time datetime="{{.PublishAtISO}}" class="font text-sm post-date">{{.PublishAt}}</time> | |
| 53 | + | <time datetime="{{.PublishAtISO}}" class="mono text-sm post-date">{{.PublishAt}}</time> | |
| 48 | 54 | <div class="flex-1"> | |
| 49 | - | <a class="text-md transform-none" href="{{.URL}}" style="text-transform: lowercase;">{{.Title}}</a> | |
| 50 | - | <address class="text-sm inline"> | |
| 51 | - | <a href="{{.BlogURL}}" class="link-grey">({{.Username}})</a> | |
| 52 | - | </address> | |
| 55 | + | <a class="text-md transform-none" href="{{.URL}}">{{.Title}}</a> | |
| 56 | + | <span class="text-sm mono"> | |
| 57 | + | <a href="{{.BlogURL}}" class="text-grey">~{{.Username}}</a> | |
| 58 | + | </span> | |
| 53 | 59 | </div> | |
| 54 | - | <span class="text-sm text-grey font-italic">{{.Score}}</span> | |
| 60 | + | <span class="text-sm text-grey mono">[{{.Score}}]</span> | |
| 55 | 61 | </div> | |
| 56 | 62 | </article> | |
| 57 | 63 | {{end}} |
+213,
-64
| ... | ... | @@ -18,6 +18,7 @@ | |
| 18 | 18 | :root { | |
| 19 | 19 | --line-height: 1.3rem; | |
| 20 | 20 | --grid-height: 0.65rem; | |
| 21 | + | --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; | |
| 21 | 22 | } | |
| 22 | 23 | ||
| 23 | 24 | @media (prefers-color-scheme: light) { |
| ... | ... | @@ -36,6 +37,7 @@ | |
| 36 | 37 | --hover: #c11e7a; | |
| 37 | 38 | --grey: #ccc; | |
| 38 | 39 | --grey-light: #6a708e; | |
| 40 | + | --green: #1a7f37; | |
| 39 | 41 | } | |
| 40 | 42 | } | |
| 41 | 43 |
| ... | ... | @@ -55,13 +57,13 @@ | |
| 55 | 57 | --hover: #ff80bf; | |
| 56 | 58 | --grey: #414558; | |
| 57 | 59 | --grey-light: #6a708e; | |
| 60 | + | --green: #50fa7b; | |
| 58 | 61 | } | |
| 59 | 62 | } | |
| 60 | 63 | ||
| 61 | 64 | html { | |
| 62 | 65 | background-color: var(--bg-color); | |
| 63 | 66 | color: var(--text-color); | |
| 64 | - | font-size: 16px; | |
| 65 | 67 | line-height: var(--line-height); | |
| 66 | 68 | font-family: | |
| 67 | 69 | -apple-system, |
| ... | ... | @@ -103,7 +105,8 @@ code, | |
| 103 | 105 | kbd, | |
| 104 | 106 | samp, | |
| 105 | 107 | pre { | |
| 106 | - | font-family: monospace; | |
| 108 | + | font-family: var(--font-mono); | |
| 109 | + | font-variant-numeric: tabular-nums; | |
| 107 | 110 | } | |
| 108 | 111 | ||
| 109 | 112 | code, |
| ... | ... | @@ -120,13 +123,11 @@ pre > code { | |
| 120 | 123 | } | |
| 121 | 124 | ||
| 122 | 125 | code { | |
| 123 | - | font-size: 90%; | |
| 124 | 126 | border-radius: 0.3rem; | |
| 125 | 127 | padding: 0.025rem 0.3rem; | |
| 126 | 128 | } | |
| 127 | 129 | ||
| 128 | 130 | pre { | |
| 129 | - | font-size: 0.8rem; | |
| 130 | 131 | border-radius: 1px; | |
| 131 | 132 | padding: var(--line-height); | |
| 132 | 133 | overflow-x: auto; |
| ... | ... | @@ -155,15 +156,48 @@ summary { | |
| 155 | 156 | h1, | |
| 156 | 157 | h2, | |
| 157 | 158 | h3, | |
| 158 | - | h4 { | |
| 159 | + | h4, | |
| 160 | + | h5, | |
| 161 | + | h6 { | |
| 159 | 162 | margin: 0; | |
| 160 | 163 | padding: 0; | |
| 161 | 164 | border: 0; | |
| 162 | - | font-style: normal; | |
| 163 | - | font-weight: inherit; | |
| 164 | - | font-size: inherit; | |
| 165 | + | font-family: var(--font-mono); | |
| 166 | + | font-weight: bold; | |
| 167 | + | } | |
| 168 | + | ||
| 169 | + | h1 { | |
| 170 | + | font-size: 1.6rem; | |
| 171 | + | line-height: calc(var(--line-height) * 1.5); | |
| 172 | + | margin-top: calc(var(--line-height) * 2.5); | |
| 173 | + | margin-bottom: var(--grid-height); | |
| 174 | + | } | |
| 175 | + | ||
| 176 | + | h2 { | |
| 177 | + | font-size: 1.3rem; | |
| 178 | + | line-height: var(--line-height); | |
| 179 | + | margin-top: calc(var(--line-height) * 2); | |
| 180 | + | margin-bottom: var(--grid-height); | |
| 181 | + | } | |
| 182 | + | ||
| 183 | + | h3 { | |
| 184 | + | font-size: 1.1rem; | |
| 185 | + | line-height: var(--line-height); | |
| 186 | + | margin-top: calc(var(--line-height) * 1.5); | |
| 187 | + | margin-bottom: var(--grid-height); | |
| 188 | + | } | |
| 189 | + | ||
| 190 | + | h4, | |
| 191 | + | h5, | |
| 192 | + | h6 { | |
| 193 | + | font-size: 1rem; | |
| 194 | + | line-height: var(--line-height); | |
| 195 | + | margin-top: var(--line-height); | |
| 196 | + | margin-bottom: var(--grid-height); | |
| 197 | + | color: var(--white-dark); | |
| 165 | 198 | } | |
| 166 | 199 | ||
| 200 | + | ||
| 167 | 201 | path { | |
| 168 | 202 | fill: var(--text-color); | |
| 169 | 203 | stroke: var(--text-color); |
| ... | ... | @@ -172,25 +206,45 @@ path { | |
| 172 | 206 | hr { | |
| 173 | 207 | color: inherit; | |
| 174 | 208 | border: 0; | |
| 175 | - | height: 2px; | |
| 176 | - | background: var(--grey); | |
| 177 | - | margin: calc(var(--grid-height) - 2px) auto; | |
| 209 | + | height: 1px; | |
| 210 | + | background: var(--grey-light); | |
| 211 | + | margin: calc(var(--grid-height) - 1px) auto; | |
| 212 | + | } | |
| 213 | + | ||
| 214 | + | hr.dashed { | |
| 215 | + | border: none; | |
| 216 | + | border-top: 1px dashed var(--grey-light); | |
| 217 | + | background: none; | |
| 218 | + | height: 0; | |
| 219 | + | margin: calc(var(--grid-height) - 1px) auto; | |
| 178 | 220 | } | |
| 179 | 221 | ||
| 180 | 222 | a { | |
| 181 | - | text-decoration: none; | |
| 182 | 223 | color: var(--link-color); | |
| 224 | + | text-decoration: underline; | |
| 225 | + | text-decoration-thickness: 1px; | |
| 226 | + | text-underline-offset: 2px; | |
| 227 | + | padding: 0 2px; | |
| 228 | + | border-radius: 1px; | |
| 229 | + | transition: background-color 0.1s ease, color 0.1s ease; | |
| 183 | 230 | } | |
| 184 | 231 | ||
| 185 | - | a:hover, | |
| 186 | - | a:visited:hover { | |
| 187 | - | text-decoration: underline; | |
| 232 | + | a:hover { | |
| 233 | + | background-color: var(--link-color); | |
| 234 | + | color: var(--bg-color); | |
| 235 | + | text-decoration: none; | |
| 188 | 236 | } | |
| 189 | 237 | ||
| 190 | 238 | a:visited { | |
| 191 | 239 | color: var(--visited); | |
| 192 | 240 | } | |
| 193 | 241 | ||
| 242 | + | a:visited:hover { | |
| 243 | + | background-color: var(--visited); | |
| 244 | + | color: var(--bg-color); | |
| 245 | + | text-decoration: none; | |
| 246 | + | } | |
| 247 | + | ||
| 194 | 248 | section { | |
| 195 | 249 | margin-bottom: 1.4rem; | |
| 196 | 250 | } |
| ... | ... | @@ -227,39 +281,73 @@ blockquote code { | |
| 227 | 281 | border: 1px solid var(--blockquote); | |
| 228 | 282 | } | |
| 229 | 283 | ||
| 230 | - | ul { | |
| 231 | - | padding: 0 0 0 var(--line-height); | |
| 284 | + | ul, | |
| 285 | + | ol { | |
| 286 | + | padding: 0 15px; | |
| 232 | 287 | list-style-position: inside; | |
| 233 | 288 | list-style-type: square; | |
| 234 | - | margin: var(--line-height) 0; | |
| 289 | + | margin: var(--grid-height) 0; | |
| 235 | 290 | } | |
| 236 | 291 | ||
| 237 | 292 | ul[style*="list-style-type: none;"] { | |
| 238 | 293 | padding: 0; | |
| 239 | 294 | } | |
| 240 | 295 | ||
| 241 | - | ol { | |
| 296 | + | ol ul, ol ol, ul ol, ul ul { | |
| 242 | 297 | padding: 0 0 0 var(--line-height); | |
| 243 | - | list-style-type: decimal; | |
| 244 | - | margin: var(--line-height) 0; | |
| 298 | + | margin: 0; | |
| 245 | 299 | } | |
| 246 | 300 | ||
| 247 | - | ol[style*="list-style-type: none;"] { | |
| 301 | + | li { | |
| 302 | + | margin: var(--grid-height) 0; | |
| 248 | 303 | padding: 0; | |
| 249 | 304 | } | |
| 250 | 305 | ||
| 251 | - | ol ul, ol ol, ul ol, ul ul { | |
| 252 | - | padding: 0 0 0 3ch; | |
| 253 | - | margin: 0; | |
| 306 | + | li::marker { | |
| 307 | + | line-height: 0; | |
| 308 | + | color: var(--grey-light); | |
| 254 | 309 | } | |
| 255 | 310 | ||
| 256 | - | li { | |
| 311 | + | li blockquote, | |
| 312 | + | li pre { | |
| 313 | + | display: inline-block; | |
| 257 | 314 | margin: 0; | |
| 258 | - | padding: 0; | |
| 315 | + | width: 100%; | |
| 259 | 316 | } | |
| 260 | 317 | ||
| 261 | - | li::marker { | |
| 262 | - | line-height: 0; | |
| 318 | + | li pre { | |
| 319 | + | padding: var(--grid-height); | |
| 320 | + | } | |
| 321 | + | ||
| 322 | + | [role="list"] { | |
| 323 | + | display: flex; | |
| 324 | + | flex-direction: column; | |
| 325 | + | gap: var(--grid-height); | |
| 326 | + | } | |
| 327 | + | ||
| 328 | + | [role="list"] [role="list"] { | |
| 329 | + | margin-left: 1.3rem; | |
| 330 | + | } | |
| 331 | + | ||
| 332 | + | [role="listitem"] { | |
| 333 | + | display: flex; | |
| 334 | + | align-items: flex-start; | |
| 335 | + | gap: 5px; | |
| 336 | + | } | |
| 337 | + | ||
| 338 | + | [role="listitem"]:has(pre, img, blockquote) { | |
| 339 | + | align-items: center; | |
| 340 | + | } | |
| 341 | + | ||
| 342 | + | table { | |
| 343 | + | border-collapse: collapse; | |
| 344 | + | margin: var(--line-height) 0; | |
| 345 | + | } | |
| 346 | + | ||
| 347 | + | th, | |
| 348 | + | td { | |
| 349 | + | border: 1px solid var(--white); | |
| 350 | + | padding: var(--grid-height); | |
| 263 | 351 | } | |
| 264 | 352 | ||
| 265 | 353 | footer { |
| ... | ... | @@ -301,8 +389,11 @@ sup { | |
| 301 | 389 | width: 100%; | |
| 302 | 390 | } | |
| 303 | 391 | ||
| 304 | - | .mono { | |
| 305 | - | font-family: monospace; | |
| 392 | + | .mono, | |
| 393 | + | time, | |
| 394 | + | nav { | |
| 395 | + | font-family: var(--font-mono); | |
| 396 | + | font-variant-numeric: tabular-nums; | |
| 306 | 397 | } | |
| 307 | 398 | ||
| 308 | 399 | .link-alt-hover, |
| ... | ... | @@ -315,6 +406,7 @@ sup { | |
| 315 | 406 | ||
| 316 | 407 | .link-alt-hover:visited:hover, | |
| 317 | 408 | .link-alt-hover:hover { | |
| 409 | + | background-color: transparent; | |
| 318 | 410 | text-decoration: underline; | |
| 319 | 411 | } | |
| 320 | 412 |
| ... | ... | @@ -328,6 +420,20 @@ sup { | |
| 328 | 420 | ||
| 329 | 421 | .link-alt:visited:hover, | |
| 330 | 422 | .link-alt:hover { | |
| 423 | + | background-color: transparent; | |
| 424 | + | text-decoration: underline; | |
| 425 | + | } | |
| 426 | + | ||
| 427 | + | .link-grey, | |
| 428 | + | .link-grey:visited { | |
| 429 | + | color: var(--grey-light); | |
| 430 | + | text-decoration: none; | |
| 431 | + | } | |
| 432 | + | ||
| 433 | + | .link-grey:hover, | |
| 434 | + | .link-grey:visited:hover { | |
| 435 | + | background-color: transparent; | |
| 436 | + | color: var(--text-color); | |
| 331 | 437 | text-decoration: underline; | |
| 332 | 438 | } | |
| 333 | 439 |
| ... | ... | @@ -336,19 +442,35 @@ sup { | |
| 336 | 442 | } | |
| 337 | 443 | ||
| 338 | 444 | .text-2xl { | |
| 339 | - | font-size: var(--line-height); | |
| 445 | + | font-size: 1.6rem; | |
| 446 | + | font-weight: bold; | |
| 447 | + | line-height: calc(var(--line-height) * 1.5); | |
| 448 | + | margin-bottom: var(--grid-height); | |
| 449 | + | } | |
| 450 | + | ||
| 451 | + | .text-xl { | |
| 452 | + | font-size: 1.3rem; | |
| 340 | 453 | font-weight: bold; | |
| 341 | 454 | line-height: var(--line-height); | |
| 342 | 455 | margin-bottom: var(--grid-height); | |
| 343 | - | text-transform: uppercase; | |
| 344 | 456 | } | |
| 345 | 457 | ||
| 346 | - | .text-xl, .text-lg, .text-md { | |
| 458 | + | .text-lg { | |
| 459 | + | font-size: 1.1rem; | |
| 460 | + | font-weight: bold; | |
| 461 | + | line-height: var(--line-height); | |
| 462 | + | margin-bottom: var(--grid-height); | |
| 463 | + | } | |
| 464 | + | ||
| 465 | + | .text-md { | |
| 347 | 466 | font-size: 1rem; | |
| 348 | 467 | font-weight: bold; | |
| 349 | 468 | line-height: var(--line-height); | |
| 350 | 469 | margin-bottom: var(--grid-height); | |
| 351 | - | text-transform: uppercase; | |
| 470 | + | } | |
| 471 | + | ||
| 472 | + | .text-right { | |
| 473 | + | text-align: right; | |
| 352 | 474 | } | |
| 353 | 475 | ||
| 354 | 476 | .text-sm { |
| ... | ... | @@ -563,13 +685,15 @@ sup { | |
| 563 | 685 | ||
| 564 | 686 | /* ==== MARKDOWN ==== */ | |
| 565 | 687 | ||
| 688 | + | .md > :first-child { | |
| 689 | + | margin-top: 0 !important; | |
| 690 | + | } | |
| 691 | + | ||
| 566 | 692 | .md h1, | |
| 567 | 693 | .md h2, | |
| 568 | 694 | .md h3, | |
| 569 | 695 | .md h4 { | |
| 570 | 696 | padding: 0; | |
| 571 | - | margin: 0; | |
| 572 | - | /* margin: 1.5rem 0 0.9rem 0; */ | |
| 573 | 697 | font-weight: bold; | |
| 574 | 698 | } | |
| 575 | 699 |
| ... | ... | @@ -581,25 +705,17 @@ sup { | |
| 581 | 705 | text-decoration: none; | |
| 582 | 706 | } | |
| 583 | 707 | ||
| 584 | - | h1 code, h2 code, h3 code, h4 code { | |
| 585 | - | text-transform: none; | |
| 586 | - | } | |
| 587 | - | ||
| 588 | - | .md h1 { | |
| 589 | - | font-size: 1rem; | |
| 590 | - | line-height: var(--line-height); | |
| 591 | - | margin-top: calc(var(--line-height) * 2); | |
| 592 | - | margin-bottom: var(--grid-height); | |
| 593 | - | text-transform: uppercase; | |
| 708 | + | .md h1 a:hover, | |
| 709 | + | .md h2 a:hover, | |
| 710 | + | .md h3 a:hover, | |
| 711 | + | .md h4 a:hover { | |
| 712 | + | background-color: transparent; | |
| 713 | + | color: var(--hover); | |
| 714 | + | text-decoration: underline; | |
| 594 | 715 | } | |
| 595 | 716 | ||
| 596 | - | .md h2, .md h3, .md h4 { | |
| 597 | - | font-size: 1rem; | |
| 598 | - | line-height: var(--line-height); | |
| 599 | - | margin-top: calc(var(--line-height) * 2); | |
| 600 | - | margin-bottom: var(--line-height); | |
| 601 | - | text-transform: uppercase; | |
| 602 | - | color: var(--white-dark); | |
| 717 | + | h1 code, h2 code, h3 code, h4 code { | |
| 718 | + | text-transform: none; | |
| 603 | 719 | } | |
| 604 | 720 | ||
| 605 | 721 | /* ==== HELPERS ==== */ |
| ... | ... | @@ -630,6 +746,11 @@ h1 code, h2 code, h3 code, h4 code { | |
| 630 | 746 | display: inline-block; | |
| 631 | 747 | } | |
| 632 | 748 | ||
| 749 | + | .btn:hover { | |
| 750 | + | background-color: var(--link-color); | |
| 751 | + | color: var(--bg-color); | |
| 752 | + | } | |
| 753 | + | ||
| 633 | 754 | .btn-link, | |
| 634 | 755 | .btn-link:visited { | |
| 635 | 756 | border: 2px solid var(--link-color); |
| ... | ... | @@ -640,26 +761,51 @@ h1 code, h2 code, h3 code, h4 code { | |
| 640 | 761 | display: inline-block; | |
| 641 | 762 | } | |
| 642 | 763 | ||
| 764 | + | .btn-link:hover, | |
| 765 | + | .btn-link:visited:hover { | |
| 766 | + | background-color: var(--link-color); | |
| 767 | + | color: var(--bg-color); | |
| 768 | + | text-decoration: none; | |
| 769 | + | } | |
| 770 | + | ||
| 643 | 771 | .box { | |
| 644 | - | border: 2px solid var(--grey-light); | |
| 772 | + | border: 1px solid var(--grey-light); | |
| 645 | 773 | padding: var(--grid-height); | |
| 774 | + | background-color: var(--pre); | |
| 646 | 775 | } | |
| 647 | 776 | ||
| 648 | 777 | .box-sm { | |
| 649 | - | border: 2px solid var(--grey-light); | |
| 778 | + | border: 1px solid var(--grey-light); | |
| 779 | + | padding: var(--grid-height); | |
| 780 | + | background-color: var(--pre); | |
| 781 | + | } | |
| 782 | + | ||
| 783 | + | .box-dashed { | |
| 784 | + | border: 1px dashed var(--grey-light); | |
| 650 | 785 | padding: var(--grid-height); | |
| 651 | 786 | } | |
| 652 | 787 | ||
| 653 | 788 | .box-alert { | |
| 654 | - | border: 2px solid var(--hover); | |
| 789 | + | border: 1px solid var(--hover); | |
| 655 | 790 | padding: var(--line-height); | |
| 656 | 791 | } | |
| 657 | 792 | ||
| 658 | 793 | .box-sm-alert { | |
| 659 | - | border: 2px solid var(--hover); | |
| 794 | + | border: 1px solid var(--hover); | |
| 660 | 795 | padding: var(--grid-height); | |
| 661 | 796 | } | |
| 662 | 797 | ||
| 798 | + | .text-green { | |
| 799 | + | color: var(--green); | |
| 800 | + | } | |
| 801 | + | ||
| 802 | + | .prompt, | |
| 803 | + | pre.cmd::before { | |
| 804 | + | content: "$ "; | |
| 805 | + | color: var(--green); | |
| 806 | + | font-weight: bold; | |
| 807 | + | } | |
| 808 | + | ||
| 663 | 809 | .list-none { | |
| 664 | 810 | list-style-type: none; | |
| 665 | 811 | } |
| ... | ... | @@ -693,7 +839,7 @@ h1 code, h2 code, h3 code, h4 code { | |
| 693 | 839 | ||
| 694 | 840 | @media only screen and (max-width: 40em) { | |
| 695 | 841 | body { | |
| 696 | - | padding: 0 1rem; | |
| 842 | + | padding: 0 var(--grid-height); | |
| 697 | 843 | } | |
| 698 | 844 | ||
| 699 | 845 | header { |
| ... | ... | @@ -705,11 +851,12 @@ h1 code, h2 code, h3 code, h4 code { | |
| 705 | 851 | } | |
| 706 | 852 | } | |
| 707 | 853 | ||
| 708 | - | #debug { | |
| 854 | + | body { | |
| 709 | 855 | position: relative; | |
| 710 | 856 | } | |
| 711 | 857 | ||
| 712 | - | #debug .debug-grid { | |
| 858 | + | /* | |
| 859 | + | .debug-grid { | |
| 713 | 860 | width: 100%; | |
| 714 | 861 | height: 100%; | |
| 715 | 862 | position: absolute; |
| ... | ... | @@ -717,13 +864,15 @@ h1 code, h2 code, h3 code, h4 code { | |
| 717 | 864 | left: 0; | |
| 718 | 865 | right: 0; | |
| 719 | 866 | bottom: 0; | |
| 720 | - | z-index: -1; | |
| 867 | + | z-index: 1000; | |
| 868 | + | pointer-events: none; | |
| 721 | 869 | background-image: | |
| 722 | - | repeating-linear-gradient(var(--code) 0 1px, transparent 1px 100%), | |
| 723 | - | repeating-linear-gradient(90deg, var(--code) 0 1px, transparent 1px 100%); | |
| 870 | + | repeating-linear-gradient(rgba(255, 121, 198, 0.18) 0 1px, transparent 1px 100%), | |
| 871 | + | repeating-linear-gradient(90deg, rgba(139, 233, 253, 0.10) 0 1px, transparent 1px 100%); | |
| 724 | 872 | background-size: 1ch var(--grid-height); | |
| 725 | 873 | margin: 0; | |
| 726 | 874 | } | |
| 875 | + | */ | |
| 727 | 876 | body { | |
| 728 | 877 | max-width: var(--body-max-width, 720px); | |
| 729 | 878 | } |