This change introduces the concept of website themes to separate the
look and feel of the website from unrelated static files and make it
easier to update themes, create new ones or switch between them.
* website/themes/initial: New theme.
* website/haunt.scm (site): Include the "themes" directory.
* website/apps/base/utils.scm (guix-website-theme): New variable.
(theme-url): New URL shorthand procedure.
The following template files were updated to use the new theme URL
shorthand:
* website/apps/base/templates/about.scm
* website/apps/base/templates/components.scm
* website/apps/base/templates/contact.scm
* website/apps/base/templates/contribute.scm
* website/apps/base/templates/cuirass.scm
* website/apps/base/templates/donate.scm
* website/apps/base/templates/graphics.scm
* website/apps/base/templates/help.scm
* website/apps/base/templates/home.scm
* website/apps/base/templates/irc.scm
* website/apps/base/templates/menu.scm
* website/apps/base/templates/security.scm
* website/apps/base/templates/theme.scm
* website/apps/blog/templates/feed.scm
* website/apps/blog/templates/post-list.scm
* website/apps/blog/templates/post.scm
* website/apps/blog/templates/tag.scm
* website/apps/download/templates/download-latest.scm
* website/apps/download/templates/download.scm
* website/apps/media/templates/components.scm
* website/apps/media/templates/publication-list.scm
* website/apps/media/templates/screenshot.scm
* website/apps/media/templates/screenshots-overview.scm
* website/apps/media/templates/video-list.scm
* website/apps/media/templates/video.scm
The following files were moved to the "initial" theme:
* website/static/base/css/breadcrumbs.css -> website/themes/initial/css/breadcrumbs.css
* website/static/base/css/buttons.css -> website/themes/initial/css/buttons.css
* website/static/base/css/code.css -> website/themes/initial/css/code.css
* website/static/base/css/common.css -> website/themes/initial/css/common.css
* website/static/base/css/contact.css -> website/themes/initial/css/contact.css
* website/static/base/css/download.css -> website/themes/initial/css/download.css
* website/static/base/css/elements.css -> website/themes/initial/css/elements.css
* website/static/base/css/footer.css -> website/themes/initial/css/footer.css
* website/static/base/css/index.css -> website/themes/initial/css/index.css
* website/static/base/css/item-preview.css -> website/themes/initial/css/item-preview.css
* website/static/base/css/manual.css -> website/themes/initial/css/manual.css
* website/static/base/css/menu.css -> website/themes/initial/css/menu.css
* website/static/base/css/messages.css -> website/themes/initial/css/messages.css
* website/static/base/css/navbar.css -> website/themes/initial/css/navbar.css
* website/static/base/css/page.css -> website/themes/initial/css/page.css
* website/static/blog/css/post.css -> website/themes/initial/css/post.css
* website/static/base/css/sidebar.css -> website/themes/initial/css/sidebar.css
* website/static/base/img/Guix-logo.png -> website/themes/initial/img/Guix-logo.png
* website/static/base/img/Guix.png -> website/themes/initial/img/Guix.png
* website/static/base/img/back-btn-bg.png -> website/themes/initial/img/back-btn-bg.png
* website/static/base/img/breadcrumbs-bg.png -> website/themes/initial/img/breadcrumbs-bg.png
* website/static/base/img/chat-icon.png -> website/themes/initial/img/chat-icon.png
* website/static/base/img/checkerboard-bg.png -> website/themes/initial/img/checkerboard-bg.png
* website/static/base/img/cookbook-icon.png -> website/themes/initial/img/cookbook-icon.png
* website/static/base/img/depression-shadow-top.png -> website/themes/initial/img/depression-shadow-top.png
* website/static/base/img/dropdown-bg.png -> website/themes/initial/img/dropdown-bg.png
* website/static/base/img/email-icon.png -> website/themes/initial/img/email-icon.png
* website/static/base/img/featured-box-bg.png -> website/themes/initial/img/featured-box-bg.png
* website/static/base/img/feed-bg-white.png -> website/themes/initial/img/feed-bg-white.png
* website/static/base/img/feed.png -> website/themes/initial/img/feed.png
* website/static/base/img/feed.svg -> website/themes/initial/img/feed.svg
* website/static/base/img/h-separator-dark.png -> website/themes/initial/img/h-separator-dark.png
* website/static/base/img/h-separator.png -> website/themes/initial/img/h-separator.png
* website/static/base/img/icon.png -> website/themes/initial/img/icon.png
* website/static/base/img/icon.svg -> website/themes/initial/img/icon.svg
* website/static/base/img/icon-set.svg -> website/themes/initial/img/icon-set.svg
* website/static/base/img/language-picker.svg -> website/themes/initial/img/language-picker.svg
* website/static/base/img/library-icon.png -> website/themes/initial/img/library-icon.png
* website/static/base/img/link-arrow-shaper.svg -> website/themes/initial/img/link-arrow-shaper.svg
* website/static/base/img/link-arrow.png -> website/themes/initial/img/link-arrow.png
* website/static/base/img/manual-icon.png -> website/themes/initial/img/manual-icon.png
* website/static/base/img/manual-latest-icon.png -> website/themes/initial/img/manual-latest-icon.png
* website/static/base/img/menu-btn-bg.png -> website/themes/initial/img/menu-btn-bg.png
* website/static/base/img/menu-item-active-bg.png -> website/themes/initial/img/menu-item-active-bg.png
* website/static/base/img/more-info-bg.png -> website/themes/initial/img/more-info-bg.png
* website/static/base/img/noise-bg.png -> website/themes/initial/img/noise-bg.png
* website/static/base/img/videos-icon.png -> website/themes/initial/img/videos-icon.png
* website/static/base/img/white-star.png -> website/themes/initial/img/white-star.png
* website/static/base/img/wiki-icon.png -> website/themes/initial/img/wiki-icon.png
* website/static/media/css/publications.css -> website/themes/initial/css/publications.css
* website/static/media/css/screenshots.css -> website/themes/initial/css/screenshots.css
* website/static/media/css/video-list.css -> website/themes/initial/css/video-list.css
* website/static/media/css/video-preview.css -> website/themes/initial/css/video-preview.css
* website/static/media/css/video.css -> website/themes/initial/css/video.css
* website/static/media/img/playing-icon.svg -> website/themes/initial/img/playing-icon.svg
* website/static/media/img/playlist-icon.svg -> website/themes/initial/img/playlist-icon.svg
* website/static/media/img/scientific-mark.svg -> website/themes/initial/img/scientific-mark.svg
* website/static/packages/css/letter-selector.css -> website/themes/initial/css/letter-selector.css
* website/static/packages/css/package-list.css -> website/themes/initial/css/package-list.css
* website/static/packages/css/package.css -> website/themes/initial/css/package.css
* website/static/packages/img/red-tag.png -> website/themes/initial/img/red-tag.png
The following files were removed:
* website/static/base/img/GuixSD-logo.png: Delete (obsolete).
---
website/apps/base/templates/about.scm | 2 +-
website/apps/base/templates/components.scm | 6 +++---
website/apps/base/templates/contact.scm | 6 +++---
website/apps/base/templates/contribute.scm | 4 ++--
website/apps/base/templates/cuirass.scm | 2 +-
website/apps/base/templates/donate.scm | 2 +-
website/apps/base/templates/graphics.scm | 4 ++--
website/apps/base/templates/help.scm | 20 +++++++++---------
website/apps/base/templates/home.scm | 6 +++---
website/apps/base/templates/irc.scm | 2 +-
website/apps/base/templates/menu.scm | 2 +-
website/apps/base/templates/security.scm | 2 +-
website/apps/base/templates/theme.scm | 18 ++++++++--------
website/apps/base/utils.scm | 20 +++++++++++++++++-
website/apps/blog/templates/feed.scm | 2 +-
website/apps/blog/templates/post-list.scm | 6 +++---
website/apps/blog/templates/post.scm | 6 +++---
website/apps/blog/templates/tag.scm | 6 +++---
.../download/templates/download-latest.scm | 4 ++--
website/apps/download/templates/download.scm | 4 ++--
website/apps/media/templates/components.scm | 6 +++---
.../apps/media/templates/publication-list.scm | 4 ++--
website/apps/media/templates/screenshot.scm | 4 ++--
.../media/templates/screenshots-overview.scm | 2 +-
website/apps/media/templates/video-list.scm | 4 ++--
website/apps/media/templates/video.scm | 4 ++--
website/haunt.scm | 1 +
website/static/base/img/GuixSD-logo.png | Bin 6785 -> 0 bytes
website/themes/README.org | 6 ++++++
.../initial}/css/breadcrumbs.css | 0
.../base => themes/initial}/css/buttons.css | 0
.../base => themes/initial}/css/code.css | 0
.../base => themes/initial}/css/common.css | 0
.../base => themes/initial}/css/contact.css | 0
.../base => themes/initial}/css/download.css | 0
.../base => themes/initial}/css/elements.css | 0
.../base => themes/initial}/css/footer.css | 0
.../base => themes/initial}/css/index.css | 0
.../initial}/css/item-preview.css | 0
.../initial}/css/letter-selector.css | 0
.../base => themes/initial}/css/manual.css | 0
.../base => themes/initial}/css/menu.css | 0
.../base => themes/initial}/css/messages.css | 0
.../base => themes/initial}/css/navbar.css | 0
.../initial}/css/package-list.css | 0
.../initial}/css/package.css | 0
.../base => themes/initial}/css/page.css | 0
.../blog => themes/initial}/css/post.css | 0
.../initial}/css/publications.css | 2 +-
.../initial}/css/screenshots.css | 0
.../base => themes/initial}/css/sidebar.css | 2 +-
.../initial}/css/video-list.css | 0
.../initial}/css/video-preview.css | 0
.../media => themes/initial}/css/video.css | 0
.../base => themes/initial}/img/Guix-logo.png | Bin
.../base => themes/initial}/img/Guix.png | Bin
.../initial}/img/back-btn-bg.png | Bin
.../initial}/img/breadcrumbs-bg.png | Bin
.../base => themes/initial}/img/chat-icon.png | Bin
.../initial}/img/checkerboard-bg.png | Bin
.../initial}/img/cookbook-icon.png | Bin
.../initial}/img/depression-shadow-top.png | Bin
.../initial}/img/dropdown-bg.png | Bin
.../initial}/img/email-icon.png | Bin
.../initial}/img/featured-box-bg.png | Bin
.../initial}/img/feed-bg-white.png | Bin
.../base => themes/initial}/img/feed.png | Bin
.../base => themes/initial}/img/feed.svg | 0
.../initial}/img/h-separator-dark.png | Bin
.../initial}/img/h-separator.png | Bin
.../base => themes/initial}/img/icon-set.svg | 0
.../base => themes/initial}/img/icon.png | Bin
.../base => themes/initial}/img/icon.svg | 0
.../initial}/img/language-picker.svg | 0
.../initial}/img/library-icon.png | Bin
.../initial}/img/link-arrow-shaper.svg | 0
.../initial}/img/link-arrow.png | Bin
.../initial}/img/manual-icon.png | Bin
.../initial}/img/manual-latest-icon.png | Bin
.../initial}/img/menu-btn-bg.png | Bin
.../initial}/img/menu-item-active-bg.png | Bin
.../initial}/img/more-info-bg.png | Bin
.../base => themes/initial}/img/noise-bg.png | Bin
.../initial}/img/playing-icon.svg | 0
.../initial}/img/playlist-icon.svg | 0
.../initial}/img/red-tag.png | Bin
.../initial}/img/scientific-mark.svg | 0
.../initial}/img/videos-icon.png | Bin
.../initial}/img/white-star.png | Bin
.../base => themes/initial}/img/wiki-icon.png | Bin
90 files changed, 92 insertions(+), 67 deletions(-)
delete mode 100644 website/static/base/img/GuixSD-logo.png
create mode 100644 website/themes/README.org
rename website/{static/base => themes/initial}/css/breadcrumbs.css (100%)
rename website/{static/base => themes/initial}/css/buttons.css (100%)
rename website/{static/base => themes/initial}/css/code.css (100%)
rename website/{static/base => themes/initial}/css/common.css (100%)
rename website/{static/base => themes/initial}/css/contact.css (100%)
rename website/{static/base => themes/initial}/css/download.css (100%)
rename website/{static/base => themes/initial}/css/elements.css (100%)
rename website/{static/base => themes/initial}/css/footer.css (100%)
rename website/{static/base => themes/initial}/css/index.css (100%)
rename website/{static/base => themes/initial}/css/item-preview.css (100%)
rename website/{static/packages => themes/initial}/css/letter-selector.css (100%)
rename website/{static/base => themes/initial}/css/manual.css (100%)
rename website/{static/base => themes/initial}/css/menu.css (100%)
rename website/{static/base => themes/initial}/css/messages.css (100%)
rename website/{static/base => themes/initial}/css/navbar.css (100%)
rename website/{static/packages => themes/initial}/css/package-list.css (100%)
rename website/{static/packages => themes/initial}/css/package.css (100%)
rename website/{static/base => themes/initial}/css/page.css (100%)
rename website/{static/blog => themes/initial}/css/post.css (100%)
rename website/{static/media => themes/initial}/css/publications.css (92%)
rename website/{static/media => themes/initial}/css/screenshots.css (100%)
rename website/{static/base => themes/initial}/css/sidebar.css (96%)
rename website/{static/media => themes/initial}/css/video-list.css (100%)
rename website/{static/media => themes/initial}/css/video-preview.css (100%)
rename website/{static/media => themes/initial}/css/video.css (100%)
rename website/{static/base => themes/initial}/img/Guix-logo.png (100%)
rename website/{static/base => themes/initial}/img/Guix.png (100%)
rename website/{static/base => themes/initial}/img/back-btn-bg.png (100%)
rename website/{static/base => themes/initial}/img/breadcrumbs-bg.png (100%)
rename website/{static/base => themes/initial}/img/chat-icon.png (100%)
rename website/{static/base => themes/initial}/img/checkerboard-bg.png (100%)
rename website/{static/base => themes/initial}/img/cookbook-icon.png (100%)
rename website/{static/base => themes/initial}/img/depression-shadow-top.png (100%)
rename website/{static/base => themes/initial}/img/dropdown-bg.png (100%)
rename website/{static/base => themes/initial}/img/email-icon.png (100%)
rename website/{static/base => themes/initial}/img/featured-box-bg.png (100%)
rename website/{static/base => themes/initial}/img/feed-bg-white.png (100%)
rename website/{static/base => themes/initial}/img/feed.png (100%)
rename website/{static/base => themes/initial}/img/feed.svg (100%)
rename website/{static/base => themes/initial}/img/h-separator-dark.png (100%)
rename website/{static/base => themes/initial}/img/h-separator.png (100%)
rename website/{static/base => themes/initial}/img/icon-set.svg (100%)
rename website/{static/base => themes/initial}/img/icon.png (100%)
rename website/{static/base => themes/initial}/img/icon.svg (100%)
rename website/{static/base => themes/initial}/img/language-picker.svg (100%)
rename website/{static/base => themes/initial}/img/library-icon.png (100%)
rename website/{static/base => themes/initial}/img/link-arrow-shaper.svg (100%)
rename website/{static/base => themes/initial}/img/link-arrow.png (100%)
rename website/{static/base => themes/initial}/img/manual-icon.png (100%)
rename website/{static/base => themes/initial}/img/manual-latest-icon.png (100%)
rename website/{static/base => themes/initial}/img/menu-btn-bg.png (100%)
rename website/{static/base => themes/initial}/img/menu-item-active-bg.png (100%)
rename website/{static/base => themes/initial}/img/more-info-bg.png (100%)
rename website/{static/base => themes/initial}/img/noise-bg.png (100%)
rename website/{static/media => themes/initial}/img/playing-icon.svg (100%)
rename website/{static/media => themes/initial}/img/playlist-icon.svg (100%)
rename website/{static/packages => themes/initial}/img/red-tag.png (100%)
rename website/{static/media => themes/initial}/img/scientific-mark.svg (100%)
rename website/{static/base => themes/initial}/img/videos-icon.png (100%)
rename website/{static/base => themes/initial}/img/white-star.png (100%)
rename website/{static/base => themes/initial}/img/wiki-icon.png (100%)
Toggle diff (83 lines)
diff --git a/website/apps/base/templates/about.scm b/website/apps/base/templates/about.scm
index 1cf2f65..68c8815 100644
--- a/website/apps/base/templates/about.scm
+++ b/website/apps/base/templates/about.scm
@@ -26,7 +26,7 @@
system|GNU Hurd|GNU Guix package manager") #\|)
#:active-menu-item (C_ "website menu" "About")
#:css (list
- (guix-url "static/base/css/page.css"))
+ (theme-url "css/page.css"))
#:crumbs (list (crumb (C_ "website menu" "About") "./"))
#:content
`(main
diff --git a/website/apps/base/templates/components.scm b/website/apps/base/templates/components.scm
index 2a6881e..82f3b85 100644
--- a/website/apps/base/templates/components.scm
+++ b/website/apps/base/templates/components.scm
@@ -179,8 +179,8 @@
`(img
(@ (class "h-separator")
,(if light
- `(src ,(guix-url "static/base/img/h-separator.png"))
- `(src ,(guix-url "static/base/img/h-separator-dark.png")))
+ `(src ,(theme-url "img/h-separator.png"))
+ `(src ,(theme-url "img/h-separator-dark.png")))
(alt ""))))
(define (horizontal-skip)
@@ -191,7 +191,7 @@
"Return SHTML for a visible separator to be used in a dropdown menu
like a menu item."
`(img (@ (class "hline")
- (src ,(guix-url "static/base/img/h-separator.png"))
+ (src ,(theme-url "img/h-separator.png"))
(alt ""))))
diff --git a/website/apps/base/templates/contact.scm b/website/apps/base/templates/contact.scm
index 49d8393..33d4abf 100644
--- a/website/apps/base/templates/contact.scm
+++ b/website/apps/base/templates/contact.scm
@@ -25,9 +25,9 @@ system|GNU Hurd|GNU Guix package manager|Community|Mailing lists|IRC \
channels|Bug reports|Help") #\|)
#:active-menu-item (C_ "website menu" "About")
#:css (list
- (guix-url "static/base/css/page.css")
- (guix-url "static/base/css/buttons.css")
- (guix-url "static/base/css/contact.css"))
+ (theme-url "css/page.css")
+ (theme-url "css/buttons.css")
+ (theme-url "css/contact.css"))
#:crumbs (list (crumb (C_ "website menu" "Contact") "./"))
#:content
`(main
diff --git a/website/apps/base/templates/contribute.scm b/website/apps/base/templates/contribute.scm
index 42ffcb9..703267f 100644
--- a/website/apps/base/templates/contribute.scm
+++ b/website/apps/base/templates/contribute.scm
@@ -25,8 +25,8 @@ system|GNU Hurd|GNU Guix package manager|Volunteer|Development|\
Translation|I18N|L10N|Artwork") #\|)
#:active-menu-item (C_ "website menu" "About")
#:css (list
- (guix-url "static/base/css/page.css")
- (guix-url "static/base/css/item-preview.css"))
+ (theme-url "css/page.css")
+ (theme-url "css/item-preview.css"))
#:crumbs (list (crumb (C_ "website menu" "Contribute") "./"))
#:content
`(main
diff --git a/website/apps/base/templates/cuirass.scm b/website/apps/base/templates/cuirass.scm
index 00fe4b9..b421530 100644
--- a/website/apps/base/templates/cuirass.scm
+++ b/website/apps/base/templates/cuirass.scm
@@ -21,7 +21,7 @@
(G_ "GNU|Linux|Unix|Free software|Libre software|Operating \
system|GNU Guix package manager|Cuirass|CI") #\|)
#:css (list
- (guix-url "static/base/css/page.css"))
+ (theme-url "css/page.css"))
#:content
`(main
(section
diff --git a/website/apps/base/