feat: add custom fonts

This commit is contained in:
Devin Haska 2024-01-30 18:11:16 -08:00
parent a5526174ba
commit be3e4272c5
14 changed files with 146 additions and 0 deletions

View file

@ -6,6 +6,11 @@ module.exports = (eleventyConfig) => {
require("./config/template-languages/css-config.js"), require("./config/template-languages/css-config.js"),
); );
// --------------------- Passthrough File Copy -----------------------
["src/assets/fonts/"].forEach((path) =>
eleventyConfig.addPassthroughCopy(path),
);
return { return {
// Optional (default is set): If your site deploys to a subdirectory, change `pathPrefix`, for example with with GitHub pages // Optional (default is set): If your site deploys to a subdirectory, change `pathPrefix`, for example with with GitHub pages
pathPrefix: "/", pathPrefix: "/",

View file

@ -1,4 +1,5 @@
@import "global/reset.css"; @import "global/reset.css";
@import "global/fonts.css";
@import "global/global-styles.css"; @import "global/global-styles.css";

View file

@ -0,0 +1,82 @@
@supports not (font-variation-settings: normal) {
@font-face {
font-family: Quattro;
font-style: normal;
font-display: swap;
font-weight: 450;
src:
local(""),
url("/assets/fonts/quattro/iAWriterQuattroS-Regular.woff2")
format("woff2");
}
@font-face {
font-family: Quattro;
font-style: bold;
font-display: swap;
font-weight: 650;
src:
local(""),
url("/assets/fonts/quattro/iAWriterQuattroS-Bold.woff2") format("woff2");
}
@font-face {
font-family: Quattro;
font-style: italic;
font-display: swap;
font-weight: 450;
src:
local(""),
url("/assets/fonts/quattro/iAWriterQuattroS-Italic.woff2") format("woff2");
}
@font-face {
font-family: Quattro;
font-style: italic;
font-display: swap;
font-weight: 650;
src:
local(""),
url("/assets/fonts/quattro/iAWriterQuattroS-BoldItalic.woff2")
format("woff2");
}
@font-face {
font-family: AnekLatin;
font-style: bold;
font-display: swap;
font-weight: 700;
src:
local(""),
url("/assets/fonts/aneklatin/AnekLatin-Bold.ttf") format("truetype");
}
@font-face {
font-family: AnekLatin;
font-style: bold;
font-display: swap;
font-weight: 800;
src:
local(""),
url("/assets/fonts/aneklatin/AnekLatin-ExtraBold.ttf") format("truetype");
}
}
@supports (font-variation-settings: normal) {
@font-face {
font-family: Quattro;
src: url("/assets/fonts/quattro/iAWriterQuattroV.ttf") format("truetype");
font-weight: 450 600;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: AnekLatin;
src: url("/assets/fonts/aneklatin/AnekLatin-VariableFont_wdth,wght.ttf")
format("truetype");
font-weight: 700 800;
font-style: normal;
font-display: swap;
}
}

View file

@ -4,3 +4,41 @@
Low-specificity, global styles that apply to the whole Low-specificity, global styles that apply to the whole
project: https://cube.fyi/css.html project: https://cube.fyi/css.html
*/ */
body {
font-family:
Quattro,
ui-sans-serif,
system-ui,
-apple-system,
"system-ui",
"Segoe UI",
Roboto,
"Helvetica Neue",
Arial,
"Noto Sans",
sans-serif,
"Apple Color Emoji",
"Segoe UI Emoji",
"Segoe UI Symbol",
"Noto Color Emoji";
}
h1 {
font-family: AnekLatin;
font-weight: 800;
}
h2,
h3 {
font-family: AnekLatin;
font-weight: 700;
}
h3 {
text-transform: uppercase;
}
a {
text-decoration-color: black;
text-decoration-thickness: 2px;
}

View file

@ -0,0 +1,8 @@
/*
FLOW UTILITY
Like the Every Layout stack: https://every-layout.dev/layouts/stack/
Info about this implementation: https://piccalil.li/quick-tip/flow-utility/
*/
.flow > * + * {
margin-block-start: var(--flow-space, 1em);
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -6,3 +6,15 @@ permalink: /index.html
# Hello from index # Hello from index
This is the root page. This is the root page.
**This is bold text.**
_This is italic text._
_**This is bold and italic text.**_
## Subheading
### Subsubheading
Here is [a link](https://wonderfulfrog.com)