Cailean Finn
5 months ago
8 changed files with 161 additions and 10 deletions
After Width: | Height: | Size: 249 KiB |
After Width: | Height: | Size: 202 KiB |
@ -0,0 +1,29 @@ |
|||
// Example location data
|
|||
const locationData = { |
|||
'digital-hub': { |
|||
text: '10-13 Thomas Street', |
|||
imageUrl: '/public/images/locations/digital-hub.png' |
|||
}, |
|||
'pallas-projects': { |
|||
text: '115-117, The Coombe, The Liberties, Dublin, D08 A970', |
|||
imageUrl: 'public/images/locations/pallas.png' |
|||
} |
|||
// Add more locations as needed
|
|||
}; |
|||
|
|||
// Function to update the content
|
|||
function updateLocationContent(locationKey) { |
|||
const location = locationData[locationKey]; |
|||
if (location) { |
|||
document.getElementById('location-text').innerText = location.text; |
|||
document.getElementById('location-img').src = location.imageUrl; |
|||
} |
|||
} |
|||
|
|||
// Add event listeners to buttons
|
|||
document.querySelectorAll('.location-button').forEach(button => { |
|||
button.addEventListener('click', (event) => { |
|||
const locationKey = event.currentTarget.getAttribute('data-location'); |
|||
updateLocationContent(locationKey); |
|||
}); |
|||
}); |
@ -0,0 +1,33 @@ |
|||
{% extends "base.html" %} |
|||
|
|||
{% block title %}{{ '| '+ title }}{% endblock %} |
|||
|
|||
{% block content %} |
|||
<div id="main-wrapper"> |
|||
{% include '_nav.html' %} |
|||
<div id="main-container-locations"> |
|||
<div id="location-list"> |
|||
<div id="location-button-list"> |
|||
<div class="location-button" data-location="digital-hub">The Digital Hub</div> |
|||
<div class="location-button" data-location="pallas-projects">Pallas Projects</div> |
|||
</div> |
|||
<div id="location-information"> |
|||
<div id="location-text"> |
|||
10-13 Thomas Street |
|||
</div> |
|||
<a target="_blank" href="https://www.google.com/maps/dir//115-117,+The+Coombe,+The+Liberties,+Dublin,+D08+A970/@53.3391179,-6.3569591,12z/data=!4m8!4m7!1m0!1m5!1m1!1s0x48670e89423ed249:0x8aa3669566840ff9!2m2!1d-6.274559!2d53.3391463?entry=ttu"> |
|||
<div class="location-button">↳ Directions</div> |
|||
</a> |
|||
</div> |
|||
</div> |
|||
<div id="location-images"> |
|||
<div id="location-image"> |
|||
<img id="location-img" src="{{ url_for('static', filename='images/locations/digital-hub.png') }}"> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
|
|||
<script type="module" src="{{ url_for('static', filename='js/skybox.js') }}"></script> |
|||
<script type="module" src="{{ url_for('static', filename='js/locations.js') }}"></script> |
|||
{% endblock content %} |
Loading…
Reference in new issue