|
112 | 112 | (define current-version (make-parameter (version))) |
113 | 113 | (define current-part-files (make-parameter #f)) |
114 | 114 | (define current-render-convertible-requests (make-parameter '(png@2x-bytes png-bytes svg-bytes gif-bytes))) |
| 115 | +(define bare-anchors? (make-parameter #f)) ;; don't decorate anchors with "link-to-here" hovers |
115 | 116 |
|
116 | 117 | (define (url->string* u) |
117 | 118 | (parameterize ([current-url-encode-mode 'unreserved]) |
|
820 | 821 | 0) |
821 | 822 |
|
822 | 823 | (define/public (render-one-part d ri fn number) |
823 | | - (parameterize ([current-output-file fn]) |
| 824 | + (parameterize ([current-output-file fn] |
| 825 | + [bare-anchors? (part-style? d 'bare-anchors)]) |
824 | 826 | (let* ([defaults (let loop ([d d]) |
825 | 827 | (or (ormap (lambda (v) (and (html-defaults? v) v)) |
826 | 828 | (style-properties (part-style d))) |
|
1188 | 1190 | ,@(if (part-title-content d) |
1189 | 1191 | (render-content (part-title-content d) d ri) |
1190 | 1192 | null) |
1191 | | - (span ([class "button-group"]) |
1192 | | - ,@(match (part-tags d) |
1193 | | - ['() '()] |
1194 | | - [(cons t _) |
1195 | | - (list `(a ([href ,(format "#~a" (anchor-name |
1196 | | - (add-current-tag-prefix |
1197 | | - (tag-key t ri))))] |
1198 | | - [class "heading-anchor"] |
1199 | | - [title "Link to here"]) |
1200 | | - "🔗"))]) |
1201 | | - ,@(if (and src taglet) |
1202 | | - (list '(a ([class "heading-source"] |
1203 | | - [title "Internal Scribble link and Scribble source"]) "ℹ")) |
1204 | | - '()) |
1205 | | - ;; this is a dummy node so that the line height of heading-anchor |
1206 | | - ;; and heading-source are correct (even when their font size is not 100%) |
1207 | | - (span ([style "visibility: hidden"]) " "))))]) |
| 1193 | + ,@(if (bare-anchors?) |
| 1194 | + null |
| 1195 | + `((span ([class "button-group"]) |
| 1196 | + ,@(match (part-tags d) |
| 1197 | + ['() '()] |
| 1198 | + [(cons t _) |
| 1199 | + (list `(a ([href ,(format "#~a" (anchor-name |
| 1200 | + (add-current-tag-prefix |
| 1201 | + (tag-key t ri))))] |
| 1202 | + [class "heading-anchor"] |
| 1203 | + [title "Link to here"]) |
| 1204 | + "🔗"))]) |
| 1205 | + ,@(if (and src taglet) |
| 1206 | + (list '(a ([class "heading-source"] |
| 1207 | + [title "Internal Scribble link and Scribble source"]) "ℹ")) |
| 1208 | + '()) |
| 1209 | + ;; this is a dummy node so that the line height of heading-anchor |
| 1210 | + ;; and heading-source are correct (even when their font size is not 100%) |
| 1211 | + (span ([style "visibility: hidden"]) " "))) |
| 1212 | + ) |
| 1213 | + ))]) |
1208 | 1214 | ,@(let ([auths (extract-authors d)]) |
1209 | 1215 | (if (null? auths) |
1210 | 1216 | null |
|
0 commit comments