aboutsummaryrefslogtreecommitdiff
path: root/src/lib/Tools
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-01-08 23:45:57 -0800
committerFuwn <[email protected]>2024-01-08 23:45:57 -0800
commit5120f53ef2ec94ddcf3a0b9aff413e55705c0ac8 (patch)
treef5d768c870282cb3b274f57eb9dd711e7b689818 /src/lib/Tools
parentfix(hovercover): correct image flip when scrolled (diff)
downloaddue.moe-5120f53ef2ec94ddcf3a0b9aff413e55705c0ac8.tar.xz
due.moe-5120f53ef2ec94ddcf3a0b9aff413e55705c0ac8.zip
refactor(schedule): unique ids
Diffstat (limited to 'src/lib/Tools')
-rw-r--r--src/lib/Tools/Schedule/Crunchyroll.svelte8
-rw-r--r--src/lib/Tools/Schedule/Tool.svelte7
-rw-r--r--src/lib/Tools/Schedule/container.css3
3 files changed, 7 insertions, 11 deletions
diff --git a/src/lib/Tools/Schedule/Crunchyroll.svelte b/src/lib/Tools/Schedule/Crunchyroll.svelte
index 68a73202..faba0222 100644
--- a/src/lib/Tools/Schedule/Crunchyroll.svelte
+++ b/src/lib/Tools/Schedule/Crunchyroll.svelte
@@ -1,5 +1,6 @@
<script lang="ts">
import crunchyroll from '$lib/crunchyroll.json';
+ import './container.css';
interface CrunchyrollMedia<T = number | 'soon' | 'continuing'> {
year: number;
@@ -42,7 +43,7 @@
};
</script>
-<div id="list-container" style={`column-count: ${columnCount};`}>
+<div class="list-container" id="crunchyroll" style={`column-count: ${columnCount};`}>
{#each Object.values(days) as day}
{@const date = new Date(day[0].year, day[0].month - 1, day[0].day)}
@@ -91,11 +92,6 @@
</div>
<style>
- #list-container {
- column-width: 250px;
- /* break-inside: avoid-column; */
- }
-
.day {
overflow-y: auto;
break-inside: avoid-column;
diff --git a/src/lib/Tools/Schedule/Tool.svelte b/src/lib/Tools/Schedule/Tool.svelte
index 56c02b1c..5fdbb526 100644
--- a/src/lib/Tools/Schedule/Tool.svelte
+++ b/src/lib/Tools/Schedule/Tool.svelte
@@ -21,6 +21,7 @@
import HoverCover from '$lib/Media/Cover/HoverCover.svelte';
import Crunchyroll from '$lib/Tools/Schedule/Crunchyroll.svelte';
import Loading from '$lib/Loading.svelte';
+ import './container.css';
let subsPleasePromise: Promise<SubsPlease>;
let scheduledMediaPromise: Promise<Partial<Media[]>>;
@@ -132,7 +133,7 @@
{#if scheduledMedia}
{@const columnCount = Math.ceil(Object.keys(subsPlease.schedule).length / 2)}
- <div id="list-container" style={`column-count: ${columnCount}`}>
+ <div class="list-container" id="schedule" style={`column-count: ${columnCount}`}>
{#each Object.entries(shiftSubsPleaseSchedule(subsPlease.schedule)) as [day, scheduleEntry]}
<details
open
@@ -218,10 +219,6 @@
<HoverCover options={hoverCoverState} width={300} />
<style>
- #list-container {
- column-width: 250px;
- }
-
.entry::after {
content: '';
display: table;
diff --git a/src/lib/Tools/Schedule/container.css b/src/lib/Tools/Schedule/container.css
new file mode 100644
index 00000000..3a3beb1f
--- /dev/null
+++ b/src/lib/Tools/Schedule/container.css
@@ -0,0 +1,3 @@
+.list-container {
+ column-width: 250px;
+}