styling updates
This commit is contained in:
+138
-12
@@ -15,20 +15,24 @@ body {
|
||||
--container-max: 1280px;
|
||||
--container-gutter: clamp(1rem, 3vw, 2rem);
|
||||
}
|
||||
|
||||
header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 60px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.mascots {
|
||||
height: 150px;
|
||||
width: auto;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: min(100% - (2 * var(--container-gutter)), var(--container-max));
|
||||
margin-inline: auto;
|
||||
@@ -48,7 +52,10 @@ header {
|
||||
--container-max: 1440px;
|
||||
}
|
||||
|
||||
|
||||
.weather-location {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
}
|
||||
.day-picker {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@@ -63,9 +70,11 @@ header {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.day-picker > a {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
.day-picker>a {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
line-height: 0;
|
||||
width: 2.5rem;
|
||||
height: 2.5rem;
|
||||
font-size: 2rem;
|
||||
@@ -78,6 +87,7 @@ header {
|
||||
.day-picker div a {
|
||||
display: block;
|
||||
}
|
||||
|
||||
// dashboards/grids
|
||||
.container-flex--full {
|
||||
--container-max: none;
|
||||
@@ -171,35 +181,49 @@ header {
|
||||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
|
||||
.weather-forecast {
|
||||
font-size: 2em;
|
||||
margin-bottom: 50px;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
> span {
|
||||
line-height: 2;
|
||||
font-size: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
.task-composer {
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
margin-bottom: 50px;
|
||||
flex-direction: column;
|
||||
|
||||
&__submit {
|
||||
display: flex;
|
||||
}
|
||||
form.task-composer__form {
|
||||
width: 100%;
|
||||
max-width: unset;
|
||||
box-shadow: unset;
|
||||
|
||||
label,
|
||||
input,
|
||||
textarea{
|
||||
textarea {
|
||||
max-width: unset;
|
||||
}
|
||||
}
|
||||
|
||||
&__main {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&__details {
|
||||
display: flex;
|
||||
gap: 25px;
|
||||
|
||||
input[type=checkbox] {
|
||||
height: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -227,7 +251,7 @@ header {
|
||||
border-radius: .5rem;
|
||||
}
|
||||
|
||||
.task-composer__repeat-input:checked ~ .task-composer__repeat-fields {
|
||||
.task-composer__repeat-input:checked~.task-composer__repeat-fields {
|
||||
display: grid;
|
||||
}
|
||||
|
||||
@@ -242,6 +266,7 @@ header {
|
||||
align-items: center;
|
||||
gap: .5rem;
|
||||
background-color: #fff;
|
||||
|
||||
form {
|
||||
background-color: #fff;
|
||||
outline: unset;
|
||||
@@ -353,11 +378,27 @@ header {
|
||||
opacity: .65;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
.task-result {
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
padding: 25px;
|
||||
|
||||
.task-result-container {
|
||||
|
||||
.task-result {
|
||||
color: #000;
|
||||
padding: 25px;
|
||||
margin: 25px;
|
||||
|
||||
h2 {
|
||||
color: #fff;
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: #000;
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.htmx-indicator {
|
||||
display: none;
|
||||
}
|
||||
@@ -386,4 +427,89 @@ header {
|
||||
|
||||
.request-failed:not([hidden]) {
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.suggested-tasks {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 25px;
|
||||
padding: 25px;
|
||||
background-color: #fff;
|
||||
|
||||
>li {
|
||||
outline: 1px solid black;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
|
||||
button {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-size: 15px;
|
||||
border-radius: 0;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
>article {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
padding: 25px;
|
||||
|
||||
.summary {}
|
||||
|
||||
.info {
|
||||
ul {
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
|
||||
li {
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
|
||||
span:first-of-type {
|
||||
font-weight: 700;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.braindump-form {
|
||||
width: 100%;
|
||||
box-shadow: unset;
|
||||
max-width: unset;
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
|
||||
textarea {
|
||||
max-width: unset;
|
||||
}
|
||||
}
|
||||
|
||||
.thinking {
|
||||
// display: block;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
transition: 0.3s all ease-in-out;
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 15px;
|
||||
font-size: 2em;
|
||||
color: #fff;
|
||||
inset: 0;
|
||||
z-index: -1;
|
||||
opacity: 0;
|
||||
|
||||
&.htmx-request {
|
||||
// display: block;
|
||||
z-index: 10;
|
||||
opacity: 1;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -34,7 +34,7 @@ final class TaskController extends AbstractController
|
||||
'battery_budget' => $taskRecommendationService->budgetFor($batteryLevel),
|
||||
'selected_date' => $selectedDate,
|
||||
'form' => $this->createForm(TaskType::class, $newTask, ['include_active' => false]),
|
||||
'weather_forecast' => $selectedDate->format('Y-m-d') === (new \DateTimeImmutable('today'))->format('Y-m-d') ? $weatherService->cachedForecastFor($settings, $selectedDate) : null,
|
||||
'weather_forecast' => $selectedDate->format('Y-m-d') === $selectedDate->format('Y-m-d') ? $weatherService->cachedForecastFor($settings, $selectedDate) : null,
|
||||
'has_saved_location' => $settings?->hasLocation() ?? false,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -2,29 +2,37 @@
|
||||
<p>No tasks were suggested.</p>
|
||||
{% else %}
|
||||
<h2>Suggested tasks</h2>
|
||||
|
||||
<ul class="suggested-tasks">
|
||||
{% for task in tasks %}
|
||||
<article>
|
||||
<h3>{{ task.title }}</h3>
|
||||
<ul>
|
||||
{% if task.description %}
|
||||
<li><p>{{ task.description }}</p></li>
|
||||
{% endif %}
|
||||
|
||||
<li>
|
||||
<dt>Duration</dt>
|
||||
<dd>{{ task.estimatedDurationMinutes }} minutes</dd>
|
||||
|
||||
<dt>Priority</dt>
|
||||
<dd>{{ task.priority }}</dd>
|
||||
|
||||
<dt>Category</dt>
|
||||
<dd>{{ task.category }}</dd>
|
||||
|
||||
<dt>Recurring</dt>
|
||||
<dd>{{ task.isRecurring ? 'Yes' : 'No' }}</dd>
|
||||
{{ dump(task|json_encode) }}
|
||||
<button><span class="material-symbols-outlined">menu</span></button>
|
||||
<article>
|
||||
<div class="summary">
|
||||
<h3>{{ task.title }}</h3>
|
||||
{% if task.description %}
|
||||
<p>{{ task.description }}</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="info">
|
||||
<ul>
|
||||
<li>
|
||||
<span>Duration</span> <span>{{ task.estimatedDurationMinutes }} minutes</span>
|
||||
</li>
|
||||
<li>
|
||||
<span>Priority</span><span>{{ task.priority }}</span>
|
||||
</li>
|
||||
<li>
|
||||
<span>Category</span><span>{{ task.category }}</span>
|
||||
</li>
|
||||
<li>
|
||||
<span>Recurring</span><span>{{ task.isRecurring ? 'Yes' : 'No' }}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</article>
|
||||
</li>
|
||||
</article>
|
||||
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
@@ -7,6 +7,7 @@
|
||||
<h1>Brain Dump</h1>
|
||||
|
||||
<form
|
||||
class="braindump-form"
|
||||
method="post"
|
||||
action="{{ path('app_braindump_dump') }}"
|
||||
hx-post="{{ path('app_braindump_dump') }}"
|
||||
@@ -36,30 +37,33 @@
|
||||
></textarea>
|
||||
</div>
|
||||
|
||||
<button type="submit">
|
||||
<span class="material-symbols-outlined">robot_2</span>
|
||||
Suggest tasks
|
||||
</button>
|
||||
|
||||
<button type="submit">
|
||||
<span class="material-symbols-outlined">robot_2</span>
|
||||
Suggest tasks
|
||||
</button>
|
||||
<span
|
||||
id="thinking"
|
||||
class="thinking"
|
||||
class="htmx-indicator"
|
||||
aria-live="polite"
|
||||
>
|
||||
<span class="material-symbols-outlined spinner">progress_activity</span>
|
||||
Thinking…
|
||||
</span>
|
||||
<span
|
||||
id="request-failed"
|
||||
class="request-failed"
|
||||
aria-live="assertive"
|
||||
hidden>
|
||||
<span class="material-symbols-outlined">error</span>
|
||||
Something went wrong
|
||||
</span>
|
||||
</form>
|
||||
<span
|
||||
id="thinking"
|
||||
class="htmx-indicator"
|
||||
aria-live="polite"
|
||||
>
|
||||
<span class="material-symbols-outlined spinner">progress_activity</span>
|
||||
Thinking…
|
||||
</span> <span
|
||||
id="request-failed"
|
||||
class="request-failed"
|
||||
aria-live="assertive"
|
||||
hidden
|
||||
>
|
||||
<span class="material-symbols-outlined">error</span>
|
||||
Something went wrong
|
||||
</span>
|
||||
<div id="tasks-result" class="task-result">
|
||||
{# HTMX will put the proposed tasks here #}
|
||||
|
||||
<div class="task-result-container">
|
||||
<div id="tasks-result" class="task-result">
|
||||
{# HTMX will put the proposed tasks here #}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -8,14 +8,18 @@
|
||||
<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>
|
||||
<a href="{{ path('app_task_index', {date: selected_date|date_modify('-1 day')|date('Y-m-d')}) }}" aria-label="Previous day"><span class="material-symbols-outlined">
|
||||
chevron_backward
|
||||
</span></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>
|
||||
<a href="{{ path('app_task_index', {date: selected_date|date_modify('+1 day')|date('Y-m-d')}) }}" aria-label="Next day"><span class="material-symbols-outlined">
|
||||
chevron_forward
|
||||
</span></a>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user