| 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <title>⚡ Distribution Board Label Generator for DIN Rail Modules</title> |
| 5 | <style> |
| 6 | /* DIN Rail Modules are 17.5mm wide, but mounted with 18mm pitch to accomodate differences */ |
| 7 | |
| 8 | /* fonts */ |
| 9 | table,h1 { font-family: sans-serif; font-weight: normal; font-size: 3.8mm; line-height: 5.2mm; } |
| 10 | small { font-size: 2.5mm; line-height: 2.5mm; } |
| 11 | small small { font-size: 2mm; line-height: 1.9mm; } |
| 12 | a { color: dark-grey; text-decoration: none; } |
| 13 | |
| 14 | /* table */ |
| 15 | table { border-spacing:0px; border-collapse: collapse; } |
| 16 | tr { margin-bottom: 10mm; } |
| 17 | td * { display: block; } |
| 18 | td { |
| 19 | border: 1px solid black; width: 18mm; height: 16mm; |
| 20 | text-align: center; padding: 0; overflow: hidden; |
| 21 | display: flex-wrap; float: left; margin-bottom: 5mm; box-sizing: border-box; |
| 22 | justify-content: center; /* align-items: center; */ |
| 23 | white-space: pre-line; |
| 24 | position: relative; |
| 25 | } |
| 26 | td:not(:last-child) { border-right: 0px solid red; } |
| 27 | |
| 28 | /* wide modules */ |
| 29 | td[colspan="2" ] { width: calc(2 * 18mm); counter-increment: module_counter 2; } |
| 30 | td[colspan="3" ] { width: calc(3 * 18mm); counter-increment: module_counter 3; } |
| 31 | td[colspan="4" ] { width: calc(4 * 18mm); counter-increment: module_counter 4; } |
| 32 | td[colspan="5" ] { width: calc(5 * 18mm); counter-increment: module_counter 5; } |
| 33 | td[colspan="6" ] { width: calc(6 * 18mm); counter-increment: module_counter 6; } |
| 34 | td[colspan="7" ] { width: calc(7 * 18mm); counter-increment: module_counter 7; } |
| 35 | td[colspan="8" ] { width: calc(8 * 18mm); counter-increment: module_counter 8; } |
| 36 | td[colspan="9" ] { width: calc(9 * 18mm); counter-increment: module_counter 9; } |
| 37 | td[colspan="10"] { width: calc(10 * 18mm); counter-increment: module_counter 10; } |
| 38 | td[colspan="11"] { width: calc(11 * 18mm); counter-increment: module_counter 11; } |
| 39 | td[colspan="12"] { width: calc(12 * 18mm); counter-increment: module_counter 12; } |
| 40 | td[colspan="13"] { width: calc(13 * 18mm); counter-increment: module_counter 13; } |
| 41 | td[colspan="14"] { width: calc(14 * 18mm); counter-increment: module_counter 14; } |
| 42 | td[colspan="15"] { width: calc(15 * 18mm); counter-increment: module_counter 15; } |
| 43 | td[colspan="16"] { width: calc(16 * 18mm); counter-increment: module_counter 16; } |
| 44 | |
| 45 | /* indexing */ |
| 46 | tr { counter-reset: module_counter; } |
| 47 | td { counter-increment: module_counter 1; } |
| 48 | table.indexed * td::after { |
| 49 | content: counter(module_counter); |
| 50 | font-size: 1.8mm; line-height: 1.9mm; |
| 51 | top: 0px; |
| 52 | right: 0px; |
| 53 | position: absolute; |
| 54 | |
| 55 | padding: 0px 1px 2px 1px; |
| 56 | } |
| 57 | table.fancyindex * td::after { |
| 58 | background-color: black; color: white; |
| 59 | width: 1.2em; |
| 60 | border-bottom-left-radius: 5px; |
| 61 | } |
| 62 | |
| 63 | /* print layout */ |
| 64 | @media print { |
| 65 | * { print-color-adjust: exact; -webkit-print-color-adjust: exact; } |
| 66 | .noprint, .noprint * { display: none; } |
| 67 | @page { size: landscape; } |
| 68 | } |
| 69 | |
| 70 | </style> |
| 71 | </head> |
| 72 | <body> |
| 73 | <h1>Distribution Box Label Generator for DIN Rail Modules ( <a href="https://github.com/harvie">github.com/harvie</a> )</h1> |
| 74 | <div class="noprint">Copy-paste these icons:</div> |
| 75 | <!-- Power --> 🔌 ⚡ 💡 🔋 🔥 💧 |
| 76 | <!-- Telco --> 📡 🌐 📺 📞 🔔 📱 🔊 ☎️ |
| 77 | <!-- Danger --> ⚠ ⚠️ 🚨 💀 ☠️ ☠ |
| 78 | <!-- Home --> 🍽️ 🍴 🛏️ 🛀 🚽 🏠 🚗 |
| 79 | <!-- Work --> 🔧 🛠️ ⚙️ 🤖 🛗 🖥️ 🪛 |
| 80 | <!-- Elements --> 🌡️ 🕒 ⏰ 💨 ☀️ 🌒 🌙 🔆 🌞 ⏳ ⭐ ✨ 💫 ❄️ |
| 81 | <!-- Security --> 🔑 🔒 🔐 🛡️ ⚔️ |
| 82 | <!-- Multimedia --> 📹 📽️ 🎥 |
| 83 | <!-- Geometry --> ■ ▲ ● ◆ |
| 84 | <br /> |
| 85 | <div class="noprint"> |
| 86 | <textarea id="labeltext" style="width:100%; height: 20em;" oninput="document.getElementById('labeltable').innerHTML=document.getElementById('labeltext').value;"></textarea> |
| 87 | Use CTRL+S to save whole tool including your changes to your computer. CTRL+P to print.<br /> |
| 88 | <button onclick="document.getElementById('labeltable').innerHTML=document.getElementById('labeltext').value;">Generate</button> |
| 89 | <button onclick="window.print();return false;">Print</button> |
| 90 | </div> |
| 91 | <br /> |
| 92 | |
| 93 | <div id="labeltable"> |
| 94 | <table class=""> |
| 95 | |
| 96 | <tr> |
| 97 | <td></td> |
| 98 | <td>🔌<br />Living Room</td> |
| 99 | <td>🔌<br />Bedroom</td> |
| 100 | <td>💧<br />Washing Machine</td> |
| 101 | <td>💡<br />Hall Lights</td> |
| 102 | <td>💧<br />Kitchen Counter</td> |
| 103 | <td>💧<br />Dish Washer</td> |
| 104 | <td colspan=3>🔥<br />Kitchen Oven</td> |
| 105 | <td colspan=3>⚡<br />Surge Protector</td> |
| 106 | <td></td> |
| 107 | </tr> |
| 108 | |
| 109 | <tr> |
| 110 | <td></td> |
| 111 | <td>🔌<br />Obývák</td> |
| 112 | <td>🔌<br />Pokoje</td> |
| 113 | <td>💧<br />Koupelna Pračka</td> |
| 114 | <td></td> |
| 115 | <td>💧<br />Kuchyně Linka</td> |
| 116 | <td>💧<br />Kuchyně Myčka</td> |
| 117 | <td colspan=3>🔥<br />Kuchyně Sporák</td> |
| 118 | <td colspan=3>⚡<br />Svodič přepětí</td> |
| 119 | <td></td> |
| 120 | </tr> |
| 121 | |
| 122 | <tr> |
| 123 | <td></td> |
| 124 | <td></td> |
| 125 | <td>🔌<br />Vchod</td> |
| 126 | <td>🔌<br />Předsíň</td> |
| 127 | <td>🛠️<br />Režie</td> |
| 128 | <td>💡<br />Světla Kuchyně</td> |
| 129 | <td>💡<br />Světla Koupelna</td> |
| 130 | <td>💡<br />Světla Obývák</td> |
| 131 | <td>💡<br />Světla Pokoje</td> |
| 132 | <td>💡<br />Světla Předsíň</td> |
| 133 | <td colspan=3>💡<br />Světla Předsíň<br />Bezdrátové Relé</td> |
| 134 | <td></td> |
| 135 | </tr> |
| 136 | |
| 137 | </table> |
| 138 | |
| 139 | |
| 140 | |
| 141 | <table class="indexed"> |
| 142 | |
| 143 | <tr> |
| 144 | <td><small>Very long and tiny text that is really important to have on your breaker box!</small></td> |
| 145 | <td>Warning!<small><small>Very long and tiny text that is really important to have on your breaker box!</small></small></td> |
| 146 | <td><b>Bold</b> <i>Italic</i> <u>Under</u></td> |
| 147 | <td></td> |
| 148 | <td></td> |
| 149 | <td></td> |
| 150 | <td></td> |
| 151 | <td colspan="6">⚠️<br />Colspan is not breaking the numbering scheme</td> |
| 152 | <td></td> |
| 153 | </tr> |
| 154 | |
| 155 | <tr> |
| 156 | <td></td> |
| 157 | <td></td> |
| 158 | <td></td> |
| 159 | <td></td> |
| 160 | <td></td> |
| 161 | <td></td> |
| 162 | <td></td> |
| 163 | <td></td> |
| 164 | <td></td> |
| 165 | <td></td> |
| 166 | <td></td> |
| 167 | <td></td> |
| 168 | <td></td> |
| 169 | <td></td> |
| 170 | </tr> |
| 171 | |
| 172 | </table> |
| 173 | |
| 174 | |
| 175 | |
| 176 | <table class="indexed fancyindex"> |
| 177 | |
| 178 | <tr> |
| 179 | <td></td> |
| 180 | <td></td> |
| 181 | <td></td> |
| 182 | <td></td> |
| 183 | <td></td> |
| 184 | <td></td> |
| 185 | <td></td> |
| 186 | <td></td> |
| 187 | <td></td> |
| 188 | <td></td> |
| 189 | <td></td> |
| 190 | <td></td> |
| 191 | <td></td> |
| 192 | <td></td> |
| 193 | </tr> |
| 194 | |
| 195 | </table> |
| 196 | </div> |
| 197 | |
| 198 | <script>document.getElementById('labeltext').value=document.getElementById('labeltable').innerHTML.replace(/<.?tbody>/g, "").trim();</script> |
| 199 | |
| 200 | </body> |
| 201 | </html> |