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

Overview
Comment:Fix display of titles in poetry
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: a4a692449b99871f327223eed39c44b6684f55b4147cee297f9b94cf3257af1e
User & Date: joel on 2019-04-11 17:11:49
Other Links: manifest | tags
Context
2019-04-11
22:20
Fix error in short (no txexpr) notes check-in: 612b87e3 user: joel tags: trunk
17:11
Fix display of titles in poetry check-in: a4a69244 user: joel tags: trunk
04:16
Add quick templating for new articles check-in: 1afe7e97 user: joel tags: trunk
Changes

Modified tags-html.rkt from [4d4ea45a] to [03385122].

109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
(define (html-blockcode attrs elems)
  (define file (or (assoc 'filename attrs) ""))
  (define codeblock `(pre [[class "code"]] (code ,@elems)))
  (cond [(string>? file "") `(@ (div [[class "listing-filename"]] 128196 " " ,file) ,codeblock)]
        [else codeblock]))

(define (html-verse attrs elems)
  (let* ([title  (or (assoc 'title attrs) "")]
         [italic? (assoc 'italic attrs)]
         [pre-attrs (cond [italic? '([class "verse"] [style "font-style: italic"])]
                          [else '([class "verse"])])]
         [pre-title (cond [(string>? title "") '(p [[class "verse-heading"]] ,title)]
                          [else ""])])
    `(div [[class "poem"]] (pre ,pre-attrs ,pre-title ,@elems))))

;; There is no way in vanilla CSS to create a selector for “p tags that contain
;; a span of class ‘newthought’”. So we can handle it at the Pollen processing level.
(define (detect-newthoughts block-xpr)
  (define (is-newthought? tx) ; Helper function
    (and (txexpr? tx)
         (eq? 'span (get-tag tx))







|



|

|







109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
(define (html-blockcode attrs elems)
  (define file (or (assoc 'filename attrs) ""))
  (define codeblock `(pre [[class "code"]] (code ,@elems)))
  (cond [(string>? file "") `(@ (div [[class "listing-filename"]] 128196 " " ,file) ,codeblock)]
        [else codeblock]))

(define (html-verse attrs elems)
  (let* ([title  (maybe-attr 'title attrs "")]
         [italic? (assoc 'italic attrs)]
         [pre-attrs (cond [italic? '([class "verse"] [style "font-style: italic"])]
                          [else '([class "verse"])])]
         [pre-title (cond [(string>? title "") `(p [[class "verse-heading"]] ,title)]
                          [else ""])])
    `(div [[class "poem"]] ,pre-title (pre ,pre-attrs ,@elems))))

;; There is no way in vanilla CSS to create a selector for “p tags that contain
;; a span of class ‘newthought’”. So we can handle it at the Pollen processing level.
(define (detect-newthoughts block-xpr)
  (define (is-newthought? tx) ; Helper function
    (and (txexpr? tx)
         (eq? 'span (get-tag tx))

Modified web-extra/martin.css.pp from [c1de787e] to [2b798009].

425
426
427
428
429
430
431






432
433
434
435
436
437
438
        margin: ◊x-lineheight[1] auto;
        display: table;
        white-space: pre-wrap;
        /* Whitespace is preserved by the browser.
           Text will wrap when necessary, and on line breaks */
    }







    section.entry-content figure {
        margin: ◊x-lineheight[1] 0;
        padding: 0;
    }

    figure>a {
        margin: 0;







>
>
>
>
>
>







425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
        margin: ◊x-lineheight[1] auto;
        display: table;
        white-space: pre-wrap;
        /* Whitespace is preserved by the browser.
           Text will wrap when necessary, and on line breaks */
    }

    p.verse-heading {
        font-feature-settings: "smcp" on, "liga" on, "clig" on, "dlig" on, "kern" on, "onum" on, "pnum" on;
        text-align: center;
        font-size: 1.3rem;
    }
        
    section.entry-content figure {
        margin: ◊x-lineheight[1] 0;
        padding: 0;
    }

    figure>a {
        margin: 0;