aboutsummaryrefslogtreecommitdiff
path: root/haunt/jakob/theme.scm
diff options
context:
space:
mode:
Diffstat (limited to 'haunt/jakob/theme.scm')
-rw-r--r--haunt/jakob/theme.scm22
1 files changed, 16 insertions, 6 deletions
diff --git a/haunt/jakob/theme.scm b/haunt/jakob/theme.scm
index 141dc68..166d20f 100644
--- a/haunt/jakob/theme.scm
+++ b/haunt/jakob/theme.scm
@@ -15,6 +15,7 @@
;;; <http://www.gnu.org/licenses/>.
(define-module (jakob theme)
+ #:use-module (srfi srfi-1)
#:use-module (ice-9 match)
#:use-module (jakob utils sxml)
#:export (theme))
@@ -33,19 +34,28 @@
("pgpkey authn" "/static/gpg.txt")))
(define %nav-bar-tabs '(("About" "/pages/about.html")
("Tags" "/tag.html")
- ("Blogroll" "/blogroll/")
- ("Bookmarks" "/bookmark/")
- ("Changelog" "/pages/changelog.html")))
+ ("More ▼" "#"
+ ("Blogroll" "/blogroll/")
+ ("Bookmarks" "/bookmark/")
+ ("Changelog" "/pages/changelog.html"))))
(define %title "Jakob's Personal Webpage")
+(define (format-nav-item item-content)
+ (let* ((anchor-element (apply hyperlink (reverse (take item-content 2))))
+ (children (drop item-content 2)))
+ (if (null? children)
+ `(li ,anchor-element)
+ `(li (@ (class "drop-parent"))
+ ,anchor-element
+ (ul (@ (class "drop-menu"))
+ ,@(map format-nav-item children))))))
+
(define %header
`(header
,(hyperlink "/" (image "lambda.svg" "home"))
(nav (ul
- ,@(map (lambda (tuple)
- `(li ,(apply hyperlink (reverse tuple))))
- %nav-bar-tabs)))))
+ ,@(map format-nav-item %nav-bar-tabs)))))
(define %footer
`(footer

© 2015 - 2026 Jakob L. Kreuze