forked from TreverHibbs/Persona5Startpage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.js
29 lines (24 loc) · 835 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
//import { getCoordinates } from "./lib/getCoordinate.js";
import { userInterface } from "./lib/userInterface.js";
import { animateSearch } from "./lib/animateSearch.js";
// get coordinates tool for development
//getCoordinates();
// only display the ui when the page is fully loaded
window.onload = (_) => {
//start search animation
animateSearch();
//make search shortcut listener
function logKey(e) {
if (e.code == "Slash") {
e.preventDefault();
document.getElementById("search-input").focus();
}
}
document.addEventListener("keydown", logKey);
const gridContainer = document.querySelector(".grid-container");
gridContainer.classList.remove("hidden");
const mapImage = document.querySelector(".map-image");
mapImage.classList.remove("hidden");
};
//initialize interface
userInterface();