Overview
| Comment: | Add custom Scribble styles | 
|---|---|
| Timelines: | family | ancestors | descendants | both | doc-expansion | 
| Files: | files | file ages | folders | 
| SHA3-256: | c7350de07b52c097e55157f674982163 | 
| User & Date: | joel on 2020-01-19 04:36:21 | 
| Other Links: | branch diff | manifest | tags | 
Context
| 2020-01-19 | ||
| 05:35 | Filling in tour, design check-in: 71aa7cd9 user: joel tags: doc-expansion | |
| 04:36 | Add custom Scribble styles check-in: c7350de0 user: joel tags: doc-expansion | |
| 03:46 | Ignore generated Scribble support files check-in: 2c745dc9 user: joel tags: doc-expansion | |
Changes
Added code-docs/custom.css version [471eaf45].
| > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 
.fileblock .SCodeFlow {
    padding-top: 0.7em;
    margin-top: 0;
}
.fileblock {
    width: 90%;
}
.fileblock_filetitle{
    background: #eee;
    text-align:right;
    padding: 0.15em;
    border: 1px dotted black;
    border-bottom: none;
}
.terminal, .browser {
    margin-bottom: 1em;
    padding: 0.5em;
    width: 88%;
    background: #fcfcfc;
    color: rgb(150, 35, 105);
}
.terminal .SIntrapara, .browser .SIntrapara, .fileblock .SIntrapara {
    margin: 0 0 0 0;
}
 | 
Modified code-docs/scribble-helpers.rkt from [95058fad] to [d6d57bb0].
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 
#lang racket/base
; SPDX-License-Identifier: BlueOak-1.0.0
; This file is licensed under the Blue Oak Model License 1.0.0.
;; Convenience/helper functions for this project’s Scribble documentation
(require scribble/core
         scribble/manual/lang
         scribble/html-properties
         (only-in net/uri-codec uri-encode))
(provide (all-defined-out))
(define repo-url/ "https://thelocalyarn.com/cgi-bin/yarncode/")
;; Link to a ticket on the Fossil repository by specifying the ticket ID.
;; The "_parent" target breaks out of the iframe used by the Fossil repo web UI.
(define (ticket id-str)
  (hyperlink (string-append repo-url/ "tktview?name=" id-str)
 | > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 
#lang racket/base
; SPDX-License-Identifier: BlueOak-1.0.0
; This file is licensed under the Blue Oak Model License 1.0.0.
;; Convenience/helper functions for this project’s Scribble documentation
(require scribble/core
         scribble/manual/lang
         scribble/html-properties
         scribble/private/manual-sprop
         scribble/decode
         racket/runtime-path
         (only-in net/uri-codec uri-encode))
(provide (all-defined-out))
(define-runtime-path custom-css "custom.css")
(define repo-url/ "https://thelocalyarn.com/cgi-bin/yarncode/")
;; Link to a ticket on the Fossil repository by specifying the ticket ID.
;; The "_parent" target breaks out of the iframe used by the Fossil repo web UI.
(define (ticket id-str)
  (hyperlink (string-append repo-url/ "tktview?name=" id-str)
 | 
| ︙ | ︙ | |||
| 41 42 43 44 45 46 47 | 
             #:style (style #f (list (attributes '((target . "_parent")))))))
(define (responsive-retina-image img-path)
  (image img-path 
         #:scale 0.5
         #:style (style #f (list (attributes '((style . "max-width:100%;height:auto;")))))))
 | > > > > > > > > > > > > > > > > > > > > > > > > > > > | 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | 
             #:style (style #f (list (attributes '((target . "_parent")))))))
(define (responsive-retina-image img-path)
  (image img-path 
         #:scale 0.5
         #:style (style #f (list (attributes '((style . "max-width:100%;height:auto;")))))))
;;
;; From https://github.com/mbutterick/pollen/blob/master/pollen/scribblings/mb-tools.rkt
;;
(define (terminal . args)
  (compound-paragraph (style "terminal" (list (css-style-addition custom-css) (alt-tag "div")))
                      (list (apply verbatim args))))
(define (cmd . args)
  (elem #:style (style #f (list (color-property "black"))) (tt args)))
(define (fileblock filename . inside)
  (compound-paragraph 
   (style "fileblock" (list* (alt-tag "div") 'multicommand
                             (box-mode "RfileboxBoxT" "RfileboxBoxC" "RfileboxBoxB") 
                             scheme-properties))
   (list
    (paragraph (style "fileblock_filetitle" (list* (alt-tag "div") (box-mode* "RfiletitleBox") scheme-properties))
               (list (make-element
                      (style "fileblock_filename" (list (css-style-addition custom-css)))
                      (if (string? filename)
                          (filepath filename)
                          filename))))
    (compound-paragraph 
     (style "fileblock_filecontent" (list* (alt-tag "div") (box-mode* "RfilecontentBox") scheme-properties))
     (decode-flow inside)))))
 |