Last active
September 2, 2022 13:50
-
-
Save Metaxal/20837a1771cf8003a305341f4e91ad1f to your computer and use it in GitHub Desktop.
scribble examples in <details> html element
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang scribble/manual | |
@(require scribble/core | |
scribble/html-properties | |
racket | |
scribble/example) | |
@(define the-eval (make-base-eval)) | |
@examples[#:eval the-eval #:hidden | |
(require racket/string)] | |
@(define (details #:label [label "Details"] . blocks) | |
(nested-flow | |
(style #f | |
(list (alt-tag "details") | |
(attributes '()))) | |
(cons | |
(paragraph | |
plain | |
(elem label #:style (style #f (list (alt-tag "summary") (attributes '()))))) | |
blocks))) | |
@(details | |
#:label "Examples" | |
@examples[#:eval the-eval | |
#:label #f | |
(string-upcase "hello")]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment