Swap out simple.css for bahunya.css and add a nice anchor style

This commit is contained in:
James Mills 2023-03-27 00:33:50 +10:00
parent 2790dad79d
commit 8dcc4ab146
No known key found for this signature in database
GPG Key ID: AC4C014F1440EBD6
7 changed files with 1020 additions and 690 deletions

View File

@ -16,23 +16,18 @@
<body> <body>
<header> <header>
<nav> <h1>{{ title }}</h1>
<a href="/">Home</a></li>
<a href="https://zs.mills.io/">Demo</a></li>
<a href="https://git.mills.io/prologic/zs-starter-template"><svg xmlns="http://www.w3.org/2000/svg" class="icon"
width="32" height="32" viewBox="0 0 32 32">
<path fill="currentColor"
d="M5.583 7.229C3.119 7.224-.172 8.786.01 12.708c.281 6.125 6.557 6.693 9.068 6.745c.271 1.146 3.224 5.109 5.411 5.318h9.573c5.74-.38 10.036-17.365 6.854-17.427c-5.271.25-8.396.375-11.073.396v5.297l-.839-.365l-.005-4.932c-3.073 0-5.781-.141-10.917-.396c-.646-.005-1.542-.115-2.5-.115zm.344 2.167h.297c.349 3.141.917 4.974 2.068 7.781c-2.938-.349-5.432-1.198-5.891-4.38c-.24-1.646.563-3.365 3.526-3.401zm11.412 3.083c.198.005.406.042.594.13l1 .432l-.714 1.302a.989.989 0 0 0-.323.052c-.464.151-.708.604-.542 1.021a.843.843 0 0 0 .151.229l-1.234 2.25a.841.841 0 0 0-.297.052c-.464.146-.708.604-.542 1.016c.172.417.682.63 1.151.479c.464-.146.703-.604.536-1.021a.834.834 0 0 0-.208-.292l1.203-2.188c.13.01.26 0 .391-.042a.805.805 0 0 0 .281-.151c.464.198.844.354 1.12.49c.406.203.552.339.599.49c.042.146-.005.427-.24.922c-.172.37-.458.896-.797 1.51c-.115 0-.229.016-.333.052c-.469.151-.708.604-.542 1.021c.167.411.682.625 1.146.479c.469-.151.708-.604.542-1.021a.862.862 0 0 0-.182-.271c.333-.609.62-1.135.807-1.526c.25-.536.38-.938.266-1.323s-.469-.635-.932-.865c-.307-.151-.693-.313-1.146-.505c.005-.109-.01-.214-.052-.318s-.109-.198-.193-.281l.703-1.281l3.901 1.682c.703.307.995 1.057.651 1.682l-2.682 4.906c-.339.625-1.182.885-1.885.578l-5.516-2.38c-.703-.307-.995-1.057-.656-1.682l2.682-4.906c.234-.432.708-.688 1.208-.708h.083z" />
</svg>Source</a>
</nav>
</header> </header>
<nav>
<a href="/">Home 🏠</a>
<a href="https://zs.mills.io/">Demo 🥳</a>
<a href="https://git.mills.io/prologic/zs">Source 💾</a>
</nav>
<main>{{ content }}</main> <main>{{ content }}</main>
<footer> <footer>
<p> Copyright &copy; James Mills ·
Copyright (c) James Mills ·
Last modified <time datetime="{{ date +%Y-%m-%dT%H:%M:%SZ%:z }}">{{ date }}</time> · Last modified <time datetime="{{ date +%Y-%m-%dT%H:%M:%SZ%:z }}">{{ date }}</time> ·
Built with <a href="https://git.mills.io/prologic/zs">zs Built with <a href="https://git.mills.io/prologic/zs">zs</a>
</p>
</footer> </footer>
</body> </body>
{{ scripts }} {{ scripts }}

View File

@ -2,7 +2,7 @@
set -e set -e
CSS="simple style" CSS="bahunya site"
JS="live" JS="live"
for css in $CSS; do for css in $CSS; do

View File

@ -2,7 +2,7 @@
set -e set -e
CSS="simple style" CSS="bahunya site"
ext="css" ext="css"
if [ -n "$ZS_PRODUCTION" ]; then if [ -n "$ZS_PRODUCTION" ]; then

995
css/bahunya.css Normal file
View File

