Skip to content

Commit

Permalink
♻️ improve loading stylesheet
Browse files Browse the repository at this point in the history
  • Loading branch information
ras0q committed Jun 11, 2024
1 parent a18098c commit 23dbd48
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
10 changes: 10 additions & 0 deletions deno.lock
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,13 @@
"https://deno.land/x/[email protected]/src/runtime/build_id.ts": "8376e70e42ce456dfa6932c638409d2ef1bca4833b4ceba0bf74510080a7f976",
"https://deno.land/x/[email protected]/src/runtime/csp.ts": "9ee900e9b0b786057b1009da5976298c202d1b86d1f1e4d2510bde5f06530ac9",
"https://deno.land/x/[email protected]/src/runtime/deserializer.ts": "1b83e75fa61c48b074ea121f33647d1ed15c68fa2f2a11b0a7f7a12cd38af627",
"https://deno.land/x/[email protected]/src/runtime/entrypoints/client.ts": "a9224606e41bc58d81f37b7125650432920a7d136bdf416051e925ac9bbd1f05",
"https://deno.land/x/[email protected]/src/runtime/entrypoints/deserializer.ts": "e836f44c454e1f67c86eab30f108eb9be05a38489604a24e418b564b77058b96",
"https://deno.land/x/[email protected]/src/runtime/entrypoints/main.ts": "de3aa5cbd9b3abfa825939b58bc8df088ab183e042c0447b37180f4ea31c613c",
"https://deno.land/x/[email protected]/src/runtime/entrypoints/main_dev.ts": "d2960e339119e45017954c7cf6798b9e0a3110d173cc378e1e3e7bc84bd68c34",
"https://deno.land/x/[email protected]/src/runtime/entrypoints/signals.ts": "782c81f97d125ad4f92aa0160dad3a2e8b6ea7a61cec7fdab87bbbbd8c0d215c",
"https://deno.land/x/[email protected]/src/runtime/head.ts": "0f9932874497ab6e57ed1ba01d549e843523df4a5d36ef97460e7a43e3132fdc",
"https://deno.land/x/[email protected]/src/runtime/polyfills.ts": "c3de932b2f23df9a4ade1ab4f8890730c0db0a71bf85faa41742a1763631e917",
"https://deno.land/x/[email protected]/src/runtime/utils.ts": "4f40630c308e8ea7d53860687905caf1a2f2a46ad8692f24e905a8e996b584c3",
"https://deno.land/x/[email protected]/src/server/boot.ts": "969da650e882adba6559af3784b90473d357201345d4e5b24a0cf5e582882d6b",
"https://deno.land/x/[email protected]/src/server/build_id.ts": "82d9cb985de6b1e38c3108e5a00667b16e80eedc145d73835d6b44349ebe6389",
Expand Down Expand Up @@ -564,6 +570,8 @@
"https://deno.land/x/[email protected]/common/typescript.js": "d72ba73c3eb625ff755075dbde78df2a844d22190ef1ad74d0c5dcd7005ba85e",
"https://deno.land/x/[email protected]/mod.ts": "adba9b82f24865d15d2c78ef6074b9a7457011719056c9928c800f130a617c93",
"https://deno.land/x/[email protected]/ts_morph.js": "fddb96abdf0cb0ac427d52757c4ffa6ff7fe9a772846d9bf6167518b7b276cad",
"https://esm.sh/*@preact/[email protected]": "de8dffabec1aab92430087751f0c451af2853ee5163fe7761fd94d70263b7ea6",
"https://esm.sh/*@preact/[email protected]": "8b174b406f1c00fdf3930fbb4ddc556162e6fd0dfe84a5ec300e9ac1776cbf42",
"https://esm.sh/*[email protected]": "07807f027acf54b994b630bbb2a923f5a835f9544e01144f67ab292e90a431e4",
"https://esm.sh/@babel/[email protected]": "daace34e028130297fddf97f3ef6deb4b05ec3eb46f5c5cacd6eaa43d6323b0a",
"https://esm.sh/[email protected]": "281b115a9b79918c6b73382b4e818d6f9e48db9064b7fd4f75a45a4edee54145",
Expand All @@ -576,6 +584,8 @@
"https://esm.sh/stable/[email protected]/denonext/jsx-runtime.js": "97e9eeb40443de53a8cb3b70f264d04db2bbfc5c2298fdb15d1c471283ccd6aa",
"https://esm.sh/stable/[email protected]/denonext/preact.mjs": "68491395d287895f4d697e403ded5b0ebb8fed0494f9e870c422bc017e5e52f5",
"https://esm.sh/v135/@babel/[email protected]/denonext/helper-validator-identifier.mjs": "1ad312a9040d1f3b096e90a3e6a9da7ecfc99662140852fe3862a316c2591c93",
"https://esm.sh/v135/@preact/[email protected]/denonext/signals-core.mjs": "dc36965311a6fda182378c0b3aec418ffe60fb2bb6020d9948d105862a27ddf8",
"https://esm.sh/v135/@preact/[email protected]/X-ZS8q/denonext/signals.mjs": "f2cb7b0335f75be2827049bf6a1ce3c6bd35e74c7a922a1eeb338b0312d61556",
"https://esm.sh/v135/[email protected]/X-ZS8q/denonext/preact-render-to-string.mjs": "bcaceb8c3938310aee3dd4f7b6f2136cf0b2b890988c2e6679485e052e76e920"
},
"workspace": {
Expand Down
4 changes: 2 additions & 2 deletions routes/[slug].tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Handler, PageProps } from "$fresh/server.ts";
import { render } from "@deno/gfm";
import { Head } from "$fresh/runtime.ts";
import { asset, Head } from "$fresh/runtime.ts";
import { extract } from "@std/front-matter/yaml";
import { exists } from "@std/fs";

Expand All @@ -27,7 +27,7 @@ export default function MarkdownPage({ data }: PageProps<Page>) {
<>
<Head>
<title>{attrs.title} | ras0q.com</title>
<link rel="stylesheet" href="/markdown.css" />
<link rel="stylesheet" href={asset("/markdown.css")} />
</Head>
<main>
<div dangerouslySetInnerHTML={{ __html: render(markdown) }}></div>
Expand Down
3 changes: 2 additions & 1 deletion routes/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import { type PageProps } from "$fresh/server.ts";
import { asset } from "$fresh/runtime.ts";
export default function App({ Component }: PageProps) {
return (
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>ras0q.com</title>
<link rel="stylesheet" href="/styles.css" />
<link rel="stylesheet" href={asset("/styles.css")} />
</head>
<body>
<Component />
Expand Down
4 changes: 2 additions & 2 deletions static/styles.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@import url('https://unpkg.com/@catppuccin/palette/css/catppuccin.css'); /* https://github.com/catppuccin/catppuccin/blob/main/docs/style-guide.md */
@import url('https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=auto');
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:[email protected]&display=auto');
@import url('https://fonts.googleapis.com/css2?family=Inter:[email protected]&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro:[email protected]&display=swap');

:root {
--is-mobile: false;
Expand Down

0 comments on commit 23dbd48

Please sign in to comment.