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

Overview
Comment:Fix disposition links in article headings when they appear in listings
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 4206e0acb1f8c3ba8abf6554360d5b16181b0df3bb78ef3f6cf57de26eef3f44
User & Date: joel on 2019-06-20 00:20:10
Other Links: manifest | tags
Context
2019-06-20
00:33
Fix CSS selector check-in: 74bf6fa0 user: joel tags: trunk
00:20
Fix disposition links in article headings when they appear in listings check-in: 4206e0ac user: joel tags: trunk
2019-06-19
23:51
Makefile: include CSS target, turn off tidy for now since it breaks relativizing check-in: 2894ef67 user: joel tags: trunk
Changes

Modified crystalize.rkt from [297d7e43] to [e76d71c3].

120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
  (define-values (disposition disp-note-id)
    (notes->last-disposition-values note-txprs))
  
  (let* ([pubdate (select-from-metas 'published (current-metas))]
         [doc-html    (->html body-txpr #:splice? #t)]
         [title-specified? (not (equal? '() maybe-title))]
         [title-val   (if (not (null? maybe-title)) (car maybe-title) (check-for-poem-title doc))]
         [title-tx    (make-article-title title-val body-txpr disposition disp-note-id)]
         [title-html  (->html title-tx #:splice? #t)]
         [title-plain (tx-strs title-tx)]
         [series-node (series-pagenode)]
         [header      (html$-article-open pagenode title-specified? title-tx pubdate)]
         [footertext (make-article-footertext pagenode series-node disposition disp-note-id (length note-txprs))]
         [footer (html$-article-close footertext)]
         [notes-section-html (crystalize-notes! pagenode title-plain note-txprs)])







|







120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
  (define-values (disposition disp-note-id)
    (notes->last-disposition-values note-txprs))
  
  (let* ([pubdate (select-from-metas 'published (current-metas))]
         [doc-html    (->html body-txpr #:splice? #t)]
         [title-specified? (not (equal? '() maybe-title))]
         [title-val   (if (not (null? maybe-title)) (car maybe-title) (check-for-poem-title doc))]
         [title-tx    (make-article-title pagenode title-val body-txpr disposition disp-note-id)]
         [title-html  (->html title-tx #:splice? #t)]
         [title-plain (tx-strs title-tx)]
         [series-node (series-pagenode)]
         [header      (html$-article-open pagenode title-specified? title-tx pubdate)]
         [footertext (make-article-footertext pagenode series-node disposition disp-note-id (length note-txprs))]
         [footer (html$-article-close footertext)]
         [notes-section-html (crystalize-notes! pagenode title-plain note-txprs)])
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245


246
247
248
249
250
251
252
          (equal? 'p (get-tag e2))
          (attrs-have-key? e2 'class)
          (string=? "verse-heading" (attr-ref e2 'class)))
     `(title (span [[class "smallcaps"]] "‘" ,@(get-elements e2) "’"))]
    [else '()]))

;; Return a title txexpr for the current article, constructing a default if no title text was specified.
(define (make-article-title supplied-title body-tx disposition disp-note-id)
  (define title-elems
    (cond [(null? supplied-title) (list (default-title (get-elements body-tx)))]
          [else (get-elements supplied-title)]))
  
  (define disposition-part
    (cond [(non-empty-string? disposition)
           (define-values (mark _) (disposition-values disposition))
           `(span [[class "disposition-mark"]] (a [[href ,(string-append "#" disp-note-id)]] ,mark))]


          [else ""]))
  ;; Returns a txexpr, the tag will be discarded by the template/snippets
  `(title ,@title-elems ,disposition-part))
  
;; Convert a bunch of information about an article into some nice English and links.
(define (make-article-footertext pagenode series disposition disp-note-id note-count)
  (define s-title (series-title))







|







|
>
>







230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
          (equal? 'p (get-tag e2))
          (attrs-have-key? e2 'class)
          (string=? "verse-heading" (attr-ref e2 'class)))
     `(title (span [[class "smallcaps"]] "‘" ,@(get-elements e2) "’"))]
    [else '()]))

;; Return a title txexpr for the current article, constructing a default if no title text was specified.
(define (make-article-title pagenode supplied-title body-tx disposition disp-note-id)
  (define title-elems
    (cond [(null? supplied-title) (list (default-title (get-elements body-tx)))]
          [else (get-elements supplied-title)]))
  
  (define disposition-part
    (cond [(non-empty-string? disposition)
           (define-values (mark _) (disposition-values disposition))
           `(a [[class "disposition-mark"] 
                [href ,(format "~a~a#~a" web-root pagenode disp-note-id)]] 
               ,mark)]
          [else ""]))
  ;; Returns a txexpr, the tag will be discarded by the template/snippets
  `(title ,@title-elems ,disposition-part))
  
;; Convert a bunch of information about an article into some nice English and links.
(define (make-article-footertext pagenode series disposition disp-note-id note-count)
  (define s-title (series-title))

Modified web-extra/martin.css.pp from [5317e3fa] to [8583f65e].

587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
        display: none;
    }

    div.note + div.note {
        margin-top: ◊x-lineheight[2];
    }

    span.disposition-mark {
        color: ◊color-xrefmark;
        position: relative;
        top: -0.5em;
        font-size: 0.83em;
    }

    /* ******* (Mobile first) Journal View styling *******







|







587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
        display: none;
    }

    div.note + div.note {
        margin-top: ◊x-lineheight[2];
    }

    .disposition-mark {
        color: ◊color-xrefmark;
        position: relative;
        top: -0.5em;
        font-size: 0.83em;
    }

    /* ******* (Mobile first) Journal View styling *******