|
|
@ -5,6 +5,7 @@ |
|
|
|
<meta charset="UTF-8"> |
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
|
|
<script src="https://cdn.tailwindcss.com"></script> |
|
|
|
<script src="//unpkg.com/alpinejs" defer></script> |
|
|
|
<title>Calculator</title> |
|
|
|
<style> |
|
|
|
|
|
|
@ -13,7 +14,6 @@ |
|
|
|
text-align: center; |
|
|
|
font-size: 10vh; |
|
|
|
border-radius: 20%; |
|
|
|
background-color: brown; |
|
|
|
margin-right: 2vw; |
|
|
|
margin-left: 2vw; |
|
|
|
} |
|
|
@ -21,29 +21,29 @@ |
|
|
|
</style> |
|
|
|
</head> |
|
|
|
|
|
|
|
<body class="flex h-screen justify-center items-start m-4"> |
|
|
|
<div id='calculator' class="w-screen grid grid-cols-4 gap-3"> |
|
|
|
<div id="screen" class="p-8 text-white bg-black col-span-4 row-span-4 h-[20vh] rounded-xl"> |
|
|
|
<body class="bg-zinc-400 flex h-screen justify-center items-start " x-data="{}" > |
|
|
|
<div id='calculator' class="bg-slate-800 w-screen grid grid-cols-[3fr,1fr] h-screen "> |
|
|
|
<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"> |
|
|
|
RESULT |
|
|
|
</div> |
|
|
|
<div class="grid grid-cols-3 gap-3 mb-4"> |
|
|
|
<template x-for="post in 9"> |
|
|
|
<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> |
|
|
|
</template> |
|
|
|
<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> |
|
|
|
<button class="active:bg-slate-700 hover:ring-4 ring-blue-400 bg-slate-600 border-double border-4 border-slate-800">.</button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<button class="justify-center bg-slate-300">1</button> |
|
|
|
<button>2</button> |
|
|
|
<button>3</button> |
|
|
|
<button>+</button> |
|
|
|
|
|
|
|
<button>4</button> |
|
|
|
<button>5</button> |
|
|
|
<button>6</button> |
|
|
|
<button>-</button> |
|
|
|
<div class="grid grid-rows-4 gap-3 mb-4"> |
|
|
|
|
|
|
|
<button>7</button> |
|
|
|
<button>8</button> |
|
|
|
<button>9</button> |
|
|
|
<button>=</button> |
|
|
|
<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> |
|
|
|
<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> |
|
|
|
<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> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
</body> |
|
|
|
|
|
|
|
</html> |