You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
2.0 KiB

9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
9 months ago
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <script src="https://cdn.tailwindcss.com"></script>
  7. <script src="//unpkg.com/alpinejs" defer></script>
  8. <title>Calculator</title>
  9. <style>
  10. #calculator button {
  11. align-self: center;
  12. text-align: center;
  13. font-size: 10vh;
  14. border-radius: 20%;
  15. margin-right: 2vw;
  16. margin-left: 2vw;
  17. }
  18. </style>
  19. </head>
  20. <body class="bg-zinc-400 flex h-screen justify-center items-start " x-data="{}" >
  21. <div id='calculator' class="bg-slate-800 w-screen grid grid-cols-[3fr,1fr] h-screen ">
  22. <div id="screen" class="hover:ring-4 ring-blue-400 m-2 p-8 text-right text-[8vh] text-white bg-black col-span-4 row-span-4 h-[20vh] rounded-xl">
  23. RESULT
  24. </div>
  25. <div class="grid grid-cols-3 gap-3 mb-4">
  26. <template x-for="post in 9">
  27. <button class="active:bg-slate-700 hover:ring-4 ring-blue-400 border-double border-4 border-slate-800 bg-slate-600" x-text="post"></button>
  28. </template>
  29. <button class="active:bg-slate-700 hover:ring-4 ring-blue-400 col-span-2 bg-slate-600 border-double border-4 border-slate-800">0</button>
  30. <button class="active:bg-slate-700 hover:ring-4 ring-blue-400 bg-slate-600 border-double border-4 border-slate-800">.</button>
  31. </div>
  32. <div class="grid grid-rows-4 gap-3 mb-4">
  33. <button class="active:bg-slate-800 hover:ring-4 ring-blue-400 border-double border-4 border-slate-600 bg-slate-900 text-white ">+</button>
  34. <button class="active:bg-slate-800 hover:ring-4 ring-blue-400 border-double border-4 border-slate-600 bg-slate-900 text-white ">-</button>
  35. <button class="active:bg-slate-800 hover:ring-4 ring-blue-400 border-double border-4 border-slate-600 bg-slate-900 text-white row-span-2 h-full bg-slate-300">=</button>
  36. </div>
  37. </div>
  38. </body>
  39. </html>