◊(Local Yarn Code "Check-in [90c1e5ff]")

Overview
Comment:Be smarter about author URLs in notes
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 90c1e5ff0db4e15af307da63fa98a04bfc5e1570b496738d90b6a62bd4aa42c1
User & Date: joel on 2019-06-09 15:54:23
Other Links: manifest | tags
Context
2019-06-09
16:23
makefile: better spritz, don't include templates in tidy check-in: 6b973e56 user: joel tags: trunk
15:54
Be smarter about author URLs in notes check-in: 90c1e5ff user: joel tags: trunk
15:37
Run HTML through tidy check-in: c3ef3a9c user: joel tags: trunk
Changes

Modified snippets-html.rkt from [2691057c] to [4461a813].

127
128
129
130
131
132
133





134
135
136
137
138
139
140
141
142

143
144
145
146
147
148
149
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146

147
148
149
150
151
152
153
154







+
+
+
+
+








-
+







 </section>
 </article>})

(define (html$-note-in-article id date contents author author-url)
  (define maybe-author-class?
    (cond [(or (string=? author default-authorname) (string=? author "")) "by-proprietor"]
          [else ""]))
  (define author-part
    (cond [(non-empty-string? author-url)
           ◊string-append{<a class="u-author h-card" href="◊author-url"><i>◊|author|</i></a>}]
          [else
           ◊string-append{<span class="h-card"><i>◊|author|</i></span>}]))

  ◊string-append{<div class="note ◊maybe-author-class? u-comment" id="◊|id|">
 <h3><a class="rel-bookmark note-permlink" href="#◊|id|"><time class="dt-published" datetime="◊date">◊ymd->english[date]</time>
 </a></h3>
 <div class="p-content p-name">
 ◊contents
 </div>
 <div class="note-meta">
 &mdash;<a class="u-author h-card" href="◊|author-url|"><i>◊|author|</i></a>
 &mdash;author-part
 </div>
 </div>})

(define (html$-notes-section note-htmls)
  ◊string-append{<div class="further-notes" id="furthernotes">
 <h2>Further Notes</h2>
 ◊(apply string-append note-htmls)