templates/cluster.html

Thu, 17 May 2018 22:56:41 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Thu, 17 May 2018 22:56:41 +0300
changeset 104
a14be4fc31b9
parent 93
53ee9e945673
child 109
88a5110b66ba
permissions
-rw-r--r--

areas

{% from "macros.html" import route_rep %}
<html>
<head>
	<link rel="icon" type="image/png" href="../static/favicon.png" />
	<link rel="stylesheet" type="text/css" href="../static/style.css" />
	<meta charset='UTF-8' />
	<meta http-equiv='refresh' content='60'>
	<title>{{name}}</title>
	{% if amount_of_stops_in_cluster >= 5 %}
	<style>
	div.stops-in-cluster
	{
		margin-left: auto;
		margin-right: auto;
	}
	div.stops-in-cluster ul
	{
		columns: 3;
	}
	</style>
	{% endif %}
	<style>
	div.stops-in-cluster li
	{
		text-align: center;
	}
	.sarake-määränpää, .sarake-pysäkki
	{
		text-align: left;
	}
	</style>
</head>
<body>
<!--
	<div class="stops-in-cluster">
	<ul>
	{% for stop in stops_in_cluster %}
		<li><a href="../pysäkki/{{stop['id']}}"><img src="../static/pysäkki.png" height="24" /> {{stop['code']}} {{stop['name']}}</a></li>
	{% endfor %}
	</ul>
	</div>
-->
	<table class='aikataulu service-{{service}}' cellspacing="0">
	<thead>
		<tr>
			<th class='primary-heading' colspan='5'>
			<span>{{name}}</span>
			</th>
		</tr>
		<tr>
			<th class='sarake-aika'>{{tr('time', 'headings')}}</th>
			<th class='sarake-pysäkki'>{{tr('bus-stop', 'headings')}}</th>
			<th class='sarake-linja'>{{tr('route', 'headings')}}</th>
			<th class='sarake-määränpää'>{{tr('destination', 'headings')}}</th>
			<th>
				<span class='actions'>
				<a class="pysäkki-sijainti" href="{{link_to_map}}" target="_blank">📌</a>
				{% if cluster %}
				<a href="../stop_cluster/{{cluster}}">🞊</a>
				{% endif %}
			</th>
		</tr>
	</thead>
	<tbody>
		{% for halt in schedule %}
		<tr class="{% if halt['night'] %}{% endif %}">
			<td class='sarake-aika'>
				{% if halt['imminent'] %}
				<span class='imminent-leave'></span>
				{% endif %}
				{{halt['time']}}
			</td>
			<td class='sarake-pysäkki'>
				<a href="../stop/{{halt['stop_id']}}"><img src="../static/{{halt['typename']}}.png" height="24" /> {{halt['stop_code']}}</a>
			</td>
			<td class='sarake-linja linja'>
				<a href="../trip/{{halt['trip']}}">{{route_rep(halt['route-splice'])}}</a>
			</td>
			<td class='sarake-määränpää' colspan='2'>
				<a href="../trip/{{halt['trip']}}">{{halt['sign']}}</a>
			</td>
		</tr>
		{% endfor %}
	</tbody>
	</table>
</body>
</html>

mercurial