From 3feeee7982ad16081c066a27d67486fa821d280b Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sun, 11 Apr 2021 10:34:53 +0200 Subject: website: Move menubar to header. --- website/haunt.scm | 46 +++++++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 21 deletions(-) (limited to 'website/haunt.scm') diff --git a/website/haunt.scm b/website/haunt.scm index a8b6a35..5d00630 100644 --- a/website/haunt.scm +++ b/website/haunt.scm @@ -39,6 +39,19 @@ (define* (base-layout body #:key (title "") (meta '()) (posts '()) site) + (define menubar + `(div (@ (id "menubar") + (class "width-control")) + (ul + (li (a (@ (href ,(base-url "/"))) + "About")) + (li (a (@ (href ,(base-url "/software"))) + "Software")) + (li (a (@ (href ,(base-url "/blog"))) + "Blog")) + (li (a (@ (href ,(base-url "/blog/feed.xml"))) + (img (@ (alt "Atom feed") + (src ,(image-url "/feed.png"))))))))) (define front-page? (assoc-ref meta 'frontpage)) @@ -56,16 +69,16 @@ (media "screen"))) (title ,title)) (body - (div (@ (id "header") - ,@(if front-page? - '((class "frontpage")) - '())) + ,@(if front-page? + '((@ (class "frontpage"))) + '()) + (div (@ (id "header")) (div (@ (id "header-inner") (class "width-control")) - (a (@ (href ,(base-url "/"))) - (img (@ (class ,(if front-page? - "logo" "logo small")) - (alt "The logo of the GNU Assembly") + (a (@ (href ,(base-url "/")) + (class ,(if front-page? + "logo" "logo small"))) + (img (@ (alt "The logo of the GNU Assembly") (src ,(image-url (if front-page? "/logo.svg" "/logo-small.svg")))))) @@ -82,19 +95,10 @@ "giving them individual and collective control " "over their computing, from the operating " "system to applications.")) - '()))) - (div (@ (id "menubar") - (class "width-control")) - (ul - (li (a (@ (href ,(base-url "/"))) - "About")) - (li (a (@ (href ,(base-url "/software"))) - "Software")) - (li (a (@ (href ,(base-url "/blog"))) - "Blog")) - (li (a (@ (href ,(base-url "/blog/feed.xml"))) - (img (@ (alt "Atom feed") - (src ,(image-url "/feed.png")))))))) + `(,menubar)))) + ,@(if (assoc-ref meta 'frontpage) + `(,menubar) + '()) (div (@ (id "content") (class "width-control")) -- cgit v1.2.1