◊(Local Yarn Code "Diff")

Differences From Artifact [eb78d203]:

To Artifact [511f6fe5]:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#lang pollen

◊; SPDX-License-Identifier: BlueOak-1.0.0
◊; This file is licensed under the Blue Oak Model License 1.0.0.

◊(require pollen/template db/base racket/list racket/match)

◊(define (fetch-series)
  (define q "SELECT noun_plural, page, title FROM series ORDER BY noun_plural DESC")
  (query-rows cache-conn q))

◊(define (series-item->txpr s)
  (match-define (list n pagenode title) s)
  `(li (a [[href ,pagenode]] (i ,title))))

◊(define (series-grouped-list)
  ;; Produces '((("noun1" "p.html" "Title") ("noun1" "q.html" "Title")) (("noun2" ...) ...))
  (define init-group
    (group-by first (map vector->list (fetch-series)) string-ci=?))
  
  (define series-list-items
    (for/list ([group (in-list init-group)])
      `(div (h2 ,(first (first group))) (ul ,@(map series-item->txpr group)))))
  `(section [[class "series-list"] [style "margin-top: 1.3rem"]] ,@series-list-items))
            

<!DOCTYPE html>
<html lang="en">
◊html$-page-head["The Local Yarn" #f]
<style>
  header#front-page {
    text-align: center;
  }





|
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<







1
2
3
4
5
6
7



















8
9
10
11
12
13
14
#lang pollen

◊; SPDX-License-Identifier: BlueOak-1.0.0
◊; This file is licensed under the Blue Oak Model License 1.0.0.

◊(require pollen/template racket/file)
            



















<!DOCTYPE html>
<html lang="en">
◊html$-page-head["The Local Yarn" #f]
<style>
  header#front-page {
    text-align: center;
  }
85
86
87
88
89
90
91

92
93
94
95
96
97
98
(almost) is ◊link[1]{arranged in time order, newest first}. There are also a few arranged into named
collections:

◊url[1]{/blog-pg1.html}

}) 
◊; stop for now: (crystalize-index-entries! '|index.html| front-page-body)


<main> 
  ◊(->html front-page-body #:splice? #t)
  ◊(->html (series-grouped-list))
</main> 
</body>
</html>







>



|



66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
(almost) is ◊link[1]{arranged in time order, newest first}. There are also a few arranged into named
collections:

◊url[1]{/blog-pg1.html}

}) 
◊; stop for now: (crystalize-index-entries! '|index.html| front-page-body)
◊(display-to-file (html$-page-footer) "scribbled/site-footer.html" #:exists 'replace)

<main> 
  ◊(->html front-page-body #:splice? #t)
  ◊(html$-series-list)
</main> 
</body>
</html>