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

new web-app #47

Open
wants to merge 3 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
23 changes: 12 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,49 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Weather App</title>

<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Josefin+Sans:wght@600&family=Roboto:wght@300;400;500&display=swap" rel="stylesheet">

<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="w-card">

<div class="w-card">
<div class="searchbox">
<input type="text" placeholder="Enter city name" spellcheck="false">
<button>Search</button>
<button><i class="fa-solid fa-magnifying-glass"></i> Search</button>
</div>

<div class="error">
<p>Invalid City name </p>
<p>Invalid City name</p>
</div>

<div class="weather">
<img src="images/clouds.png" alt="" class="weather-icon">
<h2 class="temperature" id="temp">22°c</h2>
<h2 class="city" id="city-name">New Delhi</h2>

<div class="additional-details">
<div id="col1" class="column">
<img src="images/humidity.png" alt="" id="humidity-img">
<img src="images/humidity.png" alt="humidity-icon" id="humidity-img">
<div>
<p class="humidity">47%</p>
<p>Humidity</p>
</div>
</div>

<div id="col2" class="column">
<img src="images/wind.png" alt="">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" class="icon"><!-- Wind Icon -->
<path d="M288 32c0 17.7 14.3 32 32 32l32 0c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l320 0c53 0 96-43 96-96s-43-96-96-96L320 0c-17.7 0-32 14.3-32 32zm64 352c0 17.7 14.3 32 32 32l32 0c53 0 96-43 96-96s-43-96-96-96L32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l384 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c-17.7 0-32 14.3-32 32zM128 512l32 0c53 0 96-43 96-96s-43-96-96-96L32 320c-17.7 0-32 14.3-32 32s14.3 32 32 32l128 0c17.7 0 32 14.3 32 32s-14.3 32-32 32l-32 0c-17.7 0-32 14.3-32 32s14.3 32 32 32z"/>
</svg>
<div>
<p class="wind">8.3 kmph</p>
<p>Wind Speed</p>
</div>
</div>
</div>

</div>
</div>

<script src="script.js"></script>

</body>
</html>
</html>
129 changes: 63 additions & 66 deletions style.css
Original file line number Diff line number Diff line change
@@ -1,99 +1,96 @@
*{
padding: 0;
margin: 0;
font-family: 'Josefin Sans', sans-serif;
body {
font-family: 'Roboto', sans-serif;
display: flex;
background: linear-gradient(to right, #6a11cb, #2575fc);
justify-content: center;
align-items: center;
height: 100vh;
background-color: #f0f4f8;
margin: 0;
}

body{
background-color: rgb(23, 23, 23);
}

.w-card{
width: 90%;
max-width: 455px;
background: linear-gradient(135deg, rgb(18, 28, 43), rgb(1, 46, 69));
color: white;
margin: 70px auto;
border-radius: 22px;
padding: 44px 38px;
.w-card {
background-color: #ffffff;
border-radius: 10px;
box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
padding: 20px;
width: 350px;
text-align: center;
}

.searchbox{
width: 100%;
.searchbox {
display: flex;
align-items: center;
justify-content: space-between;

margin-bottom: 20px;
}
.searchbox input{
outline: none;
border: none;
background: lightcyan;
padding: 10px 28px;
flex: 1;

.searchbox input {
width: 75%;
padding: 10px;
border-radius: 5px;
border: 1px solid #ccc;
font-size: 16px;
border-radius: 28px;
}

button{
.searchbox button {
background-color: #2575fc;
color: white;
padding: 10px 15px;
border-radius: 5px;
border: none;
outline: none;
background: lightcyan;
border-radius: 28px;
padding: 10px 28px;
margin-left: 18px;
cursor: pointer;
transition: 0.3s;
font-size: 16px;
}
button:hover{
background-color: rgb(166, 254, 254);

.error p {
color: red;
display: none;
}

.weather-icon{
width: 200px;
margin-top: 20px;
.weather-icon {
width: 80px;
margin: 20px auto;
}
#temp{
font-size: 70px;
font-weight: 500;

.temperature {
font-size: 40px;
margin: 10px 0;
color: #333;
}
#city-name{
font-size: 56px;
font-weight: 400;

.city {
font-size: 24px;
color: #666;
}

.additional-details{
.additional-details {
display: flex;
align-items: center;
justify-content: space-between;
padding: 4px 28px;
margin-top: 45px;
margin-top: 20px;
}

.column{
.column {
display: flex;
flex-direction: column;
align-items: center;
text-align: left;
}
.column img{
width: 50px;
margin-right: 12px
width: 50%;
}

.humidity, .wind{
font-size: 22px;
font-weight: 500;
.column img,
.column svg {
width: 40px;
height: auto;
margin-bottom: 10px;
}

.weather{
display: none;
.column p {
margin: 0;
font-size: 14px;
color: #555;
}

.error{
font-size: 16px;
text-align: left;
margin: 8px 0px;
display: none;
}
.icon {
fill: #555;
width: 40px;
height: 40px;
}
Binary file added wind.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.