nimdoc.cfg 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989
  1. # This is the config file for the documentation generator.
  2. # (c) 2016 Andreas Rumpf
  3. # Feel free to edit the templates as you need. If you modify this file, it
  4. # might be worth updating the hardcoded values in packages/docutils/rstgen.nim
  5. split.item.toc = "20"
  6. # too long entries in the table of contents wrap around
  7. # after this number of characters
  8. doc.section = """
  9. <div class="section" id="$sectionID">
  10. <h1><a class="toc-backref" href="#$sectionID">$sectionTitle</a></h1>
  11. <dl class="item">
  12. $content
  13. </dl></div>
  14. """
  15. doc.section.toc = """
  16. <li>
  17. <a class="reference reference-toplevel" href="#$sectionID" id="$sectionTitleID">$sectionTitle</a>
  18. <ul class="simple simple-toc-section">
  19. $content
  20. </ul>
  21. </li>
  22. """
  23. # Chunk of HTML emitted for each entry in the HTML table of contents.
  24. # Available variables are:
  25. # * $desc: the actual docstring of the item.
  26. # * $header: the full version of name, including types, pragmas, tags, etc.
  27. # * $header_plain: like header but without HTML, for attribute embedding.
  28. # * $itemID: numerical unique entry of the item in the HTML.
  29. # * $itemSym: short symbolic name of the item for easier hyperlinking.
  30. # * $itemSymEnc: quoted version for URLs or attributes.
  31. # * $itemSymOrID: the symbolic name or the ID if that is not unique.
  32. # * $itemSymOrIDEnc: quoted version for URLs or attributes.
  33. # * $name: reduced name of the item.
  34. # * $seeSrc: generated HTML from doc.item.seesrc (if some switches are used).
  35. doc.item = """
  36. <a id="$itemSymOrID"></a>
  37. <dt><pre>$header</pre></dt>
  38. <dd>
  39. $desc
  40. $seeSrc
  41. </dd>
  42. """
  43. # Chunk of HTML emitted for each entry in the HTML table of contents.
  44. # See doc.item for available substitution variables.
  45. doc.item.toc = """
  46. <li><a class="reference" href="#$itemSymOrIDEnc"
  47. title="$header_plain">$name<span class="attachedType" style="visibility:hidden">$attype</span></a></li>
  48. """
  49. # HTML rendered for doc.item's seeSrc variable. Note that this will render to
  50. # the empty string if you don't pass anything through --docSeeSrcURL. Available
  51. # substitutaion variables here are:
  52. # * $commit: branch/commit to use in source link.
  53. # * $devel: branch to use in edit link.
  54. # * $path: relative path to the file being processed.
  55. # * $line: line of the item in the original source file.
  56. # * $url: whatever you did pass through the --docSeeSrcUrl switch (which also
  57. # gets variables path/line replaced!)
  58. doc.item.seesrc = """&nbsp;&nbsp;<a
  59. href="${url}/tree/${commit}/${path}#L${line}"
  60. class="link-seesrc" target="_blank">Source</a>
  61. <a href="${url}/edit/${devel}/${path}#L${line}" class="link-seesrc" target="_blank" >Edit</a>
  62. """
  63. doc.toc = """
  64. <ul class="simple simple-toc" id="toc-list">
  65. $content
  66. </ul>
  67. """
  68. doc.body_toc = """
  69. <div class="row">
  70. <div class="three columns">
  71. <div id="global-links">
  72. <ul class="simple-boot">
  73. <li>
  74. <a href="manual.html">Manual</a>
  75. </li>
  76. <li>
  77. <a href="lib.html">Standard library</a>
  78. </li>
  79. <li>
  80. <a href="theindex.html">Index</a>
  81. </li>
  82. </ul>
  83. </div>
  84. <div id="searchInputDiv">
  85. Search: <input type="text" id="searchInput"
  86. onkeyup="search()" />
  87. </div>
  88. $tableofcontents
  89. </div>
  90. <div class="nine columns" id="content">
  91. <div id="tocRoot"></div>
  92. <p class="module-desc">$moduledesc</p>
  93. $content
  94. </div>
  95. </div>
  96. """
  97. @if boot:
  98. # This is enabled with the "boot" directive to generate
  99. # the compiler documentation.
  100. # As a user, tweak the block below instead.
  101. # You can add your own global-links entries
  102. doc.body_toc_group = """
  103. <div class="row">
  104. <div class="three columns">
  105. <div id="global-links">
  106. <ul class="simple-boot">
  107. <li>
  108. <a href="manual.html">Manual</a>
  109. </li>
  110. <li>
  111. <a href="lib.html">Standard library</a>
  112. </li>
  113. <li>
  114. <a href="theindex.html">Index</a>
  115. </li>
  116. </ul>
  117. </div>
  118. <div id="searchInputDiv">
  119. Search: <input type="text" id="searchInput"
  120. onkeyup="search()" />
  121. </div>
  122. <div class="search-groupby">
  123. Group by:
  124. <select onchange="groupBy(this.value)">
  125. <option value="section">Section</option>
  126. <option value="type">Type</option>
  127. </select>
  128. </div>
  129. $tableofcontents
  130. </div>
  131. <div class="nine columns" id="content">
  132. <div id="tocRoot"></div>
  133. <p class="module-desc">$moduledesc</p>
  134. $content
  135. </div>
  136. </div>
  137. """
  138. @else
  139. doc.body_toc_group = """
  140. <div class="row">
  141. <div class="three columns">
  142. <div id="global-links">
  143. <ul class="simple">
  144. </ul>
  145. </div>
  146. <div id="searchInputDiv">
  147. Search: <input type="text" id="searchInput"
  148. onkeyup="search()" />
  149. </div>
  150. <div>
  151. Group by:
  152. <select onchange="groupBy(this.value)">
  153. <option value="section">Section</option>
  154. <option value="type">Type</option>
  155. </select>
  156. </div>
  157. $tableofcontents
  158. </div>
  159. <div class="nine columns" id="content">
  160. <div id="tocRoot"></div>
  161. <p class="module-desc">$moduledesc</p>
  162. $content
  163. </div>
  164. </div>
  165. """
  166. @end
  167. doc.body_no_toc = """
  168. $moduledesc
  169. $content
  170. """
  171. doc.listing_start = "<pre class=\"listing\">"
  172. doc.listing_end = "</pre>"
  173. # * $analytics: Google analytics location, includes <script> tags
  174. doc.file = """<?xml version="1.0" encoding="utf-8" ?>
  175. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  176. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  177. <!-- This file is generated by Nim. -->
  178. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  179. <head>
  180. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  181. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  182. <!-- Favicon -->
  183. <link rel="shortcut icon" href="data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA=="/>
  184. <!-- Google fonts -->
  185. <link href='https://fonts.googleapis.com/css?family=Lato:400,600,900' rel='stylesheet' type='text/css'/>
  186. <link href='https://fonts.googleapis.com/css?family=Source+Code+Pro:400,500,600' rel='stylesheet' type='text/css'/>
  187. <!-- CSS -->
  188. <title>$title</title>
  189. <style type="text/css" >
  190. /*
  191. Stylesheet for use with Docutils/rst2html.
  192. See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
  193. customize this style sheet.
  194. Modified from Chad Skeeters' rst2html-style
  195. https://bitbucket.org/cskeeters/rst2html-style/
  196. Modified by Boyd Greenfield and narimiran
  197. */
  198. html {
  199. font-size: 100%;
  200. -webkit-text-size-adjust: 100%;
  201. -ms-text-size-adjust: 100%; }
  202. body {
  203. font-family: "Lato", "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif;
  204. font-weight: 400;
  205. font-size: 1.125em;
  206. line-height: 1.5;
  207. color: #222;
  208. background-color: #FCFCFC; }
  209. /* Skeleton grid */
  210. .container {
  211. position: relative;
  212. width: 100%;
  213. max-width: 1050px;
  214. margin: 0 auto;
  215. padding: 0;
  216. box-sizing: border-box; }
  217. .column,
  218. .columns {
  219. width: 100%;
  220. float: left;
  221. box-sizing: border-box;
  222. margin-left: 1%;
  223. }
  224. .column:first-child,
  225. .columns:first-child {
  226. margin-left: 0; }
  227. .three.columns {
  228. width: 19%; }
  229. .nine.columns {
  230. width: 80.0%; }
  231. .twelve.columns {
  232. width: 100%;
  233. margin-left: 0; }
  234. @media screen and (max-width: 860px) {
  235. .three.columns {
  236. display: none;
  237. }
  238. .nine.columns {
  239. width: 98.0%;
  240. }
  241. body {
  242. font-size: 1em;
  243. line-height: 1.35;
  244. }
  245. }
  246. cite {
  247. font-style: italic !important; }
  248. /* Nim search input */
  249. div#searchInputDiv {
  250. margin-bottom: 1em;
  251. }
  252. input#searchInput {
  253. width: 80%;
  254. }
  255. /* Docgen styles */
  256. /* Links */
  257. a {
  258. color: #07b;
  259. text-decoration: none;
  260. }
  261. a span.Identifier {
  262. text-decoration: underline;
  263. text-decoration-color: #aab;
  264. }
  265. a.reference-toplevel {
  266. font-weight: bold;
  267. }
  268. a.toc-backref {
  269. text-decoration: none;
  270. color: #222; }
  271. a.link-seesrc {
  272. color: #607c9f;
  273. font-size: 0.9em;
  274. font-style: italic; }
  275. a:hover,
  276. a:focus {
  277. color: #607c9f;
  278. text-decoration: underline; }
  279. a:hover span.Identifier {
  280. color: #607c9f;
  281. }
  282. sub,
  283. sup {
  284. position: relative;
  285. font-size: 75%;
  286. line-height: 0;
  287. vertical-align: baseline; }
  288. sup {
  289. top: -0.5em; }
  290. sub {
  291. bottom: -0.25em; }
  292. img {
  293. width: auto;
  294. height: auto;
  295. max-width: 100%;
  296. vertical-align: middle;
  297. border: 0;
  298. -ms-interpolation-mode: bicubic; }
  299. @media print {
  300. * {
  301. color: black !important;
  302. text-shadow: none !important;
  303. background: transparent !important;
  304. box-shadow: none !important; }
  305. a,
  306. a:visited {
  307. text-decoration: underline; }
  308. a[href]:after {
  309. content: " (" attr(href) ")"; }
  310. abbr[title]:after {
  311. content: " (" attr(title) ")"; }
  312. .ir a:after,
  313. a[href^="javascript:"]:after,
  314. a[href^="#"]:after {
  315. content: ""; }
  316. pre,
  317. blockquote {
  318. border: 1px solid #999;
  319. page-break-inside: avoid; }
  320. thead {
  321. display: table-header-group; }
  322. tr,
  323. img {
  324. page-break-inside: avoid; }
  325. img {
  326. max-width: 100% !important; }
  327. @page {
  328. margin: 0.5cm; }
  329. h1 {
  330. page-break-before: always; }
  331. h1.title {
  332. page-break-before: avoid; }
  333. p,
  334. h2,
  335. h3 {
  336. orphans: 3;
  337. widows: 3; }
  338. h2,
  339. h3 {
  340. page-break-after: avoid; }
  341. }
  342. p {
  343. margin-top: 0.5em;
  344. margin-bottom: 0.5em;
  345. }
  346. small {
  347. font-size: 85%; }
  348. strong {
  349. font-weight: 600;
  350. font-size: 0.95em;
  351. color: #3c3c3c;
  352. }
  353. em {
  354. font-style: italic; }
  355. h1 {
  356. font-size: 1.8em;
  357. font-weight: 400;
  358. padding-bottom: .25em;
  359. border-bottom: 1px solid #aaa;
  360. margin-top: 2.5em;
  361. margin-bottom: 1em;
  362. line-height: 1.2em; }
  363. h1.title {
  364. padding-bottom: 1em;
  365. border-bottom: 0px;
  366. font-size: 2.5em;
  367. text-align: center;
  368. font-weight: 900;
  369. margin-top: 0.75em;
  370. margin-bottom: 0em;
  371. }
  372. h2 {
  373. font-size: 1.3em;
  374. margin-top: 2em; }
  375. h2.subtitle {
  376. text-align: center; }
  377. h3 {
  378. font-size: 1.125em;
  379. font-style: italic;
  380. margin-top: 1.5em; }
  381. h4 {
  382. font-size: 1.125em;
  383. margin-top: 1em; }
  384. h5 {
  385. font-size: 1.125em;
  386. margin-top: 0.75em; }
  387. h6 {
  388. font-size: 1.1em; }
  389. ul,
  390. ol {
  391. padding: 0;
  392. margin-top: 0.5em;
  393. margin-left: 0.75em; }
  394. ul ul,
  395. ul ol,
  396. ol ol,
  397. ol ul {
  398. margin-bottom: 0;
  399. margin-left: 1.25em; }
  400. li {
  401. list-style-type: circle;
  402. }
  403. ul.simple-boot li {
  404. list-style-type: none;
  405. margin-left: 0em;
  406. margin-bottom: 0.5em;
  407. }
  408. ol.simple > li, ul.simple > li {
  409. margin-bottom: 0.25em;
  410. margin-left: 0.4em }
  411. ul.simple.simple-toc > li {
  412. margin-top: 1em;
  413. }
  414. ul.simple-toc {
  415. list-style: none;
  416. font-size: 0.9em;
  417. margin-left: -0.3em;
  418. margin-top: 1em; }
  419. ul.simple-toc > li {
  420. list-style-type: none;
  421. }
  422. ul.simple-toc-section {
  423. list-style-type: circle;
  424. margin-left: 1em;
  425. color: #6c9aae; }
  426. ol.arabic {
  427. list-style: decimal; }
  428. ol.loweralpha {
  429. list-style: lower-alpha; }
  430. ol.upperalpha {
  431. list-style: upper-alpha; }
  432. ol.lowerroman {
  433. list-style: lower-roman; }
  434. ol.upperroman {
  435. list-style: upper-roman; }
  436. ul.auto-toc {
  437. list-style-type: none; }
  438. dl {
  439. margin-bottom: 1.5em; }
  440. dt {
  441. margin-bottom: -0.5em;
  442. margin-left: 0.5em; }
  443. dd {
  444. margin-left: 0.5em;
  445. margin-bottom: 2.5em;
  446. margin-top: 0.5em; }
  447. hr {
  448. margin: 2em 0;
  449. border: 0;
  450. border-top: 1px solid #aaa; }
  451. blockquote {
  452. font-size: 0.9em;
  453. font-style: italic;
  454. padding-left: 0.5em;
  455. margin-left: 0;
  456. border-left: 5px solid #bbc;
  457. }
  458. .pre {
  459. font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace;
  460. font-weight: 500;
  461. font-size: 0.85em;
  462. background-color: #f0f3ff;
  463. padding-left: 3px;
  464. padding-right: 3px;
  465. border-radius: 4px;
  466. }
  467. pre {
  468. font-family: "Source Code Pro", Monaco, Menlo, Consolas, "Courier New", monospace;
  469. color: #222;
  470. font-weight: 500;
  471. display: inline-block;
  472. box-sizing: border-box;
  473. min-width: 100%;
  474. padding: 0.5em;
  475. margin-top: 0.5em;
  476. margin-bottom: 0.5em;
  477. font-size: 0.85em;
  478. white-space: pre !important;
  479. overflow-y: hidden;
  480. overflow-x: visible;
  481. background-color: ghostwhite;
  482. border: 1px solid #dde;
  483. -webkit-border-radius: 6px;
  484. -moz-border-radius: 6px;
  485. border-radius: 6px; }
  486. .pre-scrollable {
  487. max-height: 340px;
  488. overflow-y: scroll; }
  489. /* Nim line-numbered tables */
  490. .line-nums-table {
  491. width: 100%;
  492. table-layout: fixed; }
  493. table.line-nums-table {
  494. border-radius: 4px;
  495. border: 1px solid #cccccc;
  496. background-color: ghostwhite;
  497. border-collapse: separate;
  498. margin-top: 15px;
  499. margin-bottom: 25px; }
  500. .line-nums-table tbody {
  501. border: none; }
  502. .line-nums-table td pre {
  503. border: none;
  504. background-color: transparent; }
  505. .line-nums-table td.blob-line-nums {
  506. width: 28px; }
  507. .line-nums-table td.blob-line-nums pre {
  508. color: #b0b0b0;
  509. -webkit-filter: opacity(75%);
  510. text-align: right;
  511. border-color: transparent;
  512. background-color: transparent;
  513. padding-left: 0px;
  514. margin-left: 0px;
  515. padding-right: 0px;
  516. margin-right: 0px; }
  517. table {
  518. max-width: 100%;
  519. background-color: transparent;
  520. margin-top: 0.5em;
  521. margin-bottom: 1.5em;
  522. border-collapse: collapse;
  523. border-color: #ccc;
  524. border-spacing: 0;
  525. font-size: 0.9em;
  526. }
  527. table th, table td {
  528. padding: 0px 0.5em 0px;
  529. }
  530. table th {
  531. background-color: #e8e8e8;
  532. font-weight: bold; }
  533. table th.docinfo-name {
  534. background-color: transparent;
  535. }
  536. table tr:hover {
  537. background-color: ghostwhite; }
  538. /* rst2html default used to remove borders from tables and images */
  539. .borderless, table.borderless td, table.borderless th {
  540. border: 0; }
  541. table.borderless td, table.borderless th {
  542. /* Override padding for "table.docutils td" with "! important".
  543. The right padding separates the table cells. */
  544. padding: 0 0.5em 0 0 !important; }
  545. .first {
  546. /* Override more specific margin styles with "! important". */
  547. margin-top: 0 !important; }
  548. .last, .with-subtitle {
  549. margin-bottom: 0 !important; }
  550. .hidden {
  551. display: none; }
  552. blockquote.epigraph {
  553. margin: 2em 5em; }
  554. dl.docutils dd {
  555. margin-bottom: 0.5em; }
  556. object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
  557. overflow: hidden; }
  558. div.figure {
  559. margin-left: 2em;
  560. margin-right: 2em; }
  561. div.footer, div.header {
  562. clear: both;
  563. text-align: center;
  564. color: #666;
  565. font-size: smaller; }
  566. div.footer {
  567. padding-top: 5em;
  568. }
  569. div.line-block {
  570. display: block;
  571. margin-top: 1em;
  572. margin-bottom: 1em; }
  573. div.line-block div.line-block {
  574. margin-top: 0;
  575. margin-bottom: 0;
  576. margin-left: 1.5em; }
  577. div.topic {
  578. margin: 2em; }
  579. div.search_results {
  580. background-color: antiquewhite;
  581. margin: 3em;
  582. padding: 1em;
  583. border: 1px solid #4d4d4d;
  584. }
  585. div#global-links ul {
  586. margin-left: 0;
  587. list-style-type: none;
  588. }
  589. div#global-links > simple-boot {
  590. margin-left: 3em;
  591. }
  592. hr.docutils {
  593. width: 75%; }
  594. img.align-left, .figure.align-left, object.align-left {
  595. clear: left;
  596. float: left;
  597. margin-right: 1em; }
  598. img.align-right, .figure.align-right, object.align-right {
  599. clear: right;
  600. float: right;
  601. margin-left: 1em; }
  602. img.align-center, .figure.align-center, object.align-center {
  603. display: block;
  604. margin-left: auto;
  605. margin-right: auto; }
  606. .align-left {
  607. text-align: left; }
  608. .align-center {
  609. clear: both;
  610. text-align: center; }
  611. .align-right {
  612. text-align: right; }
  613. /* reset inner alignment in figures */
  614. div.align-right {
  615. text-align: inherit; }
  616. p.attribution {
  617. text-align: right;
  618. margin-left: 50%; }
  619. p.caption {
  620. font-style: italic; }
  621. p.credits {
  622. font-style: italic;
  623. font-size: smaller; }
  624. p.label {
  625. white-space: nowrap; }
  626. p.rubric {
  627. font-weight: bold;
  628. font-size: larger;
  629. color: maroon;
  630. text-align: center; }
  631. p.topic-title {
  632. font-weight: bold; }
  633. pre.address {
  634. margin-bottom: 0;
  635. margin-top: 0;
  636. font: inherit; }
  637. pre.literal-block, pre.doctest-block, pre.math, pre.code {
  638. margin-left: 2em;
  639. margin-right: 2em; }
  640. pre.code .ln {
  641. color: grey; }
  642. /* line numbers */
  643. pre.code, code {
  644. background-color: #eeeeee; }
  645. pre.code .comment, code .comment {
  646. color: #5c6576; }
  647. pre.code .keyword, code .keyword {
  648. color: #3B0D06;
  649. font-weight: bold; }
  650. pre.code .literal.string, code .literal.string {
  651. color: #0c5404; }
  652. pre.code .name.builtin, code .name.builtin {
  653. color: #352b84; }
  654. pre.code .deleted, code .deleted {
  655. background-color: #DEB0A1; }
  656. pre.code .inserted, code .inserted {
  657. background-color: #A3D289; }
  658. span.classifier {
  659. font-style: oblique; }
  660. span.classifier-delimiter {
  661. font-weight: bold; }
  662. span.option {
  663. white-space: nowrap; }
  664. span.problematic {
  665. color: #b30000; }
  666. span.section-subtitle {
  667. /* font-size relative to parent (h1..h6 element) */
  668. font-size: 80%; }
  669. span.DecNumber {
  670. color: #252dbe; }
  671. span.BinNumber {
  672. color: #252dbe; }
  673. span.HexNumber {
  674. color: #252dbe; }
  675. span.OctNumber {
  676. color: #252dbe; }
  677. span.FloatNumber {
  678. color: #252dbe; }
  679. span.Identifier {
  680. color: #222; }
  681. span.Keyword {
  682. font-weight: 600;
  683. color: #5e8f60; }
  684. span.StringLit {
  685. color: #a4255b; }
  686. span.LongStringLit {
  687. color: #a4255b; }
  688. span.CharLit {
  689. color: #a4255b; }
  690. span.EscapeSequence {
  691. color: black; }
  692. span.Operator {
  693. color: black; }
  694. span.Punctuation {
  695. color: black; }
  696. span.Comment, span.LongComment {
  697. font-style: italic;
  698. font-weight: 400;
  699. color: #484a86; }
  700. span.RegularExpression {
  701. color: darkviolet; }
  702. span.TagStart {
  703. color: darkviolet; }
  704. span.TagEnd {
  705. color: darkviolet; }
  706. span.Key {
  707. color: #252dbe; }
  708. span.Value {
  709. color: #252dbe; }
  710. span.RawData {
  711. color: #a4255b; }
  712. span.Assembler {
  713. color: #252dbe; }
  714. span.Preprocessor {
  715. color: #252dbe; }
  716. span.Directive {
  717. color: #252dbe; }
  718. span.Command, span.Rule, span.Hyperlink, span.Label, span.Reference,
  719. span.Other {
  720. color: black; }
  721. /* Pop type, const, proc, and iterator defs in nim def blocks */
  722. dt pre > span.Identifier, dt pre > span.Operator {
  723. color: #155da4;
  724. font-weight: 700; }
  725. dt pre > span.Keyword ~ span.Identifier, dt pre > span.Identifier ~ span.Identifier,
  726. dt pre > span.Operator ~ span.Identifier, dt pre > span.Other ~ span.Identifier {
  727. color: inherit;
  728. font-weight: inherit; }
  729. /* Nim sprite for the footer (taken from main page favicon) */
  730. .nim-sprite {
  731. display: inline-block;
  732. height: 16px;
  733. width: 16px;
  734. background-position: 0 0;
  735. background-size: 16px 16px;
  736. -webkit-filter: opacity(50%);
  737. background-repeat: no-repeat;
  738. background-image: url("data:image/x-icon;base64,AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAUAAAAF////AP///wD///8A////AP///wD///8A////AP///wD///8A////AAAAAAIAAABbAAAAlQAAAKIAAACbAAAAmwAAAKIAAACVAAAAWwAAAAL///8A////AP///wD///8A////AAAAABQAAADAAAAAYwAAAA3///8A////AP///wD///8AAAAADQAAAGMAAADAAAAAFP///wD///8A////AP///wAAAACdAAAAOv///wD///8A////AP///wD///8A////AP///wD///8AAAAAOgAAAJ3///8A////AP///wAAAAAnAAAAcP///wAAAAAoAAAASv///wD///8A////AP///wAAAABKAAAAKP///wAAAABwAAAAJ////wD///8AAAAAgQAAABwAAACIAAAAkAAAAJMAAACtAAAAFQAAABUAAACtAAAAkwAAAJAAAACIAAAAHAAAAIH///8A////AAAAAKQAAACrAAAAaP///wD///8AAAAARQAAANIAAADSAAAARf///wD///8AAAAAaAAAAKsAAACk////AAAAADMAAACcAAAAnQAAABj///8A////AP///wAAAAAYAAAAGP///wD///8A////AAAAABgAAACdAAAAnAAAADMAAAB1AAAAwwAAAP8AAADpAAAAsQAAAE4AAAAb////AP///wAAAAAbAAAATgAAALEAAADpAAAA/wAAAMMAAAB1AAAAtwAAAOkAAAD/AAAA/wAAAP8AAADvAAAA3gAAAN4AAADeAAAA3gAAAO8AAAD/AAAA/wAAAP8AAADpAAAAtwAAAGUAAAA/AAAA3wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAAD/AAAA/wAAAP8AAADfAAAAPwAAAGX///8A////AAAAAEgAAADtAAAAvwAAAL0AAADGAAAA7wAAAO8AAADGAAAAvQAAAL8AAADtAAAASP///wD///8A////AP///wD///8AAAAAO////wD///8A////AAAAAIcAAACH////AP///wD///8AAAAAO////wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A////AP///wD///8A//8AAP//AAD4HwAA7/cAAN/7AAD//wAAoYUAAJ55AACf+QAAh+EAAAAAAADAAwAA4AcAAP5/AAD//wAA//8AAA==");
  739. margin-bottom: -5px; }
  740. span.pragmadots {
  741. /* Position: relative frees us up to make the dots
  742. look really nice without fucking up the layout and
  743. causing bulging in the parent container */
  744. position: relative;
  745. /* 1px down looks slightly nicer */
  746. top: 1px;
  747. padding: 2px;
  748. background-color: #e8e8e8;
  749. border-radius: 4px;
  750. margin: 0 2px;
  751. cursor: pointer;
  752. font-size: 0.8em;
  753. }
  754. span.pragmadots:hover {
  755. background-color: #DBDBDB;
  756. }
  757. span.pragmawrap {
  758. display: none;
  759. }
  760. </style>
  761. <script type="text/javascript" src="dochack.js"></script>
  762. <script type="text/javascript">
  763. function main() {
  764. var pragmaDots = document.getElementsByClassName("pragmadots");
  765. for (var i = 0; i < pragmaDots.length; i++) {
  766. pragmaDots[i].onclick = function(event) {
  767. // Hide tease
  768. event.target.parentNode.style.display = "none";
  769. // Show actual
  770. event.target.parentNode.nextElementSibling.style.display = "inline";
  771. }
  772. }
  773. }
  774. </script>
  775. </head>
  776. <body onload="main()">
  777. <div class="document" id="documentId">
  778. <div class="container">
  779. <h1 class="title">$title</h1>
  780. $content
  781. <div class="row">
  782. <div class="twelve-columns footer">
  783. <span class="nim-sprite"></span>
  784. <br/>
  785. <small>Made with Nim. Generated: $date $time UTC</small>
  786. </div>
  787. </div>
  788. </div>
  789. </div>
  790. $analytics
  791. </body>
  792. </html>
  793. """