From 2fb30f2f4c044f101d5b7b03eb50a05d716d98f1 Mon Sep 17 00:00:00 2001 From: unwox Date: Tue, 22 Oct 2024 22:12:38 +0600 Subject: inline style.css into html --- bin/serve.fnl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bin/serve.fnl') diff --git a/bin/serve.fnl b/bin/serve.fnl index 51f5d6b..d96056a 100644 --- a/bin/serve.fnl +++ b/bin/serve.fnl @@ -10,6 +10,7 @@ (local array (require :lib.array)) (local str (require :lib.string)) (local texts (require :texts)) +(local fs (require :lib.fs)) (local spellfix (require :lib.spellfix)) (local cache (require :lib.cache)) (local {: must : measure} (require :lib.utils)) @@ -355,7 +356,8 @@ [:head {} [:meta {:charset "utf-8"}] [:meta {:name "viewport" :content "width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=5.0"}] - [:link {:rel "stylesheet" :href "/static/style.css"}] + ;; inline styles so the page loads faster + [:style {} [:NO-ESCAPE (fs.read-file "static/style.css")]] [:link {:rel "icon" :href "/static/favicon.png"}] [:link {:rel "preload" :href "/static/logo-hor.svg"}] [:title {} (if (str.empty? form.query) -- cgit v1.2.3