playground selection
This commit is contained in:
commit
2d25d56bbc
2 changed files with 60 additions and 42 deletions
18
index.html
18
index.html
|
@ -7,13 +7,12 @@
|
||||||
<meta name="description" content="">
|
<meta name="description" content="">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
<link rel="icon" href="./res/mario.png"/>
|
<link rel="icon" href="./res/player.png"/>
|
||||||
<!-- Place favicon.ico in the root directory -->
|
<!-- Place favicon.ico in the root directory -->
|
||||||
<link rel="stylesheet" href="./style.css"/>
|
<link rel="stylesheet" href="./style.css"/>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Sokoban</h1>
|
|
||||||
<!--[if lt IE 8]>
|
<!--[if lt IE 8]>
|
||||||
<p class="browserupgrade">
|
<p class="browserupgrade">
|
||||||
You are using an <strong>outdated</strong> browser. Please
|
You are using an <strong>outdated</strong> browser. Please
|
||||||
|
@ -22,24 +21,31 @@
|
||||||
</p>
|
</p>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
<nav>
|
<nav>
|
||||||
<ol id="level-list">
|
<h1>Sokoban</h1>
|
||||||
|
<ol id="level-lists">
|
||||||
</ol>
|
</ol>
|
||||||
</nav>
|
</nav>
|
||||||
|
<main>
|
||||||
|
<div class="controls">
|
||||||
<div id="timer">Time</div>
|
<div id="timer">Time</div>
|
||||||
<button id="Pause" onclick="Pause()">Pause</button>
|
<button id="Pause" onclick="Pause()">Pause</button>
|
||||||
<br>
|
<br>
|
||||||
<div></div>
|
</div>
|
||||||
<canvas id="canvas" width="800" height="400"></canvas>
|
<div>
|
||||||
<div class="to-center">
|
|
||||||
<canvas id="canvas" width="800" height="400"></canvas>
|
<canvas id="canvas" width="800" height="400"></canvas>
|
||||||
<div class="text-bubble">
|
<div class="text-bubble">
|
||||||
<div class="dialog">
|
<div class="dialog">
|
||||||
<div class="left-point">
|
<div class="left-point">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="left-point shifted">
|
||||||
|
</div>
|
||||||
<p class="speech">Coucou</p>
|
<p class="speech">Coucou</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
</main>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
<!-- <script type="module" src="./modules/ressources.mjs"></script> -->
|
<!-- <script type="module" src="./modules/ressources.mjs"></script> -->
|
||||||
<script type="module" src="./script.js"></script>
|
<script type="module" src="./script.js"></script>
|
||||||
|
|
66
style.css
66
style.css
|
@ -1,36 +1,20 @@
|
||||||
:root {
|
:root {
|
||||||
--main-background-color: black;
|
--main-background-color: white;
|
||||||
--main-invert-color: white;
|
--main-text-color: black;
|
||||||
--main-highlight-color: cyan;
|
--main-highlight-color: cyan;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: var(--main-background-color);
|
background-color: var(--main-background-color);
|
||||||
display: flex;
|
|
||||||
color: --main-invert-color;
|
color: --main-invert-color;
|
||||||
}
|
|
||||||
|
|
||||||
.dialog {
|
|
||||||
height: 200px;
|
|
||||||
width: 400px;
|
|
||||||
background-color: var(--main-invert-color);
|
|
||||||
position: relative;
|
|
||||||
border-radius: 10%;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
text-align: center;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.left-point {
|
main {
|
||||||
width: 0;
|
display: flex;
|
||||||
height: 0;
|
flex-direction: column;
|
||||||
border-left: 1rem solid transparent;
|
align-items: center;
|
||||||
border-right: 1rem solid transparent;
|
|
||||||
border-top: 5rem solid var(--main-invert-color);
|
|
||||||
position: absolute;
|
|
||||||
margin-top: 30%;
|
|
||||||
margin-left: -10%;
|
|
||||||
transform: rotate(60deg) ;
|
|
||||||
z-index: -1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.text-bubble {
|
.text-bubble {
|
||||||
|
@ -42,13 +26,41 @@ body {
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dialog {
|
||||||
|
height: 200px;
|
||||||
|
width: 400px;
|
||||||
|
background-color: var(--main-background-color);
|
||||||
|
position: relative;
|
||||||
|
border-radius: 10%;
|
||||||
|
display: flex;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid black;
|
||||||
|
}
|
||||||
|
|
||||||
|
.left-point {
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border-left: 1rem solid transparent;
|
||||||
|
border-right: 1rem solid transparent;
|
||||||
|
border-top: 5rem solid black;
|
||||||
|
position: absolute;
|
||||||
|
margin-top: 30%;
|
||||||
|
margin-left: -10%;
|
||||||
|
transform: rotate(60deg) ;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shifted {
|
||||||
|
transform:rotate(60deg) translate(0px,-2px);
|
||||||
|
border-top: 5rem solid white;
|
||||||
|
z-index: 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.speech {
|
.speech {
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
}
|
}
|
||||||
|
|
||||||
.to-center {
|
|
||||||
margin: 0 auto;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue