├── .gitignore ├── README.md ├── assets ├── .DS_Store ├── css │ └── styles.css └── fonts │ ├── Archivo_Black │ ├── ArchivoBlack-Regular.ttf │ └── OFL.txt │ └── Fira_Sans │ ├── FiraSans-Black.ttf │ ├── FiraSans-BlackItalic.ttf │ ├── FiraSans-Bold.ttf │ ├── FiraSans-BoldItalic.ttf │ ├── FiraSans-ExtraBold.ttf │ ├── FiraSans-ExtraBoldItalic.ttf │ ├── FiraSans-ExtraLight.ttf │ ├── FiraSans-ExtraLightItalic.ttf │ ├── FiraSans-Italic.ttf │ ├── FiraSans-Light.ttf │ ├── FiraSans-LightItalic.ttf │ ├── FiraSans-Medium.ttf │ ├── FiraSans-MediumItalic.ttf │ ├── FiraSans-Regular.ttf │ ├── FiraSans-SemiBold.ttf │ ├── FiraSans-SemiBoldItalic.ttf │ ├── FiraSans-Thin.ttf │ ├── FiraSans-ThinItalic.ttf │ └── OFL.txt ├── custom-bingo.html ├── customsheet.html ├── index.html └── main.js /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # BahnBingo 2 | Random Bingo Sheet for DB delays 3 | -------------------------------------------------------------------------------- /assets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DasUnicorn/BahnBingo/49513bb530d65869e0db00fb649b7ad8f7cd994c/assets/.DS_Store -------------------------------------------------------------------------------- /assets/css/styles.css: -------------------------------------------------------------------------------- 1 | /* Custom Values */ 2 | :root { 3 | --color-background: #ffffff; 4 | --color-text: #000000; 5 | --color-button: #ea0116; 6 | --color-highlight: #ea0116; 7 | --color-success: #63a615; 8 | 9 | --font-size-small: 1rem; 10 | --font-size-medium: 1.5em; 11 | --font-size-large: 3em; 12 | --font-size-xxlarge: 4em; 13 | --font-size-huge: 7em; 14 | } 15 | 16 | /* Set defaults */ 17 | 18 | body { 19 | box-sizing: content-box; 20 | margin: 0px 0px 0px 0px; 21 | display: flex; 22 | min-height: 100vh; 23 | flex-direction: column; 24 | align-items: center; 25 | } 26 | 27 | /* Fonts */ 28 | 29 | @font-face { 30 | font-family: "Fira Regular"; 31 | src: url("../fonts/Fira_Sans/FiraSans-Regular.ttf") format("truetype"); 32 | font-display: swap; 33 | } 34 | 35 | @font-face { 36 | font-family: "Fira Bold"; 37 | src: url("../fonts/Fira_Sans/FiraSans-Bold.ttf") format("truetype"); 38 | font-display: swap; 39 | } 40 | 41 | @font-face { 42 | font-family: "Archivo Black"; 43 | src: url("../fonts/Archivo_Black/ArchivoBlack-Regular.ttf") format("truetype"); 44 | font-display: swap; 45 | } 46 | 47 | /* Text Fonts */ 48 | p, 49 | label { 50 | font-family: "Fira Regular", "Courier New", monospace; 51 | font-size: var(--font-size-small); 52 | color: var(--color-text); 53 | text-align: center; 54 | margin: 8px; 55 | } 56 | 57 | a { 58 | font-family: "Fira Regular", "Courier New", monospace; 59 | color: var(--color-text); 60 | } 61 | 62 | button, 63 | input, 64 | select, 65 | textarea { 66 | font-family: "Fira Regular", "Courier New", monospace; 67 | font-size: 100%; 68 | width: 150px; 69 | padding: 0; 70 | margin: 0; 71 | box-sizing: border-box; 72 | } 73 | 74 | select { 75 | border: 2px solid --color-background; 76 | } 77 | 78 | .button { 79 | font-family: "Fira Regular", "Courier New", monospace; 80 | font-size: var(--font-size-small); 81 | margin: 10px; 82 | color: var(--color-background); 83 | background-color: black; 84 | border: solid black; 85 | padding: 10px 20px; 86 | border-radius: 25px; 87 | letter-spacing: 0.05em; 88 | text-align: center; 89 | text-decoration: none; /*fallback for iOS*/ 90 | text-decoration: transparent; 91 | } 92 | 93 | /* Headings */ 94 | 95 | h1, 96 | h2, 97 | h3 { 98 | font-family: "Archivo Black", Times, serif; 99 | font-size: var(--font-size-large); 100 | color: var(--color-text); 101 | } 102 | 103 | h1 { 104 | text-transform: uppercase; 105 | } 106 | 107 | h2, 108 | h3 { 109 | font-size: var(--font-size-medium); 110 | } 111 | 112 | @media (max-width: 620px) { 113 | h1 { 114 | font-size: var(--font-size-medium); 115 | padding-top: 10px; 116 | } 117 | } 118 | 119 | /* Text Highlight */ 120 | 121 | .highlight { 122 | color: var(--color-highlight); 123 | border: solid #000000; 124 | background-color: var(--color-background); 125 | border-radius: 20px; 126 | padding: 10px; 127 | margin-right: 10px; 128 | } 129 | 130 | footer { 131 | font-family: "Fira Regular", "Courier New", monospace; 132 | font-size: var(--font-size-small); 133 | color: var(--color-text); 134 | padding: 12px; 135 | } 136 | 137 | .main { 138 | display: flex; 139 | flex: 1; 140 | flex-direction: column; 141 | align-items: center; 142 | } 143 | 144 | .container { 145 | display: flex; 146 | align-items: center; 147 | justify-content: center; 148 | flex-direction: column; 149 | width: 100%; 150 | padding: 10px 0px; 151 | max-width: 770px; 152 | } 153 | 154 | .selection-container { 155 | width: 100%; 156 | } 157 | 158 | table { 159 | table-layout: fixed; 160 | width: 100%; 161 | border-collapse: collapse; 162 | } 163 | 164 | td, 165 | th { 166 | border: 1px solid black; 167 | text-align: center; 168 | padding: 10px; 169 | height: 150px; 170 | width: 150px; 171 | } 172 | 173 | .row { 174 | display: flex; 175 | flex-direction: row; 176 | } 177 | 178 | .joker { 179 | background-color: var(--color-text); 180 | color: var(--color-background); 181 | } 182 | 183 | .joker-text { 184 | color: var(--color-background); 185 | } 186 | 187 | /* Highlights after click */ 188 | .selected { 189 | background-color: #ffb2b2; 190 | } 191 | 192 | @media (max-width: 864px) { 193 | .bingo-board { 194 | width: 100%; 195 | } 196 | 197 | td, 198 | th { 199 | height: 25vw; 200 | width: 25%; 201 | padding: 0px; 202 | overflow-wrap: break-word; 203 | } 204 | } 205 | 206 | @media (max-width: 620px) { 207 | .box-text { 208 | font-size: xx-small; 209 | margin: 1px; 210 | } 211 | 212 | .button { 213 | font-size: x-small; 214 | } 215 | } 216 | -------------------------------------------------------------------------------- /assets/fonts/Archivo_Black/ArchivoBlack-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DasUnicorn/BahnBingo/49513bb530d65869e0db00fb649b7ad8f7cd994c/assets/fonts/Archivo_Black/ArchivoBlack-Regular.ttf -------------------------------------------------------------------------------- /assets/fonts/Archivo_Black/OFL.txt: -------------------------------------------------------------------------------- 1 | Copyright 2017 The Archivo Black Project Authors (https://github.com/Omnibus-Type/ArchivoBlack) 2 | 3 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 4 | This license is copied below, and is also available with a FAQ at: 5 | http://scripts.sil.org/OFL 6 | 7 | 8 | ----------------------------------------------------------- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | ----------------------------------------------------------- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide 14 | development of collaborative font projects, to support the font creation 15 | efforts of academic and linguistic communities, and to provide a free and 16 | open framework in which fonts may be shared and improved in partnership 17 | with others. 18 | 19 | The OFL allows the licensed fonts to be used, studied, modified and 20 | redistributed freely as long as they are not sold by themselves. The 21 | fonts, including any derivative works, can be bundled, embedded, 22 | redistributed and/or sold with any software provided that any reserved 23 | names are not used by derivative works. The fonts and derivatives, 24 | however, cannot be released under any other type of license. The 25 | requirement for fonts to remain under this license does not apply 26 | to any document created using the fonts or their derivatives. 27 | 28 | DEFINITIONS 29 | "Font Software" refers to the set of files released by the Copyright 30 | Holder(s) under this license and clearly marked as such. This may 31 | include source files, build scripts and documentation. 32 | 33 | "Reserved Font Name" refers to any names specified as such after the 34 | copyright statement(s). 35 | 36 | "Original Version" refers to the collection of Font Software components as 37 | distributed by the Copyright Holder(s). 38 | 39 | "Modified Version" refers to any derivative made by adding to, deleting, 40 | or substituting -- in part or in whole -- any of the components of the 41 | Original Version, by changing formats or by porting the Font Software to a 42 | new environment. 43 | 44 | "Author" refers to any designer, engineer, programmer, technical 45 | writer or other person who contributed to the Font Software. 46 | 47 | PERMISSION & CONDITIONS 48 | Permission is hereby granted, free of charge, to any person obtaining 49 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 50 | redistribute, and sell modified and unmodified copies of the Font 51 | Software, subject to the following conditions: 52 | 53 | 1) Neither the Font Software nor any of its individual components, 54 | in Original or Modified Versions, may be sold by itself. 55 | 56 | 2) Original or Modified Versions of the Font Software may be bundled, 57 | redistributed and/or sold with any software, provided that each copy 58 | contains the above copyright notice and this license. These can be 59 | included either as stand-alone text files, human-readable headers or 60 | in the appropriate machine-readable metadata fields within text or 61 | binary files as long as those fields can be easily viewed by the user. 62 | 63 | 3) No Modified Version of the Font Software may use the Reserved Font 64 | Name(s) unless explicit written permission is granted by the corresponding 65 | Copyright Holder. This restriction only applies to the primary font name as 66 | presented to the users. 67 | 68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 69 | Software shall not be used to promote, endorse or advertise any 70 | Modified Version, except to acknowledge the contribution(s) of the 71 | Copyright Holder(s) and the Author(s) or with their explicit written 72 | permission. 73 | 74 | 5) The Font Software, modified or unmodified, in part or in whole, 75 | must be distributed entirely under this license, and must not be 76 | distributed under any other license. The requirement for fonts to 77 | remain under this license does not apply to any document created 78 | using the Font Software. 79 | 80 | TERMINATION 81 | This license becomes null and void if any of the above conditions are 82 | not met. 83 | 84 | DISCLAIMER 85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 93 | OTHER DEALINGS IN THE FONT SOFTWARE. 94 | -------------------------------------------------------------------------------- /assets/fonts/Fira_Sans/FiraSans-Black.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DasUnicorn/BahnBingo/49513bb530d65869e0db00fb649b7ad8f7cd994c/assets/fonts/Fira_Sans/FiraSans-Black.ttf -------------------------------------------------------------------------------- /assets/fonts/Fira_Sans/FiraSans-BlackItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DasUnicorn/BahnBingo/49513bb530d65869e0db00fb649b7ad8f7cd994c/assets/fonts/Fira_Sans/FiraSans-BlackItalic.ttf -------------------------------------------------------------------------------- /assets/fonts/Fira_Sans/FiraSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DasUnicorn/BahnBingo/49513bb530d65869e0db00fb649b7ad8f7cd994c/assets/fonts/Fira_Sans/FiraSans-Bold.ttf -------------------------------------------------------------------------------- /assets/fonts/Fira_Sans/FiraSans-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DasUnicorn/BahnBingo/49513bb530d65869e0db00fb649b7ad8f7cd994c/assets/fonts/Fira_Sans/FiraSans-BoldItalic.ttf -------------------------------------------------------------------------------- /assets/fonts/Fira_Sans/FiraSans-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DasUnicorn/BahnBingo/49513bb530d65869e0db00fb649b7ad8f7cd994c/assets/fonts/Fira_Sans/FiraSans-ExtraBold.ttf -------------------------------------------------------------------------------- /assets/fonts/Fira_Sans/FiraSans-ExtraBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DasUnicorn/BahnBingo/49513bb530d65869e0db00fb649b7ad8f7cd994c/assets/fonts/Fira_Sans/FiraSans-ExtraBoldItalic.ttf -------------------------------------------------------------------------------- /assets/fonts/Fira_Sans/FiraSans-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DasUnicorn/BahnBingo/49513bb530d65869e0db00fb649b7ad8f7cd994c/assets/fonts/Fira_Sans/FiraSans-ExtraLight.ttf -------------------------------------------------------------------------------- /assets/fonts/Fira_Sans/FiraSans-ExtraLightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DasUnicorn/BahnBingo/49513bb530d65869e0db00fb649b7ad8f7cd994c/assets/fonts/Fira_Sans/FiraSans-ExtraLightItalic.ttf -------------------------------------------------------------------------------- /assets/fonts/Fira_Sans/FiraSans-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DasUnicorn/BahnBingo/49513bb530d65869e0db00fb649b7ad8f7cd994c/assets/fonts/Fira_Sans/FiraSans-Italic.ttf -------------------------------------------------------------------------------- /assets/fonts/Fira_Sans/FiraSans-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DasUnicorn/BahnBingo/49513bb530d65869e0db00fb649b7ad8f7cd994c/assets/fonts/Fira_Sans/FiraSans-Light.ttf -------------------------------------------------------------------------------- /assets/fonts/Fira_Sans/FiraSans-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DasUnicorn/BahnBingo/49513bb530d65869e0db00fb649b7ad8f7cd994c/assets/fonts/Fira_Sans/FiraSans-LightItalic.ttf -------------------------------------------------------------------------------- /assets/fonts/Fira_Sans/FiraSans-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DasUnicorn/BahnBingo/49513bb530d65869e0db00fb649b7ad8f7cd994c/assets/fonts/Fira_Sans/FiraSans-Medium.ttf -------------------------------------------------------------------------------- /assets/fonts/Fira_Sans/FiraSans-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DasUnicorn/BahnBingo/49513bb530d65869e0db00fb649b7ad8f7cd994c/assets/fonts/Fira_Sans/FiraSans-MediumItalic.ttf -------------------------------------------------------------------------------- /assets/fonts/Fira_Sans/FiraSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DasUnicorn/BahnBingo/49513bb530d65869e0db00fb649b7ad8f7cd994c/assets/fonts/Fira_Sans/FiraSans-Regular.ttf -------------------------------------------------------------------------------- /assets/fonts/Fira_Sans/FiraSans-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DasUnicorn/BahnBingo/49513bb530d65869e0db00fb649b7ad8f7cd994c/assets/fonts/Fira_Sans/FiraSans-SemiBold.ttf -------------------------------------------------------------------------------- /assets/fonts/Fira_Sans/FiraSans-SemiBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DasUnicorn/BahnBingo/49513bb530d65869e0db00fb649b7ad8f7cd994c/assets/fonts/Fira_Sans/FiraSans-SemiBoldItalic.ttf -------------------------------------------------------------------------------- /assets/fonts/Fira_Sans/FiraSans-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DasUnicorn/BahnBingo/49513bb530d65869e0db00fb649b7ad8f7cd994c/assets/fonts/Fira_Sans/FiraSans-Thin.ttf -------------------------------------------------------------------------------- /assets/fonts/Fira_Sans/FiraSans-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DasUnicorn/BahnBingo/49513bb530d65869e0db00fb649b7ad8f7cd994c/assets/fonts/Fira_Sans/FiraSans-ThinItalic.ttf -------------------------------------------------------------------------------- /assets/fonts/Fira_Sans/OFL.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012-2015, The Mozilla Foundation and Telefonica S.A. 2 | 3 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 4 | This license is copied below, and is also available with a FAQ at: 5 | http://scripts.sil.org/OFL 6 | 7 | 8 | ----------------------------------------------------------- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | ----------------------------------------------------------- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide 14 | development of collaborative font projects, to support the font creation 15 | efforts of academic and linguistic communities, and to provide a free and 16 | open framework in which fonts may be shared and improved in partnership 17 | with others. 18 | 19 | The OFL allows the licensed fonts to be used, studied, modified and 20 | redistributed freely as long as they are not sold by themselves. The 21 | fonts, including any derivative works, can be bundled, embedded, 22 | redistributed and/or sold with any software provided that any reserved 23 | names are not used by derivative works. The fonts and derivatives, 24 | however, cannot be released under any other type of license. The 25 | requirement for fonts to remain under this license does not apply 26 | to any document created using the fonts or their derivatives. 27 | 28 | DEFINITIONS 29 | "Font Software" refers to the set of files released by the Copyright 30 | Holder(s) under this license and clearly marked as such. This may 31 | include source files, build scripts and documentation. 32 | 33 | "Reserved Font Name" refers to any names specified as such after the 34 | copyright statement(s). 35 | 36 | "Original Version" refers to the collection of Font Software components as 37 | distributed by the Copyright Holder(s). 38 | 39 | "Modified Version" refers to any derivative made by adding to, deleting, 40 | or substituting -- in part or in whole -- any of the components of the 41 | Original Version, by changing formats or by porting the Font Software to a 42 | new environment. 43 | 44 | "Author" refers to any designer, engineer, programmer, technical 45 | writer or other person who contributed to the Font Software. 46 | 47 | PERMISSION & CONDITIONS 48 | Permission is hereby granted, free of charge, to any person obtaining 49 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 50 | redistribute, and sell modified and unmodified copies of the Font 51 | Software, subject to the following conditions: 52 | 53 | 1) Neither the Font Software nor any of its individual components, 54 | in Original or Modified Versions, may be sold by itself. 55 | 56 | 2) Original or Modified Versions of the Font Software may be bundled, 57 | redistributed and/or sold with any software, provided that each copy 58 | contains the above copyright notice and this license. These can be 59 | included either as stand-alone text files, human-readable headers or 60 | in the appropriate machine-readable metadata fields within text or 61 | binary files as long as those fields can be easily viewed by the user. 62 | 63 | 3) No Modified Version of the Font Software may use the Reserved Font 64 | Name(s) unless explicit written permission is granted by the corresponding 65 | Copyright Holder. This restriction only applies to the primary font name as 66 | presented to the users. 67 | 68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 69 | Software shall not be used to promote, endorse or advertise any 70 | Modified Version, except to acknowledge the contribution(s) of the 71 | Copyright Holder(s) and the Author(s) or with their explicit written 72 | permission. 73 | 74 | 5) The Font Software, modified or unmodified, in part or in whole, 75 | must be distributed entirely under this license, and must not be 76 | distributed under any other license. The requirement for fonts to 77 | remain under this license does not apply to any document created 78 | using the Font Software. 79 | 80 | TERMINATION 81 | This license becomes null and void if any of the above conditions are 82 | not met. 83 | 84 | DISCLAIMER 85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 93 | OTHER DEALINGS IN THE FONT SOFTWARE. 94 | -------------------------------------------------------------------------------- /custom-bingo.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DasUnicorn/BahnBingo/49513bb530d65869e0db00fb649b7ad8f7cd994c/custom-bingo.html -------------------------------------------------------------------------------- /customsheet.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Bahn-Bingo 11 | 12 | 13 | 14 |
15 |

