- Commit
- 103d3d37324d8629d7dc1d549a38fbb8981b1f00
- Parent
- 05bd7217ed9e33341333b1bfd47a134889eff77c
- Author
- John MacFarlane <jgm@berkeley.edu>
- Date
Watermark old versions of the spec.
My personal build of CMark ✏️
Watermark old versions of the spec.
2 files changed, 16 insertions, 1 deletion
Status | File Name | N° Changes | Insertions | Deletions |
Modified | Makefile | 3 | 2 | 1 |
Modified | template.html | 14 | 14 | 0 |
diff --git a/Makefile b/Makefile @@ -93,7 +93,8 @@ _site/spec.html: spec.txt (echo "% CommonMark Spec\n";\ for vers in $(shell cd _site; ls -d -t 0.*) ; do \ date=`stat -t "%Y-%m-%d" -f "%Sa" _site/$$vers/index.html`; \ - echo "- [Version $$vers ($$date)](/$$vers/)" ; done) | \ + echo "- [Version $$vers ($$date)](/$$vers/)" ; \ + perl -pe 's/<div id="watermark"><\/div>/<div id="watermark">This is an older version of the spec. For the most recent version, see <a href="http:\/\/spec.commonmark.org">http:\/\/spec.commonmark.org<\/a>.<\/div>/' _site/$$vers/index.html; \ done) | \ pandoc --template template.html -S -s -t html5 -o $@ _site/index.html: _site/spec.html
diff --git a/template.html b/template.html @@ -46,6 +46,19 @@ pre.html { background-color: #C9CaCE; } pre.html span.space:after { border: 1px solid #666; } +#watermark { + position:fixed; + bottom:0px; + left:0px; + padding: 1em; + width: 100%; + font-size: 120%; + opacity:0.7; + z-index:99; + background-color: black; + color: white; +} +#watermark a { color: white; } div.examplenum { font-size: 82%; text-align: left; } a.dingus { color: red; } a.footnoteRef > sup:before { @@ -87,6 +100,7 @@ $for(author)$<span class="author">$author$</span>$sep$; $endfor$ <div id="TOC"> $toc$ </div> +<div id="watermark"></div> $body$ </body> </html>