diff options
Diffstat (limited to '')
-rw-r--r-- | haunt.scm | 46 |
1 files changed, 25 insertions, 21 deletions
@@ -39,6 +39,19 @@ | |||
39 | 39 | ||
40 | (define* (base-layout body #:key (title "") (meta '()) | 40 | (define* (base-layout body #:key (title "") (meta '()) |
41 | (posts '()) site) | 41 | (posts '()) site) |
42 | (define menubar | ||
43 | `(div (@ (id "menubar") | ||
44 | (class "width-control")) | ||
45 | (ul | ||
46 | (li (a (@ (href ,(base-url "/"))) | ||
47 | "About")) | ||
48 | (li (a (@ (href ,(base-url "/software"))) | ||
49 | "Software")) | ||
50 | (li (a (@ (href ,(base-url "/blog"))) | ||
51 | "Blog")) | ||
52 | (li (a (@ (href ,(base-url "/blog/feed.xml"))) | ||
53 | (img (@ (alt "Atom feed") | ||
54 | (src ,(image-url "/feed.png"))))))))) | ||
42 | (define front-page? | 55 | (define front-page? |
43 | (assoc-ref meta 'frontpage)) | 56 | (assoc-ref meta 'frontpage)) |
44 | 57 | ||
@@ -56,16 +69,16 @@ | |||
56 | (media "screen"))) | 69 | (media "screen"))) |
57 | (title ,title)) | 70 | (title ,title)) |
58 | (body | 71 | (body |
59 | (div (@ (id "header") | 72 | ,@(if front-page? |
60 | ,@(if front-page? | 73 | '((@ (class "frontpage"))) |
61 | '((class "frontpage")) | 74 | '()) |
62 | '())) | 75 | (div (@ (id "header")) |
63 | (div (@ (id "header-inner") | 76 | (div (@ (id "header-inner") |
64 | (class "width-control")) | 77 | (class "width-control")) |
65 | (a (@ (href ,(base-url "/"))) | 78 | (a (@ (href ,(base-url "/")) |
66 | (img (@ (class ,(if front-page? | 79 | (class ,(if front-page? |
67 | "logo" "logo small")) | 80 | "logo" "logo small"))) |
68 | (alt "The logo of the GNU Assembly") | 81 | (img (@ (alt "The logo of the GNU Assembly") |
69 | (src ,(image-url (if front-page? | 82 | (src ,(image-url (if front-page? |
70 | "/logo.svg" | 83 | "/logo.svg" |
71 | "/logo-small.svg")))))) | 84 | "/logo-small.svg")))))) |
@@ -82,19 +95,10 @@ | |||
82 | "giving them individual and collective control " | 95 | "giving them individual and collective control " |
83 | "over their computing, from the operating " | 96 | "over their computing, from the operating " |
84 | "system to applications.")) | 97 | "system to applications.")) |
85 | '()))) | 98 | `(,menubar)))) |
86 | (div (@ (id "menubar") | 99 | ,@(if (assoc-ref meta 'frontpage) |
87 | (class "width-control")) | 100 | `(,menubar) |
88 | (ul | 101 | '()) |
89 | (li (a (@ (href ,(base-url "/"))) | ||
90 | "About")) | ||
91 | (li (a (@ (href ,(base-url "/software"))) | ||
92 | "Software")) | ||
93 | (li (a (@ (href ,(base-url "/blog"))) | ||
94 | "Blog")) | ||
95 | (li (a (@ (href ,(base-url "/blog/feed.xml"))) | ||
96 | (img (@ (alt "Atom feed") | ||
97 | (src ,(image-url "/feed.png")))))))) | ||
98 | 102 | ||
99 | (div (@ (id "content") | 103 | (div (@ (id "content") |
100 | (class "width-control")) | 104 | (class "width-control")) |