remove old templates

This commit is contained in:
Laura Klünder 2017-12-07 11:37:19 +01:00
parent 2d3eeef639
commit e87f2df21a
7 changed files with 25 additions and 373 deletions

View file

@ -1,34 +1,32 @@
{% load static %}
{% load compress %}
{% load i18n %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<html lang="{{ LANGUAGE_CODE }}">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, user-scalable=no">
<title>c3nav</title>
{% compress css %}
<link href="{% static 'bootstrap/css/bootstrap.css' %}" rel="stylesheet">
<link href="{% static 'fonts/fonts.css' %}" rel="stylesheet">
<link href="{% static 'normalize/normalize.css' %}" rel="stylesheet">
<link href="{% static 'milligram/milligram.css' %}" rel="stylesheet">
<link href="{% static 'leaflet/leaflet.css' %}" rel="stylesheet">
<link href="{% static 'material-icons/material-icons.css' %}" rel="stylesheet">
<link href="{% static 'site/css/c3nav.css' %}" rel="stylesheet">
{% endcompress %}
</head>
<body class="{% block bodyclass %}{% endblock %}">
<div class="container" id="main">
<h1><a href="{% url 'site.index' %}">c3nav</a></h1>
{% block content %}
{% endblock %}
{% include 'site/footer.html' %}
</div>
{% compress js %}
<script type="text/javascript" src="{% static 'jquery/jquery.js' %}"></script>
<!--<script type="text/javascript" src="{% static 'site/js/typeahead.js' %}"></script>-->
<script type="text/javascript" src="{% static 'site/js/c3nav.js' %}"></script>
{% endcompress %}
</body>
</head>
<body>
{% if not embed %}
<header>
<h1>c3nav</h1>
<a href="#" id="user">
<span>{{ user_data.title }}</span>
{% if user_data.subtitle %}<small>{{ user_data.subtitle }}</small>{% endif %}
</a>
</header>
{% endif %}
{% block content %}
{% endblock %}
</body>
</html>

View file

@ -1,33 +0,0 @@
{% load i18n %}
<footer>
<a href="https://github.com/c3nav/c3nav">GitHub</a>
<a href="https://twitter.com/c3nav">Twitter</a>
<a href="{% url 'editor.index' %}">{% trans 'Editor' %}</a>
<a href="/api/">{% trans 'API' %}</a>
<form action="{% url 'set_language' %}" method="post" class="languages">
{% csrf_token %}
<input name="next" type="hidden" value="{{ request.path }}" />
{% get_available_languages as LANGUAGES %}
{% get_language_info_list for LANGUAGES as languages %}
{% for language in languages %}
{% if not forloop.first %}{% endif %}
<button type="submit" name="language" value="{{ language.code }}" class="btn btn-link btn-xs">
{{ language.name_local }}
</button>
{% endfor %}
</form>
{% if full_access or access_list %}
<br><small>
{% if full_access %}
{% trans 'full access unlocked' %}
{% else %}
{% blocktrans count count=access_list|length %}
{{ count }} area unlocked
{% plural %}
{{ count }} areas unlocked
{% endblocktrans %}
{% endif %}
</small>
{% endif %}
</footer>

View file

@ -1,104 +0,0 @@
{% load i18n %}
<div class="col-md-{% if name == 'location' %}12{% else %}6{% endif %} location-group {{ name }}-select{% if location %} selected{% endif %}{% if active_field == name and map_level %} map{% endif %}" data-name="{{ name }}">
<div class="form-group{% if search == name and not search_results %} has-error{% endif %}">
<label for="{{ name }}_input">{{ heading }}</label>
{% if name == 'destination' %}
{% if origin %}
{% if destination %}
{% url 'site.route' origin=destination.location_id destination=origin.location_id as swap_url %}
{% else %}
{% url 'site.destination' destination=origin.location_id as swap_url %}
{% endif %}
{% elif destination %}
{% url 'site.origin' destination=destination.location_id as swap_url %}
{% endif %}
<a class="swap pull-right" href="{{ swap_url }}">{% trans 'swap' %}</a>
{% endif %}
<div class="locationselect">
<div class="locationselect-input">
{% if search == name and search_results %}
<span class="twitter-typeahead" style="position: relative; display: inline-block;">
{% endif %}
<input type="text" class="form-control input-lg" id="{{ name }}_input"
name="{{ name }}_search" placeholder="{% trans 'Search any Location…' %}"
{% if search and not location %} value="{% if search == name %}{{ search_query }}{% endif %}"{% endif %}>
{% if search == name and search_results %}
<div class="tt-menu tt-open noscript" style="display: block;">
<div class="tt-dataset tt-dataset-0">
{% for result in search_results %}
<a href="{{ result.url }}" class="location tt-suggestion">
<span class="title">{{ result.title }}</span>
<small class="subtitle">{{ result.subtitle }}</small>
</a>
{% endfor %}
</div>
</div>
</span>
{% endif %}
<div class="icons">
<a href="" class="locate app-only"></a>
<a href="?map-level={{ levels.0 }}" class="map"></a>
</div>
</div>
<div class="locationselect-map">
<div class="map-container">
<div class="dummy" style="width:{{ svg_width }}px;height:{{ svg_height }}px;"></div>
{% if map_level %}
{% for area in visible_areas %}
<input type="image" src="{% url 'site.level_image' level=map_level area=area %}" width="{{ svg_width }}" height="{{ svg_height }}">
{% endfor %}
<p class="scroll-hint">{% trans 'Javascript is disabled. Please scroll in this direction ⇘' %}</p>
{% endif %}
</div>
<div class="map-buttons">
<div class="btn-group level-selector" role="group">
{% for level in levels %}
<a href="?map-level={{ level }}" data-level="{{ level }}" class="btn btn-sm btn-default{% if level == map_level %} active{% endif %}">{{ level }}</a>
{% endfor %}
</div><a href="?" class="btn btn-sm btn-default close-map">{% trans 'close' %}</a>
</div>
<span class="help-block">{% trans 'Click or tap the desired location on the map.' %}</span>
</div>
<div class="locationselect-selected">
<div class="location form-control input-lg">
<span class="title">{{ location.title }}</span>
<small class="subtitle">{{ location.subtitle }}</small>
</div>
<div class="icons">
<a href="{% if location %}{% url 'site.location' location=location.location_id %}{% endif %}" class="link"></a>
<a href="{{ reset_url }}" class="reset"></a>
</div>
<input type="hidden" name="{{ name }}" value="{{ location.location_id }}" class="id-field">
</div>
<div class="locationselect-error">
<div class="location form-control input-lg">
<span class="title">{% trans 'Sorry, we could not detect your position.' %}</span>
<small class="subtitle">{% trans 'Wifi mapping may not yet be available in the entire building.' %}</small>
</div>
<div class="icons">
<a href="{{ reset_url }}" class="errorreset"></a>
</div>
</div>
</div>
{% if search == name and not search_results %}
<span class="help-block">{% trans 'No location matched your search query.' %}</span>
{% endif %}
</div>
{% if name == 'location' %}
<div class="row only-if-selected">
<div class="col-xs-6">
<a class="btn btn-primary btn-block" id="route-to-here" href="{% if location %}{% url 'site.destination' destination=location.location_id %}{% endif %}">{% trans 'Route to here' %}</a>
</div>
<div class="col-xs-6">
<a class="btn btn-default btn-block" id="route-from-here" href="{% if location %}{% url 'site.origin' origin=location.location_id %}{% endif %}">{% trans 'Route from here' %}</a>
</div>
</div>
{% endif %}
{% if not location and not map_level %}
<noscript>
<button type="submit" class="btn btn-primary btn-block">{% trans 'Search' %}</button>
</noscript>
{% endif %}
</div>

View file

@ -1,66 +0,0 @@
{% load static %}
{% load i18n %}
{% load route_render %}
<h2>{% trans 'Your Route' %} <small>{{ route.distance | stringformat:".1f" }}m</small></h2>
{% if route.ctypes_exception %}
<div class="alert alert-warning">
<strong>{% trans 'This Route contains way types you wanted to avoid.' %}</strong>
</div>
{% endif %}
<div class="routeparts">
{% for routepart in route.routeparts %}
<div class="row routepart">
<div class="col-md-6">
<svg xmlns="http://www.w3.org/2000/svg" class="map" data-level="{{ routepart.level.name }}"
viewBox="0 0 {{ routepart.svg_width | stringformat:"f" }} {{ routepart.svg_height | stringformat:"f" }}"
style="max-height:{% if routepart.svg_height > 300 %}300{% else %}{{ routepart.svg_height | stringformat:"f" }}{% endif %}px">
<defs>
<marker id="arrow-{{ forloop.counter0 }}" markerWidth="4" markerHeight="4" refX="2.5" refY="2" orient="auto">
<path d="M0,0 L3,2 L0,4 L0,0" style="fill: #FF0000; stroke: 0;"></path>
</marker>
</defs>
{% for area in visible_areas %}
<image width="{{ svg_width | stringformat:"f" }}" height="{{ svg_height | stringformat:"f" }}"
x="{{ routepart.svg_min_x | negate | stringformat:"f" }}" y="{{ routepart.svg_min_y | negate | stringformat:"f" }}"
xlink:href="{% url 'site.level_image' level=routepart.level.name area=area %}"></image>
{% endfor %}
<g class="connections">
{% for line in routepart.lines %}
<line x1="{{ line.from_point.svg_x | subtract:routepart.svg_min_x | stringformat:"f"}}"
y1="{{ line.from_point.svg_y | subtract:routepart.svg_min_y | stringformat:"f" }}"
x2="{{ line.to_point.svg_x | subtract:routepart.svg_min_x | stringformat:"f" }}"
y2="{{ line.to_point.svg_y | subtract:routepart.svg_min_y | stringformat:"f" }}"
{% if line.arrow %}marker-end="url(#arrow-{{ forloop.parentloop.counter0 }})"{% endif %}></line>
{% endfor %}
</g>
</svg>
</div>
<div class="col-md-6">
{% if forloop.first %}
<div class="desc">
<div class="icon location"></div>
<p><strong>{{ origin.title }}</strong><br>{{ origin.subtitle }}</p>
</div>
{% endif %}
{% for line in routepart.lines %}
{% if not line.ignore %}
<div class="desc">
<div class="icon {{ line.icon }}"></div>
<p>{% if line.title %}<strong>{{ line.title }}</strong><br>{% endif %}{{ line.description }}</p>
</div>
{% endif %}
{% endfor %}
{% if forloop.last %}
<div class="desc">
<div class="icon destination"></div>
<p><strong>{{ destination.title }}</strong><br>{{ destination.subtitle }}</p>
</div>
{% endif %}
</div>
</div>
{% endfor %}
</div>

View file

@ -1,8 +0,0 @@
{% load i18n %}
<select name="{{ name }}" id="{{ name }}-select" class="form-control">
<option value="yes"{% if value == 'yes' %} selected{% endif %}>{% trans 'allow' %}</option>
<option value="up"{% if value == 'up' %} selected{% endif %}>{% trans 'only upwards' %}</option>
<option value="down"{% if value == 'down' %} selected{% endif %}>{% trans 'only downwards' %}</option>
<option value="no"{% if value == 'no' %} selected{% endif %}>{% trans 'avoid' %}</option>
</select>

View file

@ -1,112 +0,0 @@
{% extends 'site/base.html' %}
{% load static %}
{% load i18n %}
{% block bodyclass %} nomobileclient{% endblock %}
{% block content %}
<form method="post" class="main-view mode-{{ mode }}{% if origin and destination %} can-route{% endif %}"
data-svg-width="{{ svg_width }}" data-svg-height="{{ svg_height }}" data-visible-areas="{{ visible_areas | join:';' }}">
{% csrf_token %}
<div class="row locations">
{% trans "Location" as heading %}
{% url 'site.index' as reset_url %}
{% include 'site/fragment_location.html' with name='location' location=location heading=heading reset_url=reset_url %}
{% trans "Origin" as heading %}
{% url 'site.destination' destination=destination.location_id as reset_url %}
{% include 'site/fragment_location.html' with name='origin' location=origin heading=heading reset_url=reset_url %}
{% trans "Destination" as heading %}
{% url 'site.origin' origin=origin.location_id as reset_url %}
{% include 'site/fragment_location.html' with name='destination' location=destination heading=heading reset_url=reset_url %}
</div>
<div class="routing">
<div class="row settings">
<div class="form-group col-md-2">
<label for="stairs-select">{% trans 'Stairs' %}</label>
{% include 'site/fragment_select.html' with name='stairs' value=stairs %}
</div>
<div class="form-group col-md-2">
<label for="escalators-select">{% trans 'Escalators' %}</label>
{% include 'site/fragment_select.html' with name='escalators' value=escalators %}
</div>
<div class="form-group col-md-2">
<label for="elevators-select">{% trans 'Elevators' %}</label>
{% include 'site/fragment_select.html' with name='elevators' value=elevators %}
</div>
<div class="form-group col-md-6">
<label>{% trans 'Include / Avoid areas' %}</label>
<p class="form-control-static">
{% for name, includable in includables %}
<label class="checkbox-inline">
<input type="checkbox" name="include" value="{{ name }}"{% if name in include %} checked{% endif %}> {% blocktrans %}Include {{ includable }}{% endblocktrans %}
</label>
{% endfor %}
{% for name, excludable in excludables %}
<label class="checkbox-inline">
<input type="checkbox" name="avoid" value="{{ name }}"{% if name in avoid %} checked{% endif %}> {% blocktrans %}Avoid {{ excludable }}{% endblocktrans %}
</label>
{% endfor %}
</p>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<div class="checkbox savesettings">
<label>
<input type="checkbox" name="save_settings" value="1"{% if save_settings %} checked{% endif %}> {% trans 'Save Settings in cookie' %}
</label>
</div>
<div class="showsettings form-control-static">
<a href="#">{% trans 'Edit Settings' %}</a>
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<button type="submit" id="submitbtn" class="btn btn-block btn-lg btn-primary">{% trans 'Get Route' %}</button>
</div>
</div>
</div>
</div>
</form>
{% if error == 'noroutefound' %}
<div class="alert alert-danger">
<strong>{% trans 'Sorry, no Route could be found.' %}</strong>
<p>
{% blocktrans %}
Your origin or your destination is not within an accessible area or there is no possible route between them.
{% endblocktrans %}
</p>
</div>
{% elif error == 'alreadythere' %}
<div class="alert alert-success">
<strong>{% trans 'Congratulations, you are already there!' %}</strong>
</div>
{% elif error == 'notyetroutable' %}
<div class="alert alert-danger">
<strong>{% trans 'One or both of your locations are not in the routing table yet.' %}</strong>
<p>{% trans 'Please try again in a few minutes.' %}</p>
</div>
{% endif %}
<div id="qr_modal">
<div class="inner">
<p><img src=""></p>
<p><strong>https://c3nav.de/lalala.png</strong></p>
<p>
<span class="app-only">
<button class="btn btn-default share">{% trans 'share' %}</button>
<button class="btn btn-default shortcut">{% trans 'shortcut' %}</button>
</span>
<button class="btn btn-default qr-close">{% trans 'close' %}</button>
</p>
</div>
</div>
{% if route %}
{% include 'site/fragment_route.html' %}
{% endif %}
{% endblock %}

View file

@ -1,31 +1,9 @@
{% extends 'site/base.html' %}
{% load static %}
{% load compress %}
{% load i18n %}
<!DOCTYPE html>
<html lang="{{ LANGUAGE_CODE }}">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, user-scalable=no">
<title>c3nav</title>
{% compress css %}
<link href="{% static 'fonts/fonts.css' %}" rel="stylesheet">
<link href="{% static 'normalize/normalize.css' %}" rel="stylesheet">
<link href="{% static 'milligram/milligram.css' %}" rel="stylesheet">
<link href="{% static 'leaflet/leaflet.css' %}" rel="stylesheet">
<link href="{% static 'material-icons/material-icons.css' %}" rel="stylesheet">
<link href="{% static 'site/css/c3nav.css' %}" rel="stylesheet">
{% endcompress %}
</head>
<body>
{% if not embed %}
<header>
<h1>c3nav</h1>
<a href="#" id="user">
<span>{{ user_data.title }}</span>
{% if user_data.subtitle %}<small>{{ user_data.subtitle }}</small>{% endif %}
</a>
</header>
{% endif %}
{% block content %}
<main class="map" data-state="{{ state }}"{% if embed %} data-embed{% endif %}>
<section id="map" data-bounds="{{ bounds }}" data-levels="{{ levels }}"{% if tile_cache_server %} data-tile-server="{{ tile_cache_server }}"{% endif %}></section>
{% if not embed %}
@ -130,5 +108,4 @@
<script type="text/javascript" src="{% static 'leaflet/leaflet.js' %}"></script>
<script type="text/javascript" src="{% static 'site/js/c3nav.js' %}"></script>
{% endcompress %}
</body>
</html>
{% endblock %}