commit f5741aa7c70b49d25a741d94bf2a38905346581b
parent 594ae0dea4236df2aacdf0c9de88139449436eec
Author: massi <mdsiboldi@gmail.com>
Date: Thu, 25 Jul 2024 00:36:32 -0700
delete unused files
Diffstat:
3 files changed, 0 insertions(+), 96 deletions(-)
diff --git a/make.clj b/make.clj
@@ -1,3 +0,0 @@
-#!clj
-(load-file "src/main.clj")
-(massi-world/mk-site)
diff --git a/make.lisp b/make.lisp
@@ -1,5 +0,0 @@
-#!/usr/bin/sbcl --script
-
-(load "./src/main.lisp")
-(in-package #:spinneret)
-(mk-site)
diff --git a/src/main.lisp b/src/main.lisp
@@ -1,88 +0,0 @@
-(load "~/quicklisp/setup.lisp")
-(ql:quickload "spinneret")
-(ql:quickload "spinneret/cl-markdown")
-(ql:quickload "local-time")
-
-(in-package #:spinneret)
-
-(defun header ()
- (with-html
- (:header
- "massi world 🦝")))
-
-(defmacro with-page ((&key path title description img img-desc) &body body)
- (let ((abs-path (format nil "https://massi.world~a" path)))
- `(with-html
- (:doctype)
- (:html.no-js
- (:head
- (:meta :charset "UTF-8")
- (:meta :name "viewport" :content "width=device-width, initial-scale=1")
- (:title ,title)
- (:script :type "module" :src "/js/js-check.js")
- (:link :rel "stylesheet" :href "/static/style.css")
- (:meta :name "description" :content ,description)
- (:meta :property "og:title" :content ,title)
- (when (and ,img ,img-desc)
- (:meta :property "og:image" :content ,img)
- (:meta :property "og:image:alt" :content ,img-desc))
- (:meta :property "og:locale" :content "en_US")
- (:meta :property "og:type" :content "website")
- (:meta :property "og:url" :content ,abs-path)
- (:meta :name "theme-color" :content "#000033")
- (:link :rel "canonical" :href ,abs-path)
- (:link :rel "shortcut icon" :href "/favicon.ico")
- (:link :rel "icon" :type "image/png" :sizes "16x16" :href "/static/massi-world-16-16.png")
- (:link :rel "icon" :type "image/png" :sizes "32x32" :href "/static/massi-world-32-32.png")
- (:link :rel "icon" :type "image/png" :sizes "48x48" :href "/static/massi-world-48-48.png")
- (:link :rel "apple-touch-icon" :href "/static/massi-world-180-180.png")
- (:link :rel "manifest" :href "/manifest.json"))
- (:body ,@body)))))
-
-(defun mk-home (path)
- (with-page (:path path :title "Home page" :description "My website.")
- (header)
- (:section
- (:h2 "projects")
- (:ul
- (:li (:a :href "/projects/color-synth.html" "color-synth"))))
- (:footer ("Last generated: ~A" (local-time:now)))))
-
-(defun file-get-contents (filename)
- (with-open-file (stream filename)
- (let ((contents (make-string (file-length stream))))
- (read-sequence contents stream)
- contents)))
-
-(defun mk-page (&key path maker)
- (let* ((out-dir "build/")
- (out-file (format nil "~{~A~}" `(,out-dir ,path))))
- (ensure-directories-exist out-file)
- (with-open-file (str out-file
- :direction :output
- :if-exists :supersede
- :if-does-not-exist :create)
- (setf *always-quote* t)
- (format str (with-output-to-string (*html*) (funcall maker path))))))
-
-(defun mk-color-synth (path)
- (with-page (:path path
- :title "color-synth"
- :description "color-synth: a synth that outputs colors")
- (:div.color-synth
- (:h1 "color-synth")
- (:div.samples (:img :src "/static/color-synth-sample-1.webp")
- (:img :src "/static/color-synth-sample-2.webp")
- (:img :src "/static/color-synth-sample-3.webp")
- (:img :src "/static/color-synth-sample-4.webp"))
- (:div.md (#.(file-get-contents "./src/color-synth.md"))))))
-
-(defparameter sitespec
- '(("index.html" mk-home)
- ("projects/color-synth.html" mk-color-synth)))
-
-(defun mk-site ()
- (loop for pagespec in sitespec
- for path = (first pagespec)
- for maker = (second pagespec)
- do (mk-page :path path :maker maker)))