|
1 | | -{% extends "base.html" %} {% block content %} |
| 1 | +{% extends "base.html" %} |
| 2 | +{% block title %}Feeds | {% endblock title %} |
| 3 | + |
| 4 | +{% block content %} |
2 | 5 | <div class="container px-4 py-8 max-w-3xl text-wrap"> |
3 | 6 |
|
4 | | - <h1 class="text-3xl mb-6 py-4">Predefined Feeds</h1> |
| 7 | + <h1 class="text-3xl mb-6 py-4">OPTIMAP feeds</h1> |
| 8 | + |
| 9 | + {% if global_feeds %} |
| 10 | + <h2 class="text-2xl mb-4">General feeds</h2> |
| 11 | + <p>Subscribe to research works from all sources, time periods, and regions.</p> |
| 12 | + <ul class="list-disc list-inside mb-8"> |
| 13 | + {% for feed in global_feeds %} |
| 14 | + <li> |
| 15 | + <a href="{{ feed.url }}" class="text-blue-600 hover:underline"> |
| 16 | + {{ feed.title }} |
| 17 | + </a> |
| 18 | + </li> |
| 19 | + {% endfor %} |
| 20 | + </ul> |
| 21 | + {% endif %} |
| 22 | + |
| 23 | + <h2 class="text-2xl mb-4">Global region feeds</h2> |
| 24 | + <p>Subscribe to research works from all sources and time periods for selected regions.</p> |
| 25 | + <ul class="list-disc list-inside space-y-2 mb-8"> |
| 26 | + {% for region in regions %} |
| 27 | + <li class="flex flex-wrap items-center space-x-2"> |
| 28 | + <strong>{{ region.name }}</strong> |
| 29 | + <span>({{ region.get_region_type_display }})</span>:<br> |
5 | 30 |
|
6 | | - <p class="lead">Follow your favourite countinent or ocean with these predefined feeds.</p> |
| 31 | + <a href="{% url 'optimap:feed-georss-by-slug' region.name|slugify %}" |
| 32 | + class="text-blue-600 hover:underline" |
| 33 | + title="GeoRSS for {{ region.name }}">GeoRSS</a> |
| 34 | + <span>|</span> |
7 | 35 |
|
| 36 | + <a href="{{% url 'optimap:feed-geoatom-by-slug' region.name|slugify %}" |
| 37 | + class="text-blue-600 hover:underline" |
| 38 | + title="Atom for {{ region.name }}">GeoAtom</a> |
8 | 39 |
|
9 | | - <ul class="list-disc list-inside space-y-2"> |
10 | | - {% for region in regions %} |
11 | | - <li class="flex flex-wrap items-center space-x-2"> |
12 | | - <strong>{{ region.name }}</strong> ({{ region.get_region_type_display }}): |
13 | | - |
14 | | - {# GeoRSS feed link #} |
15 | | - <a |
16 | | - href="{% url 'optimap:feed-georss-by-slug' region.name|slugify %}" |
17 | | - class="text-blue-600 hover:underline" |
18 | | - title="GeoRSS feed for {{ region.name }}" |
19 | | - > |
20 | | - GeoRSS |
21 | | - </a> |
22 | | - <span>|</span> |
23 | | - |
24 | | - {# Atom feed link #} |
25 | | - <a |
26 | | - href="{% url 'optimap:feed-geoatom-by-slug' region.name|slugify %}" |
27 | | - class="text-blue-600 hover:underline" |
28 | | - title="Atom feed for {{ region.name }}" |
29 | | - > |
30 | | - GeoAtom |
31 | | - </a> |
32 | | - |
33 | | - <small class="text-gray-500"> |
34 | | - (updated {{ region.last_loaded|date:"Y-m-d H:i" }}) |
35 | | - </small> |
36 | | - </li> |
| 40 | + <small class="text-gray-500">(updated {{ region.last_loaded|date:"Y-m-d H:i" }})</small> |
| 41 | + </li> |
37 | 42 | {% endfor %} |
38 | 43 | </ul> |
39 | 44 |
|
40 | | - <strong class="font-semibold mt-8 mb-4">Sources & Licenses</strong> |
41 | | - |
42 | | - <ul class="list-disc list-inside space-y-2 text-sm text-gray-700"> |
| 45 | + <span class="mt-8 mb-4">Sources & licenses for region data:</span> |
| 46 | + <ul class="list-inline text-sm text-gray-700"> |
43 | 47 | {% for region in regions %} |
44 | | - <li class="flex items-center space-x-2"> |
45 | | - <span class="flex-shrink-0"></span> |
46 | | - <a |
47 | | - href="{{ region.source_url }}" |
48 | | - title="Source for geospatial extent of {{ region.name }}" |
49 | | - target="_blank" |
50 | | - class="flex-1 min-w-0 truncate text-blue-600 hover:underline" |
51 | | - > |
52 | | - {{ region.name }} |
53 | | - </a> |
54 | | - <span class="flex-shrink-0">(<a href="{{ region.license }}">license URL</a>)</span> |
55 | | - </li> |
| 48 | + <li class="list-inline-item flex mr-0"> |
| 49 | + <a href="{{ region.source_url }}" |
| 50 | + class="flex-1 min-w-0 truncate text-blue-600 hover:underline" |
| 51 | + target="_blank" |
| 52 | + title="Source for {{ region.name }}">{{ region.name|safe }}</a> <span>(<a href="{{ region.license }}">license</a>)</span> |
| 53 | + {% if not forloop.last %}, {% endif %} |
| 54 | + </li> |
56 | 55 | {% endfor %} |
57 | 56 | </ul> |
| 57 | + |
58 | 58 | </div> |
59 | | -{% endblock %} |
| 59 | +{% endblock content %} |
0 commit comments