diff --git a/qlfile b/qlfile index 052a4e6..1b680f7 100644 --- a/qlfile +++ b/qlfile @@ -10,3 +10,4 @@ git microcms https://github.com/skyizwhite/microcms-lisp-sdk ql local-time ql function-cache ql jonathan +ql access diff --git a/qlfile.lock b/qlfile.lock index bcfc50c..f3d33ac 100644 --- a/qlfile.lock +++ b/qlfile.lock @@ -50,3 +50,7 @@ (:class qlot/source/ql:source-ql :initargs (:%version :latest) :version "ql-2020-09-25")) +("access" . + (:class qlot/source/ql:source-ql + :initargs (:%version :latest) + :version "ql-2024-10-12")) diff --git a/src/components/header.lisp b/src/components/header.lisp index 9546095..d4a2f9c 100644 --- a/src/components/header.lisp +++ b/src/components/header.lisp @@ -1,7 +1,6 @@ (defpackage #:website/components/header (:use #:cl - #:hsx - #:jingle) + #:website/helper) (:export #:~header)) (in-package #:website/components/header) diff --git a/src/components/metadata.lisp b/src/components/metadata.lisp index f8fb04a..780e2c8 100644 --- a/src/components/metadata.lisp +++ b/src/components/metadata.lisp @@ -1,7 +1,6 @@ (defpackage #:website/components/metadata (:use #:cl - #:hsx - #:jingle) + #:website/helper) (:import-from #:website/lib/env #:website-url) (:export #:~metadata)) diff --git a/src/helper.lisp b/src/helper.lisp index 4732e38..a367676 100644 --- a/src/helper.lisp +++ b/src/helper.lisp @@ -1,6 +1,9 @@ -(defpackage #:website/helper - (:use #:cl - #:jingle) +(uiop:define-package #:website/helper + (:use #:cl) + (:use-reexport #:hsx + #:jingle + #:jonathan + #:access) (:export #:api-p)) (in-package #:website/helper) diff --git a/src/renderer.lisp b/src/renderer.lisp index c3b2d28..64c6724 100644 --- a/src/renderer.lisp +++ b/src/renderer.lisp @@ -1,9 +1,6 @@ (defpackage #:website/renderer (:use #:cl - #:hsx - #:jingle - #:website/helper - #:jonathan) + #:website/helper) (:import-from #:hsx/element #:element) (:import-from #:website/components/metadata diff --git a/src/routes/about.lisp b/src/routes/about.lisp index e8dcc44..fa84d69 100644 --- a/src/routes/about.lisp +++ b/src/routes/about.lisp @@ -1,7 +1,6 @@ (defpackage #:website/routes/about (:use #:cl - #:hsx - #:jingle) + #:website/helper) (:import-from #:website/lib/cms #:get-about) (:import-from #:website/lib/time @@ -25,7 +24,7 @@ (div :class "flex justify-center" (figure :class "flex flex-col items-center" (img - :src (getf (getf about :avatar) :url) + :src (accesses about :avatar :url) :alt "avatar" :class "size-40 rounded-xl shadow-sm avatar") (figcaption (getf about :avatar-caption)))) (raw! (getf about :content)) diff --git a/src/routes/blog.lisp b/src/routes/blog.lisp index 820b359..051e7df 100644 --- a/src/routes/blog.lisp +++ b/src/routes/blog.lisp @@ -1,7 +1,6 @@ (defpackage #:website/routes/blog (:use #:cl - #:hsx - #:jingle) + #:website/helper) (:export #:handle-get)) (in-package #:website/routes/blog) diff --git a/src/routes/index.lisp b/src/routes/index.lisp index 8797b29..fe78adb 100644 --- a/src/routes/index.lisp +++ b/src/routes/index.lisp @@ -1,6 +1,6 @@ (defpackage #:website/routes/index (:use #:cl - #:hsx) + #:website/helper) (:import-from #:website/lib/cms #:get-about) (:export #:handle-get @@ -30,7 +30,7 @@ (hsx (div :class "flex flex-col items-center justify-center h-full" (img - :src (getf (getf about :avatar) :url) + :src (accesses about :avatar :url) :alt "avatar" :class "size-40 rounded-xl shadow-sm avatar") (div :class "flex flex-col items-center gap-2 py-6" (h1 :class "font-bold text-2xl text-center" diff --git a/src/routes/not-found.lisp b/src/routes/not-found.lisp index 0715ff8..b5ca783 100644 --- a/src/routes/not-found.lisp +++ b/src/routes/not-found.lisp @@ -1,7 +1,5 @@ (defpackage #:website/routes/not-found (:use #:cl - #:hsx - #:jingle #:website/helper) (:export #:handle-not-found)) (in-package #:website/routes/not-found) diff --git a/src/routes/work.lisp b/src/routes/work.lisp index c1e6cf4..97114cc 100644 --- a/src/routes/work.lisp +++ b/src/routes/work.lisp @@ -1,7 +1,6 @@ (defpackage #:website/routes/work (:use #:cl - #:hsx - #:jingle) + #:website/helper) (:import-from #:website/lib/cms #:get-work) (:import-from #:website/lib/time