Unverified Commit 5bc19f85 authored by Philip Kaludercic's avatar Philip Kaludercic 🌝
Browse files

changed from tabs to spaces

parent 3a1b1555
;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")
((scheme-mode
(indent-tabs-mode . nil)))
(use-modules (haunt post) (use-modules (haunt post)
(haunt page) (haunt page)
(haunt site) (haunt site)
(haunt asset) (haunt asset)
(haunt html) (haunt html)
(haunt builder blog) (haunt builder blog)
(haunt builder atom) (haunt builder atom)
(haunt builder rss) (haunt builder rss)
(haunt builder assets) (haunt builder assets)
(haunt reader commonmark) (haunt reader commonmark)
(local micronews paged-blog) (local micronews paged-blog)
(local theme) (local theme)
(local common) (local common)
(local pages) (local pages)
(srfi srfi-19)) (srfi srfi-19))
(define* (static-page name title sxml #:key (theme local-site-theme)) (define* (static-page name title sxml #:key (theme local-site-theme))
(lambda (site posts) (lambda (site posts)
(list (list
(make-page (string-append name ".html") (make-page (string-append name ".html")
((theme-layout theme) site title sxml) ((theme-layout theme) site title sxml)
sxml->html)))) sxml->html))))
(define (local-post-slug post) (define (local-post-slug post)
(string-append (date->string (post-date post) "~Y/~m/") (string-append (date->string (post-date post) "~Y/~m/")
(basename (post-file-name post) ".md"))) (basename (post-file-name post) ".md")))
(site #:title "#faui2k17" (site #:title "#faui2k17"
#:domain "faui2k17.de" #:domain "faui2k17.de"
#:readers (list commonmark-reader) #:readers (list commonmark-reader)
#:make-slug local-post-slug #:make-slug local-post-slug
#:builders (list (paged-blog #:theme local-site-theme #:builders (list (paged-blog #:theme local-site-theme
#:prefix "post") #:prefix "post")
(atom-feed #:blog-prefix "post") (atom-feed #:blog-prefix "post")
(atom-feeds-by-tag #:prefix "tags" (atom-feeds-by-tag #:prefix "tags"
#:blog-prefix "post") #:blog-prefix "post")
(rss-feed #:blog-prefix "post") (rss-feed #:blog-prefix "post")
(static-page "meta" "Meta" (static-page "meta" "Meta"
%meta-page) %meta-page)
(static-page "irc" "IRC" (static-page "irc" "IRC"
%irc-page) %irc-page)
(static-page "whatsapp" "WhatsApp Links" (static-page "whatsapp" "WhatsApp Links"
%whatsapp-page) %whatsapp-page)
(static-directory "static" "static"))) (static-directory "static" "")))
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
(define (ulist . items) (define (ulist . items)
`(ul ,(map (lambda (item) (list 'li item)) `(ul ,(map (lambda (item) (list 'li item))
items))) items)))
(define (link name uri) (define (link name uri)
`(a (@ (href ,uri)) ,name)) `(a (@ (href ,uri)) ,name))
...@@ -14,35 +14,35 @@ listing. ...@@ -14,35 +14,35 @@ listing.
See (haunt builder blog)'s blog for more details." See (haunt builder blog)'s blog for more details."
(define (group-by lst n) (define (group-by lst n)
(let loop ((left n) (current '()) (groups '()) (rest lst)) (let loop ((left n) (current '()) (groups '()) (rest lst))
(cond ((null? rest) (reverse! (cons current groups))) (cond ((null? rest) (reverse! (cons current groups)))
((> left 0) (loop (1- left) (cons (car rest) current) ((> left 0) (loop (1- left) (cons (car rest) current)
groups (cdr rest))) groups (cdr rest)))
(else (loop n '() (cons (reverse! current) groups) rest))))) (else (loop n '() (cons (reverse! current) groups) rest)))))
(lambda (site posts) (lambda (site posts)
(let* ((sorted (posts/reverse-chronological posts)) (let* ((sorted (posts/reverse-chronological posts))
(grouped (group-by (reverse sorted) per-page)) (grouped (group-by (reverse sorted) per-page))
(last-group-nr (length grouped))) (last-group-nr (length grouped)))
(define (create-index-page group i) (define (create-index-page group i)
(let ((title (format #f "faui2k17 - Page ~d" i))) (let ((title (format #f "faui2k17 - Page ~d" i)))
(make-page (make-page
;; file name ;; file name
(if (= i 1) (if (= i 1)
"index.html" "index.html"
(format #f "page-~d.html" i)) (format #f "page-~d.html" i))
;; content ;; content
((theme-layout theme) site title ((theme-layout theme) site title
((theme-collection-template theme) ((theme-collection-template theme)
site title group prefix i (= i last-group-nr))) site title group prefix i (= i last-group-nr)))
;; function ;; function
sxml->html))) sxml->html)))
(append (append
;; index pages ;; index pages
(map create-index-page grouped (map 1+ (iota (length grouped)))) (map create-index-page grouped (map 1+ (iota (length grouped))))
;; blog pages ;; blog pages
((blog #:theme theme #:prefix prefix ((blog #:theme theme #:prefix prefix
#:collections '()) #:collections '())
site posts))))) site posts)))))
...@@ -2,104 +2,104 @@ ...@@ -2,104 +2,104 @@
(define-module (local pages) (define-module (local pages)
#:use-module (local common) #:use-module (local common)
#:export (%meta-page #:export (%meta-page
%irc-page %irc-page
%whatsapp-page)) %whatsapp-page))
;; /meta.html ;; /meta.html
(define %meta-page (define %meta-page
`(article `(article
(p "Auf dieser Seite sind Kurznachrichten und andere " (p "Auf dieser Seite sind Kurznachrichten und andere "
"Informationen (hauptsächlich) für Studenten der " "Informationen (hauptsächlich) für Studenten der "
,(link "FAU Erlangen" "https://www.fau.de/") ,(link "FAU Erlangen" "https://www.fau.de/")
" im Studiengang " " im Studiengang "
,(link "Informatik" "https://www.cs.fau.de/") ,(link "Informatik" "https://www.cs.fau.de/")
".") ".")
(p "Alle Inhalte werden von einem statischem Webseiten " (p "Alle Inhalte werden von einem statischem Webseiten "
"Generator verwaltet, und jeder ist eingeladen mit " "Generator verwaltet, und jeder ist eingeladen mit "
"beizutragen. Besucht hierzu das " "beizutragen. Besucht hierzu das "
,(link "GitLab Repo" "https://gitlab.cs.fau.de/faui2k17/generator#beitragen") ,(link "GitLab Repo" "https://gitlab.cs.fau.de/faui2k17/generator#beitragen")
", auf welches mit SSO (IdM-Kennung) zugegriffen " ", auf welches mit SSO (IdM-Kennung) zugegriffen "
"werden kann.") "werden kann.")
(p "Fragen/Vorschläge technischer oder rechtlicher Art bitte an " (p "Fragen/Vorschläge technischer oder rechtlicher Art bitte an "
"den derzeitigen " "den derzeitigen "
,(link "Webmaster" "https://wwwcip.informatik.uni-erlangen.de/~oj14ozun/") ,(link "Webmaster" "https://wwwcip.informatik.uni-erlangen.de/~oj14ozun/")
" schicken."))) " schicken.")))
;; /irc.html ;; /irc.html
(define %irc-page (define %irc-page
`(article `(article
(p "IRC Channel des Jahrgangs: " (p "IRC Channel des Jahrgangs: "
,(link '(code "#faui2k17") "irc://irc.fau.de:6667/faui2k17")) ,(link '(code "#faui2k17") "irc://irc.fau.de:6667/faui2k17"))
(p "Für die die noch nie IRC verwendet haben, kann einem der " (p "Für die die noch nie IRC verwendet haben, kann einem der "
,(link '(em "IRC-Guide") "https://fsi.cs.fau.de/dw/kontakt/irc") ,(link '(em "IRC-Guide") "https://fsi.cs.fau.de/dw/kontakt/irc")
" von der FSI helfen die Basics zu verstehen.") " von der FSI helfen die Basics zu verstehen.")
(p "Auch möglich: Verbinden via " (p "Auch möglich: Verbinden via "
,(link "Matrix" "https://matrix.to/#/#_ircnet_#faui2k17:irc.snt.utwente.nl")))) ,(link "Matrix" "https://matrix.to/#/#_ircnet_#faui2k17:irc.snt.utwente.nl"))))
;; /whatsapp.html ;; /whatsapp.html
(define %whatsapp-page (define %whatsapp-page
`(article `(article
(p "Diese Seite enthält direkte " (p "Diese Seite enthält direkte "
,(link '(em "Invite Links") ,(link '(em "Invite Links")
"https://faq.whatsapp.com/en/wp/23704967?lang=de#invite") "https://faq.whatsapp.com/en/wp/23704967?lang=de#invite")
" zu WhatsApp Gruppen welche vom Semester 2017/18 erstellt wurden.") " zu WhatsApp Gruppen welche vom Semester 2017/18 erstellt wurden.")
(h1 "Allgemeine Gruppen") (h1 "Allgemeine Gruppen")
,(ulist ,(ulist
(link '(em "Erstis Gruppe") (link '(em "Erstis Gruppe")
"https://chat.whatsapp.com/Le3bBFeddlM3UD6XUduudm")) "https://chat.whatsapp.com/Le3bBFeddlM3UD6XUduudm"))
(h1 "Vorlesungen aus dem 4. Semester") (h1 "Vorlesungen aus dem 4. Semester")
,(ulist ,(ulist
(link "Rechnerkommunikation" (link "Rechnerkommunikation"
"https://chat.whatsapp.com/KkIfQkNspYsDGc1e2D5xaM") "https://chat.whatsapp.com/KkIfQkNspYsDGc1e2D5xaM")
(link "Theorie der Programmierung" (link "Theorie der Programmierung"
"https://chat.whatsapp.com/F9oXhsXeaLwJjSYkuIYqbO") "https://chat.whatsapp.com/F9oXhsXeaLwJjSYkuIYqbO")
(link "Algorithmik Kontinuierlicher Systeme" (link "Algorithmik Kontinuierlicher Systeme"
"https://chat.whatsapp.com/KqvTD8lXAuA0qnLHx208bK") "https://chat.whatsapp.com/KqvTD8lXAuA0qnLHx208bK")
(link "Mathe C4" (link "Mathe C4"
"https://chat.whatsapp.com/4eofzccqOfd51ky7Q0bgD1")) "https://chat.whatsapp.com/4eofzccqOfd51ky7Q0bgD1"))
(h1 "Vorlesungen aus dem 3. Semester") (h1 "Vorlesungen aus dem 3. Semester")
,(ulist ,(ulist
(link "Berechenbarkeit formeller Systeme" (link "Berechenbarkeit formeller Systeme"
"https://chat.whatsapp.com/7cTwkQ8dVqF4RSl8QMq0ru") "https://chat.whatsapp.com/7cTwkQ8dVqF4RSl8QMq0ru")
(link "Software Entwickelung" (link "Software Entwickelung"
"https://chat.whatsapp.com/ATOD2sUNAWP2CoukTlo4J2") "https://chat.whatsapp.com/ATOD2sUNAWP2CoukTlo4J2")
(link "Grundlagen der Logik in der Informatik" (link "Grundlagen der Logik in der Informatik"
"https://chat.whatsapp.com/0ofifeh7DVQ4mobOTmHod4") "https://chat.whatsapp.com/0ofifeh7DVQ4mobOTmHod4")
(link "Systemprogrammierung 2" (link "Systemprogrammierung 2"
"https://chat.whatsapp.com/IavyuLwBNeIJR4EHay8JKk") "https://chat.whatsapp.com/IavyuLwBNeIJR4EHay8JKk")
'(span (em "Mathe C3") '(span (em "Mathe C3")
" existiert nicht mehr, wurde zu " " existiert nicht mehr, wurde zu "
(em "Mathe C4"))) (em "Mathe C4")))
(h1 "Vorlesungen aus dem 2. Semester") (h1 "Vorlesungen aus dem 2. Semester")
,(ulist ,(ulist
(link "Parallele und Funktionale Programmierung" (link "Parallele und Funktionale Programmierung"
"https://chat.whatsapp.com/8GCn4fTWZ0b24aJCOLqnbP") "https://chat.whatsapp.com/8GCn4fTWZ0b24aJCOLqnbP")
(link "Grundlagen der Rechnerarchitektur" (link "Grundlagen der Rechnerarchitektur"
"https://chat.whatsapp.com/G8wa1sbPw5hAyKB7FqaiP4") "https://chat.whatsapp.com/G8wa1sbPw5hAyKB7FqaiP4")
(link "Grundlagen der Schaltungstechnik" (link "Grundlagen der Schaltungstechnik"
"https://chat.whatsapp.com/CLFxwY0QTItGlGhD7gXGlP") "https://chat.whatsapp.com/CLFxwY0QTItGlGhD7gXGlP")
'(span (em "Systemprogrammierung 1") '(span (em "Systemprogrammierung 1")
" existiert nicht mehr, wurde zu " " existiert nicht mehr, wurde zu "
(em "Systemprogrammierung 2")) (em "Systemprogrammierung 2"))
'(span (em "Mathe C2") '(span (em "Mathe C2")
" existiert nicht mehr, wurde zu " " existiert nicht mehr, wurde zu "
(em "Mathe C4"))) (em "Mathe C4")))
(h1 "Vorlesungen aus dem 1. Semester") (h1 "Vorlesungen aus dem 1. Semester")
,(ulist ,(ulist
(link "Konzeptionelle Modellierung" (link "Konzeptionelle Modellierung"
"https://chat.whatsapp.com/1vgtbFsvEPL8VQhwxS7wgh") "https://chat.whatsapp.com/1vgtbFsvEPL8VQhwxS7wgh")
(link "Grundlagen der Technischen Informatik" (link "Grundlagen der Technischen Informatik"
"https://chat.whatsapp.com/2gGMa0rLJFz4UoUrQbWpRp") "https://chat.whatsapp.com/2gGMa0rLJFz4UoUrQbWpRp")
(link "Algorithmen und Datenstrukturen" (link "Algorithmen und Datenstrukturen"
"https://chat.whatsapp.com/DKtSVJ0cGJW7WllVXkpYOt") "https://chat.whatsapp.com/DKtSVJ0cGJW7WllVXkpYOt")
'(span (em "Mathe C1") '(span (em "Mathe C1")
" existiert nicht mehr, wurde zu " " existiert nicht mehr, wurde zu "
(em "Mathe C4"))))) (em "Mathe C4")))))
...@@ -11,38 +11,38 @@ ...@@ -11,38 +11,38 @@
(define (intersperse lst x) (define (intersperse lst x)
(append (apply append (map (lambda (item) (list item x)) (append (apply append (map (lambda (item) (list item x))
(drop-right lst 1))) (drop-right lst 1)))
(last-pair lst))) (last-pair lst)))
(define* (make-post-generator #:key site prefix) (define* (make-post-generator #:key site prefix)
(lambda (post) (lambda (post)
`(article `(article
,(post-sxml post) ,(post-sxml post)
(nav (span "Beigetragen am " (nav (span "Beigetragen am "
(time (@ (datetime ,(date->string (post-date post) "~4"))) (time (@ (datetime ,(date->string (post-date post) "~4")))
,(date->string (post-date post) ,(date->string (post-date post)
"~Y-~m-~d"))) "~Y-~m-~d")))
,@(if (post-ref post 'author) ,@(if (post-ref post 'author)
`((span "Verfasst von " (em ,(post-ref post 'author)))) `((span "Verfasst von " (em ,(post-ref post 'author))))
'()) '())
,@(if (post-ref post 'tags) ,@(if (post-ref post 'tags)
`((span "Tags: " `((span "Tags: "
,(intersperse ,(intersperse
(map (lambda (tag) (map (lambda (tag)
(link tag (format #f "/tags/~a.xml" tag))) (link tag (format #f "/tags/~a.xml" tag)))
(post-ref post 'tags)) (post-ref post 'tags))
", "))) ", ")))
'()) '())
(span ,@(if (and site prefix) (span ,@(if (and site prefix)
`(" " `(" "
,(link "Permalink" ,(link "Permalink"
(format #f "/~a/~a.html" (format #f "/~a/~a.html"
prefix (site-post-slug site post))) prefix (site-post-slug site post)))
" | ") " | ")
'("")) '(""))
,(link "Source" ,(link "Source"
(string-append "https://gitlab.cs.fau.de/faui2k17/posts/blob/master/" (string-append "https://gitlab.cs.fau.de/faui2k17/posts/blob/master/"
(basename (post-file-name post))))))))) (basename (post-file-name post)))))))))
(define local-site-theme (define local-site-theme
(theme (theme
...@@ -50,40 +50,40 @@ ...@@ -50,40 +50,40 @@
#:layout #:layout
(lambda (site title body) (lambda (site title body)
`((doctype "html") `((doctype "html")
(html (@ (lang "de")) (html (@ (lang "de"))
(head (head
(meta (@ (charset "utf-8"))) (meta (@ (charset "utf-8")))
(meta (@ (name "referrer") (content "none"))) (meta (@ (name "referrer") (content "none")))
(meta (@ (name "viewport") (content "width=device-width"))) (meta (@ (name "viewport") (content "width=device-width")))
(title ,title) (title ,title)
(link (@ (rel "stylesheet") (href "/static/style.css"))) (link (@ (rel "stylesheet") (href "/style.css")))
(link (@ (rel "alternate") (type "application/atom+xml") (title "Atom") (link (@ (rel "alternate") (type "application/atom+xml") (title "Atom")
(href ,(string-append (site-domain site) "/feed.xml")))) (href ,(string-append (site-domain site) "/feed.xml"))))
(link (@ (rel "alternate") (type "application/rss+xml") (title "RSS") (link (@ (rel "alternate") (type "application/rss+xml") (title "RSS")
(href ,(string-append (site-domain site) "/rss-feed.xml"))))) (href ,(string-append (site-domain site) "/rss-feed.xml")))))
(body (body
(header (header
(nav ,@(list (link '(code "#faui2k17") "/") (nav ,@(list (link '(code "#faui2k17") "/")
(link "IRC" "/irc.html") (link "IRC" "/irc.html")
(link "WhatsApp" "/whatsapp.html") (link "WhatsApp" "/whatsapp.html")
(link "Beitragen" "/meta.html") (link "Beitragen" "/meta.html")
(link "Atom" "/feed.xml") (link "Atom" "/feed.xml")
(link "RSS" "/rss-feed.xml")))) (link "RSS" "/rss-feed.xml"))))
,body)))) ,body))))
#:post-template (make-post-generator) #:post-template (make-post-generator)
#:collection-template #:collection-template
(lambda (site title posts prefix number last?) (lambda (site title posts prefix number last?)
(list (list
(map (make-post-generator #:site site (map (make-post-generator #:site site
#:prefix prefix) #:prefix prefix)
posts) posts)
`(footer `(footer
,(let ((prev (link (format #f "<< Page ~d" (1- number)) ,(let ((prev (link (format #f "<< Page ~d" (1- number))
(if (= number 2) "/index.html" (if (= number 2) "/index.html"
(format #f "/page-~d.html" (1- number))))) (format #f "/page-~d.html" (1- number)))))
(next (link (format #f "Page ~d >>" (1+ number)) (next (link (format #f "Page ~d >>" (1+ number))
(format #f "/page-~d.html" (1+ number))))) (format #f "/page-~d.html" (1+ number)))))
(cond ((and last? (= number 1)) '()) (cond ((and last? (= number 1)) '())
(last? (list prev)) (last? (list prev))
((= number 1) (list next)) ((= number 1) (list next))
(else (list prev " | " next))))))))) (else (list prev " | " next)))))))))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment