forked from GithubMirrors/cardconjurer
		
	
		
			
				
	
	
		
			223 lines
		
	
	
		
			6.3 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			223 lines
		
	
	
		
			6.3 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <!DOCTYPE html5>
 | |
| <html>
 | |
| <head>
 | |
| 	<title>Life Counter</title>
 | |
| 	<!-- Other things -->
 | |
| 	<meta charset="UTF-8">
 | |
| 	<meta name="apple-mobile-web-app-title" content="LifeCounter">
 | |
| 	<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0"> -->
 | |
| 	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1, maximum-scale=1, user-scalable=no">
 | |
| 	<meta name="apple-mobile-web-app-capable" content="yes">
 | |
| 	<meta name="mobile-web-app-capable" content="yes">
 | |
| 	<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
 | |
| </head>
 | |
| <body autocomplete="off">
 | |
| 	<div id="settings" class="settings">
 | |
| 		<div class="innerSettings">
 | |
| 			Number of Players:<br>
 | |
| 			<input id="inputPlayerCount" class="input" type="number" min="2" value="4" max="16"><br>
 | |
| 			Starting Life Total:<br>
 | |
| 			<input id="inputStartingLife" class="input" type="number" min="0" value="40"><br>
 | |
| 			<button id="buttonStartGame" class="input" onclick="startGame()">Game On!</button><br>
 | |
|             <input type="checkbox" id="inputWakeLock" checked="true">Enable Wake Lock</input><br><br>
 | |
|             For an optimal experience, save this website to your home screen and open it from there.<br><br><div style="font-size: 0.75em">Check out my other website, <a style="font-size: inherit" href="index.html">Card Conjurer</a>, to easily create custom Magic cards!</div>
 | |
| 		</div>
 | |
| 	</div>
 | |
| 	<div onclick="fullscreen()" class="hidden" id="return">CLICK ANYWHERE TO RETURN TO FULLSCREEN</div>
 | |
| 	<div id="gridShell">
 | |
| 		<img id="menuButton" class="menuButton" src="data/site/other/life/menuButton.png" onclick="document.getElementById('menu').classList.remove('hidden')">
 | |
| 		<div id="menu" class="menu hidden">
 | |
| 			<img class="menuExitButton" src="data/site/other/life/menuExitButton.png" onclick="document.getElementById('menu').classList.add('hidden')">
 | |
| 			<div class="menuInterior">
 | |
| 				<div class="menuOption" onclick="resetLife()">Reset Life Totals</div><br>
 | |
| 				<div class="menuOption" onclick="location.reload()">Change Player Count</div><br>
 | |
| 				<div class="menuOption">
 | |
| 					Change Background:<br>
 | |
| 					<select id="inputPlayer" onchange="updateColorSelector()"></select><br>
 | |
| 					Color:<br>
 | |
| 					<input type="color" class="colorInput" value="#222222" id="inputPlayerColor" onchange="updateBackgroundColor(this.value)"><br>
 | |
| 					<button onclick="updateBackgroundColor('#222222')">Default</button><br>
 | |
| 					Image:<br>
 | |
| 					<input type="file" accept="image/*" onchange="loadImage(event, playerList[parseInt(document.getElementById('inputPlayer').value) - 1].image)" placeholder="Via File Upload"><br>
 | |
| 					<input type="text" placeholder="Via URL" onchange="playerList[parseInt(document.getElementById('inputPlayer').value) - 1].image.src = this.value"><br>
 | |
| 					<input id="inputCardArtName" onchange="inputCardArtName(this.value)" type="text" placeholder="Via Card Name"><br>
 | |
| 					<input id="inputCardArtNameNumber" onchange="inputCardArtNameNumber(this.value)" type="number" value="1" min="1" max="1"><br><br>
 | |
| 					Text Color:<br>
 | |
| 					<input type="color" class="colorInput" value="#ffffff" id="inputTextColor" onchange="updateTextColor(this.value)"><br>
 | |
| 				</div><br>
 | |
| 				<div class="menuOption">
 | |
| 					RNG<br>
 | |
| 					Min <input class="smallInput" type="number" id="inputRNGMin" min="0" value="1"><br>
 | |
| 					Max <input class="smallInput" type="number" id="inputRNGMax" min="0" value="20"><br>
 | |
| 					<div onclick="rollRNG()" class="rng"><div class="rngNumber" id="rngOutput"><div style="font-size: 30pt; margin-top: 0.75em;">Tap Me<br>To Roll</div></div></div>
 | |
| 				</div>
 | |
| 			</div>
 | |
| 		</div>
 | |
| 		<div id="mainGrid" class="mainGrid"></div>
 | |
| 	</div>
 | |
| </body>
 | |
| <style>
 | |
| 	@font-face {
 | |
| 		font-family: belerenbsc;
 | |
| 		src: url("data/fonts/beleren-bsc.ttf");
 | |
| 	}
 | |
|     .settings {
 | |
|         overflow-y: auto;
 | |
|         touch-action: pan-y;
 | |
|         -webkit-overflow-scrolling: touch;
 | |
|         height: 100%
 | |
|     }
 | |
| 	.innerSettings {
 | |
|         margin: 10pt;
 | |
| 	}
 | |
| 	* {
 | |
| 		font-family: belerenbsc;
 | |
| 		font-size: 24pt;
 | |
| 		margin: 0px;
 | |
|         touch-action: manipulation;
 | |
| 	}
 | |
