| 1 | <!DOCTYPE html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta charset="UTF-8" /> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 6 | <meta name="robots" content="noindex"> |
| 7 | <title>Ix Language Manual</title> |
| 8 | {style} |
| 9 | </head> |
| 10 | <body> |
| 11 | <input type="checkbox" id="hidden-menu-checkbox" /> |
| 12 | <aside> |
| 13 | <div id="top-part"> |
| 14 | <label |
| 15 | id="menu-btn" |
| 16 | for="hidden-menu-checkbox" |
| 17 | aria-label="Toggle menu visibility" |
| 18 | > |
| 19 | <svg |
| 20 | xmlns="http://www.w3.org/2000/svg" |
| 21 | height="24px" |
| 22 | viewBox="0 -960 960 960" |
| 23 | width="24px" |
| 24 | fill="currentColor" |
| 25 | id="open" |
| 26 | > |
| 27 | <path |
| 28 | d="M120-240v-80h720v80H120Zm0-200v-80h720v80H120Zm0-200v-80h720v80H120Z" |
| 29 | /> |
| 30 | </svg> |
| 31 | <svg |
| 32 | xmlns="http://www.w3.org/2000/svg" |
| 33 | height="24px" |
| 34 | viewBox="0 -960 960 960" |
| 35 | width="24px" |
| 36 | fill="currentColor" |
| 37 | id="close" |
| 38 | > |
| 39 | <path |
| 40 | d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z" |
| 41 | /> |
| 42 | </svg> |
| 43 | <svg |
| 44 | id="chevron" |
| 45 | width="91" |
| 46 | height="8" |
| 47 | viewBox="0 0 91 8" |
| 48 | fill="none" |
| 49 | xmlns="http://www.w3.org/2000/svg" |
| 50 | > |
| 51 | <path |
| 52 | d="M2 6L45.5714 2L89.1429 6" |
| 53 | stroke="currentColor" |
| 54 | stroke-width="3" |
| 55 | stroke-linecap="square" |
| 56 | /> |
| 57 | </svg> |
| 58 | </label> |
| 59 | </div> |
| 60 | |
| 61 | <div id="sidebar-content"> |
| 62 | <nav> |
| 63 | <header><a href="#top">{nav_h1}</a></header> |
| 64 | {navigation} |
| 65 | </nav> |
| 66 | |
| 67 | <ul id="links"> |
| 68 | <li> |
| 69 | <a href="{repository}" target="_blank" rel="noopener noreferrer"> |
| 70 | GitHub |
| 71 | </a> |
| 72 | </li> |
| 73 | </ul> |
| 74 | </div> |
| 75 | |
| 76 | <label id="clickable-background" for="hidden-menu-checkbox"></label> |
| 77 | </aside> |
| 78 | <div class="aside-spacer"></div> |
| 79 | <main id="main"> |
| 80 | {contents} |
| 81 | </main> |
| 82 | <script type="text/javascript"> |
| 83 | const checkbox = document.getElementById("hidden-menu-checkbox"); |
| 84 | const sidebar = document.getElementById("sidebar-content"); |
| 85 | const sidebarLinks = sidebar.querySelectorAll("a"); |
| 86 | |
| 87 | sidebarLinks.forEach((link) => { |
| 88 | link.addEventListener("click", () => { |
| 89 | checkbox.checked = false; |
| 90 | }); |
| 91 | }); |
| 92 | |
| 93 | addEventListener("keydown", (ev) => { |
| 94 | if (ev.key === "Escape" && checkbox.checked) { |
| 95 | checkbox.checked = false; |
| 96 | } |
| 97 | }); |
| 98 | |
| 99 | const copyButtons = document.querySelectorAll(".copy-button"); |
| 100 | |
| 101 | copyButtons.forEach((button) => { |
| 102 | button.addEventListener("click", () => { |
| 103 | const code = button.parentElement.querySelector("code"); |
| 104 | navigator.clipboard.writeText(code.innerText); |
| 105 | const copySvg = button.children[0]; |
| 106 | const checkSvg = button.children[1]; |
| 107 | copySvg.classList.add('hidden'); |
| 108 | checkSvg.classList.remove('hidden'); |
| 109 | setTimeout(() => { |
| 110 | copySvg.classList.remove('hidden'); |
| 111 | checkSvg.classList.add('hidden'); |
| 112 | }, 1000); |
| 113 | }); |
| 114 | }); |
| 115 | </script> |
| 116 | </body> |
| 117 | </html> |