Commit 87efb81c authored by Robert Ricci's avatar Robert Ricci

Support for screenshots in @instructionsteps

parent f97c8904
#lang racket/base
(require scribble/base)
(require scribble/decode)
(require racket/class)
(require racket/draw)
(provide (all-defined-out))
(define (apturl page)
(string-append "https://www.aptlab.net/" page))
(define apt-base-url "https://www.aptlab.net/")
(define screenshot-width 650)
(define apturl
(case-lambda
[() apt-base-url]
[(page) (string-append apt-base-url page)]))
(define (TODO . what)
(bold "TODO: " what))
(bold "TODO: " (decode-content what)))
(define nodetype
(lambda (typename howmany . properties)
......@@ -16,3 +25,15 @@
(list (bold typename)
(string-append (number->string howmany) " nodes"))
properties))))
(define (instructionstep step #:screenshot [screenshot #f] . body)
(item (bold (decode-content (list step)))
(linebreak)
(if screenshot
(let* ([path (string-append "screenshots/" screenshot)]
[b (make-object bitmap% path)]
[width (send b get-width)]
[scale-factor (/ screenshot-width width)])
(list (image #:scale scale-factor path screenshot) (linebreak)))
(void))
(decode-content body)))
......@@ -4,4 +4,14 @@
@title[#:tag "getting-started"]{Getting Started}
@TODO{This Section To Be Written!}
This chapter will walk you through running a simple experiment on Apt and
introduce you to some of its basic concepts.
Start by pointing your browser to @url[(apturl)] .
@itemlist[#:style 'ordered
@instructionstep["Enter your email address and pick a username"
#:screenshot "instantiate-empty.png"]{
Do things
}
]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment