summaryrefslogtreecommitdiff
path: root/app/planner/templates/planner
diff options
context:
space:
mode:
authorlxf <sng@luxagraf.net>2022-02-06 13:47:00 -0500
committerlxf <sng@luxagraf.net>2022-02-06 13:47:00 -0500
commit129e788c7bd41be000ddc18dd5252a66fc1bee03 (patch)
tree4568c0a916e3bbec0002f0ca79a6e3ce563faa0c /app/planner/templates/planner
parent13c0f7653855b4feb433eeeea513f41693cdb2af (diff)
plan: added urls and views for camp ideas
Diffstat (limited to 'app/planner/templates/planner')
-rw-r--r--app/planner/templates/planner/base.html1
-rw-r--r--app/planner/templates/planner/idea-list.html35
-rw-r--r--app/planner/templates/planner/list.html2
3 files changed, 37 insertions, 1 deletions
diff --git a/app/planner/templates/planner/base.html b/app/planner/templates/planner/base.html
index 4de5ce7..b465910 100644
--- a/app/planner/templates/planner/base.html
+++ b/app/planner/templates/planner/base.html
@@ -15,6 +15,7 @@
<nav>
<span class="nav-item"><a href="{% url 'luxplanner:list' %}">Home</a></span>
<span class="nav-item"><a href="{% url 'luxplanner:create' %}">Add Camp</a></span>
+ <span class="nav-item"><a href="{% url 'luxplanner:ideacreate' %}">Add Idea</a></span>
</nav>
{% block content %}
{% endblock %}
diff --git a/app/planner/templates/planner/idea-list.html b/app/planner/templates/planner/idea-list.html
new file mode 100644
index 0000000..1a3007c
--- /dev/null
+++ b/app/planner/templates/planner/idea-list.html
@@ -0,0 +1,35 @@
+{% extends 'planner/base.html' %}
+{% load typogrify_tags %}
+{% block pagetitle %}Luxagraf - Camping{% endblock %}
+ {% block content %}
+ <div id="mapid" class="idea-map"></div>
+ <div class="">
+ {% for object in object_list %}
+ <article>
+ <h3 class="campname">{{object.name}} <small><a href="{% url 'luxplanner:update' object.pk %}">edit</a></small></h3>
+ <div class="notes">{{object.notes_html|safe|urlize}}</div>
+ <ul class="icons">
+ {% if object.has_water %}<li class="water">water</li>{% endif %}
+ {% if object.has_dump %}<li class="water">dump</li>{% endif %}
+ {% if object.has_electric %}<li class="water">electric</li>{% endif %}
+ </ul>
+ </article>{% endfor %}
+ </div>
+ {% endblock %}
+
+ {% block js %}
+
+ <link rel="stylesheet" href="/media/js/leaflet-1.7.1/leaflet.css" integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A==" />
+<script src="/media/js/leaflet-1.7.1/leaflet.js" integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA=="></script>
+ <script>
+
+ var mymap = L.map('mapid').setView([51.505, -0.09], 13);
+
+ L.tileLayer('https://tile.thunderforest.com/outdoors/{z}/{x}/{y}.png?apikey=c9a9f0c5edfd4ce2948f49b51f533ad2', {
+ maxZoom: 18,
+ attribution: 'Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, ' +
+ 'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
+ }).addTo(mymap);
+
+</script>
+{% endblock %}
diff --git a/app/planner/templates/planner/list.html b/app/planner/templates/planner/list.html
index ce7650e..2fffe59 100644
--- a/app/planner/templates/planner/list.html
+++ b/app/planner/templates/planner/list.html
@@ -16,7 +16,7 @@
{% if object.has_electric %}<li class="water">electric</li>{% endif %}
</article>{% endfor %}
</div>
- <div id="mapid" ></div>
+ <div id="mapid" class="camp-map"></div>
{% endblock %}
{% block js %}