|
| 1 | +<html lang="en"> |
| 2 | + <head> |
| 3 | + <meta charset="UTF-8" /> |
| 4 | + <meta http-equiv="X-UA-Compatible" content="IE=edge" /> |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 6 | + <script src="https://cdn.tailwindcss.com"></script> |
| 7 | + <title>Rock Paper Sscissors</title> |
| 8 | + </head> |
| 9 | + <body> |
| 10 | + <div class="bg-gradient-to-r from-cyan-500 to-blue-500 h-[100vh]"> |
| 11 | + <div class="xl:w-[50%] md-w-[100%] m-auto pt-5 flex flex-col gap-[100px]"> |
| 12 | + <div class="border-2 rounded-md p-5 flex justify-between"> |
| 13 | + <img src="./assets/svg/logo.svg" /> |
| 14 | + <div |
| 15 | + class="flex flex-col justify-center text-center bg-white rounded-lg p-5 gap-3" |
| 16 | + > |
| 17 | + <span class="text-2xl text-blue-400">Score</span> |
| 18 | + <span class="font-bold text-4xl text-blue-400" id="score">0</span> |
| 19 | + </div> |
| 20 | + </div> |
| 21 | + <div class="justify-center flex" id="game"> |
| 22 | + <div |
| 23 | + class="relative bg-[url('./assets/svg/bg-triangle.svg')] h-[300px] w-[305px] bg-no-repeat bg-center" |
| 24 | + > |
| 25 | + <div |
| 26 | + onclick="Main.play(PAPER)" |
| 27 | + class="bg-white absolute left-0 top-[-10%] rounded-full w-[100px] h-[100px] flex hover:shadow-[0_1px_20px_10px_#f8f8f8]" |
| 28 | + > |
| 29 | + <img |
| 30 | + src="./assets/svg/icon-paper.svg" |
| 31 | + alt="paper" |
| 32 | + class="m-auto" |
| 33 | + /> |
| 34 | + </div> |
| 35 | + <div |
| 36 | + onclick="Main.play(SCISSORS)" |
| 37 | + class="bg-white absolute right-0 top-[-10%] rounded-full w-[100px] h-[100px] flex hover:shadow-[0_1px_20px_10px_#f8f8f8]" |
| 38 | + > |
| 39 | + <img |
| 40 | + src="./assets/svg/icon-scissors.svg" |
| 41 | + alt="scissors" |
| 42 | + class="m-auto" |
| 43 | + /> |
| 44 | + </div> |
| 45 | + <div |
| 46 | + onclick="Main.play(ROCK)" |
| 47 | + class="bg-white absolute left-[34%] bottom-0 rounded-full w-[100px] h-[100px] flex hover:shadow-[0_1px_20px_10px_#f8f8f8]" |
| 48 | + > |
| 49 | + <img src="./assets/svg/icon-rock.svg" alt="rock" class="m-auto" /> |
| 50 | + </div> |
| 51 | + </div> |
| 52 | + </div> |
| 53 | + <div |
| 54 | + class="flex justify-between w-[100%] md:w-[80%] m-auto hidden" |
| 55 | + id="result" |
| 56 | + > |
| 57 | + <div class="flex-col flex gap-5 items-center"> |
| 58 | + <span class="text-xl md:text-2xl font-bold text-white" |
| 59 | + >You picked</span |
| 60 | + > |
| 61 | + <div class="bg-white rounded-full w-[100px] h-[100px] flex"> |
| 62 | + <img alt="player" class="m-auto" id="player" /> |
| 63 | + </div> |
| 64 | + </div> |
| 65 | + <div class="flex flex-col items-center gap-4"> |
| 66 | + <span |
| 67 | + class="text-xl md:text-2xl font-bold text-white" |
| 68 | + id="result-text" |
| 69 | + >You win</span |
| 70 | + > |
| 71 | + <button |
| 72 | + onclick="Main.playAgain()" |
| 73 | + class="bg-white w-[100px] border-0 text-sky-500 rounded-lg pointer" |
| 74 | + > |
| 75 | + Play again |
| 76 | + </button> |
| 77 | + </div> |
| 78 | + <div class="flex-col flex items-center gap-5"> |
| 79 | + <span class="text-xl md:text-2xl font-bold text-white" |
| 80 | + >Computer pick</span |
| 81 | + > |
| 82 | + <div class="bg-white rounded-full w-[100px] h-[100px] flex"> |
| 83 | + <img alt="computer" id="computer" class="m-auto" /> |
| 84 | + </div> |
| 85 | + </div> |
| 86 | + </div> |
| 87 | + </div> |
| 88 | + </div> |
| 89 | + </body> |
| 90 | + <script src="./main.js"></script> |
| 91 | +</html> |
0 commit comments