;;; -*- mode: lisp; coding: utf-8; -*- ;;; Generate the index.html file (ql:quickload '(:dev.metalisp.sbt :3bmd)) (defpackage :website (:use :cl #:ml-sbt) (:import-from #:ml-sbt/section #:with-section #:with-section-row #:with-section-col #:with-section-projects #:with-title-bar) (:import-from #:ml-sbt/navbar #:with-navbar) (:import-from #:ml-sbt/list-group #:list-group #:with-list-group #:with-list-group*) (:import-from #:ml-sbt/card #:with-card*) (:import-from #:ml-sbt/utility #:make-grid-class) (:import-from #:ml-sbt/btn #:btn)) (in-package :website) (defvar *lang* "en") (defparameter *active-projects* '(("dev.metalisp.sbt" ("Library of Common Lisp Macros to generate HTML." "In Active Development" "Common Lisp" "MIT License") "https://code.metalisp.dev/marcuskammer/dev.metalisp.sbt") ("dev.metalisp.survey" ("Create questionnaires and analyze the results." "In Active Development" "Common Lisp" "MIT License") "https://code.metalisp.dev/marcuskammer/dev.metalisp.survey") ("dev.metalisp.qmetrics" ("Calculation engine for questionnaires." "In Active Development" "Common Lisp" "MIT License") "https://code.metalisp.dev/marcuskammer/dev.metalisp.qmetrics") ("dev.metalisp.activitystreams" ("ActivityStreams 2 library" "In Active Development" "Common Lisp" "MIT License") "https://code.metalisp.dev/marcuskammer/dev.metalisp.activitystreams") ("dev.metalisp.webdriver" ("WebDriver library" "In Active Development" "Common Lisp" "MIT License") "https://code.metalisp.dev/marcuskammer/dev.metalisp.webdriver") ("emacs dot files" ("Personal emacs dot files." "In Active Development" "Emacs Lisp" "GPL") "https://code.metalisp.dev/marcuskammer/emacs.d"))) (unless (uiop:directory-exists-p #P"public/") (ensure-directories-exist "public/")) (defparameter *brand-name* "metalisp.dev") (defparameter *brand-url* "/") (defparameter *main-headline* "Crafting Software with the Power of Inclusion") (defparameter *index-html* (with-page (:title "metalisp.dev projects" :lang *lang*) ;; -- ;; Body Head ;; -- (with-body-header nil *main-headline* *lang* (with-navbar nil *brand-name* *brand-url* nil nil)) ;; -- ;; Body Main ;; -- (with-body-main nil ;; -- ;; Introduction ;; -- (with-section (with-title-bar "About metalisp.dev") (:raw (md-file-to-html-string "about.md"))) ;; -- ;; News ;; -- (with-section (with-title-bar "News") (:raw (md-file-to-html-string "news.md"))) ;; -- ;; Active Projects ;; -- (with-section (with-title-bar "Active Projects") (with-section-projects (dolist (project *active-projects*) (destructuring-bind (cheader citems curl) project (with-card* :card-header cheader :card-items citems :card-body (btn (:url curl) (t9n "view-details" *lang*))))))) ;; -- ;; Contact ;; -- (with-section (with-title-bar "Contact") (with-list-group nil "email: post at metalisp.dev" "jabber chatgroup: metalisp@conference.mailbox.org" (:a :rel "me" :href "https://fosstodon.org/@metalisp" "Mastodon")))))) (with-open-file (ofile "public/index.html" :direction :output :if-exists :supersede) (princ *index-html* ofile))