mirror of
https://github.com/FranP-code/Tic-Tac-Toe-Game.git
synced 2025-10-12 23:52:39 +00:00
player selection fstyles done
This commit is contained in:
41
index.html
41
index.html
@@ -0,0 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Tic tac toe</title>
|
||||
<link rel="stylesheet" href="./styles/styles.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/>
|
||||
<script type="module" src="https://cdn.jsdelivr.net/npm/emoji-picker-element@^1/index.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="player-selection">
|
||||
<h1>Player selection</h1>
|
||||
<form>
|
||||
<div class="player player-1">
|
||||
<input class="name-input" type="text" placeholder="Player 1 name">
|
||||
|
||||
<div class="symbol-container">
|
||||
<button>😁</button>
|
||||
<input class="symbol-input" type="text" placeholder="Symbol" maxlength="1">
|
||||
</div>
|
||||
</div>
|
||||
<div class="player player-2">
|
||||
<input class="name-input" type="text" placeholder="Player 2 name">
|
||||
|
||||
<div class="symbol-container">
|
||||
<input class="symbol-input" type="text" placeholder="Symbol" maxlength="1">
|
||||
<button>😁</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<button id="start">Start</button>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="emoji-picker-container hidden">
|
||||
<emoji-picker class="animate__animated animate__fadeInUp"></emoji-picker>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
28
package-lock.json
generated
Normal file
28
package-lock.json
generated
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"name": "tic-tac-toe-game",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "tic-tac-toe-game",
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"emoji-picker-element": "^1.8.2"
|
||||
}
|
||||
},
|
||||
"node_modules/emoji-picker-element": {
|
||||
"version": "1.8.2",
|
||||
"resolved": "https://registry.npmjs.org/emoji-picker-element/-/emoji-picker-element-1.8.2.tgz",
|
||||
"integrity": "sha512-XNSuntOOz1+JBklOqj+tqJqbInp88i12JXv0ZyQNCaHlkAlUf7Ak9e857S/uVTFlVtA6pJ6qeXLxvMdrL0ngFQ=="
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"emoji-picker-element": {
|
||||
"version": "1.8.2",
|
||||
"resolved": "https://registry.npmjs.org/emoji-picker-element/-/emoji-picker-element-1.8.2.tgz",
|
||||
"integrity": "sha512-XNSuntOOz1+JBklOqj+tqJqbInp88i12JXv0ZyQNCaHlkAlUf7Ak9e857S/uVTFlVtA6pJ6qeXLxvMdrL0ngFQ=="
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,5 +7,8 @@
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "Francisco Pessano",
|
||||
"license": "ISC"
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"emoji-picker-element": "^1.8.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
html, body {
|
||||
height: 100%;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #dd7979;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
button {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.player-selection {
|
||||
background-color: #fff;
|
||||
height: 33vh;
|
||||
width: 50vw;
|
||||
border-radius: 6px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
box-shadow: 0px 3px 10px #000;
|
||||
}
|
||||
.player-selection h1 {
|
||||
user-select: none;
|
||||
}
|
||||
.player-selection form {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
}
|
||||
.player-selection form .player {
|
||||
width: 40%;
|
||||
}
|
||||
.player-selection form .player input {
|
||||
height: 5vh;
|
||||
box-sizing: content-box;
|
||||
outline: none;
|
||||
font-size: 14pt;
|
||||
}
|
||||
.player-selection form .player .name-input {
|
||||
width: 100%;
|
||||
}
|
||||
.player-selection form .player .symbol-input {
|
||||
margin-top: 1vh;
|
||||
width: 5vw;
|
||||
}
|
||||
.player-selection form .player .symbol-container {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
margin-top: 1vh;
|
||||
}
|
||||
.player-selection form .player button {
|
||||
box-sizing: content-box;
|
||||
height: 5vh;
|
||||
}
|
||||
.player-selection form .player.player-1 {
|
||||
padding-left: 10%;
|
||||
padding-right: 2.5%;
|
||||
}
|
||||
.player-selection form .player.player-1 .symbol-container {
|
||||
width: 103%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
margin-top: 1vh;
|
||||
}
|
||||
.player-selection form .player.player-1 .symbol-container .symbol-input {
|
||||
margin-top: 0px;
|
||||
margin-left: 1vw;
|
||||
}
|
||||
.player-selection form .player.player-2 {
|
||||
padding-right: 10%;
|
||||
padding-left: 2.5%;
|
||||
}
|
||||
.player-selection form .player.player-2 .symbol-container .symbol-input {
|
||||
margin-top: 0px;
|
||||
margin-right: 1vw;
|
||||
}
|
||||
.player-selection button#start {
|
||||
width: 50%;
|
||||
height: 6vh;
|
||||
margin-top: 1vh;
|
||||
background-color: #a6ff6a;
|
||||
color: rgba(0, 0, 0, 0.72);
|
||||
font-size: 14pt;
|
||||
border: none;
|
||||
box-shadow: 0px 3px #555555;
|
||||
transition: 0.3s ease-in-out;
|
||||
}
|
||||
.player-selection button#start.pressed {
|
||||
transition: 0.3s ease-in-out;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.emoji-picker-container {
|
||||
background-color: rgba(0, 0, 0, 0.404);
|
||||
transition: 0.4s ease-in-out;
|
||||
opacity: 100%;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.emoji-picker-container.hidden {
|
||||
opacity: 0%;
|
||||
transform: translateY(100vh);
|
||||
background-color: #dd7979;
|
||||
transition: 0.4s ease-in-out;
|
||||
}
|
||||
|
||||
/*# sourceMappingURL=styles.css.map */
|
||||
|
||||
1
styles/styles.css.map
Normal file
1
styles/styles.css.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"sourceRoot":"","sources":["styles.scss"],"names":[],"mappings":"AAAA;EAEI;EAEA;EAEA;;;AAGJ;EAEI;EACA;EAEA;EAEA;EACA;EACA;;;AAGJ;EAEI;;;AAGJ;EAEI;EAEA;EACA;EAEA;EAEA;EACA;EACA;EAEA;;AAEA;EAEG;;AAGH;EAEI;EAEA;;AAEA;EAKI;;AAEA;EAEI;EACA;EACA;EAEA;;AAGJ;EAEI;;AAGJ;EAEI;EACA;;AAGJ;EAEI;EAEA;EACA;EACA;EAEA;;AAGJ;EAEI;EACA;;AAIR;EAEI;EACA;;AAEA;EAEI;EAEA;EACA;EACA;EAEA;;AAEA;EAEI;EACA;;AAKZ;EAEI;EACA;;AAII;EAEI;EACA;;AAMhB;EAEI;EACA;EAEA;EAEA;EACA;EACA;EAEA;EAEA;EAEA;;AAGJ;EAEI;EAEA;;;AAIR;EAEI;EAEA;EACA;EAEA;EACA;EAEA;EAEA;EACA;EACA;;;AAGJ;EAEI;EACA;EAEA;EAEA","file":"styles.css"}
|
||||
@@ -0,0 +1,188 @@
|
||||
html, body {
|
||||
|
||||
height: 100%;
|
||||
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
|
||||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
background-color: rgb(221, 121, 121);
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
button {
|
||||
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.player-selection {
|
||||
|
||||
background-color: #fff;
|
||||
|
||||
height: 33vh;
|
||||
width: 50vw;
|
||||
|
||||
border-radius: 6px;
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
box-shadow: 0px 3px 10px #000;
|
||||
|
||||
h1 {
|
||||
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
form {
|
||||
|
||||
display: flex;
|
||||
// justify-content: space-around;
|
||||
width: 100%;
|
||||
|
||||
.player {
|
||||
|
||||
// display: flex;
|
||||
// flex-direction: column;
|
||||
|
||||
width: 40%;
|
||||
|
||||
input {
|
||||
|
||||
height: 5vh;
|
||||
box-sizing: content-box;
|
||||
outline: none;
|
||||
|
||||
font-size: 14pt;
|
||||
}
|
||||
|
||||
.name-input {
|
||||
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.symbol-input{
|
||||
|
||||
margin-top: 1vh;
|
||||
width: 5vw;
|
||||
}
|
||||
|
||||
.symbol-container {
|
||||
|
||||
width: 100%;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
|
||||
margin-top: 1vh;
|
||||
}
|
||||
|
||||
button {
|
||||
|
||||
box-sizing: content-box;
|
||||
height: 5vh;
|
||||
}
|
||||
}
|
||||
|
||||
.player.player-1 {
|
||||
|
||||
padding-left: 10%;
|
||||
padding-right: 2.5%;
|
||||
|
||||
.symbol-container {
|
||||
|
||||
width: 103%;
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
|
||||
margin-top: 1vh;
|
||||
|
||||
.symbol-input {
|
||||
|
||||
margin-top: 0px;
|
||||
margin-left: 1vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.player.player-2 {
|
||||
|
||||
padding-right: 10%;
|
||||
padding-left: 2.5%;
|
||||
|
||||
.symbol-container {
|
||||
|
||||
.symbol-input {
|
||||
|
||||
margin-top: 0px;
|
||||
margin-right: 1vw;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
button#start {
|
||||
|
||||
width: 50%;
|
||||
height: 6vh;
|
||||
|
||||
margin-top: 1vh;
|
||||
|
||||
background-color: rgb(166, 255, 106);
|
||||
color: rgba(0, 0, 0, 0.72);
|
||||
font-size: 14pt;
|
||||
|
||||
border: none;
|
||||
|
||||
box-shadow: 0px 3px rgb(85, 85, 85);
|
||||
|
||||
transition: 0.3s ease-in-out;
|
||||
}
|
||||
|
||||
button#start.pressed {
|
||||
|
||||
transition: 0.3s ease-in-out;
|
||||
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
.emoji-picker-container {
|
||||
|
||||
background-color: rgba(0, 0, 0, 0.404);
|
||||
|
||||
transition: 0.4s ease-in-out;
|
||||
opacity: 100%;
|
||||
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
position: absolute;
|
||||
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.emoji-picker-container.hidden {
|
||||
|
||||
opacity: 0%;
|
||||
transform: translateY(100vh);
|
||||
|
||||
background-color: rgb(221, 121, 121);
|
||||
|
||||
transition: 0.4s ease-in-out;
|
||||
}
|
||||
Reference in New Issue
Block a user