From cb7062028e78a1575886fda0f3e0fc091696e58f Mon Sep 17 00:00:00 2001 From: Akira Tempaku <paku@skyizwhite.dev> Date: Sat, 17 May 2025 16:42:51 +0900 Subject: [PATCH 1/2] re-export hsx, jingle, jonathan in helper --- src/components/header.lisp | 3 +-- src/components/metadata.lisp | 3 +-- src/helper.lisp | 8 +++++--- src/renderer.lisp | 5 +---- src/routes/about.lisp | 3 +-- src/routes/blog.lisp | 3 +-- src/routes/index.lisp | 2 +- src/routes/not-found.lisp | 2 -- src/routes/work.lisp | 3 +-- 9 files changed, 12 insertions(+), 20 deletions(-) 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..5ee1bda 100644 --- a/src/helper.lisp +++ b/src/helper.lisp @@ -1,6 +1,8 @@ -(defpackage #:website/helper - (:use #:cl - #:jingle) +(uiop:define-package #:website/helper + (:use #:cl) + (:use-reexport #:hsx + #:jingle + #:jonathan) (: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..e17f122 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 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..efc327e 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 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 From fa0c60d4754d8cf7ec529a4701018029c730f35e Mon Sep 17 00:00:00 2001 From: Akira Tempaku <paku@skyizwhite.dev> Date: Sat, 17 May 2025 17:14:58 +0900 Subject: [PATCH 2/2] Add access to helper --- qlfile | 1 + qlfile.lock | 4 ++++ src/helper.lisp | 3 ++- src/routes/about.lisp | 2 +- src/routes/index.lisp | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) 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/helper.lisp b/src/helper.lisp index 5ee1bda..a367676 100644 --- a/src/helper.lisp +++ b/src/helper.lisp @@ -2,7 +2,8 @@ (:use #:cl) (:use-reexport #:hsx #:jingle - #:jonathan) + #:jonathan + #:access) (:export #:api-p)) (in-package #:website/helper) diff --git a/src/routes/about.lisp b/src/routes/about.lisp index e17f122..fa84d69 100644 --- a/src/routes/about.lisp +++ b/src/routes/about.lisp @@ -24,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/index.lisp b/src/routes/index.lisp index efc327e..fe78adb 100644 --- a/src/routes/index.lisp +++ b/src/routes/index.lisp @@ -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"