Show events as colored bars in the month grid on phones
This commit is contained in:
1 parent
08a175cc6a
commit
9031a2bf68
1 file changed
+6
-2
@@ -50,7 +50,7 @@
|
||||
{#each list.slice(0, 3) as e (e.id)}
|
||||
<span class="chip" style:--c={colorFor(e)} title={e.title}>{e.title}</span>
|
||||
{/each}
|
||||
{#if list.length > 3}<span class="more">+{list.length - 3} more</span>{/if}
|
||||
{#if list.length > 3}<span class="more">+{list.length - 3}<span class="hide-sm"> more</span></span>{/if}
|
||||
{/snippet}
|
||||
{#if onday}
|
||||
<button type="button" class="day" class:outside class:today={day === today} onclick={() => onday(day)}
|
||||
@@ -76,7 +76,7 @@
|
||||
text-align: left; font-size: var(--fs-xs); font-weight: 500; overflow: hidden; min-width: 0; white-space: normal;
|
||||
}
|
||||
button.day { cursor: pointer; }
|
||||
button.day:hover:not(:disabled) { border-color: var(--primary); background: var(--surface-2); }
|
||||
@media (hover: hover) { button.day:hover:not(:disabled) { border-color: var(--primary); background: var(--surface-2); } }
|
||||
.outside { opacity: 0.4; }
|
||||
.num { font-size: var(--fs-xs); font-weight: 700; color: var(--text-2); width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; }
|
||||
.today .num { background: var(--primary); color: var(--on-primary); }
|
||||
@@ -86,4 +86,8 @@
|
||||
}
|
||||
.more { color: var(--text-2); font-weight: 600; }
|
||||
@media (min-width: 768px) { .day { min-height: 96px; } }
|
||||
/* Phones: a cell fits 3-4 letters of a title, so show each event as a colored bar; List view has the titles. */
|
||||
@media (max-width: 599px) {
|
||||
.chip { height: 6px; padding: 0; border: 0; border-radius: 3px; font-size: 0; background: var(--c); }
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user