add static license page
[~bandali/bndl.org] / haunt.scm
CommitLineData
85314da0
AB
1(use-modules (haunt asset)
2 (haunt builder blog)
3 (haunt builder atom)
4 (haunt builder assets)
99ac860d 5 (haunt builder rss)
85314da0
AB
6 (haunt html)
7 (haunt page)
8 (haunt post)
9 (haunt reader commonmark)
10 (haunt site)
11 (haunt utils)
12 (ice-9 match)
13 (srfi srfi-19))
14
15(define (stylesheet name)
16 `(link (@ (rel "stylesheet")
17 (href ,(string-append "/" name ".css")))))
18
19(define* (base-layout site body #:key title)
20 `((doctype "html")
21 (html
22 (head
23 (meta (@ (charset "utf-8")))
24 (title ,(if title (string-append title " — " (site-title site))
25 "Amin Bandali’s Personal Site"))
26 ,(stylesheet "reset")
27 ,(stylesheet "style"))
28 (body
29 (main ,body)
30 (footer
31 (p
32 "Copyright 2016–2019 Amin Bandali. See "
33 (a (@ (href "license.html")) "license.html")
34 " for license conditions. Please copy and share."))))))
35
cd5ad35b
AB
36(define my-date-format "~B ~d, ~Y")
37
38(define (my-post-template post)
85314da0
AB
39 `((header
40 (h1 ,(post-ref post 'title))
41 (address "By "
42 (a (@ (href "/"))
43 ,(post-ref post 'author))
44 " <" ,(post-ref post 'email) ">")
45 (p (@ (class "date"))
cd5ad35b 46 ,(date->string (post-date post) my-date-format)))
85314da0
AB
47 ,(post-sxml post)))
48
cd5ad35b 49(define (my-collection-template site title posts prefix)
85314da0
AB
50 (define (post-uri post)
51 (string-append (or prefix "") "/"
52 (site-post-slug site post) ".html"))
53
54 `((h3 ,title)
55 (ul
56 ,@(map (lambda (post)
57 `(li
58 (a (@ (href ,(post-uri post)))
59 ,(post-ref post 'title))
cd5ad35b 60 " — " ,(date->string (post-date post) my-date-format)))
85314da0
AB
61 posts))))
62
63(define bandali-theme
64 (theme #:name "bandali"
65 #:layout
66 (lambda (site title body)
67 (base-layout site body
68 #:title title))
cd5ad35b
AB
69 #:post-template my-post-template
70 #:collection-template my-collection-template))
71
72(define (static-page title file-name body)
73 (lambda (site posts)
74 (make-page file-name
75 (with-layout bandali-theme site title body)
76 sxml->html)))
85314da0
AB
77
78(define (index-material site posts)
79 `(div
80 (h1 (@ (style "font-size: 0;"))
81 "Amin Bandali")
82 (p (@ (style "margin-top: 0;"))
83 "Hi, I’m "
84 (a (@ (href "images/bandali-with-rms.jpg")
85 (title ,(string-append
86 "photo of bandali with rms wearing a "
87 "“pay cash don’t be tracked” pin")))
88 "Amin Bandali")
89 ". I’m a graduate student at "
90 (a (@ (href "https://watform.uwaterloo.ca"))
91 "WatForm")
92 " at University of Waterloo, supervised by "
93 (a (@ (href "https://cs.uwaterloo.ca/~nday/"))
94 "Dr. Nancy Day")
95 ". The main goal of my research is improving "
96 (strong "software and systems reliability")
97 " through application of " (em "formal methods") ".")
98 (p "My research at WatForm focuses on formal logic, model "
99 "checking, and verification. I’m also interested in "
100 "programming languages, theorem provers, and their "
101 "type systems. You may wish to view my academic "
102 (a (@ (href "bandali-cv.html")) "curriculum vitae") ".")
103 (p (@ (class "notice"))
104 (strong "SE 212 students: ")
105 "see " (a (@ (href "se212-f19/")) "here") " for slides and "
106 "other material from the tutorials.")
107 (p "On the side, I dabble in "
108 (a (@ (href "https://leanprover.github.io")) "Lean")
109 " and enjoy "
110 (a (@ (href "https://stallman.org/articles/on-hacking.html"))
111 "hacking")
112 " on "
113 (a (@ (href "https://www.gnu.org/software/emacs/manual/elisp.html"))
114 "Elisp")
115 ". I’m a "
116 (a (@ (href "https://www.gnu.org/philosophy/free-sw.html"))
117 "Free Software")
99ac860d 118 " activist, a GNU "
85314da0
AB
119 (a (@ (href "https://www.gnu.org/people/#bandali"))
120 "maintainer")
121 " and "
122 (a (@ (href "https://www.gnu.org/people/webmeisters.html#bandali"))
123 "webmaster")
99ac860d
AB
124 ", and an "
125 (a (@ (href "https://www.fsf.org/associate/"))
126 "associate member")
127 " of the " (a (@ (href "https:///www.fsf.org")
128 (title "Free Software Foundation")) "FSF")
85314da0
AB
129 ". I co-host the "
130 (a (@ (href "https://emacsel.com")) "Emacs.el")
131 " podcast with "
99ac860d
AB
132 (a (@ (href "https://www.pygopar.com")) "Daniel Gopar")
133 ", and organize "
85314da0
AB
134 (a (@ (href "https://emacsconf.org")) "EmacsConf") " with help"
135 " from many wonderful people. I am also a member of the"
136 " Systems Committee for the "
137 (a (@ (href "https://csclub.uwaterloo.ca")
138 (title ,(string-append
139 "Computer Science Club of the "
140 "University of Waterloo"))) "CSC")
141 ".")
142 (p "See my " (a (@ (href "contact.html")) "contact") " page for "
143 "how to best reach me.")
144 (h2 (@ (id "papers")) "Papers")
145 (dl
146 (dt "A Comparison of the Declarative Modelling Languages B, DASH,
147 and TLA" (sup "+")
148 (span (@ (class "plinks"))
149 " [ "
150 (a (@ (href "papers/modre2018-declarative.pdf"))
151 "pdf")
152 " | "
153 (a (@ (href "papers/modre2018-declarative.bib"))
154 "bib")
155 " ]"))
156 (dd "Ali Abbassi, "
157 (a (@ (href "https://bandali.eu.org")) "Amin Bandali") ", "
158 (a (@ (href "https://cs.uwaterloo.ca/~nday/"))
159 "Nancy A. Day")
160 ", and Jose Serna"
161 (br)
162 (em "2018 IEEE 8th International Model-Driven Requirements"
163 " Engineering Workshop (MoDRE)")
164 (br)
165 "Copyright © 2018 IEEE. All Rights Reserved. Sadly."))
166 (h2 (@ (id "talks")) "Talks")
167 (dl
168 (dt
169 "The Magic of Specifications and Type Systems"
170 (span (@ (class "plinks"))
171 " [ "
172 (a (@ (href "talks/cucsc-2017-slides.pdf")
173 (title ,(string-append
174 "presented at the Canadian Undergraduate"
175 " Computer Science Conference 2017,\n"
176 "University of Toronto, Canada,"
177 "June 15–17, 2017")))
178 "slides")
179 " | "
180 (a (@ (href "talks/eecs4080-poster.pdf")
181 (title ,(string-append
182 "presented at the Lassonde Undergraduate"
183 " Summer Student Research Conference,\n"
184 "York University, Toronto, Canada,"
185 "August 15, 2017")))
186 "poster")
187 " ]"))
188 (dd (a (@ (href "https://bandali.eu.org")) "Amin Bandali") ", "
189 (a (@ (href "https://github.com/cipher1024"))
190 "Simon Hudon")
191 ", "
192 (a (@ (href "http://www.cse.yorku.ca/~jonathan/"))
193 "Jonathan S. Ostroff")))
194 (h2 (@ (id "projects")) "Projects")
195 (p "Below are a number of free software projects I have worked "
196 "on:")
197 (dl
198 (dt (a (@ (href "https://git.sr.ht/~bandali/george-mode"))
199 "george-mode"))
200 (dd "Emacs major mode for editing George files")
201 (dt (a (@ (href "https://git.uwaterloo.ca/bandali/alloy-catalyst"))
202 "alloy-catalyst"))
203 (dd "Framework for performance analysis of Alloy models")
204 (dt (a (@ (href "https://github.com/unitb/unitb-web"))
205 "unitb-web"))
206 (dd "Web interface for Unit-B")
207 (dt (a (@ (href "https://github.com/unitb/tex2png-hs"))
208 "tex2png-hs"))
209 (dd "Library and CLI for converting TeX and LaTeX to PNG "
210 "images"))
211 (h2 (@ (id "notes")) "Notes")
60d388df
AB
212 (table
213 (@ (class "post-list"))
214 (tbody
85314da0
AB
215 ,@(map
216 (lambda (post)
217 (define (post-uri post)
218 (string-append "/"
219 (site-post-slug site post) ".html"))
60d388df
AB
220 `(tr
221 (td (a (@ (href ,(post-uri post)))
222 ,(post-ref post 'title)))
223 (td (@ (style "font-size: 0.875em;"))
cd5ad35b 224 ,(date->string (post-date post) my-date-format))))
60d388df 225 (take-up-to 10 (posts/reverse-chronological posts)))))))
85314da0
AB
226
227(define (index-page site posts)
228 (make-page
229 "index.html"
230 (base-layout site (index-material site posts))
231 sxml->html))
232
cd5ad35b
AB
233(define license-page
234 (static-page
235 "Licensing Information"
236 "license.html"
237 `((h1 "License information for bandali.eu.org")
238 (p "I strongly believe in "
239 (a (@ (href "https://questioncopyright.org/what_is_free_culture"))
240 "free culture")
241 " and that all creative works everywhere should be "
242 (a (@ (href "https://freedomdefined.org/Definition")) "free"
243 "."))
244 (p "Unless otherwise noted material on this site is licensed "
245 "under the GNU General Public License as published by the "
246 "Free Software Foundation, either version 3 of the License, "
247 "or (at your option) any later version. A copy of the "
248 "license is included at "
249 (a (@ (href "gpl-3.0.html")) "gpl-3.0.html") ".")
250 (p "Some resources on free software and licenses:")
251 (ul
252 (li (a (@ (href "https://www.gnu.org/philosophy/free-sw.html"))
253 "What is free software?"))
254 (li (a (@ (href "https://www.gnu.org/licenses/license-list.html"))
255 "Various Licenses and Comments about Them"))
256 (li (a (@ (href "https://www.gnu.org/proprietary/proprietary.html"))
257 "Proprietary Software Is Often Malware"))))))
258
85314da0
AB
259(define my-domain "bandali.eu.org")
260
261(site #:title "Amin Bandali"
262 #:domain my-domain
263 #:default-metadata
264 '((author . "Amin Bandali")
265 (email . "bandali@gnu.org")
266 (domain . my-domain))
267 #:readers (list commonmark-reader)
268 #:builders (list (blog #:theme bandali-theme
269 #:collections
270 `(("Notes" "notes.html"
271 ,posts/reverse-chronological)))
272 index-page
99ac860d
AB
273 (atom-feed
274 #:file-name "feed.atom")
275 (atom-feeds-by-tag
276 #:prefix "tags")
277 (rss-feed
278 #:file-name "feed.rss")
cd5ad35b 279 license-page
85314da0 280 (static-directory "static" "")))