@ -0,0 +1,995 @@
:root {
--background-body: #0d1117;
--background: rgb(22, 27, 34);
--background-bright: rgba(240, 246, 252, 0.15);
--background-alt: #1a242f;
--selection: #1c76c5;
--text-main: rgb(201, 209, 217);
--text-bright: rgb(227, 233, 240);
--text-muted: rgb(139, 148, 158);
--links: #e3bc5e;
--focus: rgb(56, 139, 253);
--focus-background: rgb(12, 45, 107);
--border: rgb(33, 37, 44);
--border-muted: rgb(33, 38, 45);
--border-bright: rgb(139, 148, 158);
--button-hover: #324759;
--form-placeholder: #a9a9a9;
--select-arrow: svg-load("./assets/select-arrow.svg", fill: #efefef);
/* Fonts */
--monospace: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
--sans-serif: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
"Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
"Helvetica Neue", "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji",
sans-serif;
}
html {
box-sizing: border-box;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
"Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans",
"Helvetica Neue", "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji",
sans-serif;
font-family: var(--sans-serif);
line-height: 1.7;
max-width: 50rem;
margin: 6rem auto;
padding: 0 10px;
word-wrap: break-word;
color: rgb(201, 209, 217);
color: var(--text-main);
background: #0d1117;
background: var(--background-body);
text-rendering: optimizeLegibility;
}
h1,
h2,
h3,
h4,
h5 {
margin: 3rem 0 1.38rem;
line-height: 1.3;
}
h1 {
font-size: 2.488rem;
}
h2 {
font-size: 2.074rem;
}
h3 {
font-size: 1.728rem;
}
h4 {
font-size: 1.44rem;
}
h5 {
font-size: 1.2rem;
}
h6 {
font-size: 1rem;
}
small {
font-size: 0.833rem;
}
h1 {
color: rgb(227, 233, 240);
color: var(--text-bright);
}
h2 {
color: rgb(227, 233, 240);
color: var(--text-bright);
}
h3 {
color: rgb(227, 233, 240);
color: var(--text-bright);
}
h4 {
color: rgb(227, 233, 240);
color: var(--text-bright);
}
h5 {
color: rgb(227, 233, 240);
color: var(--text-bright);
}
h6 {
color: rgb(227, 233, 240);
color: var(--text-bright);
}
strong {
color: rgb(227, 233, 240);
color: var(--text-bright);
}
blockquote {
border-left: 4px solid rgb(56, 139, 253);
border-left: 4px solid var(--focus);
margin: 1.5em 0;
padding: 0em 1em;
}
blockquote> :first-child {
margin-top: 0;
}
blockquote> :last-child {
margin-bottom: 0;
}
blockquote>footer {
border: 0;
}
address {
font-style: normal;
}
a[href^="mailto\:"]::before {
content: "📧 ";
}
a[href^="tel\:"]::before {
content: "📞 ";
}
a[href^="sms\:"]::before {
content: "💬 ";
}
mark {
background-color: #e3bc5e;
background-color: var(--links);
border-radius: 2px;
padding: 0 2px 0 2px;
}
ul,
ol {
padding-left: 2em;
}
aside {
width: 40%;
padding-left: .5rem;
margin-left: .5rem;
float: right;
border-left: 2px solid rgb(56, 139, 253);
border-left: 2px solid var(--focus);
font-style: italic;
}
aside>p {
margin: .5rem;
}
button,
select,
input[type="submit"],
input[type="reset"],
input[type="button"],
input[type="checkbox"],
input[type="range"],
input[type="radio"] {
cursor: pointer;
}
input:not([type="checkbox"]):not([type="radio"]),
select {
display: block;
}
input {
color: rgb(227, 233, 240);
color: var(--text-bright);
background-color: rgb(22, 27, 34);
background-color: var(--background);
font-family: inherit;
font-size: inherit;
margin-right: 6px;
margin-bottom: 6px;
padding: 10px;
border: none;
border-radius: 6px;
outline: none;
border: 1px solid rgb(33, 38, 45);
border: 1px solid var(--border-muted);
}
textarea {
color: rgb(227, 233, 240);
color: var(--text-bright);
background-color: rgb(22, 27, 34);
background-color: var(--background);
font-family: inherit;
font-size: inherit;
margin-right: 6px;
margin-bottom: 6px;
padding: 10px;
border: none;
border-radius: 6px;
outline: none;
border: 1px solid rgb(33, 38, 45);
border: 1px solid var(--border-muted);
}
select {
color: rgb(227, 233, 240);
color: var(--text-bright);
background-color: rgb(22, 27, 34);
background-color: var(--background);
font-family: inherit;
font-size: inherit;
margin-right: 6px;
margin-bottom: 6px;
padding: 10px;
border: none;
border-radius: 6px;
outline: none;
border: 1px solid rgb(33, 38, 45);
border: 1px solid var(--border-muted);
}
input[type="color"] {
min-height: 2rem;
padding: 8px;
cursor: pointer;
}
input[type="checkbox"],
input[type="radio"] {
height: 1.2em;
width: 1em;
}
input[type="radio"] {
border-radius: 100%;
}
input {
vertical-align: top;
}
label {
vertical-align: middle;
margin-bottom: 4px;
display: inline-block;
}
input:not([type="checkbox"]):not([type="radio"]),
input[type="range"],
select,
button,
textarea {
-webkit-appearance: none;
}
textarea {
display: block;
margin-right: 0;
resize: vertical;
width: 100%;
}
textarea:not([cols]) {
width: 100%;
}
textarea:not([rows]) {
min-height: 40px;
height: 140px;
}
select {
background: rgb(22, 27, 34) svg-load("./assets/select-arrow.svg", fill: #efefef) calc(100% - 12px) 50% / 12px no-repeat;
background: var(--background) var(--select-arrow) calc(100% - 12px) 50% / 12px no-repeat;
padding-right: 35px;
}
select::-ms-expand {
display: none;
}
select[multiple] {
padding-right: 10px;
background-image: none;
overflow-y: auto;
}
input:focus {
border: 1px solid rgb(56, 139, 253);
border: 1px solid var(--focus);
box-shadow: 0 0 0 3px rgb(12, 45, 107);
box-shadow: 0 0 0 3px var(--focus-background);
}
select:focus {
border: 1px solid rgb(56, 139, 253);
border: 1px solid var(--focus);
box-shadow: 0 0 0 3px rgb(12, 45, 107);
box-shadow: 0 0 0 3px var(--focus-background);
}
textarea:focus {
border: 1px solid rgb(56, 139, 253);
border: 1px solid var(--focus);
box-shadow: 0 0 0 3px rgb(12, 45, 107);
box-shadow: 0 0 0 3px var(--focus-background);
}
input:disabled,
select:disabled,
button:disabled,
textarea:disabled {
cursor: not-allowed;
opacity: 0.5;
}
::-moz-placeholder {
color: #a9a9a9;
color: var(--form-placeholder);
}
:-ms-input-placeholder {
color: #a9a9a9;
color: var(--form-placeholder);
}
::placeholder {
color: #a9a9a9;
color: var(--form-placeholder);
}
fieldset {
border: 1px rgb(33, 37, 44) solid;
border: 1px var(--border) solid;
border-radius: 6px;
margin: 0;
margin-bottom: 12px;
padding: 10px 20px;
}
legend {
font-size: 0.9em;
font-weight: 600;
}
input[type="range"] {
margin: 10px 0;
padding: 10px 0;
background: transparent;
}
input[type="range"]:focus {
outline: none;
}
input[type="range"]::-webkit-slider-runnable-track {
width: 100%;
height: 9.5px;
-webkit-transition: 0.2s;
transition: 0.2s;
background: rgb(22, 27, 34);
background: var(--background);
border-radius: 3px;
}
input[type="range"]::-webkit-slider-thumb {
box-shadow: 0 1px 1px #000, 0 0 1px #0d0d0d;
height: 20px;
width: 20px;
border-radius: 50%;
background: rgb(33, 37, 44);
background: var(--border);
-webkit-appearance: none;
margin-top: -7px;
}
input[type="range"]:focus::-webkit-slider-runnable-track {
background: rgb(22, 27, 34);
background: var(--background);
}
input[type="range"]::-moz-range-track {
width: 100%;
height: 9.5px;
-moz-transition: 0.2s;
transition: 0.2s;
background: rgb(22, 27, 34);
background: var(--background);
border-radius: 3px;
}
input[type="range"]::-moz-range-thumb {
box-shadow: 1px 1px 1px #000, 0 0 1px #0d0d0d;
height: 20px;
width: 20px;
border-radius: 50%;
background: rgb(33, 37, 44);
background: var(--border);
}
input[type="range"]::-ms-track {
width: 100%;
height: 9.5px;
background: transparent;
border-color: transparent;
border-width: 16px 0;
color: transparent;
}
input[type="range"]::-ms-fill-lower {
background: rgb(22, 27, 34);
background: var(--background);
border: 0.2px solid #010101;
border-radius: 3px;
box-shadow: 1px 1px 1px #000, 0 0 1px #0d0d0d;
}
input[type="range"]::-ms-fill-upper {
background: rgb(22, 27, 34);
background: var(--background);
border: 0.2px solid #010101;
border-radius: 3px;
box-shadow: 1px 1px 1px #000, 0 0 1px #0d0d0d;
}
input[type="range"]::-ms-thumb {
box-shadow: 1px 1px 1px #000, 0 0 1px #0d0d0d;
border: 1px solid #000;
height: 20px;
width: 20px;
border-radius: 50%;
background: rgb(33, 37, 44);
background: var(--border);
}
input[type="range"]:focus::-ms-fill-lower {
background: rgb(22, 27, 34);
background: var(--background);
}
input[type="range"]:focus::-ms-fill-upper {
background: rgb(22, 27, 34);
background: var(--background);
}
a {
text-decoration: none;
color: #e3bc5e;
color: var(--links);
}
a:hover {
text-decoration: underline;
}
code {
font-size: 85%;
font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
font-family: var(--monospace);
}
samp {
font-size: 85%;
font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
font-family: var(--monospace);
}
tt {
font-size: 85%;
font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
font-family: var(--monospace);
}
var {
font-size: 85%;
font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
font-family: var(--monospace);
}
kbd {
font-size: 85%;
font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
font-family: var(--monospace);
}
code,
samp,
tt,
kbd {
padding: 0.2em 0.4em;
border-radius: 0.4em;
}
code {
background: rgba(240, 246, 252, 0.15);
background: var(--background-bright);
}
samp {
background: rgba(240, 246, 252, 0.15);
background: var(--background-bright);
}
tt {
background: rgba(240, 246, 252, 0.15);
background: var(--background-bright);
}
pre {
display: block;
overflow-x: auto;
}
pre>code {
background: rgb(22, 27, 34);
background: var(--background);
padding: 1em;
display: block;
overflow-x: auto;
}
var {
color: rgb(56, 139, 253);
color: var(--focus);
font-style: normal;
}
kbd {
border: 1px solid rgb(139, 148, 158);
border: 1px solid var(--border-bright);
font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
font-family: var(--monospace);
}
img,
video {
max-width: 100%;
height: auto;
}
hr {
border: none;
border-top: 1px solid rgb(139, 148, 158);
border-top: 1px solid var(--border-bright);
margin: 1em 0;
}
table {
border-collapse: collapse;
margin-bottom: 10px;
width: 100%;
table-layout: fixed;
overflow-x: auto;
display: block;
}
table caption {
text-align: left;
}
td,
th {
padding: 6px;
text-align: left;
vertical-align: top;
word-wrap: break-word;
}
thead {
border-bottom: 1px solid rgb(139, 148, 158);
border-bottom: 1px solid var(--border-bright);
}
tfoot {
border-top: 1px solid rgb(139, 148, 158);
border-top: 1px solid var(--border-bright);
}
tbody tr:nth-child(even) {
background-color: rgb(22, 27, 34);
background-color: var(--background);
}
tbody tr:nth-child(even) button {
background-color: #1a242f;
background-color: var(--background-alt);
}
tbody tr:nth-child(even) button:hover {
background-color: #0d1117;
background-color: var(--background-body);
}
::-moz-selection {
background-color: #1c76c5;
background-color: var(--selection);
color: rgb(227, 233, 240);
color: var(--text-bright);
}
::selection {
background-color: #1c76c5;
background-color: var(--selection);
color: rgb(227, 233, 240);
color: var(--text-bright);
}
details summary {
padding: 0.5rem 0;
border-top: 1px solid rgb(33, 37, 44);
border-top: 1px solid var(--border);
cursor: pointer;
font-size: 1.2rem;
outline: none;
/* font-weight: 300; */
/* list-style: none; */
}
/* details summary:after {
content: "+";
color: white;
position: absolute;
font-size: 1.75rem;
line-height: 0;
margin-top: 0.75rem;
right: 0;
font-weight: 200;
transform-origin: center;
transition: 200ms linear;
}
details[open] summary:after {
transform: rotate(45deg);
font-size: 2rem;
} */
summary:hover,
summary:focus {
text-decoration: underline;
}
details> :not(summary) {
/* margin-top: 0; */
}
summary::-webkit-details-marker {
/* color: var(--text-main); */
}
dialog {
background-color: #0d1117;
background-color: var(--background-body);
color: rgb(201, 209, 217);
color: var(--text-main);
border: none;
border-radius: 6px;
border: 1px solid rgb(33, 37, 44);
border: 1px solid var(--border);
padding: 10px 30px;
}
dialog>header:first-child {
border-radius: 6px 6px 0 0;
margin: -10px -30px 10px;
padding: 10px;
text-align: center;
border-bottom: 1px solid rgb(33, 37, 44);
border-bottom: 1px solid var(--border);
}
dialog::-webkit-backdrop {
background: #0000009c;
-webkit-backdrop-filter: blur(4px);
backdrop-filter: blur(4px);
}
dialog::backdrop {
background: #0000009c;
-webkit-backdrop-filter: blur(4px);
backdrop-filter: blur(4px);
}
footer {
border-top: 1px solid rgb(33, 37, 44);
border-top: 1px solid var(--border);
padding-top: 10px;
color: rgb(139, 148, 158);
color: var(--text-muted);
}
body>footer {
margin-top: 40px;
}
@media print {
body,
pre,
code,
summary,
details,
button,
input,
textarea {
background-color: #fff;
}
button,
input,
textarea {
border: 1px solid #000;
}
body,
h1,
h2,
h3,
h4,
h5,
h6,
pre,
code,
button,
input,
textarea,
footer,
summary,
strong {
color: #000;
}
summary::marker {
color: #000;
}
summary::-webkit-details-marker {
color: #000;
}
tbody tr:nth-child(even) {
background-color: #f2f2f2;
}
a {
color: #00f;
text-decoration: underline;
}
}
body nav:first-of-type {
position: fixed;
top: 0;
left: 0;
width: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
padding: 0 calc((100vw - 50rem) / 2);
display: flex;
align-items: center;
width: 100%;
z-index: 999;
}
body nav:first-of-type:before {
/* https://stackoverflow.com/questions/63907743/parent-element-backdrop-filter-does-not-apply-for-its-child */
backdrop-filter: saturate(180%) blur(5px);
-webkit-backdrop-filter: saturate(180%) blur(5px);
content: "";
position: absolute;
z-index: -1;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
body nav:first-of-type #brand {
margin-right: auto;
font-size: 1.1rem;
}
body nav:first-of-type a {
margin: 10px;
display: inline-block;
}
body nav:first-of-type ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
display: inline;
}
body nav:first-of-type>ul>li {
float: left;
}
body nav:first-of-type ul li ul {
display: none;
position: absolute;
background: rgba(0, 0, 0, 0.5);
/* z-index: 1; */
-webkit-backdrop-filter: saturate(180%) blur(5px);
backdrop-filter: saturate(180%) blur(5px);
}
body nav:first-of-type ul li:hover ul {
display: block;
}
section {
margin: 20px 0;
}
article {
border: 1px solid rgb(33, 37, 44);
border: 1px solid var(--border);
padding: 20px;
margin: 10px 0;
border-radius: 0.4em;
}
article> :first-child {
margin-top: 0;
}
article> :first-child> :first-child {
margin-top: 0;
}
article> :last-child {
margin-bottom: 0;
}
article> :last-child> :last-child {
margin-bottom: 0;
}
input[type="submit"] {
background: rgba(240, 246, 252, 0.15);
background: var(--background-bright);
/* border: 1px solid rgb(48, 54, 61); */
border: 1px solid rgb(48, 54, 61);
color: rgb(227, 233, 240);
color: var(--text-bright);
font-family: inherit;
font-size: inherit;
margin-right: 0.5rem;
margin-bottom: 0.5rem;
padding: 5px 16px;
border-radius: 6px;
outline: none;
font-size: 87.5%;
}
input[type="reset"] {
background: rgba(240, 246, 252, 0.15);
background: var(--background-bright);
/* border: 1px solid rgb(48, 54, 61); */
border: 1px solid rgb(48, 54, 61);
color: rgb(227, 233, 240);
color: var(--text-bright);
font-family: inherit;
font-size: inherit;
margin-right: 0.5rem;
margin-bottom: 0.5rem;
padding: 5px 16px;
border-radius: 6px;
outline: none;
font-size: 87.5%;
}
input[type="button"] {
background: rgba(240, 246, 252, 0.15);
background: var(--background-bright);
/* border: 1px solid rgb(48, 54, 61); */
border: 1px solid rgb(48, 54, 61);
color: rgb(227, 233, 240);
color: var(--text-bright);
font-family: inherit;
font-size: inherit;
margin-right: 0.5rem;
margin-bottom: 0.5rem;
padding: 5px 16px;
border-radius: 6px;
outline: none;
font-size: 87.5%;
}
button {
background: rgba(240, 246, 252, 0.15);
background: var(--background-bright);
/* border: 1px solid rgb(48, 54, 61); */
border: 1px solid rgb(48, 54, 61);
color: rgb(227, 233, 240);
color: var(--text-bright);
font-family: inherit;
font-size: inherit;
margin-right: 0.5rem;
margin-bottom: 0.5rem;
padding: 5px 16px;
border-radius: 6px;
outline: none;
font-size: 87.5%;
}
input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover,
button:hover {
/* background-color: rgb(48, 54, 61); */
border-color: rgb(139, 148, 158);
filter: brightness(115%);
}
input[type="submit"]:focus,
input[type="reset"]:focus,
input[type="button"]:focus,
button:focus {
border: 1px solid rgb(139, 148, 158);
box-shadow: none;
}
input[type="submit"]:active,
input[type="reset"]:active,
input[type="button"]:active,
button:active {
background: none;
}
input[type="submit"]:disabled,
input[type="reset"]:disabled,
input[type="button"]:disabled,
button:disabled {
border-color: rgb(48, 54, 61);
}
/*# sourceMappingURL=bahunya.css.map */
iframe {
width: 100%;
border: none;
}
audio,
video,
embed,
object {
width: 100%;
}

View File

@ -1,651 +0,0 @@
/* Global variables. */
:root {
/* Set sans-serif & mono fonts */
--sans-font: -apple-system, BlinkMacSystemFont, "Avenir Next", Avenir,
"Nimbus Sans L", Roboto, "Noto Sans", "Segoe UI", Arial, Helvetica,
"Helvetica Neue", sans-serif;
--mono-font: Consolas, Menlo, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
--standard-border-radius: 5px;
/* Default (light) theme */
--bg: #fff;
--accent-bg: #f5f7ff;
--text: #212121;
--text-light: #585858;
--border: #898EA4;
--accent: #0d47a1;
--code: #d81b60;
--preformatted: #444;
--marked: #ffdd33;
--disabled: #efefef;
}
/* Dark theme */
@media (prefers-color-scheme: dark) {
:root {
color-scheme: dark;
--bg: #212121;
--accent-bg: #2b2b2b;
--text: #dcdcdc;
--text-light: #ababab;
--accent: #ffb300;
--code: #f06292;
--preformatted: #ccc;
--disabled: #111;
}
/* Add a bit of transparency so light media isn't so glaring in dark mode */
img,
video {
opacity: 0.8;
}
}
/* Reset box-sizing */
*, *::before, *::after {
box-sizing: border-box;
}
/* Reset default appearance */
textarea,
select,
input,
progress {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
}
html {
/* Set the font globally */
font-family: var(--sans-font);
scroll-behavior: smooth;
}
/* Make the body a nice central block */
body {
color: var(--text);
background-color: var(--bg);
font-size: 1.15rem;
line-height: 1.5;
display: grid;
grid-template-columns: 1fr min(45rem, 90%) 1fr;
margin: 0;
}
body > * {
grid-column: 2;
}
/* Make the header bg full width, but the content inline with body */
body > header {
background-color: var(--accent-bg);
border-bottom: 1px solid var(--border);
text-align: center;
padding: 0 0.5rem 2rem 0.5rem;
grid-column: 1 / -1;
}
body > header h1 {
max-width: 1200px;
margin: 1rem auto;
}
body > header p {
max-width: 40rem;
margin: 1rem auto;
}
/* Add a little padding to ensure spacing is correct between content and header > nav */
main {
padding-top: 1.5rem;
}
body > footer {
margin-top: 4rem;
padding: 2rem 1rem 1.5rem 1rem;
color: var(--text-light);
font-size: 0.9rem;
text-align: center;
border-top: 1px solid var(--border);
}
/* Format headers */
h1 {
font-size: 3rem;
}
h2 {
font-size: 2.6rem;
margin-top: 3rem;
}
h3 {
font-size: 2rem;
margin-top: 3rem;
}
h4 {
font-size: 1.44rem;
}
h5 {
font-size: 1.15rem;
}
h6 {
font-size: 0.96rem;
}
/* Prevent long strings from overflowing container */
p, h1, h2, h3, h4, h5, h6 {
overflow-wrap: break-word;
}
/* Fix line height when title wraps */
h1,
h2,
h3 {
line-height: 1.1;
}
/* Reduce header size on mobile */
@media only screen and (max-width: 720px) {
h1 {
font-size: 2.5rem;
}
h2 {
font-size: 2.1rem;
}
h3 {
font-size: 1.75rem;
}
h4 {
font-size: 1.25rem;
}
}
/* Format links & buttons */
a,
a:visited {
color: var(--accent);
}
a:hover {
text-decoration: none;
}
button,
[role="button"],
input[type="submit"],
input[type="reset"],
input[type="button"],
label[type="button"] {
border: none;
border-radius: var(--standard-border-radius);
background-color: var(--accent);
font-size: 1rem;
color: var(--bg);
padding: 0.7rem 0.9rem;
margin: 0.5rem 0;
}
button[disabled],
[role="button"][aria-disabled="true"],
input[type="submit"][disabled],
input[type="reset"][disabled],
input[type="button"][disabled],
input[type="checkbox"][disabled],
input[type="radio"][disabled],
select[disabled] {
cursor: not-allowed;
}
input:disabled,
textarea:disabled,
select:disabled,
button[disabled] {
cursor: not-allowed;
background-color: var(--disabled);
color: var(--text-light)
}
input[type="range"] {
padding: 0;
}
/* Set the cursor to '?' on an abbreviation and style the abbreviation to show that there is more information underneath */
abbr[title] {
cursor: help;
text-decoration-line: underline;
text-decoration-style: dotted;
}
button:enabled:hover,
[role="button"]:not([aria-disabled="true"]):hover,
input[type="submit"]:enabled:hover,
input[type="reset"]:enabled:hover,
input[type="button"]:enabled:hover,
label[type="button"]:hover {
filter: brightness(1.4);
cursor: pointer;
}
button:focus-visible:where(:enabled, [role="button"]:not([aria-disabled="true"])),
input:enabled:focus-visible:where(
[type="submit"],
[type="reset"],
[type="button"]
) {
outline: 2px solid var(--accent);
outline-offset: 1px;
}
/* Format navigation */
header > nav {
font-size: 1rem;
line-height: 2;
padding: 1rem 0 0 0;
}
/* Use flexbox to allow items to wrap, as needed */
header > nav ul,
header > nav ol {
align-content: space-around;
align-items: center;
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
list-style-type: none;
margin: 0;
padding: 0;
}
/* List items are inline elements, make them behave more like blocks */
header > nav ul li,
header > nav ol li {
display: inline-block;
}
header > nav a,
header > nav a:visited {
margin: 0 0.5rem 1rem 0.5rem;
border: 1px solid var(--border);
border-radius: var(--standard-border-radius);
color: var(--text);
display: inline-block;
padding: 0.1rem 1rem;
text-decoration: none;
}
header > nav a:hover {
border-color: var(--accent);
color: var(--accent);
cursor: pointer;
}
/* Reduce nav side on mobile */
@media only screen and (max-width: 720px) {
header > nav a {
border: none;
padding: 0;
text-decoration: underline;
line-height: 1;
}
}
/* Consolidate box styling */
aside, details, pre, progress {
background-color: var(--accent-bg);
border: 1px solid var(--border);
border-radius: var(--standard-border-radius);
margin-bottom: 1rem;
}
aside {
font-size: 1rem;
width: 30%;
padding: 0 15px;
margin-left: 15px;
float: right;
}
/* Make aside full-width on mobile */
@media only screen and (max-width: 720px) {
aside {
width: 100%;
float: none;
margin-left: 0;
}
}
article, fieldset {
border: 1px solid var(--border);
padding: 1rem;
border-radius: var(--standard-border-radius);
margin-bottom: 1rem;
}
article h2:first-child,
section h2:first-child {
margin-top: 1rem;
}
section {
border-top: 1px solid var(--border);
border-bottom: 1px solid var(--border);
padding: 2rem 1rem;
margin: 3rem 0;
}
/* Don't double separators when chaining sections */
section + section,
section:first-child {
border-top: 0;
padding-top: 0;
}
section:last-child {
border-bottom: 0;
padding-bottom: 0;
}
details {
padding: 0.7rem 1rem;
}
summary {
cursor: pointer;
font-weight: bold;
padding: 0.7rem 1rem;
margin: -0.7rem -1rem;
word-break: break-all;
}
details[open] > summary + * {
margin-top: 0;
}
details[open] > summary {
margin-bottom: 0.5rem;
}
details[open] > :last-child {
margin-bottom: 0;
}
/* Format tables */
table {
border-collapse: collapse;
margin: 1.5rem 0;
}
td,
th {
border: 1px solid var(--border);
text-align: left;
padding: 0.5rem;
}
th {
background-color: var(--accent-bg);
font-weight: bold;
}
tr:nth-child(even) {
/* Set every other cell slightly darker. Improves readability. */
background-color: var(--accent-bg);
}
table caption {
font-weight: bold;
margin-bottom: 0.5rem;
}
/* Format forms */
textarea,
select,
input {
font-size: inherit;
font-family: inherit;
padding: 0.5rem;
margin-bottom: 0.5rem;
color: var(--text);
background-color: var(--bg);
border: 1px solid var(--border);
border-radius: var(--standard-border-radius);
box-shadow: none;
max-width: 100%;
display: inline-block;
}
label {
display: block;
}
textarea:not([cols]) {
width: 100%;
}
/* Add arrow to drop-down */
select:not([multiple]) {
background-image: linear-gradient(45deg, transparent 49%, var(--text) 51%),
linear-gradient(135deg, var(--text) 51%, transparent 49%);
background-position: calc(100% - 15px), calc(100% - 10px);
background-size: 5px 5px, 5px 5px;
background-repeat: no-repeat;
padding-right: 25px;
}
/* checkbox and radio button style */
input[type="checkbox"],
input[type="radio"] {
vertical-align: middle;
position: relative;
width: min-content;
}
input[type="checkbox"] + label,
input[type="radio"] + label {
display: inline-block;
}
input[type="radio"] {
border-radius: 100%;
}
input[type="checkbox"]:checked,
input[type="radio"]:checked {
background-color: var(--accent);
}
input[type="checkbox"]:checked::after {
/* Creates a rectangle with colored right and bottom borders which is rotated to look like a check mark */
content: " ";
width: 0.18em;
height: 0.32em;
border-radius: 0;
position: absolute;
top: 0.05em;
left: 0.17em;
background-color: transparent;
border-right: solid var(--bg) 0.08em;
border-bottom: solid var(--bg) 0.08em;
font-size: 1.8em;
transform: rotate(45deg);
}
input[type="radio"]:checked::after {
/* creates a colored circle for the checked radio button */
content: " ";
width: 0.25em;
height: 0.25em;
border-radius: 100%;
position: absolute;
top: 0.125em;
background-color: var(--bg);
left: 0.125em;
font-size: 32px;
}
/* Makes input fields wider on smaller screens */
@media only screen and (max-width: 720px) {
textarea,
select,
input {
width: 100%;
}
}
/* Set a height for color input */
input[type="color"] {
height: 2.5rem;
padding: 0.2rem;
}
/* do not show border around file selector button */
input[type="file"] {
border: 0;
}
/* Misc body elements */
hr {
border: none;
height: 1px;
background: var(--border);
margin: 1rem auto;
}
mark {
padding: 2px 5px;
border-radius: var(--standard-border-radius);
background-color: var(--marked);
}
img,
video {
max-width: 100%;
height: auto;
border-radius: var(--standard-border-radius);
}
figure {
margin: 0;
display: block;
overflow-x: auto;
}
figcaption {
text-align: center;
font-size: 0.9rem;
color: var(--text-light);
margin-bottom: 1rem;
}
blockquote {
margin: 2rem 0 2rem 2rem;
padding: 0.4rem 0.8rem;
border-left: 0.35rem solid var(--accent);
color: var(--text-light);
font-style: italic;
}
cite {
font-size: 0.9rem;
color: var(--text-light);
font-style: normal;
}
dt {
color: var(--text-light);
}
/* Use mono font for code elements */
code,
pre,
pre span,
kbd,
samp {
font-family: var(--mono-font);
color: var(--code);
}
kbd {
color: var(--preformatted);
border: 1px solid var(--preformatted);
border-bottom: 3px solid var(--preformatted);
border-radius: var(--standard-border-radius);
padding: 0.1rem 0.4rem;
}
pre {
padding: 1rem 1.4rem;
max-width: 100%;
overflow: auto;
color: var(--preformatted);
}
/* Fix embedded code within pre */
pre code {
color: var(--preformatted);
background: none;
margin: 0;
padding: 0;
}
/* Progress bars */
/* Declarations are repeated because you */
/* cannot combine vendor-specific selectors */
progress {
width: 100%;
}
progress:indeterminate {
background-color: var(--accent-bg);
}
progress::-webkit-progress-bar {
border-radius: var(--standard-border-radius);
background-color: var(--accent-bg);
}
progress::-webkit-progress-value {
border-radius: var(--standard-border-radius);
background-color: var(--accent);
}
progress::-moz-progress-bar {
border-radius: var(--standard-border-radius);
background-color: var(--accent);
transition-property: width;
transition-duration: 0.3s;
}
progress:indeterminate::-moz-progress-bar {
background-color: var(--accent-bg);
}
/* Classes for buttons and notices */
.button,
.button:visited {
border: none;
border-radius: 5px;
background: var(--accent);
font-size: 1rem;
color: var(--bg);
padding: 0.7rem 0.9rem;
margin: 0.5rem 0;
}
.button:hover,
.button:focus {
filter: brightness(1.4);
cursor: pointer;
}
.notice {
background: var(--accent-bg);
border: 2px solid var(--border);
border-radius: 5px;
padding: 1.5rem;
margin: 2rem 0;
}

14
css/site.css Normal file
View File

@ -0,0 +1,14 @@
h1:hover .anchor:before,
h2:hover .anchor:before,
h3:hover .anchor:before,
h4:hover .anchor:before,
h5:hover .anchor:before,
h6:hover .anchor:before {
width: 16px;
height: 16px;
content: ' ';
display: inline-block;
background-color: currentColor;
-webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");
mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");
}

View File

@ -1,23 +0,0 @@
/* Icons */
.icon {
vertical-align: sub;
padding-right: 0.25rem;
display: inline-block;
width: 1em;
height: 1.3em;
margin-right: 0.2rem;
stroke-width: 0;
stroke: currentColor;
fill: currentColor;
}
/* Anchors */
a.anchor {
text-decoration: none;
}
/* Fences */
.blue { background-color: steelblue; padding: 5px; }
#insideme { color: yellow; }
.red { background-color: red; }