diff options
| author | Jakob L. Kreuze | 2019-05-17 11:56:24 -0400 |
|---|---|---|
| committer | Jakob L. Kreuze | 2019-05-17 13:55:18 -0400 |
| commit | a6ac6b919970ab9e4b04f9c3cc1640c12b4015fe (patch) | |
| tree | 7dffc306280eec0ca3b4b1ee500fe70cc83eefdf /haunt/custom/sxml.scm | |
| parent | 911c2c50c482027f3b687dc3f336975a9e331ea8 (diff) | |
Refactor SXML
Diffstat (limited to 'haunt/custom/sxml.scm')
| -rw-r--r-- | haunt/custom/sxml.scm | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/haunt/custom/sxml.scm b/haunt/custom/sxml.scm new file mode 100644 index 0000000..1fbdc97 --- /dev/null +++ b/haunt/custom/sxml.scm @@ -0,0 +1,37 @@ +;;; Copyright © 2019 Jakob L. Kreuze <zerodaysfordays@sdf.lonestar.org> +;;; +;;; This program is free software; you can redistribute it and/or +;;; modify it under the terms of the GNU General Public License as +;;; published by the Free Software Foundation; either version 3 of the +;;; License, or (at your option) any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with this program. If not, see +;;; <http://www.gnu.org/licenses/>. + +(define-module (custom sxml) + #:export (%cc-by-sa-button + %cc-by-sa-link + link + stylesheet)) + +(define %cc-by-sa-button + '(a (@ (class "cc-button") + (href "https://creativecommons.org/licenses/by-sa/4.0/")) + (img (@ (src "https://licensebuttons.net/l/by-sa/4.0/80x15.png"))))) + +(define %cc-by-sa-link + '(a (@ (href "https://creativecommons.org/licenses/by-sa/4.0/")) + "Creative Commons Attribution Share-Alike 4.0 International")) + +(define (link name uri) + `(a (@ (href ,uri)) ,name)) + +(define (stylesheet name) + `(link (@ (rel "stylesheet") + (href ,(string-append "/css/" name ".css"))))) |