diff options
author | lonkaars <loek@pipeframe.xyz> | 2024-03-23 20:51:35 +0100 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2024-03-23 20:51:35 +0100 |
commit | 6f48041c9dd52f4d98c3defec030232aa0bbfeb9 (patch) | |
tree | 092020453e1893021dcf5be7b2f7d4ce93163f87 /ui/grid.html | |
parent | eb46bad3d09e05fe40c4637c3d1aca5d0a263514 (diff) |
merge Sean's code
Diffstat (limited to 'ui/grid.html')
-rw-r--r-- | ui/grid.html | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/ui/grid.html b/ui/grid.html deleted file mode 100644 index 70810e5..0000000 --- a/ui/grid.html +++ /dev/null @@ -1,47 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <title>Four Sections Layout</title> - <link rel="stylesheet" href="css/style.css"> - <script type="module" src="js/main.js"></script> -</head> -<body> - <div class="container"> - <div class="section overview_control" id="overview_control"></div> - <div class="section notifications" id="notifications"></div> - <div class="section lfv_selector" id="lfv_selector"></div> - <div class="section map" id="map"></div> - </div> - - <script> - // Function to include HTML content from given URL into specified element - async function includeHTML(url, elementId) { - const response = await fetch(url); - const html = await response.text(); - document.getElementById(elementId).innerHTML = html; - } - - // Function to handle item click and load respective HTML page - function handleItemClick(event) { - const target = event.target.getAttribute('data-target'); - includeHTML(`sections/lfv/${target}.html`, 'overview_control'); - } - - // Include HTML content into respective div elements - // includeHTML('sections/overview_control.html', 'overview_control'); - includeHTML('sections/notifications.html', 'notifications'); - includeHTML('sections/lfv_selector.html', 'lfv_selector'); - includeHTML('sections/map.html', 'map'); - - // Add event listener to each item in the list (event delegation) - document.getElementById('lfv_selector').addEventListener('click', function(event) { - if (event.target.tagName === 'LI') { - handleItemClick(event); - } - }); - </script> - -</body> -</html>
\ No newline at end of file |