fix font style
This commit is contained in:
@@ -1,29 +0,0 @@
|
|||||||
#let fonts = (
|
|
||||||
(src: "/font/minecraft-seven-ascii.woff2", name: "Mojangles", style: "normal", weight: 400, unicodes: "U+0000-007F"),
|
|
||||||
)
|
|
||||||
|
|
||||||
#asset(
|
|
||||||
"font.css",
|
|
||||||
fonts
|
|
||||||
.map(it => {
|
|
||||||
"@font-face{"
|
|
||||||
"font-family:" + repr(it.name) + ";"
|
|
||||||
"font-style:" + str(it.style) + ";"
|
|
||||||
"font-weight:" + str(it.weight) + ";"
|
|
||||||
"src: url(" + repr(it.src) + ");"
|
|
||||||
if ("unicodes" in it) { "unicode-range: " + str(it.unicodes) + ";" }
|
|
||||||
"}"
|
|
||||||
})
|
|
||||||
.join(" "),
|
|
||||||
)
|
|
||||||
|
|
||||||
#asset("./style.css", read("style.css", encoding: none))
|
|
||||||
|
|
||||||
#for font in fonts {
|
|
||||||
asset(font.src, read("." + font.src, encoding: none))
|
|
||||||
}
|
|
||||||
|
|
||||||
#let stylesheets = (
|
|
||||||
"/font.css",
|
|
||||||
"/style.css",
|
|
||||||
)
|
|
||||||
@@ -1,156 +0,0 @@
|
|||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
:root {
|
|
||||||
--mode-note: cyan;
|
|
||||||
--mode-caution: coral;
|
|
||||||
--mode-tip: springgreen;
|
|
||||||
|
|
||||||
--bg: #111;
|
|
||||||
--fg: #eee;
|
|
||||||
--fg-dim: #aaa;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (prefers-color-scheme: light) {
|
|
||||||
:root {
|
|
||||||
--mode-note: mediumblue;
|
|
||||||
--mode-caution: brown;
|
|
||||||
--mode-tip: forestgreen;
|
|
||||||
|
|
||||||
--bg: #eee;
|
|
||||||
--fg: #111;
|
|
||||||
--fg-dim: #555;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
html {
|
|
||||||
font-family: "Libertinus Serif", serif;
|
|
||||||
font-size: 18pt;
|
|
||||||
line-height: 1.5em;
|
|
||||||
background: var(--background);
|
|
||||||
}
|
|
||||||
|
|
||||||
h1, h2, h3, h4, h5, h6, nav li {
|
|
||||||
font-family: "Mojangles", "monospace";
|
|
||||||
}
|
|
||||||
|
|
||||||
nav > * {
|
|
||||||
margin-block: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
nav {
|
|
||||||
margin-block: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer > nav {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
gap: 1ch;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer > nav > *
|
|
||||||
{
|
|
||||||
flex-grow: 1;
|
|
||||||
flex-shrink: 1;
|
|
||||||
flex-basis: 0;
|
|
||||||
text-align: center;
|
|
||||||
font-family: "Mojangles", "monospace";
|
|
||||||
|
|
||||||
text-decoration: none;
|
|
||||||
|
|
||||||
--mode-color: var(--fg-dim);
|
|
||||||
}
|
|
||||||
|
|
||||||
footer > nav > *:hover {
|
|
||||||
--mode-color: var(--fg);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.go-next::after {
|
|
||||||
display: block;
|
|
||||||
content: "Next page";
|
|
||||||
font-size: smaller;
|
|
||||||
}
|
|
||||||
|
|
||||||
.go-prev::after {
|
|
||||||
display: block;
|
|
||||||
content: "Previous page";
|
|
||||||
font-size: smaller;
|
|
||||||
}
|
|
||||||
|
|
||||||
.go-home::after {
|
|
||||||
display: block;
|
|
||||||
content: "Home page";
|
|
||||||
font-size: smaller;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
font-family: "Libertinus Mono", monospace;
|
|
||||||
}
|
|
||||||
|
|
||||||
math {
|
|
||||||
font-family: "Libertinus Math", math;
|
|
||||||
}
|
|
||||||
|
|
||||||
main, header, footer {
|
|
||||||
max-width: 80ch;
|
|
||||||
margin-inline: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
li > * {
|
|
||||||
margin-block: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer > nav > * ,
|
|
||||||
.callout {
|
|
||||||
color: var(--mode-color);
|
|
||||||
border-color: rgba(from var(--mode-color) r g b);
|
|
||||||
background-color: rgba(from var(--mode-color) r g b / 5%);
|
|
||||||
}
|
|
||||||
|
|
||||||
footer > nav > * {
|
|
||||||
display: block;
|
|
||||||
padding-inline: 2ch;
|
|
||||||
padding-block: 1ch;
|
|
||||||
border-radius: 4pt;
|
|
||||||
border-width: 1pt;
|
|
||||||
border-style: solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
.callout {
|
|
||||||
display: block;
|
|
||||||
padding-inline: 2ch;
|
|
||||||
padding-block: 1ch;
|
|
||||||
border-width: 1pt 0;
|
|
||||||
border-style: solid;
|
|
||||||
|
|
||||||
margin-inline: -2ch;
|
|
||||||
margin-block: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.callout::before {
|
|
||||||
content: var(--mode-name);
|
|
||||||
padding-inline-end: 1ch;
|
|
||||||
font-family: "Mojangles", "monospace";
|
|
||||||
display: inline-block;
|
|
||||||
float: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.callout > p:first-child {
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.note {
|
|
||||||
--mode-color: var(--mode-note);
|
|
||||||
--mode-name: "Note";
|
|
||||||
}
|
|
||||||
|
|
||||||
.caution {
|
|
||||||
--mode-color: var(--mode-caution);
|
|
||||||
--mode-name: "Caution";
|
|
||||||
}
|
|
||||||
|
|
||||||
.tip {
|
|
||||||
--mode-color: var(--mode-tip);
|
|
||||||
--mode-name: "Tip";
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,3 +1,11 @@
|
|||||||
|
@font-face {
|
||||||
|
font-family: "Mojangles";
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
src: url("/mojangles-ascii.woff2");
|
||||||
|
unicode-range: U+0000-007F;
|
||||||
|
}
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
font: 1rem / 1.5 sans-serif;
|
font: 1rem / 1.5 sans-serif;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user