up styles

This commit is contained in:
Tykayn 2025-09-21 17:30:47 +02:00 committed by tykayn
parent 1048f4af45
commit 7971e48636
5 changed files with 32 additions and 33 deletions

View file

@ -167,7 +167,7 @@ class DemoResource:
<a href="/demo">&larr; Back to Map</a>
<a href="/">API Information</a>
<a href="/event">View Events</a>
<a href="https://source.cipherbliss.com/tykayn/oedb-backend" target="_blank" title="View Source Code on Cipherbliss">
<a href="https://source.cipherbliss.com/tykayn/oedb-backend" title="View Source Code on Cipherbliss">
<i class="fas fa-code-branch"></i> Source
</a>
</div>
@ -251,7 +251,7 @@ class DemoResource:
// Add attribution control with OpenStreetMap attribution
map.addControl(new maplibregl.AttributionControl({{
customAttribution: '© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors'
customAttribution: '© <a href="https://www.openstreetmap.org/copyright" >OpenStreetMap</a> contributors'
}}));
// Add marker for event location
@ -400,7 +400,7 @@ class DemoResource:
// Add link to view the event
const resultElement = document.getElementById('result');
resultElement.innerHTML += `<p><a href="/event/${{data.id}}" target="_blank">View Event</a> | <a href="/demo">Back to Map</a></p>`;
resultElement.innerHTML += `<p><a href="/event/${{data.id}}" >View Event</a> | <a href="/demo">Back to Map</a></p>`;
}})
.catch(error => {{
showResult(`Error: ${{error.message}}`, 'error');
@ -553,8 +553,8 @@ class DemoResource:
event_label = event.get('label', 'Unnamed Event')
coordinates = event.get('coordinates', [0, 0])
html += f'<li><a href="/event/{event_id}" target="_blank">{event_label}</a> '
html += f'<small>[<a href="https://www.openstreetmap.org/?mlat={coordinates[1]}&mlon={coordinates[0]}&zoom=15" target="_blank">map</a>]</small></li>'
html += f'<li><a href="/event/{event_id}" >{event_label}</a> '
html += f'<small>[<a href="https://www.openstreetmap.org/?mlat={coordinates[1]}&mlon={coordinates[0]}&zoom=15" >map</a>]</small></li>'
html += "</ul>"
else:
@ -1207,7 +1207,7 @@ class DemoResource:
}
// Add link to view full event
popupContent += `<p><a href="/event/${properties.id}" target="_blank">View Event</a></p>`;
popupContent += `<p><a href="/event/${properties.id}" >View Event</a></p>`;
popupContent += '</div>';
@ -1468,7 +1468,7 @@ class DemoResource:
<a href="/">Home</a>
<a href="/demo">Demo Map</a>
<a href="/demo/by-what">Events by Type</a>
<a href="https://source.cipherbliss.com/tykayn/oedb-backend" target="_blank" title="View Source Code on Cipherbliss">
<a href="https://source.cipherbliss.com/tykayn/oedb-backend" title="View Source Code on Cipherbliss">
<i class="fas fa-code-branch"></i> Source
</a>
</div>
@ -1504,7 +1504,7 @@ class DemoResource:
// Add attribution control with OpenStreetMap attribution
map.addControl(new maplibregl.AttributionControl({
customAttribution: '© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors'
customAttribution: '© <a href="https://www.openstreetmap.org/copyright" >OpenStreetMap</a> contributors'
}));
// Store all events and their types
@ -1696,7 +1696,7 @@ class DemoResource:
} else if (typeof value === 'object') {
displayValue = `<pre style="margin: 0; white-space: pre-wrap;">${JSON.stringify(value, null, 2)}</pre>`;
} else if (typeof value === 'string' && value.startsWith('http')) {
displayValue = `<a href="${value}" target="_blank">${value}</a>`;
displayValue = `<a href="${value}" >${value}</a>`;
} else {
displayValue = String(value);
}
@ -1897,8 +1897,8 @@ class DemoResource:
event_label = event.get('label', 'Unnamed Event')
coordinates = event.get('coordinates', [0, 0])
html += f'<li><a href="/event/{event_id}" target="_blank">{event_label}</a> '
html += f'<small>[<a href="https://www.openstreetmap.org/?mlat={coordinates[1]}&mlon={coordinates[0]}&zoom=15" target="_blank">map</a>]</small></li>'
html += f'<li><a href="/event/{event_id}" >{event_label}</a> '
html += f'<small>[<a href="https://www.openstreetmap.org/?mlat={coordinates[1]}&mlon={coordinates[0]}&zoom=15" >map</a>]</small></li>'
html += "</ul>"
else:
@ -1933,7 +1933,7 @@ class DemoResource:
"""
Handle GET requests to the /demo/view-events endpoint.
Delegates to the demo_view_events resource.
Args:
req: The request object.
resp: The response object.