78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
◊string-append{</section>
<footer class="article-info"><span class="x">(</span>◊|footertext|<span class="x">)</span></footer>
</article>}]
[else "</section></article>"]))
(define (html$-article-listing-short pagenode pubdate title)
◊string-append{
<li><a href="/◊(symbol->string pagenode)">
<div class="article-list-date caps">◊(ymd->english pubdate)</div>
<div class="article-list-title">◊|title|</div>
</a></li>})
(define (html$-page-body-close)
◊string-append{<footer>By Joel Dueck</footer>
</main></body>})
;; Notes
;;
(define (html$-note-title author pagenode parent-title)
(define author-part
(cond [(and (non-empty-string? author)
(not (string-ci=? author default-authorname)))
(format "A note from ~a, " author)]
[else ""]))
(define article-part
(format "Re: <a class=\"cross-reference\" href=\"/~a\">~a</a>"
pagenode
parent-title))
(string-append author-part article-part))
(define (html$-note-contents disposition-mark elems)
(define-values (first-tag first-attrs first-elems) (txexpr->values (car elems)))
(define disposition
(cond [(non-empty-string? disposition-mark)
`(span [[class "disposition-mark"]] ,disposition-mark)]
[else ""]))
|
|
|
|
|
|
<
<
<
<
<
<
|
|
|
<
|
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
◊string-append{</section>
<footer class="article-info"><span class="x">(</span>◊|footertext|<span class="x">)</span></footer>
</article>}]
[else "</section></article>"]))
(define (html$-article-listing-short pagenode pubdate title)
◊string-append{
<li><a href="/◊(symbol->string pagenode)">
<div class="article-list-date caps">◊(ymd->english pubdate)</div>
<div class="article-list-title">◊|title|</div>
</a></li>})
(define (html$-page-body-close)
◊string-append{<footer>By Joel Dueck</footer>
</main></body>})
;; Notes
;;
(define (html$-note-title pagenode parent-title)
(format "Re: <a class=\"cross-reference\" href=\"/~a\">~a</a>"
pagenode
parent-title))
(define (html$-note-contents disposition-mark elems)
(define-values (first-tag first-attrs first-elems) (txexpr->values (car elems)))
(define disposition
(cond [(non-empty-string? disposition-mark)
`(span [[class "disposition-mark"]] ,disposition-mark)]
[else ""]))
|
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
<div class="note-meta">
—<a class="u-author h-card" href="◊|author-url|"><i>◊|author|</i></a>
</div>}]
[else ◊string-append{
<div class="note-meta">
—<span class="h-card"><i>◊|author|</i></span>
</div>}]))
(define maybe-author-class?
(cond [(string=? author default-authorname) "by-proprietor"]
[else ""]))
◊string-append{
<article class="with-title ◊maybe-author-class? hentry">
<h1 class="entry-title">◊|title-html-flow|</h1>
<p class="time"><a href="◊|pagenode|◊note-id" class="rel-bookmark note-permlink">
<time datetime="◊date">◊ymd->english[date]</time>
</a></p>
<section class="entry-content">
<div class="p-content p-name">◊|contents|</div>
◊author-part
</section>
</article>})
|
|
|
|
|
|
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
<div class="note-meta">
—<a class="u-author h-card" href="◊|author-url|"><i>◊|author|</i></a>
</div>}]
[else ◊string-append{
<div class="note-meta">
—<span class="h-card"><i>◊|author|</i></span>
</div>}]))
(define maybe-author-class
(cond [(string=? author default-authorname) "by-proprietor"]
[else ""]))
◊string-append{
<article class="with-title ◊maybe-author-class hentry">
<h1 class="entry-title note-full">◊|title-html-flow|</h1>
<p class="time"><a href="/◊|pagenode|#◊note-id" class="rel-bookmark note-permlink">
<time datetime="◊date">◊ymd->english[date]</time>
</a></p>
<section class="entry-content">
<div class="p-content p-name">◊|contents|</div>
◊author-part
</section>
</article>})
|