nfc-web/web/nfc-theme/templates/category.html
2023-05-01 22:59:40 +03:00

48 lines
1.7 KiB
HTML

<!DOCTYPE html>
<html lang="{{ DEFAULT_LANG }}">
<head>
<base target="_top">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ category }}</title>
<link rel="shortcut icon" type="image/x-icon" href="/images/favicon.ico" />
<link rel="stylesheet" href="{{ SITEURL }}/theme/local.css">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.3/dist/leaflet.css" integrity="sha256-kLaT2GOSpHechhsozzB+flnD+zUyjE2LlfWPgU04xyI=" crossorigin=""/>
<style>
html, body { height: 100%; margin: 0; padding: 0; }
</style>
<script src="https://unpkg.com/leaflet@1.9.3/dist/leaflet.js" integrity="sha256-WBkoXOwTeyKclOHuWtc+i2uENFpDZ9YPdf5Hf+D7ewM=" crossorigin=""></script>
</head>
<body>
<script>
var nfcTags = {
"type": "FeatureCollection",
"title": "{{ category }}",
"id" : "{{ category.slug }}",
"features": [
{% for article in articles_page.object_list %}
{% if article.metadata['lat'] and article.metadata['lon'] %}
{
"type": "Feature",
"id": "{{ article.slug }}",
"geometry": {
"type": "Point",
"coordinates": [{{ article.metadata['lon'] }}, {{ article.metadata['lat'] }}]
},
"properties": {
"title": "{{ article.title }}"
},
},
{% endif %}
{% endfor %}
]
};
</script>
<div id='map'></div>
<script src="{{ SITEURL }}/theme/map.js"></script>
</body>
</html>