Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update the UI #37

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 25 additions & 21 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,32 @@



<div class="container">


9
<h1>Temperature Converter</h1>
<div class="input-container">
<select id="conversion-from-type" class="dropdown-box">
<option value="Fahrenheit">Fahrenheit</option>
<option value="Celsius">Celsius</option>
<option value="Kelvin">Kelvin</option>
<option value="Rankine">Rankine</option>
</select>
<span id="to">to</span>
<select id="conversion-to-type" class="dropdown-box">
<option value="Fahrenheit">Fahrenheit</option>
<option value="Celsius" selected>Celsius</option>
<option value="Kelvin">Kelvin</option>
<option value="Rankine">Rankine</option>
</select>
<input type="number" id="temperature" placeholder="Enter temperature in Fahrenheit">
<button id="convert">Convert</button>
<div class="result">
<p id="result-text"></p>
<div class="card">
<div class="circle"></div>
<div class="circle"></div>
<div class="card-inner">
<h1 class="dark light">Temperature Converter</h1>
<div class="input-container">
<select id="conversion-from-type" class="dropdown-box">
<option value="Fahrenheit">Fahrenheit</option>
<option value="Celsius">Celsius</option>
<option value="Kelvin">Kelvin</option>
<option value="Rankine">Rankine</option>
</select>
<span id="to">to</span>
<select id="conversion-to-type" class="dropdown-box">
<option value="Fahrenheit">Fahrenheit</option>
<option value="Celsius" selected>Celsius</option>
<option value="Kelvin">Kelvin</option>
<option value="Rankine">Rankine</option>
</select>
<input type="number" id="temperature" placeholder="Enter temperature in Fahrenheit">
<button id="convert">Convert</button>
<div class="result">
<p id="result-text"></p>
</div>
</div>
</div>
</div>
Expand Down
99 changes: 67 additions & 32 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,41 +16,12 @@ body {

}


.container {
background-color: rgba(245, 242, 242, 0.959);
padding: 20px;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
margin: 0 auto;
height: 250px;
max-width: 400px;
cursor: pointer;
transition: background-color 0.3s, transform 0.3s;
margin-top: 50px;
color: black;
}

.container:hover {
background-color: #c5cccf;
transform: scale(1.1);
}

.container {
background-color: rgba(233, 228, 228, 0.477);
border-color: #142245;
transform: scale(1.05);
}

h1 {
color: #090909;
}

.input-container {
margin-top: 20px;
margin-left: 20px;
margin-right: 20px;
margin-bottom: 20px;

}

label {
Expand All @@ -65,6 +36,7 @@ input[type="number"] {
margin-top: 5px;
border: 2px solid #ccc;
border-radius: 5px;
outline: none;
}

button {
Expand All @@ -88,7 +60,7 @@ button:hover {
margin-top: 20px;
font-weight: bold;
font-size: 18px;
color: rgb(7, 0, 7);
color: white;
}

@media (max-width: 768px) {
Expand All @@ -113,4 +85,67 @@ button:hover {
}
#dark,#light{
cursor: pointer;
}
}

.card {
margin: 0 auto;
height: 250px;
max-width: 500px;
transition: all 0.2s;
position: relative;
cursor: pointer;
margin: auto;
margin-top: 4rem;

}

.card-inner {
width: inherit;
height: inherit;
background: rgba(255,255,255,.05);
box-shadow: 0 0 10px rgba(0,0,0,0.25);
transition: background-color 0.3s, transform 0.3s;
backdrop-filter: blur(10px);
border-radius: 8px;
padding: 2rem;
}

.card-inner h1{
color: white;
}

.card:hover {
transform: scale(1.04);
}

.circle {
width: 100px;
height: 100px;
background: radial-gradient(#b0e633, #53ef7d);
border-radius: 50%;
position: absolute;
animation: move-up6 2s ease-in infinite alternate-reverse;
}

.circle:nth-child(1) {
top: -25px;
left: -25px;
}

.circle:nth-child(2) {
bottom: -25px;
right: -25px;
animation-name: move-down1;
}

@keyframes move-up6 {
to {
transform: translateY(-10px);
}
}

@keyframes move-down1 {
to {
transform: translateY(10px);
}
}