diff --git a/src/view/components/document/main.lisp b/src/view/components/document/main.lisp index 32012af..b51217d 100644 --- a/src/view/components/document/main.lisp +++ b/src/view/components/document/main.lisp @@ -1,9 +1,9 @@ (defpackage #:hp/view/components/document/main (:use #:cl) (:local-nicknames (#:pi #:piccolo)) - (:import-from #:hp/view/components/document/stylesheets - #:stylesheets - #:on-demand-stylesheets) + (:import-from #:hp/view/components/document/styles + #:styles + #:on-demand-styles) (:import-from #:hp/view/components/document/scripts #:scripts) (:import-from #:hp/view/components/document/seo @@ -17,7 +17,7 @@ (html :lang "ja" (head (meta :charset "UTF-8") - (stylesheets pi:children) + (styles pi:children) (scripts) (seo metadata)) pi:children))) @@ -26,5 +26,5 @@ (pi:h (<> (head :hx-head "append" - (on-demand-stylesheets pi:children)) + (on-demand-styles pi:children)) pi:children))) diff --git a/src/view/components/document/stylesheets.lisp b/src/view/components/document/styles.lisp similarity index 76% rename from src/view/components/document/stylesheets.lisp rename to src/view/components/document/styles.lisp index 4238702..bc46b33 100644 --- a/src/view/components/document/stylesheets.lisp +++ b/src/view/components/document/styles.lisp @@ -1,12 +1,12 @@ -(defpackage #:hp/view/components/document/stylesheets +(defpackage #:hp/view/components/document/styles (:use #:cl) (:local-nicknames (#:pi #:piccolo)) (:import-from #:hp/view/asset #:define-asset #:get-css-paths) - (:export #:on-demand-stylesheets - #:stylesheets)) -(in-package #:hp/view/components/document/stylesheets) + (:export #:on-demand-styles + #:styles)) +(in-package #:hp/view/components/document/styles) (define-asset *ress* :vendor "ress@5.0.2.css") @@ -14,7 +14,7 @@ (define-asset *global-css* :css "global.css") -(pi:define-element on-demand-stylesheets () +(pi:define-element on-demand-styles () (let* ((pi:*escape-html* nil) (html-str (pi:elem-str pi:children)) (css-paths (get-css-paths html-str))) @@ -24,12 +24,12 @@ (link :rel "stylesheet" :type "text/css" :href path)) css-paths))))) -(pi:define-element stylesheets () +(pi:define-element styles () (pi:h (<> (link :rel "stylesheet" :type "text/css" :href *ress*) (link :rel "stylesheet" :type "text/css" :href *global-css*) - (on-demand-stylesheets pi:children) + (on-demand-styles pi:children) (link :rel "preconnect" :href "https://fonts.googleapis.com") (link :rel "preconnect" :href "https://fonts.gstatic.com" :crossorigin t) (link