Bläddra i källkod

add main template

subDesTagesMitExtraKaese 2 år sedan
förälder
incheckning
dcd2542c41
5 ändrade filer med 83 tillägg och 1 borttagningar
  1. 2 0
      README.md
  2. BIN
      images/demo.jpg
  3. 66 0
      templates/gps_logger/index.html
  4. 7 0
      urls.py
  5. 8 1
      views.py

+ 2 - 0
README.md

@@ -1,5 +1,7 @@
 # GPS-Logger
 
+![demo image](images/demo.jpg)
+
 ## Features
 
 - 3D Map with GPS-Tracking data

BIN
images/demo.jpg


+ 66 - 0
templates/gps_logger/index.html

@@ -0,0 +1,66 @@
+
+{% extends "homepage/base.html" %}
+{% load static %}
+
+{% block title %}GPS Logging{% endblock %}
+{% block header %}GPS Logging{% endblock %}
+
+{% block status %}
+{% if user.is_authenticated %}
+<p style="text-align:center">
+  Hi {% firstof user.first_name user.username %}!<br/>
+  <a href="{% url 'logout' %}" class="link">Logout</a>
+</p>
+{% else %}
+<p style="text-align:center">
+  <a href="{% url 'login' %}" class="link">Login</a>
+</p>
+{% endif %}
+{% endblock %}
+
+{% block sidebar %}
+
+{% endblock %}
+
+
+{% block head %}
+<link href="{% static 'gps_logger/css/stylesheet.css' %}" rel="stylesheet" type="text/css">
+{% endblock %}
+
+{% block content %}
+<div id="map" class="fullSize"></div>
+{% endblock %}
+
+{% block body %}
+<div class="popup shadow" id="shadow"  onclick="hide()"></div>
+<div class="popup frame" id="frame">
+  <div class="demo-container">
+    <div id="placeholder" class="demo-placeholder"></div>
+  </div>
+
+  <div class="demo-container" style="height:150px;">
+    <div id="overview" class="demo-placeholder"></div>
+  </div>
+  <p></p>
+  <p>Zoom to: 
+    <button id="whole">All</button>
+    <button id="track">Track</button>
+  </p>
+  <p>Move: 
+    <button id="left">Left</button>
+    <button id="right">Right</button>
+  </p> 
+  <ul id="tracks">
+  </ul>
+</div>
+<script language="javascript" type="text/javascript" src="{% static 'gps_logger/flot/jquery.js' %}"></script>
+<script src="{% static 'gps_logger/cesium-1.60/Cesium.js' %}" type="text/javascript"></script>
+<script src="{% static 'gps_logger/js/tracks.js' %}" type="text/javascript"></script>
+<script src="{% static 'gps_logger/js/main.js' %}" type="text/javascript"></script>
+<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="{% static 'gps_logger/flot/excanvas.min.js' %}"></script><![endif]-->
+<script language="javascript" type="text/javascript" src="{% static 'gps_logger/flot/jquery.min.js' %}"></script>
+<script language="javascript" type="text/javascript" src="{% static 'gps_logger/flot/jquery.flot.min.js' %}"></script>
+<script language="javascript" type="text/javascript" src="{% static 'gps_logger/flot/jquery.flot.time.min.js' %}"></script>
+<script language="javascript" type="text/javascript" src="{% static 'gps_logger/flot/jquery.flot.selection.min.js' %}"></script>
+<script language="javascript" type="text/javascript" src="{% static 'gps_logger/flot/jquery.flot.navigate.min.js' %}"></script>
+{% endblock %}

+ 7 - 0
urls.py

@@ -0,0 +1,7 @@
+from django.urls import path, include
+
+from . import views
+
+urlpatterns = [
+  path('', views.index, name='index'),
+]

+ 8 - 1
views.py

@@ -1,3 +1,10 @@
 from django.shortcuts import render
+from .models import *
 
-# Create your views here.
+
+def index(request):
+
+  context = {
+    
+  }
+  return render(request, 'gps_logger/index.html', context)