dev.metalisp.sbt/src/main.lisp

22 lines
574 B
Common Lisp
Raw Normal View History

2023-06-29 17:19:12 +02:00
(defpackage cl-sbt
2023-07-01 16:30:10 +02:00
(:use :cl)
(:export
2023-07-16 13:57:42 +02:00
:write-string-to-file
:with-page))
2023-07-01 16:30:10 +02:00
2023-06-29 17:19:12 +02:00
(in-package :cl-sbt)
2023-07-03 14:43:58 +02:00
2023-07-16 13:57:42 +02:00
(defmacro with-page ((&key title) &body body)
`(spinneret:with-html
(:doctype)
(:html
(:head
(:title ,title)
2023-07-17 08:29:16 +02:00
(:link :type "text/css" :rel "stylesheet" :href "public/5.3.0/bootstrap.min.css"))
2023-07-17 09:04:34 +02:00
(:body ,@body)
(:script :src "public/5.3.0/bootstrap.bundle.min.js"))))
2023-07-16 13:57:42 +02:00
2023-07-16 11:36:30 +02:00
(defun write-string-to-file (filename string)
(with-open-file (stream filename :direction :output :if-exists :supersede)
(write-string string stream)))