templates/cluster.html

Thu, 22 Jun 2017 19:01:31 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Thu, 22 Jun 2017 19:01:31 +0300
changeset 29
2c78e68d7363
parent 27
f89504285945
child 30
a5bfd99bc2a3
permissions
-rw-r--r--

Mööö

<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' />
	<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;
	}
	/*
	body
	{
		background: url('/static/tausta-pysäkki.png') no-repeat center center fixed;
		background-size: cover;
	}*/
	</style>
</head>
<body>
	<h1><img src="/static/iso-pysäkki.png" height="96" /> <span>{{name}}</span></h1>
	<p id="pysäkki-info">
	<a class="pysäkki-sijainti" href="{{link_to_map}}" target="_blank">📌 ({{location}})</a>
	</p>
	<p>Pysäkit ryhmässä:</p>
	<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' cellspacing="0">
		<tr>
			<th class='sarake-aika'>{{tr('time', 'headings')}}</th>
			<th class='sarake-linja'>{{tr('route', 'headings')}}</th>
			<th class='sarake-määränpää'>{{tr('destination', 'headings')}}</th>
			<th class='sarake-pysäkki'>{{tr('bus-stop', 'headings')}}</th>
		</tr>
		{% for halt in schedule %}
		<tr class="{% if halt['night'] %}{% endif %}">
			<td class='sarake-aika'>{{halt['time']}}</td>
			<td class='sarake-linja linja'>
				<a href="/ajovuoro/{{halt['trip']}}">{{halt['route']}}</a>
			</td>
			<td class='sarake-määränpää'>
				<a href="/ajovuoro/{{halt['trip']}}">{{halt['sign']}}</a>
			</td>
			<td class='sarake-pysäkki'>
				<a href="/pysäkki/{{halt['stop_id']}}"><img src="/static/pysäkki.png" height="24" /> {{halt['stop_code']}}</a>
			</td>
		</tr>
		{% endfor %}
	</table>
</body>
</html>

mercurial