summaryrefslogtreecommitdiffstats
path: root/website/haunt.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2021-04-10 22:19:13 +0200
committerLudovic Courtès <ludo@gnu.org>2021-04-10 22:19:13 +0200
commit96be3aee4214f864dfe48758d4b08d13ffa58c78 (patch)
treecdddb6773579956ff60d4c03d6fb7dd1c04122ac /website/haunt.scm
parentwebsite: free-software: Add note on "open source". (diff)
website: Add big-letter heading on the front page.
Suggested by Ricardo. * website/haunt.scm (base-layout): Factorize front-page checks. (read-markdown-page): Add special heading on the front page. * website/index.md: Adjust heading. * website/static/css/main.css (.front-page-heading): New entity.
Diffstat (limited to 'website/haunt.scm')
-rw-r--r--website/haunt.scm28
1 files changed, 23 insertions, 5 deletions
diff --git a/website/haunt.scm b/website/haunt.scm
index af3e5e8..bb02010 100644
--- a/website/haunt.scm
+++ b/website/haunt.scm
@@ -38,6 +38,9 @@
38 38
39(define* (base-layout body #:key (title "") (meta '()) 39(define* (base-layout body #:key (title "") (meta '())
40 (posts '()) site) 40 (posts '()) site)
41 (define front-page?
42 (assoc-ref meta 'frontpage))
43
41 `((doctype "html") 44 `((doctype "html")
42 (html (@ (lang "en")) 45 (html (@ (lang "en"))
43 (head 46 (head
@@ -53,19 +56,19 @@
53 (title ,title)) 56 (title ,title))
54 (body 57 (body
55 (div (@ (id "header") 58 (div (@ (id "header")
56 ,@(if (assoc-ref meta 'frontpage) 59 ,@(if front-page?
57 '((class "frontpage")) 60 '((class "frontpage"))
58 '())) 61 '()))
59 (div (@ (id "header-inner") 62 (div (@ (id "header-inner")
60 (class "width-control")) 63 (class "width-control"))
61 (a (@ (href ,(base-url "/"))) 64 (a (@ (href ,(base-url "/")))
62 (img (@ (class ,(if (assoc-ref meta 'frontpage) 65 (img (@ (class ,(if front-page?
63 "logo" "logo small")) 66 "logo" "logo small"))
64 (alt "The logo of the GNU Assembly") 67 (alt "The logo of the GNU Assembly")
65 (src ,(image-url (if (assoc-ref meta 'frontpage) 68 (src ,(image-url (if front-page?
66 "/logo.svg" 69 "/logo.svg"
67 "/logo-small.svg")))))) 70 "/logo-small.svg"))))))
68 ,@(if (assoc-ref meta 'frontpage) 71 ,@(if front-page?
69 '((div (@ (class "baseline")) 72 '((div (@ (class "baseline"))
70 "Software for human empowerment.")) 73 "Software for human empowerment."))
71 '()))) 74 '())))
@@ -98,7 +101,22 @@
98representation." 101representation."
99 (let ((meta body (read-markdown (string-append %cwd "/" file)))) 102 (let ((meta body (read-markdown (string-append %cwd "/" file))))
100 (base-layout `(div (@ (class "post")) 103 (base-layout `(div (@ (class "post"))
101 (div (@ (class "post-body")) ,body)) 104 (div (@ (class "post-body"))
105
106 ;; Add the large-font welcoming message on the
107 ;; front page.
108 ,@(if (assoc-ref meta 'frontpage)
109 `((p (@ (id "heading")
110 (class "front-page-heading"))
111 "Welcome to the GNU Assembly! We write "
112 (a (@ (href "/en/documents/free-software"))
113 (emph "free software"))
114 " — software that empowers users, "
115 "giving them individual and collective control "
116 "over their computing, from the operating "
117 "system to applications."))
118 '())
119 ,body))
102 #:title (string-append "The GNU Assembly — " 120 #:title (string-append "The GNU Assembly — "
103 (assoc-ref meta 'title)) 121 (assoc-ref meta 'title))
104 #:meta meta 122 #:meta meta