Commit 786407b1 authored by Robert Ricci's avatar Robert Ricci

Better name for the class that contains downloadable code

parent bf4dae5d
......@@ -171,14 +171,14 @@
(list (make-css-addition "code-sample.css")
(make-tex-addition "code-sample.tex"))))
(define invisible-code-sample-style
(make-style "invisible-code-sample"
(list (make-css-addition "invisible-code-sample.css")
(make-tex-addition "invisible-code-sample.tex"))))
(define downloadable-code-sample-style
(make-style "downloadable-code-sample"
(list (make-css-addition "downloadable-code-sample.css")
(make-tex-addition "downloadable-code-sample.tex"))))
(define (code-sample filename)
; We include the code sample twice; the second time, it's hidden. This is
; so that we get to keep a 'clean' copy for the download button
(elem #:style code-sample-style (file->string (string-append "code-samples/" filename)))
(elem #:style invisible-code-sample-style (file->string (string-append "code-samples/" filename)))))
(elem #:style downloadable-code-sample-style (file->string (string-append "code-samples/" filename)))))
......@@ -16,7 +16,7 @@ function markupOneExampleForDownload(elem) {
function markupAllExamples() {
var samples = document.getElementsByClassName("invisible-code-sample");
var samples = document.getElementsByClassName("downloadable-code-sample");
for(var i = 0; i < samples.length; i++) {
.invisible-code-sample {
.downloadable-code-sample {
display: none;
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