Overview
| Comment: | Add title-plain for notes; small refactor of note title generation | 
|---|---|
| Timelines: | family | ancestors | descendants | both | trunk | 
| Files: | files | file ages | folders | 
| SHA3-256: | 
286673cf6040b70dd137560ac89a47af | 
| User & Date: | joel on 2019-08-19 21:33:37 | 
| Other Links: | manifest | tags | 
Context
| 
   2019-08-19 
 | ||
| 21:36 | Add RSS feed. Closes [5cca77420922765f] check-in: f06db447 user: joel tags: trunk | |
| 21:33 | Add title-plain for notes; small refactor of note title generation check-in: 286673cf user: joel tags: trunk | |
| 
   2019-08-18 
 | ||
| 20:06 | Add notice to index preprocess source check-in: 1346740b user: joel tags: trunk | |
Changes
Modified code-docs/snippets-html.scrbl from [841e7710] to [ca2f5449].
| ︙ | |||
91 92 93 94 95 96 97  | 91 92 93 94 95 96 97 98 99 100 101 102 103 104  | - - - - - - - - -  | 
Returns a string of HTML for an article as it would appear in a listing context in “short” form
(date and title only, with link).
@defproc[(html$-page-body-close) non-empty-string?]
Returns a string containing the page’s @tt{<footer>} and closing tags.
 | 
| ︙ | 
Modified crystalize.rkt from [43b9fb1b] to [0131cbe3].
| ︙ | |||
69 70 71 72 73 74 75 76 77 78 79 80 81 82  | 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83  | +  | 
    listing_excerpt_html ; Not used for now
    listing_short_html)) ; Date and title only
(define table_notes-fields
  '(pagenode
    note_id
    title_html_flow
    title_plain
    author
    author_url
    date
    disposition
    content_html
    series_pagenode
    listing_full_html
 | 
| ︙ | |||
316 317 318 319 320 321 322  | 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344  | - + + + +  | 
                           "must be in format \"[symbol] [past-tense-verb]\""
                           "disposition attr"
                           disposition-attr))
  
  ;; Parse out remaining columns
  (define author (maybe-attr 'author attrs default-authorname))
  (define note-id (build-note-id note-tx))
 | 
| ︙ | |||
348 349 350 351 352 353 354 355 356 357 358 359 360 361  | 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370  | + + + + +  | 
                           " AND `note_id` = ?2), ~a)")
            (list->sql-fields table_notes-fields)
            (list->sql-parameters table_notes-fields)))
  (apply query! save-note-query note-record)
  
  ;; return html$ of note
  (html$-note-in-article note-id note-date content-html author author-url))
(define (make-note-title pagenode parent-title-plain)
  `(note-title "Re: " (a [[class "cross-reference"]
                          [href ,(format "~a~a" web-root pagenode)]]
                         ,parent-title-plain)))
(define (article-plain-title pagenode)
  (query-value (sqltools:dbc) "SELECT `title_plain` FROM `articles` WHERE `pagenode` = ?1" (symbol->string pagenode)))
;; ~~~ Keyword Index Entries ~~~
;; (private) Convert an entry key into a list of at most two elements,
 | 
| ︙ | 
Modified snippets-html.rkt from [1d57c14f] to [2b13836e].
| ︙ | |||
17 18 19 20 21 22 23  | 17 18 19 20 21 22 23 24 25 26 27 28 29 30  | -  | 
(provide html$-page-head
         html$-page-body-open
         html$-article-open
         html$-article-close
         html$-article-listing-short
         html$-page-body-close
 | 
| ︙ | |||
77 78 79 80 81 82 83  | 76 77 78 79 80 81 82 83 84 85 86 87 88 89  | - - - - -  | 
(define (html$-page-body-close)
  ◊string-append{<footer>By Joel Dueck</footer>
 </main></body>})
;; Notes
;;
 | 
| ︙ |