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