diff --git a/oedb/resources/demo.py b/oedb/resources/demo.py index d0cdc43..1ca3b3c 100644 --- a/oedb/resources/demo.py +++ b/oedb/resources/demo.py @@ -167,7 +167,7 @@ class DemoResource: ← Back to Map API Information View Events - + Source @@ -251,7 +251,7 @@ class DemoResource: // Add attribution control with OpenStreetMap attribution map.addControl(new maplibregl.AttributionControl({{ - customAttribution: '© OpenStreetMap contributors' + customAttribution: '© OpenStreetMap 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 += `

View Event | Back to Map

`; + resultElement.innerHTML += `

View Event | Back to Map

`; }}) .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'
  • {event_label} ' - html += f'[map]
  • ' + html += f'
  • {event_label} ' + html += f'[map]
  • ' html += "" else: @@ -1207,7 +1207,7 @@ class DemoResource: } // Add link to view full event - popupContent += `

    View Event

    `; + popupContent += `

    View Event

    `; popupContent += ''; @@ -1468,7 +1468,7 @@ class DemoResource: Home Demo Map Events by Type - + Source @@ -1504,7 +1504,7 @@ class DemoResource: // Add attribution control with OpenStreetMap attribution map.addControl(new maplibregl.AttributionControl({ - customAttribution: '© OpenStreetMap contributors' + customAttribution: '© OpenStreetMap contributors' })); // Store all events and their types @@ -1696,7 +1696,7 @@ class DemoResource: } else if (typeof value === 'object') { displayValue = `
    ${JSON.stringify(value, null, 2)}
    `; } else if (typeof value === 'string' && value.startsWith('http')) { - displayValue = `${value}`; + displayValue = `${value}`; } 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'
  • {event_label} ' - html += f'[map]
  • ' + html += f'
  • {event_label} ' + html += f'[map]
  • ' html += "" 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. diff --git a/oedb/resources/demo/demo_main.py b/oedb/resources/demo/demo_main.py index d7484ca..519164f 100644 --- a/oedb/resources/demo/demo_main.py +++ b/oedb/resources/demo/demo_main.py @@ -114,7 +114,7 @@ class DemoMainResource:

    OpenStreetMap Authentication

    -

    Authenticate with your OpenStreetMap account to include your username in reports.

    + Login with OpenStreetMap @@ -138,23 +138,23 @@ class DemoMainResource:

    API Endpoints:

    Demo Pages:

    + Add New Event

    - +

    @@ -180,7 +180,7 @@ class DemoMainResource: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png' ], tileSize: 256, - attribution: '© OpenStreetMap contributors' + attribution: '© OpenStreetMap contributors' } }, layers: [ @@ -208,7 +208,7 @@ class DemoMainResource: // Add attribution control with OpenStreetMap attribution map.addControl(new maplibregl.AttributionControl({ - customAttribution: '© OpenStreetMap contributors' + customAttribution: '© OpenStreetMap contributors' })); // Style switcher functionality @@ -348,7 +348,7 @@ class DemoMainResource: } else if (typeof value === 'object') { displayValue = `
    ${JSON.stringify(value, null, 2)}
    `; } else if (typeof value === 'string' && value.startsWith('http')) { - displayValue = `${value}`; + displayValue = `${value}`; } else { displayValue = String(value); } diff --git a/oedb/resources/demo/static/demo_auth.js b/oedb/resources/demo/static/demo_auth.js index 81fba57..2b868c7 100644 --- a/oedb/resources/demo/static/demo_auth.js +++ b/oedb/resources/demo/static/demo_auth.js @@ -114,13 +114,12 @@ class OSMAuth { html += '
    '; html += '
    '; html += `

    Logged in as ${this.username}

    `; - html += `

    View OSM Profile

    `; + html += `

    View OSM Profile

    `; html += ``; html += ``; html += '
    '; html += '
    '; } else { - html += '

    Authenticate with your OpenStreetMap account to include your username in reports.

    '; html += ``; html += ''; html += 'Login with OpenStreetMap'; diff --git a/oedb/resources/demo/static/demo_styles.css b/oedb/resources/demo/static/demo_styles.css index c5c5a91..b19b586 100644 --- a/oedb/resources/demo/static/demo_styles.css +++ b/oedb/resources/demo/static/demo_styles.css @@ -82,7 +82,7 @@ button:hover { #map { width: 100%; - height: 300px; + height: 100vh; margin-bottom: 15px; border-radius: 4px; } diff --git a/oedb/resources/demo/templates/traffic.html b/oedb/resources/demo/templates/traffic.html index 0621f2e..39e74a0 100644 --- a/oedb/resources/demo/templates/traffic.html +++ b/oedb/resources/demo/templates/traffic.html @@ -32,7 +32,7 @@

    View OSM Profile

    +

    View OSM Profile

    @@ -441,8 +441,8 @@ const resultElement = document.getElementById('result'); resultElement.innerHTML += `

    - View Report on Server | - View Saved Reports | + View Report on Server | + View Saved Reports | Back to Map

    `;