Leaflet Blog in Deno Fresh

fix fonts

knotbin.com 3264b36f c50612b6

verified
Changed files
+102 -108
static
+1
.gitignore
···
_fresh/
# npm dependencies
node_modules/
+
**/.DS_Store
+2 -9
deno.json
···
"preview": "deno run -A main.ts",
"update": "deno run -A -r https://fresh.deno.dev/update ."
},
-
"lint": {
-
"rules": {
-
"tags": ["fresh", "recommended"]
-
}
-
},
+
"lint": { "rules": { "tags": ["fresh", "recommended"] } },
"exclude": ["**/_fresh/*"],
"imports": {
"$fresh/": "https://deno.land/x/fresh@1.7.3/",
···
"tailwindcss/plugin": "npm:/tailwindcss@3.4.1/plugin.js",
"$std/": "https://deno.land/std@0.216.0/"
},
-
"compilerOptions": {
-
"jsx": "react-jsx",
-
"jsxImportSource": "preact"
-
},
+
"compilerOptions": { "jsx": "react-jsx", "jsxImportSource": "preact" },
"nodeModulesDir": "auto"
}
+99 -99
static/styles.css
···
-
@import url("https://api.fonts.coollabs.io/css2?family=Inter:wght@400;700&display=swap");
-
@import url("https://api.fonts.coollabs.io/css2?family=Libre+Bodoni:ital,wght@0,400;0,700;1,400&display=swap");
+
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap");
+
@import url("https://fonts.googleapis.com/css2?family=Libre+Bodoni:ital,wght@0,400..700;1,400..700&display=swap");
@font-face {
-
font-family: "Berkeley Mono";
-
src:
-
url("/path/to/local/fonts/BerkeleyMono-Regular.woff2") format("woff2"),
-
url("/path/to/local/fonts/BerkeleyMono-Regular.woff") format("woff");
-
font-weight: 400;
-
font-style: normal;
+
font-family: "Berkeley Mono";
+
src:
+
url("/path/to/local/fonts/BerkeleyMono-Regular.woff2") format("woff2"),
+
url("/path/to/local/fonts/BerkeleyMono-Regular.woff") format("woff");
+
font-weight: 400;
+
font-style: normal;
}
@tailwind base;
···
@tailwind utilities;
@theme inline {
-
--color-background: var(--background);
-
--color-foreground: var(--foreground);
+
--color-background: var(--background);
+
--color-foreground: var(--foreground);
}
:root {
-
--font-sans: "Inter", sans-serif;
-
--font-serif: "Libre Bodoni", serif;
-
--font-mono: "Berkeley Mono", monospace;
+
--font-sans: "Inter", sans-serif;
+
--font-serif: "Libre Bodoni", serif;
+
--font-mono: "Berkeley Mono", monospace;
}
.font-sans {
-
font-family: var(--font-sans);
+
font-family: var(--font-sans);
}
.font-serif {
-
font-family: var(--font-serif);
+
font-family: var(--font-serif);
}
.font-mono {
-
font-family: var(--font-mono);
+
font-family: var(--font-mono);
}
.font-serif-italic {
-
font-family: var(--font-serif);
-
font-style: italic;
+
font-family: var(--font-serif);
+
font-style: italic;
}
/*
···
color utility to any element that depends on these defaults.
*/
@layer base {
-
*,
-
::after,
-
::before,
-
::backdrop,
-
::file-selector-button {
-
border-color: var(--color-gray-200, currentColor);
-
}
+
*,
+
::after,
+
::before,
+
::backdrop,
+
::file-selector-button {
+
border-color: var(--color-gray-200, currentColor);
+
}
}
@utility text-balance {
-
text-wrap: balance;
+
text-wrap: balance;
}
@layer utilities {
-
:root {
-
--background: #ffffff;
-
--foreground: #171717;
-
}
-
-
@media (prefers-color-scheme: dark) {
:root {
-
--background: #0a0a0a;
-
--foreground: #ededed;
+
--background: #ffffff;
+
--foreground: #171717;
}
-
}
-
body {
-
color: var(--foreground);
-
background: var(--background);
-
font-family: var(--font-sans);
-
}
+
@media (prefers-color-scheme: dark) {
+
:root {
+
--background: #0a0a0a;
+
--foreground: #ededed;
+
}
+
}
-
@keyframes marquee {
-
0% {
-
opacity: 0;
-
transform: translateX(0px);
-
}
-
2% {
-
opacity: 0.075;
-
}
-
98% {
-
opacity: 0.075;
-
}
-
100% {
-
opacity: 0;
-
transform: translateX(-4000px);
+
body {
+
color: var(--foreground);
+
background: var(--background);
+
font-family: var(--font-sans);
}
-
}
-
@keyframes fadeIn {
-
0% {
-
opacity: 0;
-
}
-
100% {
-
opacity: 1;
+
@keyframes marquee {
+
0% {
+
opacity: 0;
+
transform: translateX(0px);
+
}
+
2% {
+
opacity: 0.075;
+
}
+
98% {
+
opacity: 0.075;
+
}
+
100% {
+
opacity: 0;
+
transform: translateX(-4000px);
+
}
}
-
}
-
@keyframes fadeOut {
-
0% {
-
opacity: 1;
+
@keyframes fadeIn {
+
0% {
+
opacity: 0;
+
}
+
100% {
+
opacity: 1;
+
}
}
-
100% {
-
opacity: 0;
+
+
@keyframes fadeOut {
+
0% {
+
opacity: 1;
+
}
+
100% {
+
opacity: 0;
+
}
}
-
}
-
.animate-marquee {
-
animation: marquee 30s linear infinite;
-
font-size: 100vh;
-
line-height: 0.8;
-
height: 100vh;
-
display: flex;
-
align-items: center;
-
}
+
.animate-marquee {
+
animation: marquee 30s linear infinite;
+
font-size: 100vh;
+
line-height: 0.8;
+
height: 100vh;
+
display: flex;
+
align-items: center;
+
}
-
.animate-fade-in {
-
animation: fadeIn 0.3s ease-in-out forwards;
-
}
+
.animate-fade-in {
+
animation: fadeIn 0.3s ease-in-out forwards;
+
}
-
.animate-fade-out {
-
animation: fadeOut 0.3s ease-in-out forwards;
-
}
+
.animate-fade-out {
+
animation: fadeOut 0.3s ease-in-out forwards;
+
}
}
.diagonal-pattern {
-
background-color: transparent;
-
background: repeating-linear-gradient(
-
-45deg,
-
#000000,
-
#000000 4px,
-
transparent 4px,
-
transparent 10px
-
);
+
background-color: transparent;
+
background: repeating-linear-gradient(
+
-45deg,
+
#000000,
+
#000000 4px,
+
transparent 4px,
+
transparent 10px
+
);
}
@media (prefers-color-scheme: dark) {
-
.diagonal-pattern {
-
background: repeating-linear-gradient(
-
-45deg,
-
#ffffff,
-
#ffffff 4px,
-
transparent 4px,
-
transparent 10px
-
);
-
}
+
.diagonal-pattern {
+
background: repeating-linear-gradient(
+
-45deg,
+
#ffffff,
+
#ffffff 4px,
+
transparent 4px,
+
transparent 10px
+
);
+
}
}