From a6ac6b919970ab9e4b04f9c3cc1640c12b4015fe Mon Sep 17 00:00:00 2001 From: Jakob L. Kreuze Date: Fri, 17 May 2019 11:56:24 -0400 Subject: Refactor SXML --- haunt/custom/sxml.scm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 haunt/custom/sxml.scm (limited to 'haunt/custom/sxml.scm') 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 +;;; +;;; 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 +;;; . + +(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"))))) -- cgit v1.3