1 (use-modules (haunt asset)
14 (define (stylesheet name)
15 `(link (@ (rel "stylesheet")
16 (href ,(string-append "css/" name ".css")))))
18 (define (static-page title file-name body)
21 (with-layout flex-theme site title body)
27 (lambda (site title body)
31 (meta (@ (charset "utf-8")))
32 (title ,(string-append title " - " (site-title site)))
33 (link (@ (rel "stylesheet") (href "//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,700,400italic")))
34 ,(stylesheet "style.min")
35 ,(stylesheet "monokai.min")
36 ,(stylesheet "font-awesome.min")
37 ,(stylesheet "custom")
38 (meta (@ (name "viewport") (content "width=device-width, initial-scale=1.0"))))
40 ,(let ((metadata (site-default-metadata site)))
43 (a (@ (href "index.html")) (img (@ (src ,(assoc-ref metadata 'picture)))))
44 (h1 (a (@ (href "index.html")) ,(assoc-ref metadata 'author)))
45 (p ,(assoc-ref metadata 'description))
47 (ul (@ (class "list"))
49 `(li (a (@ (href ,(cdr page))) ,(car page))))
50 (assoc-ref metadata 'pages))))
51 (ul (@ (class "social"))
52 (li (a (@ (class "sc-linkedin") (target "_blank") (href "")) (i (@ (class "fa fa-linkedin")))))
54 (li (a (@ (class "sc-github") (target "_blank") (href "")) (i (@ (class "fa fa-github")))))
56 (li (a (@ (class "sc-twitter") (target "_blank") (href "")) (i (@ (class "fa fa-twitter")))))
58 (li (a (@ (class "sc-rss") (target "_blank") (href "feed.xml")) (i (@ (class "fa fa-rss")))))))))
63 (define (get-tags post)
64 (or (assoc-ref (post-metadata post) 'tags) '()))
66 `((article (@ (class "single"))
68 (h1 ,(post-ref post 'title))
69 (p "Posted on " ,(date->string (post-date post) "~B ~d, ~Y")))
71 (div (@ (class "tag-cloud"))
74 `((a (@ (href "")) ,tag) " "))
78 (lambda (site title posts prefix)
79 (define (post-uri post)
80 (string-append (or prefix "")
81 (site-post-slug site post) ".html"))
83 (define (get-paragraphs sxml count)
85 (lambda (e) (and (pair? e) (eq? (car e) 'p)))
87 (list-head pars (min count (length pars)))))
89 (define (post-summary post)
90 (or (post-ref post 'summary)
91 (get-paragraphs (cdr (post-sxml post)) 3)))
98 (a (@ (href ,(post-uri post)))
99 ,(post-ref post 'title)))
100 (p "Posted on " ,(date->string (post-date post) "~B ~d, ~Y")))
101 (div ,(post-summary post)
103 (a (@ (class "btn") (href ,(post-uri post))) " Continue reading "))
105 (posts/reverse-chronological posts))))))
113 (header (h2 "About me"))
114 (p "I met GNU/Linux and free software while I was studying Computer Science at " (a (@ (href "http://www.uji.es/")) "Universitat Jaume I") " and, since then, my commitment with these ideas hasn't stopped growing.")
115 (p "It was in 2003 when I started as an activist, participating in events related with free software, demonstrations against software patents, talks and information sessions at install parties, schools, etc.")
116 (p "I enjoy programming and I use the programming language that better fits my needs (Python, PHP, Golang, Erlang, ...). For many years my favorite language was C, although over time that privileged place has been occupied by Lisp y Scheme. I'm in love with the functional paradigm.")
117 (p "I'm married with a wonderful woman and we have a kid that amaze us every day. They are the best of my life."))))))
120 `(("Home" "index.html" ,posts/reverse-chronological)))
122 (site #:title "Javier Sancho"
123 #:domain "jsancho.org"
125 '((author . "Javier Sancho")
126 (description . "Free Software Evangelist - Programmer")
127 (email . "jsf@jsancho.org")
128 (picture . "images/jsancho.jpg")
129 (pages . (("about" . "about.html")
130 ("projects" . "http://git.jsancho.org/"))))
131 #:readers (list sxml-reader html-reader)
132 #:builders (list (blog #:theme flex-theme #:collections %collections)
136 (static-directory "images")
137 (static-directory "fonts")
138 (static-directory "css")))