add main site base

This commit is contained in:
Laura Klünder 2016-12-13 20:17:56 +01:00
parent 237b89dcc8
commit ea0eb44fcb
7 changed files with 5668 additions and 5619 deletions

View file

@ -146,6 +146,7 @@ INSTALLED_APPS = [
'rest_framework',
'c3nav.mapdata',
'c3nav.routing',
'c3nav.site',
'c3nav.editor',
'c3nav.control',
]

View file

View file

@ -0,0 +1,35 @@
{% load static %}
{% load compress %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>c3nav</title>
{% compress css %}
<link href="{% static 'bootstrap/css/bootstrap.css' %}" rel="stylesheet">
{% endcompress %}
</head>
<body>
<nav class="navbar navbar-static-top navbar-default">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="{% url 'site.index' %}">c3nav</a>
</div>
</div>
</nav>
<div class="container" id="main">
{% block content %}
{% endblock %}
</div>
{% compress js %}
<script type="text/javascript" src="{% static 'jquery/jquery.js' %}"></script>
<script type="text/javascript" src="{% static 'bootstrap/js/bootstrap.js' %}"></script>
{% endcompress %}
</body>
</html>

View file

@ -0,0 +1,5 @@
{% extends 'site/base.html' %}
{% load static %}
{% block content %}
Hi!
{% endblock %}

6
src/c3nav/site/urls.py Normal file
View file

@ -0,0 +1,6 @@
from django.conf.urls import url
from django.views.generic import TemplateView
urlpatterns = [
url(r'^$', TemplateView.as_view(template_name='site/index.html'), name='site.index')
]

View file

@ -4,10 +4,12 @@ from django.contrib import admin
import c3nav.api.urls
import c3nav.control.urls
import c3nav.editor.urls
import c3nav.site.urls
urlpatterns = [
url(r'^control/', include(c3nav.control.urls)),
url(r'^editor/', include(c3nav.editor.urls)),
url(r'^api/', include(c3nav.api.urls, namespace='api')),
url(r'^admin/', admin.site.urls),
url(r'^', include(c3nav.site.urls)),
]

View file

@ -747,7 +747,7 @@ L.Mixin = {Events: proto};
ielt9: ie && !document.addEventListener,
// @property edge: Boolean
// `true` for the Edge web browser.
// `true` for the Edge site browser.
edge: 'msLaunchUri' in navigator && !('documentMode' in document),
// @property webkit: Boolean
@ -1919,7 +1919,7 @@ L.LatLngBounds.prototype = {
},
// @method toBBoxString(): String
// Returns a string with bounding box coordinates in a 'southwest_lng,southwest_lat,northeast_lng,northeast_lat' format. Useful for sending requests to web services that return geo data.
// Returns a string with bounding box coordinates in a 'southwest_lng,southwest_lat,northeast_lng,northeast_lat' format. Useful for sending requests to site services that return geo data.
toBBoxString: function () {
return [this.getWest(), this.getSouth(), this.getEast(), this.getNorth()].join(',');
},
@ -2320,7 +2320,7 @@ L.Map = L.Evented.extend({
// @option transform3DLimit: Number = 2^23
// Defines the maximum size of a CSS translation transform. The default
// value should not be changed unless a web browser positions layers in
// value should not be changed unless a site browser positions layers in
// the wrong place after doing a large `panBy`.
transform3DLimit: 8388608, // Precision limit of a 32-bit float
@ -8553,7 +8553,7 @@ L.circle = function (latlng, options, legacyOptions) {
* Inherits `Renderer`.
*
* Due to [technical limitations](http://caniuse.com/#search=svg), SVG is not
* available in all web browsers, notably Android 2.x and 3.x.
* available in all site browsers, notably Android 2.x and 3.x.
*
* Although SVG is not available on IE7 and IE8, these browsers support
* [VML](https://en.wikipedia.org/wiki/Vector_Markup_Language)
@ -8948,7 +8948,7 @@ if (L.Browser.vml) {
* Inherits `Renderer`.
*
* Due to [technical limitations](http://caniuse.com/#search=canvas), Canvas is not
* available in all web browsers, notably IE8, and overlapping geometries might
* available in all site browsers, notably IE8, and overlapping geometries might
* not display properly in some edge cases.
*
* @example
@ -10892,7 +10892,7 @@ L.Map.mergeOptions({
// @option touchZoom: Boolean|String = *
// Whether the map can be zoomed by touch-dragging with two fingers. If
// passed `'center'`, it will zoom to the center of the view regardless of
// where the touch events (fingers) were. Enabled for touch-capable web
// where the touch events (fingers) were. Enabled for touch-capable site
// browsers except for old Androids.
touchZoom: L.Browser.touch && !L.Browser.android23,