WIP: weather integration
This commit is contained in:
@@ -6,14 +6,35 @@
|
||||
<div class="container">
|
||||
<div class="task-list-header">
|
||||
<h1>Tasks</h1>
|
||||
|
||||
<nav class="day-picker" aria-label="Choose task day">
|
||||
<a href="{{ path('app_task_index', {date: selected_date|date_modify('-1 day')|date('Y-m-d')}) }}" aria-label="Previous day">‹</a>
|
||||
<div>
|
||||
<strong>{{ selected_date|date('l, j F') }}</strong>
|
||||
{% if selected_date|date('Y-m-d') != 'now'|date('Y-m-d') %}
|
||||
<a href="{{ path('app_task_index') }}">Today</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
<a href="{{ path('app_task_index', {date: selected_date|date_modify('+1 day')|date('Y-m-d')}) }}" aria-label="Next day">›</a>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
<button class="weather-location" type="button" data-weather-location data-location-url="{{ path('app_task_location') }}" data-location-token="{{ csrf_token('weather_location') }}">
|
||||
<span class="material-symbols-outlined" aria-hidden="true">my_location</span>
|
||||
{{ has_saved_location ? 'Update weather location' : 'Use my location for weather' }}
|
||||
</button>
|
||||
|
||||
{% if weather_forecast %}
|
||||
{{ include('task/_weather_forecast.html.twig', {forecast: weather_forecast}) }}
|
||||
{{ include('task/_task_composer.html.twig', {form: form}) }}
|
||||
{% endif %}
|
||||
|
||||
{{ include('task/_task_recommendations.html.twig', {
|
||||
tasks: tasks,
|
||||
battery_level: battery_level,
|
||||
battery_budget: battery_budget
|
||||
battery_budget: battery_budget,
|
||||
selected_date: selected_date
|
||||
}) }}
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user