Skip to content
Snippets Groups Projects
index.html 2.43 KiB
Newer Older
Louis's avatar
Louis committed
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8"/>
	<title>Bevy 2D Template</title> <!-- TODO: Set game name -->
	<link data-trunk rel="copy-dir" href="../assets"/>
	<style>
		html, body {
			margin: 0;
			padding: 0;
		}
	</style>
	<style id="init-styles">
		* {
			transition: all 0.2s linear;
		}

		#start_container {
Louis's avatar
v2  
Louis committed
			width: auto;
			height: 100vh;
Louis's avatar
v2  
Louis committed
			aspect-ratio: 1;
			display: flex;
			justify-content: center;
			align-items: center;
			flex-direction: column;
		}

		h1 {
			font-family: sans-serif;
			font-weight: bolder;
			margin-top: 3rem;
			margin-bottom: 3rem;
			animation-name: float-anim;
			animation-duration: 2.5s;
			animation-iteration-count: infinite;
			animation-timing-function: ease-in-out;
			animation-direction: alternate;
		}

		@keyframes float-anim {
			0% {
				transform: translateY(10px);
			}
			100% {
				transform: translateY(-10px);
			}
		}

		#start_button {
			width: 25%;
			height: 25%;
			background-color: black;
			border-radius: 50%;
			cursor: pointer;
		}

		.play-button-component {
			fill: none;
			stroke: #ffffff;
			stroke-width: 10;
			stroke-linecap: round;
			stroke-linejoin: round;
			stroke-miterlimit: 4;
			transform-origin: center;
		}

		.swircle {
			stroke-dasharray: 100 50 100;
		}

		#start_button:hover .swircle:nth-of-type(2n) {
			transform: rotateZ(-90deg);
		}
		#start_button:hover .swircle:first-of-type {
			transform: rotateZ(90deg);
		}

		#start_button:hover {
			background-color: rgba(0, 0, 0, 0.8);
		}
	</style>
Louis's avatar
Louis committed
</head>
<body>

<main id="start_container">
	<svg
		width="512"
		height="512"
		viewBox="0 0 512 512"
		id="start_button"
		xmlns="http://www.w3.org/2000/svg">
		<path
			class="play-button-component swircle"
			d="M 482.86983,256 A 226.86983,226.86983 0 0 1 256,482.86983 226.86983,226.86983 0 0 1 29.130173,256 226.86983,226.86983 0 0 1 256,29.130173 226.86983,226.86983 0 0 1 482.86983,256 Z"/>
		<path
			class="play-button-component swircle"
			d="M 447.06812,256 A 191.06812,191.06812 0 0 1 256,447.06812 191.06812,191.06812 0 0 1 64.931885,256 191.06812,191.06812 0 0 1 256,64.931885 191.06812,191.06812 0 0 1 447.06812,256 Z"/>
		<path
			class="play-button-component"
			d="M 194.45831,348.47991 V 163.5198 l 159.08378,91.84706 -126.14795,72.83155 V 232.4989" />
	</svg>

	<h1>Press Start To Play</h1>
</main>

Louis's avatar
Louis committed
<link data-trunk rel="inline" href="../build/web/audio.js"/>
<link data-trunk rel="inline" href="../build/web/autofocus.js"/>

Louis's avatar
Louis committed
</body>
</html>