Merge branch 'main' of git.sr.ht:~marcuskammer/dev.metalisp.sbt

This commit is contained in:
Marcus Kammer 2024-06-22 13:20:10 +02:00
commit 572959eec7
Signed by: marcuskammer
GPG key ID: C374817BE285268F
2 changed files with 18 additions and 6 deletions

View file

@ -4,6 +4,7 @@
(defpackage dev.metalisp.sbt (defpackage dev.metalisp.sbt
(:use :cl) (:use :cl)
(:import-from #:spinneret #:*html-lang*)
(:export (:export
:*l10n* :*l10n*
:find-l10n :find-l10n
@ -14,6 +15,8 @@
:*local-url-js* :*local-url-js*
:*bs-version* :*bs-version*
:*color-theme* :*color-theme*
:bs-url-css
:bs-url-js
:download-bs-css :download-bs-css
:download-bs-js :download-bs-js
:write-html-to-file :write-html-to-file
@ -150,12 +153,20 @@ Example usage:
,@(loop for url in add-css-urls ,@(loop for url in add-css-urls
collect `(:link :type "text/css" collect `(:link :type "text/css"
:rel "stylesheet" :href ,url))) :rel "stylesheet" :href ,url)))
(:body
(:body ,@body) (:div :class "container text-center py-3"
(:a :href "#main-content"
:class "skip-link"
(find-l10n "skip-link" *html-lang* *l10n*)))
(:h1 :class "visually-hidden" ,title)
(:main :id "main-content"
,@(if main-con (list :class "container") nil) ,@body)
(:script :src ,(bs-url-js)) (:script :src ,(bs-url-js))
,@(loop for url in add-js-urls ,@(loop for url in add-js-urls
collect `(:script :src ,url))))) collect `(:script :src ,url))))))
(defun remove-special-chars (str) (defun remove-special-chars (str)
"Removes all special characters from the string STR except numbers and alphabets. "Removes all special characters from the string STR except numbers and alphabets.

View file

@ -70,7 +70,8 @@
("subscribe" ("en" "Subscribe" "de" "Abonnieren" "fr" "S'abonner")) ("subscribe" ("en" "Subscribe" "de" "Abonnieren" "fr" "S'abonner"))
("unsubscribe" ("en" "Unsubscribe" "de" "Abbestellen" "fr" "Se désabonner")) ("unsubscribe" ("en" "Unsubscribe" "de" "Abbestellen" "fr" "Se désabonner"))
("see-more" ("en" "See More" "de" "Mehr sehen" "fr" "Voir plus")) ("see-more" ("en" "See More" "de" "Mehr sehen" "fr" "Voir plus"))
("see-less" ("en" "See Less" "de" "Weniger sehen" "fr" "Voir moins"))) ("see-less" ("en" "See Less" "de" "Weniger sehen" "fr" "Voir moins"))
("skip-link" ("en" "Skip to main content" "de" "Zum Hauptinhalt springen" "fr" "Aller au contenu principal")))
"Localization (l10n) settings for multi-language support.") "Localization (l10n) settings for multi-language support.")
(declaim (ftype (function (string string dict) string) find-l10n)) (declaim (ftype (function (string string dict) string) find-l10n))