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    120     (define-values (disposition disp-note-id)
   121    121       (notes->last-disposition-values note-txprs))
   122    122     
   123    123     (let* ([pubdate (select-from-metas 'published (current-metas))]
   124    124            [doc-html    (->html body-txpr #:splice? #t)]
   125    125            [title-specified? (not (equal? '() maybe-title))]
   126    126            [title-val   (if (not (null? maybe-title)) (car maybe-title) (check-for-poem-title doc))]
   127         -         [title-tx    (make-article-title title-val body-txpr disposition disp-note-id)]
          127  +         [title-tx    (make-article-title pagenode title-val body-txpr disposition disp-note-id)]
   128    128            [title-html  (->html title-tx #:splice? #t)]
   129    129            [title-plain (tx-strs title-tx)]
   130    130            [series-node (series-pagenode)]
   131    131            [header      (html$-article-open pagenode title-specified? title-tx pubdate)]
   132    132            [footertext (make-article-footertext pagenode series-node disposition disp-note-id (length note-txprs))]
   133    133            [footer (html$-article-close footertext)]
   134    134            [notes-section-html (crystalize-notes! pagenode title-plain note-txprs)])
................................................................................
   230    230             (equal? 'p (get-tag e2))
   231    231             (attrs-have-key? e2 'class)
   232    232             (string=? "verse-heading" (attr-ref e2 'class)))
   233    233        `(title (span [[class "smallcaps"]] "‘" ,@(get-elements e2) "’"))]
   234    234       [else '()]))
   235    235   
   236    236   ;; Return a title txexpr for the current article, constructing a default if no title text was specified.
   237         -(define (make-article-title supplied-title body-tx disposition disp-note-id)
          237  +(define (make-article-title pagenode supplied-title body-tx disposition disp-note-id)
   238    238     (define title-elems
   239    239       (cond [(null? supplied-title) (list (default-title (get-elements body-tx)))]
   240    240             [else (get-elements supplied-title)]))
   241    241     
   242    242     (define disposition-part
   243    243       (cond [(non-empty-string? disposition)
   244    244              (define-values (mark _) (disposition-values disposition))
   245         -           `(span [[class "disposition-mark"]] (a [[href ,(string-append "#" disp-note-id)]] ,mark))]
          245  +           `(a [[class "disposition-mark"] 
          246  +                [href ,(format "~a~a#~a" web-root pagenode disp-note-id)]] 
          247  +               ,mark)]
   246    248             [else ""]))
   247    249     ;; Returns a txexpr, the tag will be discarded by the template/snippets
   248    250     `(title ,@title-elems ,disposition-part))
   249    251     
   250    252   ;; Convert a bunch of information about an article into some nice English and links.
   251    253   (define (make-article-footertext pagenode series disposition disp-note-id note-count)
   252    254     (define s-title (series-title))

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

   587    587           display: none;
   588    588       }
   589    589   
   590    590       div.note + div.note {
   591    591           margin-top: ◊x-lineheight[2];
   592    592       }
   593    593   
   594         -    span.disposition-mark {
          594  +    .disposition-mark {
   595    595           color: ◊color-xrefmark;
   596    596           position: relative;
   597    597           top: -0.5em;
   598    598           font-size: 0.83em;
   599    599       }
   600    600   
   601    601       /* ******* (Mobile first) Journal View styling *******