view weather_server/templates/index.html @ 27:99b0759386b1

index: Add meta-viewport declaration.
author Paul Fisher <paul@pfish.zone>
date Sun, 10 Nov 2019 23:48:38 -0500
parents 7def5611895b
children 27217790dc04
line wrap: on
line source

<!doctype html>
<html>
    <head>
        <title>The Weather In Places</title>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link
            rel="stylesheet"
            href="{{ url_for('static', filename='style.css') }}">
        <link
            rel="shortcut icon"
            href="{{ url_for('static', filename='thermometer.png') }}">
    </head>
    <body class="home">
        <h1><span>Weather</span></h1>
        <ul>
            {% for location in locations %}
            <li>
                <a href="{{ url_for('show', location=location.key) }}">
                    <b>{{ location.name }}</b>
                    <span>
                        {%- set reading = location.latest() -%}
                        {%- if reading -%}
                            {{ reading.temp_f|round|int -}}
                            &nbsp;°F
                        {%- else -%}
                            ???
                        {%- endif -%}
                    </span>
                </a>
            </li>
            {% endfor %}
        </ul>
    </body>
</html>