aboutsummaryrefslogtreecommitdiff
path: root/tools/template.html
blob: 2bc32c031e323bcaecbb452725045fe7f891d271 (plain)
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>$title$</title>
  6. <style type="text/css">
  7. body { font-family: Helvetica, arial, freesans, clean, sans-serif;
  8. line-height: 1.4;
  9. max-width: 48em;
  10. margin: auto;
  11. color: #333333;
  12. background-color: #fff;
  13. font-size: 13pt;
  14. }
  15. div#TOC ul { list-style: none; }
  16. h1 { font-size: 140%; font-weight: bold; border-top: 1px solid gray; padding-top: 0.5em; }
  17. h2 { font-size: 120%; font-weight: bold; }
  18. h3 { font-size: 110%; font-weight: bold; }
  19. h4 { font-size: 100%; font-weight: bold; }
  20. a.definition { font-weight: bold; }
  21. span.space { position: relative; }
  22. span.number:after { content: "  " }
  23. span.space:after {
  24. content: "·";
  25. position: absolute;
  26. /* create a mark that indicates a space (trick from D. Greenspan) */
  27. top: 0px; bottom: 7px; left: 1px; right: 1px;
  28. color: #AAA;
  29. }
  30. div.example { overflow: hidden; }
  31. p { text-align: justify; }
  32. pre { padding: 0.5em; margin-left: 0; margin-right: 0; margin-top: 0.2em;
  33. margin-bottom: 0.5em; font-size: 88%; }
  34. pre {
  35. white-space: pre-wrap; /* css-3 */
  36. white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
  37. white-space: -pre-wrap; /* Opera 4-6 */
  38. white-space: -o-pre-wrap; /* Opera 7 */
  39. word-wrap: break-word; /* Internet Explorer 5.5+ */
  40. }
  41. code { font-family: monospace; background-color: #D3E1E4; }
  42. pre > code { background-color: transparent; }
  43. .example { font-size: 0; /* hack to get width:50% to work on inline-block */
  44. padding-bottom: 6pt; }
  45. .column pre { font-size: 11pt; padding-left: 6pt; padding-right: 6pt;
  46. padding-top: 2pt; padding-bottom: 2pt; }
  47. div.examplenum { font-size: 11pt; text-align: left; margin-bottom:10px; }
  48. div.column { display: inline-block; width: 50%; vertical-align: top; }
  49. div.example > div:nth-child(2) { clear:left; background-color: #D3E1E4; }
  50. div.example > div:nth-child(3) { clear:right; background-color: #C9CaCE; }
  51. #watermark {
  52. position:fixed;
  53. bottom:0px;
  54. left:0px;
  55. padding: 1em;
  56. width: 100%;
  57. font-size: 120%;
  58. opacity:0.7;
  59. z-index:99;
  60. color: white;
  61. }
  62. #watermark a { color: white; }
  63. a.dingus {
  64. margin-left: 1em;
  65. cursor: pointer;
  66. line-height: 30px;
  67. padding: 4px 7px;
  68. color: #FFF;
  69. background-color: #33C3F0;
  70. box-shadow: 2px 2px 2px rgba(0,0,0,.2);
  71. border-color: #4FCAEF;
  72. border-bottom: 2px #2A9EC1 solid;
  73. border-right: 2px #2A9EC1 solid;
  74. }
  75. a.footnoteRef > sup:before {
  76. content: "[";
  77. }
  78. a.footnoteRef > sup:after {
  79. content: "]";
  80. }
  81. a.footnoteRef > sup {
  82. vertical-align: baseline;
  83. font-size: 100%;
  84. }
  85. @media print {
  86. @page {
  87. size: auto;
  88. margin: 1.2in 1.2in 1.2in 1.2in;
  89. }
  90. body {
  91. margin: 0px;
  92. line-height: 1.2;
  93. font-size: 10pt;
  94. }
  95. .column pre { font-size: 9pt; }
  96. div.examplenum { font-size: 9pt; }
  97. a.dingus { display: none; }
  98. }
  99. </style>
  100. <script src="https://code.jquery.com/jquery-2.2.0.min.js"></script>
  101. <script type="text/javascript">
  102. $$(document).ready(function() {
  103. $$("div.example").each(function(e) {
  104. var t = $$(this).find('code.language-markdown').text();
  105. $$(this).find('a.dingus').click(function(f) {
  106. window.open('/dingus/?text=' +
  107. encodeURIComponent(t.replace(/→/g,"\t")));
  108. });
  109. });
  110. $$("code.language-markdown").dblclick(function(e) { window.open('/dingus/?text=' +
  111. encodeURIComponent($$(this).find('code').text()));
  112. });
  113. });
  114. </script>
  115. </head>
  116. <body>
  117. <h1 class="title">$title$</h1>
  118. <div class="version">Version $version$ ($date$)</div>
  119. <div class="authors">
  120. <span class="author">$author$</span>
  121. </div>
  122. <div class="license">
  123. <a rel="license"
  124. href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative
  125. Commons BY-SA" style="border-width:0"
  126. src="https://i.creativecommons.org/l/by-sa/4.0/80x15.png"
  127. /></a><br/><span style="display:none"><span xmlns:dct="http://purl.org/dc/terms/"
  128. href="http://purl.org/dc/dcmitype/Text" property="dct:title"
  129. rel="dct:type">CommonMark Spec</span> by
  130. <a xmlns:cc="http://creativecommons.org/ns#"
  131. href="http://spec.commonmark.org" property="cc:attributionName"
  132. rel="cc:attributionURL">John MacFarlane</a> is licensed under a
  133. <a rel="license"
  134. href="http://creativecommons.org/licenses/by-sa/4.0/">Creative
  135. Commons Attribution-ShareAlike 4.0 International License</a>.</span>
  136. </div>
  137. <div id="watermark"></div>
  138. <div id="TOC">
  139. $toc$
  140. </div>
  141. $body$
  142. </body>
  143. </html>