view weather_server/templates/location.html @ 15:df3e0534c994

Tighten up MADRegistry: - Use only one map for registry. - Make the user construct it, to avoid modifying global state.
author Paul Fisher <paul@pfish.zone>
date Fri, 11 Oct 2019 20:50:50 -0400
parents 4eaa9d69c4e2
children 9a609bcf0809
line wrap: on
line source

<!doctype html>
<html>
    <head>
        <title>{{ location.name }}</title>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link
            rel="stylesheet"
            href="{{ url_for('static', filename='style.css') }}">
    </head>
    <body>
        <h1><span>{{ location.name }} conditions</span></h1>
        {% if last_reading %}
            <p class="plain important" id="temp">
                <span class="key">Temperature</span>
                <span class="value">
                    <span class="pad"> </span>
                    <span class="n">
                        {{- last_reading.temp_f|round|int -}}
                    </span>
                    <span class="unit">&deg;F</span>
                </span>
            </p>
            <p class="plain important" id="dewpoint">
                <span class="key">Dew point</span>
                <span class="value">
                    <span class="pad"> </span>
                    <span class="n">
                        {{- last_reading.dew_point_f|round|int -}}
                    </span>
                    <span class="unit">&deg;F</span>
                </span>
            </p>
            <p id="timestamp">
                <span>
                    <span class="key">Reported</span>
                    <span class="value">{{ "{:%H:%M}".format(date) }}</span>
                </span>
            </p>
        {% else %}
            <p id="big-question-mark">?</p>
        {% endif %}
        <script src="{{ url_for('static', filename='script.js') }}"></script>
        <!--
            <script>
                setUp(
                    document.getElementById('temp'),
                    document.getElementById('dewpoint'));
            </script>
        -->
    </body>
</html>