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