diff options
| author | Fuwn <[email protected]> | 2024-06-23 08:21:47 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-06-23 08:24:39 -0700 |
| commit | e2738e68c19d79394209b9dd90a07db6168b7c66 (patch) | |
| tree | 70e8aa0b4ea4f993ec0bc917b83802498d977369 /src/lib/Hololive/Stream.svelte | |
| parent | build: replace koix with just (diff) | |
| download | due.moe-e2738e68c19d79394209b9dd90a07db6168b7c66.tar.xz due.moe-e2738e68c19d79394209b9dd90a07db6168b7c66.zip | |
feat(hololive): update time and guest formatting
Diffstat (limited to 'src/lib/Hololive/Stream.svelte')
| -rw-r--r-- | src/lib/Hololive/Stream.svelte | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/lib/Hololive/Stream.svelte b/src/lib/Hololive/Stream.svelte index 1f0a5b62..cde3be68 100644 --- a/src/lib/Hololive/Stream.svelte +++ b/src/lib/Hololive/Stream.svelte @@ -30,28 +30,29 @@ {/if} <p class="stream-heading"> - [{#if live.streaming} + {#if live.streaming} <b class="live">{$locale().hololive.live}</b >{:else if new Date(live.time).getTime() < Date.now()} <span class="ended">{$locale().hololive.ended}</span>{:else} - <span class="upcoming">{$locale().hololive.upcoming}</span>{/if}] + <span class="upcoming">{$locale().hololive.upcoming}</span>{/if} + <span class="opaque">|</span> {#if icon} <a href={root(`/hololive/${encodeURIComponent(live.streamer)}`)}> <img src={icon} alt="Avatar" class="stream-icon" /> </a> {/if} - <b>{live.streamer}</b> <span class="opaque">|</span> + <a href={root(`/hololive/${encodeURIComponent(live.streamer)}`)} class="streamer-link"> + <b>{live.streamer}</b> + </a> + <br /> {$locale().hololive.dateFormatter(new Date(live.time))} {#if live.guests.length > 0} - <br /> - <small> - {$locale().hololive.with}{live.guests - .join($locale().hololive.comma) - .replace( - new RegExp(`${$locale().hololive.comma}([^${$locale().hololive.commaNoSpace}]+)$`, 'g'), - `${$locale().hololive.comma}${$locale().hololive.ampersand}$1` - )} - </small> + {$locale().hololive.with}{live.guests + .join($locale().hololive.comma) + .replace( + new RegExp(`${$locale().hololive.comma}([^${$locale().hololive.commaNoSpace}]+)$`, 'g'), + `${$locale().hololive.comma}${$locale().hololive.ampersand}$1` + )} {/if} </p> @@ -144,4 +145,9 @@ transform: scale(1.1); } } + + .streamer-link { + color: var(--fg); + text-decoration: none; + } </style> |