summaryrefslogtreecommitdiffstats
path: root/website
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
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')
-rw-r--r--website/haunt.scm28
-rw-r--r--website/index.md3
-rw-r--r--website/static/css/main.css5
3 files changed, 29 insertions, 7 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
diff --git a/website/index.md b/website/index.md
index f6724e2..30056aa 100644
--- a/website/index.md
+++ b/website/index.md
@@ -4,8 +4,7 @@ frontpage: yes
4 4
5**DRAFT** 5**DRAFT**
6 6
7Welcome to the GNU Assembly! Wondering what this is? Here are the 7Wondering what this is? Here are the highlights:
8highlights:
9 8
10 - Gathering under a New Umbrella — 9 - Gathering under a New Umbrella —
11 [We](https://wiki.gnu.tools/gnu:social-contract-endorsement), 10 [We](https://wiki.gnu.tools/gnu:social-contract-endorsement),
diff --git a/website/static/css/main.css b/website/static/css/main.css
index f8c84a2..89ff430 100644
--- a/website/static/css/main.css
+++ b/website/static/css/main.css
@@ -38,6 +38,11 @@
38@media all and (max-width:800px){html {font-size: 16px;}} 38@media all and (max-width:800px){html {font-size: 16px;}}
39@media all and (max-width:760px){html {font-size: 16px;}} 39@media all and (max-width:760px){html {font-size: 16px;}}
40 40
41.front-page-heading {
42 font-size: 175%;
43 line-height: 150%;
44}
45
41/*#ffbf2d*/ 46/*#ffbf2d*/
42 47
43body,html { 48body,html {