Skip to content
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
20 changes: 17 additions & 3 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<html lang="en">

<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="/public/styles.css" />
<link href='https://fonts.googleapis.com/css?family=Kumbh Sans' rel='stylesheet'>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.2/css/all.min.css" />
Expand Down Expand Up @@ -33,10 +35,10 @@
</div>
<div class="header-icons">
<button title="Help" id="help-btn" tabindex="0"
aria-label="select for read user manual" onclick="window.open('/src/pages/user-guide/index.html', '_blank');"
aria-label="select for read user manual"
style="cursor: pointer;">
Help <i class="fa fa-question-circle" aria-hidden="true"></i>
</button>
Help <i class="fa fa-question-circle" aria-hidden="true"></i>
</button>
</div>
</div>
</header>
Expand Down Expand Up @@ -125,6 +127,18 @@ <h1>Find Distance</h1>

<div tabindex="0" aria-label="focused on map. use arrow keys to navigate" id="map"></div>

<div id="help-modal" class="modal" tabindex="-1" role="dialog" aria-labelledby="help-modal-title" style="display: none;">
<div class="modal-content">
<div class="modal-header">
<h2 id="help-modal-title">World-Map-Explorer – User Manual</h2>
<button class="close-modal" aria-label="Close help manual">&times;</button>
</div>
<div class="modal-body">
<iframe id="help-content" src="/src/pages/user-guide/index.html" title="User Manual" loading="lazy" sandbox="allow-same-origin allow-scripts"></iframe>
</div>
</div>
</div>

</body>
<footer>
<span id="status-bar"></span>
Expand Down
7 changes: 3 additions & 4 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/*
* Copyright (c) 2023-25 Zendalona
* This software is licensed under the GPL-3.0 License.
Expand All @@ -12,7 +11,7 @@ import { addDisclaimer } from "./layout/disclaimer.js";
import { detailsCloseButton, distanceBox, distanceIcon, input } from "./utils/dom-elements.js";
import { lockTabKey } from "./utils/keydown-helpers.js";
import { closeSound, successSound } from "./utils/sounds.js";
let marker
let marker;
addDisclaimer() // Add a disclaimer to the UI

fetch('https://ipinfo.io/json') //fetching the location of the user and setting the map to that location, if failed then setting it to the default location
Expand All @@ -22,9 +21,9 @@ fetch('https://ipinfo.io/json') //fetching the location of the user and setting
map.setView([lat, lon], 7)
})
.catch(error => {
map.setView([10.16,76.64],7)
map.setView([10.16,76.64],7)
}).finally(()=>{
window.marker = new Marker(map.getCenter()).addTo(map)
marker = new Marker(map.getCenter()).addTo(map)
})
document.addEventListener('keydown',handleKeyDownOnDocument) // Initialize event listeners for key shortcuts on the document, general any time shortcuts
addListenerstoUI() // Initialize event listeners for the UI elements on the page
Expand Down
Loading