Remove bulma, add bun, tailwindcss, daisyui

This commit is contained in:
Akira Tempaku 2024-06-16 14:13:16 +09:00
parent bbb9ad4b0a
commit 7040fb5173
9 changed files with 46 additions and 4 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
.qlot
public/dist.css
node_modules

12
Makefile Normal file
View file

@ -0,0 +1,12 @@
install: ## Install dependencies
@qlot install
watch: ## Run watch mode
@bun run tailwindcss -i ./public/style.css -o ./public/dist.css --watch=always
build: ## Build
@bun run tailwindcss -i ./public/style.css -o ./public/dist.css
help: ## Show options
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'

BIN
bun.lockb Executable file

Binary file not shown.

6
package.json Normal file
View file

@ -0,0 +1,6 @@
{
"devDependencies": {
"daisyui": "^4.12.2",
"tailwindcss": "^3.4.4"
}
}

3
public/style.css Normal file
View file

@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

View file

@ -10,13 +10,19 @@
#:update))
(in-package #:hp)
(defparameter *watch-process* nil)
(defparameter *app* (jg:make-app :address "localhost"
:port env:*port*))
(defun start ()
(when (env:dev-mode-p)
(setf *watch-process* (uiop:launch-program "make watch")))
(jg:start *app*))
(defun stop ()
(when (env:dev-mode-p)
(uiop:terminate-process *watch-process*))
(jg:stop *app*))
(defun setup ()

View file

@ -12,8 +12,7 @@
(head
(meta :charset "UTF-8")
(meta :name "viewport" :content "width=device-width, initial-scale=1")
(link :rel "stylesheet" :href "https://cdn.jsdelivr.net/npm/bulma@1.0.0/css/bulma.min.css")
(script :src "https://cdn.jsdelivr.net/npm/uikit@3.21.5/dist/js/uikit.min.js")
(link :rel "stylesheet" :href "/dist.css")
(script :src "https://cdn.jsdelivr.net/npm/htmx.org@1.9.12/dist/htmx.min.js")
(script :src "https://cdn.jsdelivr.net/npm/htmx.org@1.9.12/dist/ext/head-support.js")
(script :src "https://cdn.jsdelivr.net/npm/alpinejs@3.14.0/dist/cdn.min.js" :defer t)
@ -22,7 +21,7 @@
:name "description"
:content (or description "pakuの個人サイト"))
(body :hx-ext "head-support"
(main :class "container"
(main :class "container mx-auto"
children))))))
(defun response (page &key status metadata)

View file

@ -7,7 +7,8 @@
(defcomp page ()
(hsx
(h1 "こんにちは")))
(h1 :class "text-primary"
"こんにちは")))
(defun handle-get (params)
(declare (ignore params))

14
tailwind.config.js Normal file
View file

@ -0,0 +1,14 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./src/response.lisp",
"./src/routes/**/*.lisp",
"./src/components/**/*.lisp",
],
theme: {
extend: {},
},
plugins: [
require('daisyui'),
],
}