Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

hourly.njk 1.6KB

1234567891011121314151617181920212223242526272829303132333435
  1. {% if hourly %}
  2. {% set numSteps = hourly | calcNumEntries %}
  3. {% set currentStep = 0 %}
  4. <table class="{{ config.tableClass }}">
  5. {% set hours = hourly.slice(0, numSteps) %}
  6. {% for hour in hours %}
  7. <tr {% if config.colored %}class="colored"{% endif %} {% if config.fade %}style="opacity: {{ currentStep | opacity(numSteps) }};"{% endif %}>
  8. <td class="day">{{ hour.date | formatTime }}</td>
  9. <td class="bright weather-icon"><span class="wi weathericon wi-{{ hour.weatherType }}"></span></td>
  10. <td class="align-right bright">
  11. {{ hour.temperature | roundValue | unit("temperature") }}
  12. </td>
  13. {% if config.showPrecipitationAmount %}
  14. {% if hour.precipitationUnits %}
  15. <td class="align-right bright precipitation">
  16. {{ hour.precipitation }}{{ hour.precipitationUnits }}
  17. </td>
  18. {% else %}
  19. <td class="align-right bright precipitation">
  20. {{ hour.precipitation | unit("precip") }}
  21. </td>
  22. {% endif %}
  23. {% endif %}
  24. </tr>
  25. {% set currentStep = currentStep + 1 %}
  26. {% endfor %}
  27. </table>
  28. {% else %}
  29. <div class="dimmed light small">
  30. {{ "LOADING" | translate }}
  31. </div>
  32. {% endif %}
  33. <!-- Uncomment the line below to see the contents of the `hourly` object. -->
  34. <!-- <div style="word-wrap:break-word" class="xsmall dimmed">{{hourly | dump}}</div> -->