link to Editor, API and GitHub in attribution

This commit is contained in:
Laura Klünder 2017-12-07 20:50:43 +01:00
parent baaec3cc9b
commit 66547f27e7
3 changed files with 7 additions and 1 deletions

View file

@ -436,7 +436,7 @@ main:not([data-view=route-result]) #route-dots {
color: #b2b2b2; color: #b2b2b2;
} }
#popup-buttons { #popup-buttons, #attributions {
display: none; display: none;
} }
.location-popup .leaflet-popup-content { .location-popup .leaflet-popup-content {

View file

@ -787,6 +787,7 @@ c3nav = {
zoomSnap: 0, zoomSnap: 0,
zoomControl: false zoomControl: false
}); });
c3nav.map.attributionControl.setPrefix($('#attributions').html());
if (L.Browser.chrome && !('ontouchstart' in window)) { if (L.Browser.chrome && !('ontouchstart' in window)) {
$('.leaflet-touch').removeClass('leaflet-touch'); $('.leaflet-touch').removeClass('leaflet-touch');
} }

View file

@ -5,6 +5,11 @@
{% block content %} {% block content %}
<main class="map" data-state="{{ state }}"{% if embed %} data-embed{% endif %}> <main class="map" data-state="{{ state }}"{% if embed %} data-embed{% endif %}>
<section id="attributions">
<a href="{% url 'editor.index' %}" target="_blank">{% trans 'Editor' %}</a> //
<a href="/api/" target="_blank">{% trans 'API' %}</a> //
<a href="https://github.com/c3nav/c3nav/" rel="external" target="_blank">{% trans 'GitHub' %}</a>
</section>
<section id="map" data-bounds="{{ bounds }}" data-levels="{{ levels }}"{% if tile_cache_server %} data-tile-server="{{ tile_cache_server }}"{% endif %}></section> <section id="map" data-bounds="{{ bounds }}" data-levels="{{ levels }}"{% if tile_cache_server %} data-tile-server="{{ tile_cache_server }}"{% endif %}></section>
{% if not embed %} {% if not embed %}
<section id="popup-buttons"> <section id="popup-buttons">