| 	image, div, canvas {
 | |
| 		user-select: none;
 | |
| 		-webkit-user-select: none;
 | |
| 		-moz-user-select: none;
 | |
| 		-ms-user-select: none;
 | |
| 	}
 | |
| 	html, body {
 | |
| 		/*position: fixed;
 | |
| 		top: 0px;
 | |
| 		left: 0px;
 | |
| 		width: 100%;
 | |
| 		height: 100%;
 | |
| 		overflow: hidden;*/
 | |
| 	}
 | |
| 	body {
 | |
| 		background-color: #333;
 | |
| 		color: white;
 | |
| 	}
 | |
| 	.mainGrid {
 | |
| 		display: grid;
 | |
| 		grid-template-columns: auto auto;
 | |
| 		grid-auto-rows: 1fr;
 | |
| 		width: 100%;
 | |
| 		height: 100%;
 | |
| 	}
 | |
| 	.mainGrid {
 | |
| 		/*position: fixed;
 | |
| 		top: 0;
 | |
| 		left: 0;*/
 | |
| 	}
 | |
| 	#gridShell {
 | |
| 		display: none;
 | |
| 	}
 | |
|     #gridShell:fullscreen {
 | |
| 		display: inline-block;
 | |
| 	}
 | |
|     #gridShell:-webkit-full-screen {
 | |
|         display: inline-block;
 | |
|     }
 | |
| 	#gridShell.fullscreenUnavailable {
 | |
| 		display: inline-block;
 | |
| 	}
 | |
| 	.playerBox {
 | |
| 		border: 1px solid white;
 | |
| 		width: auto;
 | |
| 		height: auto;
 | |
| 	}
 | |
| 	.widePlayerBox {
 | |
| 		grid-column: 1 / span 2;
 | |
| 	}
 | |
| 	#return {
 | |
| 		width: 100%;
 | |
| 		height: 100%;
 | |
| 		color: white;
 | |
| 		font-size: 3vw;
 | |
| 	}
 | |
| 	.menuButton {
 | |
| 		position: fixed;
 | |
| 		top: calc(50% - 7.5vw);
 | |
| 		left: calc(50% - 7.5vw);
 | |
| 		width: 15vw;
 | |
| 		height: 15vw;
 | |
| 		border: 2px solid white;
 | |
| 	}
 | |
| 	.menuExitButton {
 | |
| 		position: fixed;
 | |
| 		top: 5pt;
 | |
| 		right: 5pt;
 | |
| 		width: 50pt;
 | |
| 		height: 50pt;
 | |
| 	}
 | |
| 	.menu {
 | |
| 		position: fixed;
 | |
| 		top: 0;
 | |
| 		left: 0;
 | |
| 		width: 100%;
 | |
| 		height: 100%;
 | |
| 		background-color: #000a;
 | |
| 		text-align: center;
 | |
| 		display: table;
 | |
| 	}
 | |
| 	.menuInterior {
 | |
| 		margin: 60pt 0px 0px 0px;
 | |
| 		padding: 10pt;
 | |
| 		overflow-y: auto;
 | |
| 		max-width: calc(100vw - 23pt);
 | |
| 		height: calc(100% - 60pt);
 | |
| 		border: 2px solid white;
 | |
| 		touch-action: pan-y;
 | |
| 		-webkit-overflow-scrolling: touch;
 | |
| 	}
 | |
| 	.menuOption {
 | |
| 		font-size: 20pt;
 | |
| 		background-color: #333;
 | |
| 		border-radius: 1em;
 | |
| 		display: inline-block;
 | |
| 		margin-bottom: 10pt;
 | |
| 		padding: 8pt;
 | |
| 		max-width: calc(100% - 16pt);
 | |
| 		overflow-x: hidden;
 | |
| 	}
 | |
| 	.colorInput {
 | |
| 		border: 0px;
 | |
| 		padding: 0px;
 | |
| 		width: 4.5em;
 | |
| 		height: 2em;
 | |
| 	}
 | |
| 	.hidden {
 | |
| 		display: none;
 | |
| 	}
 | |
| 	.permaHidden {
 | |
| 		display: none;
 | |
| 	}
 | |
| 	input {
 | |
| 		width: 7.5em;
 | |
| 	}
 | |
|     #inputWakeLock {
 | |
|         /*position: relative;
 | |
|         top: -0.2em;*/
 | |
|         margin: 0.25em;
 | |
|         height: auto;
 | |
|         width: auto;
 | |
|     }
 | |
| 	.smallInput {
 | |
| 		width: 3em;
 | |
| 	}
 | |
| 	.rng {
 | |
| 		margin-top: 6pt;
 | |
| 		border: 1px solid white;
 | |
| 		height: 5em;
 | |
| 		min-width: 5em;
 | |
| 		border-radius: 1em;
 | |
| 		background-color: #222;
 | |
| 	}
 | |
| 	.rngNumber {
 | |
| 		font-size: 4em;
 | |
| 	}
 | |
| 	a {
 | |
| 		color: white;
 | |
| 	}
 | |
| </style>
 | |
| <script src="data/site/other/life/NoSleep.js"></script>
 | |
| <script src="data/site/other/life/life.js"></script>
 | |
| <html>
 | 
