From 96be3aee4214f864dfe48758d4b08d13ffa58c78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sat, 10 Apr 2021 22:19:13 +0200 Subject: 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. --- website/haunt.scm | 28 +++++++++++++++++++++++----- website/index.md | 3 +-- website/static/css/main.css | 5 +++++ 3 files changed, 29 insertions(+), 7 deletions(-) (limited to 'website') 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 @@ (define* (base-layout body #:key (title "") (meta '()) (posts '()) site) + (define front-page? + (assoc-ref meta 'frontpage)) + `((doctype "html") (html (@ (lang "en")) (head @@ -53,19 +56,19 @@ (title ,title)) (body (div (@ (id "header") - ,@(if (assoc-ref meta 'frontpage) + ,@(if front-page? '((class "frontpage")) '())) (div (@ (id "header-inner") (class "width-control")) (a (@ (href ,(base-url "/"))) - (img (@ (class ,(if (assoc-ref meta 'frontpage) + (img (@ (class ,(if front-page? "logo" "logo small")) (alt "The logo of the GNU Assembly") - (src ,(image-url (if (assoc-ref meta 'frontpage) + (src ,(image-url (if front-page? "/logo.svg" "/logo-small.svg")))))) - ,@(if (assoc-ref meta 'frontpage) + ,@(if front-page? '((div (@ (class "baseline")) "Software for human empowerment.")) '()))) @@ -98,7 +101,22 @@ representation." (let ((meta body (read-markdown (string-append %cwd "/" file)))) (base-layout `(div (@ (class "post")) - (div (@ (class "post-body")) ,body)) + (div (@ (class "post-body")) + + ;; Add the large-font welcoming message on the + ;; front page. + ,@(if (assoc-ref meta 'frontpage) + `((p (@ (id "heading") + (class "front-page-heading")) + "Welcome to the GNU Assembly! We write " + (a (@ (href "/en/documents/free-software")) + (emph "free software")) + " — software that empowers users, " + "giving them individual and collective control " + "over their computing, from the operating " + "system to applications.")) + '()) + ,body)) #:title (string-append "The GNU Assembly — " (assoc-ref meta 'title)) #: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 **DRAFT** -Welcome to the GNU Assembly! Wondering what this is? Here are the -highlights: +Wondering what this is? Here are the highlights: - Gathering under a New Umbrella — [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 @@ @media all and (max-width:800px){html {font-size: 16px;}} @media all and (max-width:760px){html {font-size: 16px;}} +.front-page-heading { + font-size: 175%; + line-height: 150%; +} + /*#ffbf2d*/ body,html { -- cgit v1.2.1