geo.js fix

This commit is contained in:
NN Solex 2023-05-01 22:59:40 +03:00
parent 20c0224bc8
commit 4203301112
35 changed files with 556 additions and 23 deletions

View file

@ -9,9 +9,12 @@
<article class="hentry">
<header>
<h2 class="entry-title">
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark">{{ article.category }}: {{ article.title }}</a>
<a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark">{{ article.category }}: {{ article.title }}</a>
{% if article.metadata['geohash'] %}
[<a href="geo:{{ article.metadata['lat'] }},{{ article.metadata['lon'] }}">{{ article.metadata['geohash'] }}</a>]
{% endif %}
</h2>
<span class="entry-summary">{{ article.summary }}</span>
</header>
</article>
{% endfor %}

View file

@ -4,7 +4,7 @@
<div class="entry-content">
{{ article.content }}
{% if article.metadata.geohash %}
<a href="{{ SITEURL }}/{{ article.category.url }}">NFC</a>
<a href="{{ SITEURL }}/{{ article.category.url }}">Map</a>
{% endif %}
</div>
</section>

View file

@ -24,6 +24,7 @@
"id" : "{{ category.slug }}",
"features": [
{% for article in articles_page.object_list %}
{% if article.metadata['lat'] and article.metadata['lon'] %}
{
"type": "Feature",
"id": "{{ article.slug }}",
@ -35,6 +36,7 @@
"title": "{{ article.title }}"
},
},
{% endif %}
{% endfor %}
]
};