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 index.html #399

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
110 changes: 36 additions & 74 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,113 +2,75 @@
<html lang="en">

<head>

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
<title>Maa-Vimala</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
</head>

<body id="body">
<header>
<nav class="navbar">
<h1 id="logoName">Maa-Vimala</h1>
<ul class="nav-links">
<li><i class="fa-solid fa-house"></i><a href="#home"> Home </a></li>
<li><i class="fa-solid fa-info-circle"></i><a href="#about"> About Us </a></li>
<li><i class="fa-solid fa-concierge-bell"></i><a href="#services"> Services </a></li>
<li><i class="fa-solid fa-star"></i><a href="#reviews"> Reviews </a></li>
<li><i class="fa-solid fa-envelope"></i><a href="#contact"> Contact Us </a></li>
</ul>
</nav>
</header>
<!-- <div>
<div class="nav-info">
<p id="time">22 : 33 AM</p>
<div class="nav-info-ele">
<p id="date">24 Aug 2022</p>
<div id="nav-extra">
<span id="whether">Temp : c</span>
<span id="wind">Wind : 17.65</span>
</div>
</div>
</div> -->
</div>
<header>
<nav class="navbar">
<img src="flower-lotus-logo-design-template-vector.jpg" alt="Maa-Vimala Logo" id="logo" />
<h1 id="logoName">Maa-Vimala</h1>
<ul class="nav-links">
<li><i class="fa-solid fa-house"></i><a href="#home"> Home </a></li>
<li><i class="fa-solid fa-right-to-bracket"></i><a href="blog-app/views/login.html">Login</a></li>
<li><i class="fa-solid fa-info-circle"></i><a href="about.html"> About Us </a></li>
<li><i class="fa-solid fa-star"></i><a href="review.html"> Reviews </a></li>
<li><i class="fa-solid fa-envelope"></i><a href="contact.html"> Contact Us </a></li>
<li><i class="fa-solid fa-blog"></i><a href="blog-app\views\register.html"> Blog </a></li>
</ul>
</nav>
</header>
<div class="cursor" id="custom-cursor"></div>
<div>
<div>
<div>
<h1 id="search-txt">Start Typing To Search...</h1>
</div>
<!-- <input type="text" name="" id="input_text"> -->
<div class="search-container">
<input type="text" id="input_text" class="search-bar" placeholder="">
<i class="fas fa-search search-icon"></i>
</div>
</div>
<div>
<ul id="content" class="max-h-[300px] overflow-y-scroll">
<!-- <li>Search On<div>
<i class="fa fa-google"></i>
<i class="fa fa-youtube"></i>
</div></li>
<li>Wikipedia</li>
<li>Maths</li>
<li>Word Search</li> -->
</ul>
</div>
<div id="loader"></div>
<div class="result" id="result">
</div>
<div class="result" id="result"></div>
<div id="link">
<a href="https://github.com/Web403/Maa-Vimala/blob/main/README.md">Read Me</a>
</div>
</div>
<footer>
<p>&copy; 2024 Maa-Vimala. All rights reserved.</p>
<p>Visit count: <span id="visit-count">0</span></p>
</footer>

<script>
let time = document.getElementById('time');
let date = document.getElementById('date');
let whether = document.getElementById('whether');
let wind = document.getElementById('wind');
const currentDate = new Date();
const day = currentDate.getDate();
const month = currentDate.getMonth() + 1;
const year = currentDate.getFullYear();
const hour = currentDate.getHours();
const minute = currentDate.getMinutes();
var months = [ "Jan", "Feb", "March", "April", "May", "June",
"July", "Aug", "Sep", "Oct", "Nov", "Dec" ];
let timeext;
hour < 12? timeext = "AM" : timeext = "PM";
setInterval(() => {
time.innerText = hour + " : " + minute + " " + timeext;
}, 60000);
date.innerText = day + " " + months[month] + " " + year;
// Existing script code here...

setInterval(() => {
time.innerText = ""
}, 60000);
function getlocation() {
if (navigator.geolocation) {
console.log("done")
navigator.geolocation.getCurrentPosition(showPosition)
}
else {
console.log("Sorry! your browser is not supporting")
}
// Function to update visit count
function updateVisitCount() {
let visitCount = localStorage.getItem('visitCount');
visitCount = visitCount ? parseInt(visitCount) + 1 : 1; // Increment or set to 1
localStorage.setItem('visitCount', visitCount);
document.getElementById('visit-count').innerText = visitCount;
}

async function showPosition(position) {
const response = await fetch(`https://api.open-meteo.com/v1/forecast?latitude=${position.coords.latitude}&longitude=${position.coords.longitude}&current=temperature_2m,wind_speed_10m&hourly=temperature_2m,relative_humidity_2m,wind_speed_10m`);
const wdata = await response.json();
console.log(wdata);
whether.innerText = "Temp : " + wdata.current.temperature_2m + " c";
wind.innerText = "Wind : " + wdata.current.wind_speed_10m + " KM/H";
}
getlocation()
// Call the function when the page loads
window.onload = function() {
updateVisitCount();
getlocation(); // Ensure location fetching is also called on page load
};
</script>
<script src="script.js"></script>
</body>

</html>
</html>