BahnBingo

16 | 17 |
18 |

Select your Bingo fields:

19 |
20 |
21 |
22 |
23 | 24 |
25 |
26 |
27 |
28 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Bahn-Bingo 11 | 12 | 13 | 14 |
15 |

BahnBingo

16 |
17 | 18 | 19 |
20 | 21 |
22 |
23 |
24 |
25 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /main.js: -------------------------------------------------------------------------------- 1 | const delayOptions = [ 2 | "Polizei­einsatz", 3 | "Feuer­wehr­einsatz auf der Strecke", 4 | "ärzt­liche Versorgung eines Fahr­gastes", 5 | "unbefugtes Ziehen der Not­bremse", 6 | "Personen im Gleis", 7 | "Notarzt­einsatz auf der Strecke", 8 | "Streik­auswirkungen", 9 | "Tiere auf der Strecke", 10 | "Unwetter", 11 | "Warten auf ein verspätetes Schiff", 12 | "Pass- und Zoll­kontrolle", 13 | "technischer Defekt am Bahnhof", 14 | "Beein­trächtigung durch Vanda­lismus", 15 | "Ent­schärfung einer Flieger­bombe", 16 | "Beschädigung einer Brücke", 17 | "umgestürzter Baum auf der Strecke", 18 | "Unfall an einem Bahn­übergang", 19 | "Warten auf An­schluss­reisende", 20 | "Witterungs­bedingte Be­einträchti­gungen", 21 | "Verspätung im Ausland", 22 | "Bereit­stellung weiterer Wagen", 23 | "Abhängen von Wagen", 24 | "Gegen­stände auf der Strecke", 25 | "Ersatz­verkehr mit Bus ist ein­gerichtet", 26 | "Bau­arbeiten", 27 | "Unter­stützung beim Ein- und Aus­stieg", 28 | "Reparatur an der Ober­leitung", 29 | "Reparatur an einem Signal", 30 | "Strecken­sperrung ", 31 | "Reparatur am Zug", 32 | "Reparatur an der Strecke", 33 | "defektes Stell­werk", 34 | "tech­nischer Defekt an einem Bahn­übergang", 35 | "vorüber­gehend verminderte Ge­schwindig­keit auf der Strecke", 36 | "Verspätung eines voraus­fahrenden Zuges", 37 | "Warten auf einen ent­gegen­kommenden Zug", 38 | "Vorfahrt eines anderen Zuges", 39 | "verspätete Bereit­stellung des Zuges", 40 | "Verspätung aus vorheriger Fahrt", 41 | "kurz­fristiger Personal­ausfall", 42 | "kurz­fristige Erkrankung von Personal", 43 | "verspätetes Personal aus vorheriger Fahrt", 44 | "Streik", 45 | "Unwetter­aus­wirkungen", 46 | "Verfügbar­keit der Gleise derzeit ein­geschränkt", 47 | "technischer Defekt an einem anderen Zug", 48 | "Warten auf Anschluss­reisende", 49 | "zusätzlicher Halt zum Ein- und Ausstieg", 50 | "Umleitung des Zuges", 51 | "Schnee und Eis", 52 | "Witterungs­bedingt verminderte Geschwindig­keit", 53 | "Defekte Tür", 54 | "Behobener technischer Defekt am Zug", 55 | "Technische Unter­suchung am Zug", 56 | "Reparatur an der Weiche", 57 | "Erdrutsch", 58 | "Hochwasser", 59 | "Behördliche Maßnahme", 60 | "hohes Fahrgast­aufkommen verlängert Ein- und Ausstieg", 61 | "Zug verkehrt mit verminderter Geschwindigkeit", 62 | "WLAN nicht verfügbar", 63 | "Info-/­Entertainment nicht verfügbar", 64 | "1. Klasse fehlt", 65 | "Mehrzweck­abteil fehlt", 66 | "andere Reihenfolge der Wagen", 67 | "defekte fahr­zeug­gebundene Einstiegs­hilfe", 68 | "Zug verkehrt richtig gereiht", 69 | "ein Wagen fehlt", 70 | "defekte Reservierungs­anzeige", 71 | "kein gastronomisches Angebot", 72 | "Fahrrad­mitnahme nicht möglich", 73 | "Eingeschränkte Fahrrad­beförderung", 74 | "behinderten­gerechte Einrichtung fehlt", 75 | "Universal-WC fehlt", 76 | "Toilette defekt", 77 | "Klimaanlage ausgefallen", 78 | "Verzögerungen im Betriebs­ablauf", 79 | "Auf falsche Strecke geleitet", 80 | "Umleitung", 81 | "Zu kurzer Bahn­steig", 82 | ]; 83 | 84 | function getRandomInt(max) { 85 | return Math.floor(Math.random() * max); 86 | } 87 | 88 | function getNumberOfRandomReasons(number) { 89 | var currentReasonList = JSON.parse(JSON.stringify(delayOptions)); 90 | var resultList = []; 91 | for (let i = 0; i < number; i++) { 92 | var randomInt = getRandomInt(delayOptions.length - i); 93 | var randomReason = currentReasonList[randomInt]; 94 | resultList.push(randomReason); 95 | currentReasonList.splice(randomInt, 1); 96 | } 97 | return resultList; 98 | } 99 | 100 | function setUpBingo() { 101 | const bingoContainer = document.querySelector("#bingo-container"); 102 | bingoContainer.innerHTML = ""; // Clear any previous content 103 | 104 | const bingoFields = getNumberOfRandomReasons(25); 105 | 106 | const table = document.createElement("table"); 107 | bingoContainer.appendChild(table); 108 | 109 | let currentFieldNumber = 0; 110 | 111 | for (let i = 0; i < 5; i++) { 112 | const row = document.createElement("tr"); 113 | 114 | for (let j = 0; j < 5; j++) { 115 | const cell = document.createElement("td"); 116 | const p = document.createElement("p"); 117 | if (i == 2 && j == 2) { 118 | p.innerHTML = "JOKER"; 119 | p.classList.add("joker-text"); 120 | cell.classList.add("joker"); 121 | } else { 122 | cell.id = "field" + currentFieldNumber; 123 | p.id = "text" + currentFieldNumber; 124 | p.innerHTML = bingoFields[i * 5 + j]; 125 | } 126 | p.classList.add("box-text"); 127 | cell.appendChild(p); 128 | row.appendChild(cell); 129 | currentFieldNumber++; 130 | } 131 | 132 | table.appendChild(row); 133 | } 134 | } 135 | 136 | function setUpCustomBingoSelection() { 137 | const numberOfBoxes = 25; 138 | const selectContainer = document.querySelector("#bingo-selection"); 139 | selectContainer.innerHTML = ""; // Clear any previous content 140 | let currentRow = 0; 141 | let currentSelection = 0; 142 | 143 | for (n = 0; n < 5; n++) { 144 | currentRow++; 145 | const h3 = document.createElement("h3"); 146 | h3.innerHTML = "Reihe " + currentRow; 147 | selectContainer.appendChild(h3); 148 | for (i = 0; i < 5; i++) { 149 | const select = document.createElement("select"); 150 | select.id = "selection" + currentSelection; 151 | currentSelection++; 152 | 153 | //Set Select-options 154 | for (var x = 0; x < delayOptions.length; x++) { 155 | var option = document.createElement("option"); 156 | option.value = delayOptions[x]; 157 | option.innerHTML = delayOptions[x]; 158 | select.appendChild(option); 159 | } 160 | 161 | selectContainer.appendChild(select); 162 | 163 | if (n == 2 && i == 3) { 164 | break; 165 | } 166 | } 167 | } 168 | } 169 | 170 | // On Click behaviour 171 | 172 | document.addEventListener("DOMContentLoaded", function () { 173 | var delayInMilliseconds = 1000; //1 second 174 | 175 | setTimeout(function () { 176 | document.addEventListener("click", (event) => { 177 | const target = event.target; 178 | 179 | // If the target's id starts with 'field', toggle target 180 | if (target.id.startsWith("field")) { 181 | target.classList.toggle("selected"); 182 | } 183 | 184 | // If the target's id starts with 'text', toggle parent 185 | if (target.id.startsWith("text")) { 186 | target.parentElement.classList.toggle("selected"); 187 | } 188 | }); 189 | }, delayInMilliseconds); 190 | }); 191 | --------------------------------------------------------------------------------