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

Overview
Comment:Notes in listings: shorten titles, fix permlinks, fix styling where no author specified
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5ac5a1e3420a1ecada10c01a68b83cd3ced8ea06dbe5f59397b14aa3934c29e6
User & Date: joel on 2019-04-08 12:37:01
Other Links: manifest | tags
Context
2019-04-11
03:22
Fix bug preventing inclusion of article footers check-in: 41f70967 user: joel tags: trunk
2019-04-08
12:37
Notes in listings: shorten titles, fix permlinks, fix styling where no author specified check-in: 5ac5a1e3 user: joel tags: trunk
01:44
Styling enhancements for series pages check-in: 9bce92ab user: joel tags: trunk
Changes

Modified crystalize.rkt from [5f760cf0] to [172ca0cc].

294
295
296
297
298
299
300
301

302
303

304
305
306
307
308
309
310
294
295
296
297
298
299
300

301
302

303
304
305
306
307
308
309
310







-
+

-
+







              (and ((length (string-split disposition-attr)) . >= . 2)))
    (raise-arguments-error 'note
                           "must be in format \"[symbol] [past-tense-verb]\""
                           "disposition attr"
                           disposition-attr))
  
  ;; Parse out remaining columns
  (define author (maybe-attr 'author attrs))
  (define author (maybe-attr 'author attrs default-authorname))
  (define note-id (build-note-id note-tx))
  (define title-html-flow (html$-note-title author pagenode parent-title-plain))
  (define title-html-flow (html$-note-title pagenode parent-title-plain))
  (define author-url (maybe-attr 'author-url attrs))
  (define-values (disp-mark disp-verb) (disposition-values disposition-attr))
  (define content-html (html$-note-contents disp-mark (get-elements note-tx)))
  (define listing-full-html
    (html$-note-listing-full pagenode note-id title-html-flow note-date content-html author author-url))

  (define note-record

Modified snippets-html.rkt from [ad5d5244] to [460d9c7b].

78
79
80
81
82
83
84
85
86
87
88




89
90
91
92
93
94
95
96

97
98
99
100
101
102
103
104
105



106
107
108
109
110
111
112
113
78
79
80
81
82
83
84




85
86
87
88
89
90
91
92
93
94
95

96









97
98
99

100
101
102
103
104
105
106







-
-
-
-
+
+
+
+







-
+
-
-
-
-
-
-
-
-
-
+
+
+
-







         ◊string-append{</section>
          <footer class="article-info"><span class="x">(</span>◊|footertext|<span class="x">)</span></footer>
          </article>}]
        [else "</section></article>"]))

(define (html$-article-listing-short pagenode pubdate title)
  ◊string-append{
  <li><a href="/◊(symbol->string pagenode)">
    <div class="article-list-date caps">◊(ymd->english pubdate)</div>
    <div class="article-list-title">◊|title|</div>
  </a></li>})
 <li><a href="/◊(symbol->string pagenode)">
 <div class="article-list-date caps">◊(ymd->english pubdate)</div>
 <div class="article-list-title">◊|title|</div>
 </a></li>})

(define (html$-page-body-close)
  ◊string-append{<footer>By Joel Dueck</footer>
 </main></body>})

;; Notes
;;
(define (html$-note-title author pagenode parent-title)
(define (html$-note-title pagenode parent-title)
  (define author-part
    (cond [(and (non-empty-string? author)
                (not (string-ci=? author default-authorname)))
           (format "A note from ~a, " author)]
          [else ""]))
  (define article-part
    (format "Re: <a class=\"cross-reference\" href=\"/~a\">~a</a>"
            pagenode
            parent-title))
  (format "Re: <a class=\"cross-reference\" href=\"/~a\">~a</a>"
          pagenode
          parent-title))
  (string-append author-part article-part))

(define (html$-note-contents disposition-mark elems)
  (define-values (first-tag first-attrs first-elems) (txexpr->values (car elems)))
  (define disposition
    (cond [(non-empty-string? disposition-mark)
           `(span [[class "disposition-mark"]] ,disposition-mark)]
          [else ""]))
126
127
128
129
130
131
132
133

134
135
136
137
138
139
140



141
142
143
144
145
146
147
119
120
121
122
123
124
125

126
127
128
129
130



131
132
133
134
135
136
137
138
139
140







-
+




-
-
-
+
+
+







            <div class="note-meta">
            &mdash;<a class="u-author h-card" href="◊|author-url|"><i>◊|author|</i></a>
            </div>}]
          [else ◊string-append{
            <div class="note-meta">
            &mdash;<span class="h-card"><i>◊|author|</i></span>
            </div>}]))
  (define maybe-author-class?
  (define maybe-author-class
    (cond [(string=? author default-authorname) "by-proprietor"]
          [else ""]))
  
  ◊string-append{
 <article class="with-title ◊maybe-author-class? hentry">
 <h1 class="entry-title">◊|title-html-flow|</h1>
 <p class="time"><a href="◊|pagenode|◊note-id" class="rel-bookmark note-permlink">
 <article class="with-title ◊maybe-author-class hentry">
 <h1 class="entry-title note-full">◊|title-html-flow|</h1>
 <p class="time"><a href="/◊|pagenode|#◊note-id" class="rel-bookmark note-permlink">
 <time datetime="◊date">◊ymd->english[date]</time>
 </a></p>
 <section class="entry-content">
 <div class="p-content p-name">◊|contents|</div>
 ◊author-part
 </section>
 </article>})

Modified web-extra/martin.css.pp from [6ce3d0c2] to [c1de787e].

205
206
207
208
209
210
211
212

213
214
215
216
217




218
219
220
221

222
223
224
225
226
227
228
205
206
207
208
209
210
211

212
213
214
215
216
217
218
219
220
221
222
223
224

225
226
227
228
229
230
231
232







-
+





+
+
+
+



-
+







        line-height: ◊x-lineheight[1];
        margin: 0 0 ◊x-lineheight[1] 0;
        font-style: italic;
        font-weight: normal;
    }

    /* Titles non-bold, non-smallcaps by default. This can be overridden in document markup. */
    article>h1.entry-title {
    h1.entry-title {
        margin: 0 0 0 0;
        text-transform: none;
        font-style: normal;
        line-height: 1.7rem;
    }

    h1.entry-title.note-full {
        font-feature-settings: "smcp" on, "liga" on, "clig" on, "dlig" on, "kern" on, "onum" on, "pnum" on;
    }

    /* This <SPAN> class is used in titles for Notes appended to earlier articles */
    h1.entry-title .cross-reference {
        font-feature-settings: "scmp" off, "liga" on, "clig" on, "dlig" on, "kern" on, "onum" on, "pnum" on;
        font-feature-settings: "smcp" off, "liga" on, "clig" on, "dlig" on, "kern" on, "onum" on, "pnum" on;
        font-style: italic;
        text-transform: none;
    }

    /* I want my *title* permlinks not to be green or underlined. Just your basic raven black, dark green on hover.

       Normally with links, you _don’t_ want to rely on hovers to differentiate them, because there’s no way