Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
CJ1899 committed Oct 9, 2024
1 parent 35711f4 commit 87d8497
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 deletions.
18 changes: 1 addition & 17 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ <h1 style="color: #89b4fa">CJ1899</h1>
<div align="center"><img src="images/clrline.gif"></div>
<div align="center"><img src="images/clrline.gif"></div>
<div align="center"><img src="images/clrline.gif"></div>
<div align="center"><img src="images/effect.gif"></div>
<br>
<div align="center"><img src="images/sunset.gif"></div>
<br>
<div id="weather-container" class="weather-box">
<div class="weather-content">
Expand Down Expand Up @@ -79,7 +76,6 @@ <h2>Hawler Now:</h2>
</div>

<script>
// Function to fetch and display the local time for Hawler
function updateTime() {
const now = new Date();

Expand All @@ -91,27 +87,20 @@ <h2>Hawler Now:</h2>
hour12: true,
};

// Format the time based on the specified timezone
const timeString = now.toLocaleTimeString('en-GB', options);

// Update only the time span, keeping the icon intact
document.querySelector('.time').innerText = `Time: ${timeString}`;
}

// Update the time every second
setInterval(updateTime, 1000);

// Call the function once initially to display time immediately
updateTime();

// Fetch weather information from wttr.in
fetch('https://wttr.in/Hawler?format=%t+%h+%w+%M')
.then(response => response.text())
.then(data => {
// Split data into weather details
const [temp, humidity, wind, condition] = data.split(' ');

// Update the HTML with the weather data
document.querySelector('.temp').innerText = `Temperature: ${temp}`;
document.querySelector('.humidity').innerText = `Humidity: ${humidity}`;
document.querySelector('.wind').innerText = `Wind Speed: ${wind}`;
Expand All @@ -123,12 +112,7 @@ <h2>Hawler Now:</h2>
});
</script>
</div>
<div id="eff">
<img src="images/down.gif">
<img src="images/rdollar.gif">


</div>
<br>
<div class="pagination">
<a href=""><i class="fa-solid fa-chevron-left"></i></a>
<a href="index.html" class="active">1</a>
Expand Down
16 changes: 12 additions & 4 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#body {
/*background-image: url('images/background.jpg');*/
/*background-image: url('images/5006.png');*/
background-color: #1a1a1a;
background-color: #181818;
background-position: center;
background-attachment: fixed;
/*background-size: 260px 260px;*/
Expand All @@ -21,6 +21,14 @@
margin: 0px;
}

a {
color: #ff6f61;
}

a:hover {
color #ff9473;
}

.welcome {
color: #ff6347;
font-size: 28px;
Expand Down Expand Up @@ -383,15 +391,15 @@
color: #333333
}

#eff {
/* {
padding: 10px;
display: flex;
justify-content: space-between;
align-items: center;
}
}*/

.links {
color: #89b4fa;
/* color: #89b4fa;*/
font-size: 16px;
white-space: nowrap;
}
Expand Down

0 comments on commit 87d8497

Please sign in to comment.