From 9825775d2c0a543e55e412ba71362d7615063542 Mon Sep 17 00:00:00 2001 From: nat Date: Sun, 11 May 2025 20:35:43 -0700 Subject: [PATCH] improve loading time;improve unstyled content flash --- www/src/templates/page.hy | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/www/src/templates/page.hy b/www/src/templates/page.hy index 1273f0e..2549eb5 100644 --- a/www/src/templates/page.hy +++ b/www/src/templates/page.hy @@ -11,8 +11,14 @@ (run "echo > /tmp/footnote_count") `(html (:lang "en") (head () + (style #[[ + :root { + background: #202020; + } + body {display: none}]]) + (link (:rel preload :href "/assets/style.css" :as style)) + (link (:rel preload :href "/assets/bg.svg" :as img)) (link (:rel "stylesheet" :href "/assets/style.css" :type "text/css")) - (link (:rel preload :href "/assets/style.css")) (meta (:http-equiv "content-type" :content "text/html; charset=utf-8")) (meta (:name "viewport" :content "width=device-width, initial-scale=1")) (meta (:name "author" :content ~author))