index.hbs 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326
  1. <!DOCTYPE HTML>
  2. <html lang="{{ language }}" class="sidebar-visible no-js {{ default_theme }}">
  3. <head>
  4. <!-- Book generated using mdBook -->
  5. <meta charset="UTF-8">
  6. <title>{{ title }}</title>
  7. {{#if is_print }}
  8. <meta name="robots" content="noindex" />
  9. {{/if}}
  10. {{#if base_url}}
  11. <base href="{{ base_url }}">
  12. {{/if}}
  13. <!-- Custom HTML head -->
  14. {{> head}}
  15. <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  16. <meta name="description" content="{{ description }}">
  17. <meta name="viewport" content="width=device-width, initial-scale=1">
  18. <meta name="theme-color" content="#ffffff" />
  19. {{#if favicon_svg}}
  20. <link rel="icon" href="{{ path_to_root }}favicon.svg">
  21. {{/if}}
  22. {{#if favicon_png}}
  23. <link rel="shortcut icon" href="{{ path_to_root }}favicon.png">
  24. {{/if}}
  25. <link rel="stylesheet" href="{{ path_to_root }}css/variables.css">
  26. <link rel="stylesheet" href="{{ path_to_root }}css/general.css">
  27. <link rel="stylesheet" href="{{ path_to_root }}css/chrome.css">
  28. {{#if print_enable}}
  29. <link rel="stylesheet" href="{{ path_to_root }}css/print.css" media="print">
  30. {{/if}}
  31. <!-- Fonts -->
  32. <link rel="stylesheet" href="{{ path_to_root }}FontAwesome/css/font-awesome.css">
  33. {{#if copy_fonts}}
  34. <link rel="stylesheet" href="{{ path_to_root }}fonts/fonts.css">
  35. {{/if}}
  36. <!-- Highlight.js Stylesheets -->
  37. <link rel="stylesheet" href="{{ path_to_root }}highlight.css">
  38. <link rel="stylesheet" href="{{ path_to_root }}tomorrow-night.css">
  39. <link rel="stylesheet" href="{{ path_to_root }}ayu-highlight.css">
  40. <!-- Custom theme stylesheets -->
  41. {{#each additional_css}}
  42. <link rel="stylesheet" href="{{ ../path_to_root }}{{ this }}">
  43. {{/each}}
  44. {{#if mathjax_support}}
  45. <!-- MathJax -->
  46. <script async type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
  47. {{/if}}
  48. </head>
  49. <body>
  50. <!-- Provide site root to javascript -->
  51. <script type="text/javascript">
  52. var path_to_root = "{{ path_to_root }}";
  53. var default_theme = window.matchMedia("(prefers-color-scheme: dark)").matches ? "{{ preferred_dark_theme }}" : "{{ default_theme }}";
  54. </script>
  55. <!-- Work around some values being stored in localStorage wrapped in quotes -->
  56. <script type="text/javascript">
  57. try {
  58. var theme = localStorage.getItem('mdbook-theme');
  59. var sidebar = localStorage.getItem('mdbook-sidebar');
  60. if (theme.startsWith('"') && theme.endsWith('"')) {
  61. localStorage.setItem('mdbook-theme', theme.slice(1, theme.length - 1));
  62. }
  63. if (sidebar.startsWith('"') && sidebar.endsWith('"')) {
  64. localStorage.setItem('mdbook-sidebar', sidebar.slice(1, sidebar.length - 1));
  65. }
  66. } catch (e) { }
  67. </script>
  68. <!-- Set the theme before any content is loaded, prevents flash -->
  69. <script type="text/javascript">
  70. var theme;
  71. try { theme = localStorage.getItem('mdbook-theme'); } catch(e) { }
  72. if (theme === null || theme === undefined) { theme = default_theme; }
  73. var html = document.querySelector('html');
  74. html.classList.remove('no-js')
  75. html.classList.remove('{{ default_theme }}')
  76. html.classList.add(theme);
  77. html.classList.add('js');
  78. </script>
  79. <!-- Hide / unhide sidebar before it is displayed -->
  80. <script type="text/javascript">
  81. var html = document.querySelector('html');
  82. var sidebar = 'hidden';
  83. if (document.body.clientWidth >= 1080) {
  84. try { sidebar = localStorage.getItem('mdbook-sidebar'); } catch(e) { }
  85. sidebar = sidebar || 'visible';
  86. }
  87. html.classList.remove('sidebar-visible');
  88. html.classList.add("sidebar-" + sidebar);
  89. </script>
  90. <nav id="sidebar" class="sidebar" aria-label="Table of contents">
  91. <div class="sidebar-scrollbox">
  92. {{#toc}}{{/toc}}
  93. </div>
  94. <div id="sidebar-resize-handle" class="sidebar-resize-handle"></div>
  95. </nav>
  96. <div id="page-wrapper" class="page-wrapper">
  97. <div class="page">
  98. {{> header}}
  99. <div id="menu-bar-hover-placeholder"></div>
  100. <div id="menu-bar" class="menu-bar sticky bordered">
  101. <div class="left-buttons">
  102. <button id="sidebar-toggle" class="icon-button" type="button" title="Alternar índice general" aria-label="Alternar índice general" aria-controls="sidebar">
  103. <i class="fa fa-bars"></i>
  104. </button>
  105. <button id="theme-toggle" class="icon-button" type="button" title="Cambiar tema" aria-label="Cambiar tema" aria-haspopup="true" aria-expanded="false" aria-controls="theme-list">
  106. <i class="fa fa-paint-brush"></i>
  107. </button>
  108. <ul id="theme-list" class="popup" aria-label="Temas" role="menu">
  109. <li role="none"><button role="menuitem" class="item" data-value="light">{{ theme_option "Light" }}</button></li>
  110. <li role="none"><button role="menuitem" class="item" data-value="rust">{{ theme_option "Rust" }}</button></li>
  111. <li role="none"><button role="menuitem" class="item" data-value="coal">{{ theme_option "Coal" }}</button></li>
  112. <li role="none"><button role="menuitem" class="item" data-value="navy">{{ theme_option "Navy" }}</button></li>
  113. <li role="none"><button role="menuitem" class="item" data-value="ayu">{{ theme_option "Ayu" }}</button></li>
  114. </ul>
  115. <button id="font-size-toggle" class="icon-button" type="button" title="Cambiar tamaño de letra" aria-label="Cambiar tamaño de letra" aria-haspopup="true" aria-expanded="false" aria-controls="font-size-list">
  116. <i class="fa fa-text-height"></i>
  117. </button>
  118. <ul id="font-size-list" class="popup" aria-label="Tamaños de fuente" role="menu">
  119. <li role="none"><button role="menuitem" class="item" data-value="10pt">10pt</button></li>
  120. <li role="none"><button role="menuitem" class="item" data-value="12pt">12pt</button></li>
  121. <li role="none"><button role="menuitem" class="item" data-value="16pt">16pt</button></li>
  122. <li role="none"><button role="menuitem" class="item" data-value="20pt">20pt</button></li>
  123. <li role="none"><button role="menuitem" class="item" data-value="24pt">24pt</button></li>
  124. </ul>
  125. <button id="font-family-toggle" class="icon-button" type="button" title="Cambiar fuente" aria-label="Cambiar fuente" aria-haspopup="true" aria-expanded="false" aria-controls="font-family-list">
  126. <i class="fa fa-font"></i>
  127. </button>
  128. <ul id="font-family-list" class="popup" aria-label="Fuentes" role="menu">
  129. <li role="none"><button role="menuitem" class="item" data-value="Inconsolata">Inconsolata</button></li>
  130. <li role="none"><button role="menuitem" class="item" data-value="Open Sans">Open Sans</button></li>
  131. <li role="none"><button role="menuitem" class="item" data-value="Merriweather">Merriweather</button></li>
  132. <li role="none"><button role="menuitem" class="item" data-value="Roboto">Roboto</button></li>
  133. <li role="none"><button role="menuitem" class="item" data-value="Roboto Slab">Roboto Slab</button></li>
  134. </ul>
  135. {{#if search_enabled}}
  136. <button id="search-toggle" class="icon-button" type="button" title="Search. (Shortkey: s)" aria-label="Toggle Searchbar" aria-expanded="false" aria-keyshortcuts="S" aria-controls="searchbar">
  137. <i class="fa fa-search"></i>
  138. </button>
  139. {{/if}}
  140. </div>
  141. <h1 class="menu-title">{{ book_title }}</h1>
  142. <div class="right-buttons">
  143. {{#if print_enable}}
  144. <a href="{{ path_to_root }}print.html" title="Print this book" aria-label="Print this book">
  145. <i id="print-button" class="fa fa-print"></i>
  146. </a>
  147. {{/if}}
  148. {{#if git_repository_url}}
  149. <a href="{{ git_repository_url }}.epub" title="Libro en formato EPUB (para lectores digitales)" aria-label="Libro en formato EPUB (para lectores digitales)">
  150. <i id="epub-button" class="fa fa-book"></i>
  151. </a>
  152. <a href="{{ git_repository_url }}.pdf" title="Libro en formato PDF (para imprimir)" aria-label="Libro en formato PDF (para imprimir)">
  153. <i id="pdf-button" class="fa fa-print"></i>
  154. </a>
  155. {{/if}}
  156. </div>
  157. </div>
  158. {{#if search_enabled}}
  159. <div id="search-wrapper" class="hidden">
  160. <form id="searchbar-outer" class="searchbar-outer">
  161. <input type="search" name="search" id="searchbar" name="searchbar" placeholder="Buscar en este libro..." aria-controls="searchresults-outer" aria-describedby="searchresults-header">
  162. </form>
  163. <div id="searchresults-outer" class="searchresults-outer hidden">
  164. <div id="searchresults-header" class="searchresults-header"></div>
  165. <ul id="searchresults">
  166. </ul>
  167. </div>
  168. </div>
  169. {{/if}}
  170. <!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
  171. <script type="text/javascript">
  172. document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
  173. document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
  174. Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
  175. link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);
  176. });
  177. </script>
  178. <div id="content" class="content">
  179. <main>
  180. {{{ content }}}
  181. </main>
  182. <nav class="nav-wrapper" aria-label="Navegación de los capítulos">
  183. <!-- Mobile navigation buttons -->
  184. {{#previous}}
  185. <a rel="prev" href="{{ path_to_root }}{{link}}" class="mobile-nav-chapters previous" title="Capítulo previo" aria-label="Capítulo previo" aria-keyshortcuts="Izquierda">
  186. <i class="fa fa-angle-left"></i>
  187. </a>
  188. {{/previous}}
  189. {{#next}}
  190. <a rel="next" href="{{ path_to_root }}{{link}}" class="mobile-nav-chapters next" title="Capítulo siguiente" aria-label="Capítulo siguiente" aria-keyshortcuts="Derecha">
  191. <i class="fa fa-angle-right"></i>
  192. </a>
  193. {{/next}}
  194. <div style="clear: both"></div>
  195. </nav>
  196. </div>
  197. </div>
  198. <nav class="nav-wide-wrapper" aria-label="Navegación de la página">
  199. <button type="button" rel="prev" href="#" class="nav-page previous" title="Página anterior" aria-label="Página anterior">
  200. <i class="fa fa-angle-left"></i>
  201. </button>
  202. <button type="button" rel="next" class="nav-page next" title="Página siguiente" aria-label="Página siguiente">
  203. <i class="fa fa-angle-right"></i>
  204. </button>
  205. </nav>
  206. </div>
  207. {{#if livereload}}
  208. <!-- Livereload script (if served using the cli tool) -->
  209. <script type="text/javascript">
  210. var socket = new WebSocket("{{{livereload}}}");
  211. socket.onmessage = function (event) {
  212. if (event.data === "reload") {
  213. socket.close();
  214. location.reload();
  215. }
  216. };
  217. window.onbeforeunload = function() {
  218. socket.close();
  219. }
  220. </script>
  221. {{/if}}
  222. {{#if google_analytics}}
  223. <!-- Google Analytics Tag -->
  224. <script type="text/javascript">
  225. var localAddrs = ["localhost", "127.0.0.1", ""];
  226. // make sure we don't activate google analytics if the developer is
  227. // inspecting the book locally...
  228. if (localAddrs.indexOf(document.location.hostname) === -1) {
  229. (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  230. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  231. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  232. })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
  233. ga('create', '{{google_analytics}}', 'auto');
  234. ga('send', 'pageview');
  235. }
  236. </script>
  237. {{/if}}
  238. {{#if playground_line_numbers}}
  239. <script type="text/javascript">
  240. window.playground_line_numbers = true;
  241. </script>
  242. {{/if}}
  243. {{#if playground_copyable}}
  244. <script type="text/javascript">
  245. window.playground_copyable = true;
  246. </script>
  247. {{/if}}
  248. {{#if playground_js}}
  249. <script src="{{ path_to_root }}ace.js" type="text/javascript" charset="utf-8"></script>
  250. <script src="{{ path_to_root }}editor.js" type="text/javascript" charset="utf-8"></script>
  251. <script src="{{ path_to_root }}mode-rust.js" type="text/javascript" charset="utf-8"></script>
  252. <script src="{{ path_to_root }}theme-dawn.js" type="text/javascript" charset="utf-8"></script>
  253. <script src="{{ path_to_root }}theme-tomorrow_night.js" type="text/javascript" charset="utf-8"></script>
  254. {{/if}}
  255. {{#if search_js}}
  256. <script src="{{ path_to_root }}elasticlunr.min.js" type="text/javascript" charset="utf-8"></script>
  257. <script src="{{ path_to_root }}mark.min.js" type="text/javascript" charset="utf-8"></script>
  258. <script src="{{ path_to_root }}searcher.js" type="text/javascript" charset="utf-8"></script>
  259. {{/if}}
  260. <script src="{{ path_to_root }}clipboard.min.js" type="text/javascript" charset="utf-8"></script>
  261. <script src="{{ path_to_root }}highlight.js" type="text/javascript" charset="utf-8"></script>
  262. <script src="{{ path_to_root }}book.js" type="text/javascript" charset="utf-8"></script>
  263. <!-- Custom JS scripts -->
  264. {{#each additional_js}}
  265. <script type="text/javascript" src="{{ ../path_to_root }}{{this}}"></script>
  266. {{/each}}
  267. {{#if is_print}}
  268. {{#if mathjax_support}}
  269. <script type="text/javascript">
  270. window.addEventListener('load', function() {
  271. MathJax.Hub.Register.StartupHook('End', function() {
  272. window.setTimeout(window.print, 100);
  273. });
  274. });
  275. </script>
  276. {{else}}
  277. <script type="text/javascript">
  278. window.addEventListener('load', function() {
  279. window.setTimeout(window.print, 100);
  280. });
  281. </script>
  282. {{/if}}
  283. {{/if}}
  284. </body>
  285. </html>