Skip to content

Commit

Permalink
Update index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
jardelva96 authored Nov 16, 2024
1 parent 2d78c5d commit 81db0d9
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -214,21 +214,31 @@ <h2>My Projects</h2>
<p>&copy; 2024 Jardel Alves. All rights reserved. | Contact me at: <a href="mailto:[email protected]">[email protected]</a></p>
<p>WhatsApp: <a href="https://wa.me/5548988168349?text=Olá%20Jardel!">+55 48 98816-8349</a></p>
</footer>
<script>
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script>
document.addEventListener('DOMContentLoaded', () => {
// Inicializa o mapa
const map = L.map('map').setView([-27.5954, -48.5480], 12);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: '&copy; OpenStreetMap contributors'
}).addTo(map);
L.marker([-27.5954, -48.5480]).addTo(map).bindPopup('Florianópolis, SC').openPopup();

// Atualiza hora e data
const timeElement = document.getElementById('time');
const dateElement = document.getElementById('date');
const updateTime = () => {
const now = new Date();
timeElement.textContent = now.toLocaleTimeString();
dateElement.textContent = now.toLocaleDateString();
const hours = String(now.getHours()).padStart(2, '0');
const minutes = String(now.getMinutes()).padStart(2, '0');
const seconds = String(now.getSeconds()).padStart(2, '0');
timeElement.textContent = `${hours}:${minutes}:${seconds}`;

const day = String(now.getDate()).padStart(2, '0');
const month = String(now.getMonth() + 1).padStart(2, '0');
const year = now.getFullYear();
dateElement.textContent = `${day}/${month}/${year}`;
};
setInterval(updateTime, 1000);
updateTime();
Expand Down

0 comments on commit 81db0d9

Please sign in to comment.