-
-
+
+
{#each actions as action}
- {action.type} at {new Date(action.timestamp).toLocaleTimeString('en-NL', { hour: '2-digit', minute: '2-digit' })}
{/each}
-
{/if}
\ No newline at end of file
diff --git a/src/routes/calendar/+page.svelte b/src/routes/calendar/+page.svelte
index 747232d..ed087ca 100644
--- a/src/routes/calendar/+page.svelte
+++ b/src/routes/calendar/+page.svelte
@@ -73,7 +73,7 @@ import { onMount } from 'svelte';
.day-header, .hour-label {
font-weight: bold;
font-size: 1.2rem;
- background: #e9e9e9;
+ background: var(--c-border);
}
.day-header {
border-radius: 1em 1em 0 0;
@@ -86,17 +86,17 @@ import { onMount } from 'svelte';
margin-left: .5rem;
}
.hour {
- border: 1px solid #e9e9e9;
+ border: 1px solid var(--c-border);
min-height: 60px;
}
.event {
background-color: var(--color);
border-radius: 4px;
- padding: .5em 1em;
+ padding: 0.3em 0.8em;
line-height: 1;
margin: 2px;
display: flex;
- align-items: baseline;
+ align-items: center;
justify-content: space-between;
color: rgba(255,255,255,.5);
}
@@ -107,7 +107,13 @@ import { onMount } from 'svelte';
text-transform: uppercase;
letter-spacing: .2em;
}
-
+
+ .event__time {
+ line-height: 1;
+ font-size: 1.2rem;
+ font-weight: 300;
+ color: rgba(255,255,255,.75);
+ }
@@ -127,7 +133,7 @@ import { onMount } from 'svelte';
{#each actions as action}
{#if getDayOfWeek(action.timestamp) === dayIndex && getHourOfDay(action.timestamp) === hour}
-
{action.type}{formatTime(action.timestamp)}
+
{action.type}{formatTime(action.timestamp)}
{/if}
{/each}
diff --git a/src/styles/app.css b/src/styles/app.css
index 1634e25..075c243 100644
--- a/src/styles/app.css
+++ b/src/styles/app.css
@@ -2,9 +2,37 @@
--c-primary: darkorange; /* Replace #yourColor with your desired color */
}
-body {
- background-color: #f2f0ef;
+/* https://coolors.co/palette/5f0f40-9a031e-fb8b24-e36414-0f4c5c */
+
+[class*='--food'] {
+ --color: #136f63;
}
+[class*='--poop'] {
+ --color: #78290f;
+}
+[class*='--asleep'] {
+ --color: #032b43;
+}
+[class*='--awake'] {
+ --color: #ffba08;
+}
+[class*='--diaper'] {
+ --color: #3f88c5;
+}
+/* d00000 ff7d00 */
+
+html[data-theme='light'] body {
+ background-color: #f2f0ef;
+ --c-border: #e9e9e9;
+ --c-toggle: #00464b;
+}
+
+html[data-theme='dark'] body {
+ background-color: #181818;
+ --c-border: #2b2b2b;
+ --c-toggle: #ffe600;
+ }
+
a,
input[type='text']:focus,
@@ -19,6 +47,15 @@ button,
input[type='submit'] {
background-color: var(--color);
border-color: var(--color);
+ transition: all .2s ease-in-out;
+}
+
+a {
+ transition: all .2s ease-in-out;
+}
+
+svg path {
+ transition: all .2s ease-in-out;
}
nav ul {
@@ -31,6 +68,12 @@ nav ul {
nav ul li {
font-size: 2rem;
+ display: flex;
+ list-style: none;
+}
+
+.today__list ul {
+ list-style: none;
}
header {
@@ -61,27 +104,9 @@ aside button {
section {
margin-top: 4rem;
+ position: relative;
}
-/* https://coolors.co/palette/5f0f40-9a031e-fb8b24-e36414-0f4c5c */
-
-[class*='--food'] {
- --color: #136f63;
-}
-[class*='--poop'] {
- --color: #78290f;
-}
-[class*='--asleep'] {
- --color: #032b43;
-}
-[class*='--awake'] {
- --color: #ffba08;
-}
-[class*='--diaper'] {
- --color: #3f88c5;
-}
-/* d00000 ff7d00 */
-
.badge {
background-color: var(--color);
display: inline-block;
@@ -96,12 +121,24 @@ section {
text-align: center;
}
+
+
.counters {
- position: fixed;
- right: 0;
+ position: absolute;
+ top: 0;
+ right: 0;
width: max-content;
- outline: 1px solid #ccc;
- background-color: #eee;
+ outline: 1px solid var(--c-border);
+ background-color: var(--c-border);
padding: 2rem;
- border-radius: 2rem 0 0 2rem;
+ border-radius: 2rem;
+ font-size: 2.5rem;
+}
+
+@media screen and (max-width: 600px) {
+ .counters {
+ margin-right: -2rem;
+ border-radius: 2rem 0 0 2rem;
+ }
+
}