diff --git a/src/App.svelte b/src/App.svelte index ccd95d4..68c0010 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -1,6 +1,13 @@ -
- +
+
+ content content +
+
+
+
+
diff --git a/src/style.css b/src/style.css index 2002630..f852d1e 100644 --- a/src/style.css +++ b/src/style.css @@ -1 +1,9 @@ @import url('@unocss/reset/tailwind.css'); + +.hide-scrollbar::-webkit-scrollbar { + display: none; +} +.hide-scrollbar { + -ms-overflow-style: none; + scrollbar-width: none; +} diff --git a/src/utils/client/time.ts b/src/utils/client/time.ts new file mode 100644 index 0000000..c1ece6f --- /dev/null +++ b/src/utils/client/time.ts @@ -0,0 +1,6 @@ +export const getServerTime = async (): Promise => { + const json = await fetch(`${import.meta.env.VITE_EQUAKE_API_URL}/time`).then( + (r) => r.json(), + ) + return new Date(Date.parse(json.string)) +} \ No newline at end of file diff --git a/src/views/Footer.svelte b/src/views/Footer.svelte new file mode 100644 index 0000000..c4ac156 --- /dev/null +++ b/src/views/Footer.svelte @@ -0,0 +1,36 @@ + +
+ +
+ {formattedTime} +
+
\ No newline at end of file diff --git a/src/views/MainContent/index.svelte b/src/views/MainContent/index.svelte new file mode 100644 index 0000000..ec25172 --- /dev/null +++ b/src/views/MainContent/index.svelte @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/src/views/News.svelte b/src/views/News.svelte new file mode 100644 index 0000000..3fadba5 --- /dev/null +++ b/src/views/News.svelte @@ -0,0 +1,40 @@ + +
+ {content} +
diff --git a/src/views/RealTimeSindo/index.svelte b/src/views/RealTimeSindo/index.svelte index 00b496e..cc69d67 100644 --- a/src/views/RealTimeSindo/index.svelte +++ b/src/views/RealTimeSindo/index.svelte @@ -10,9 +10,9 @@ let projection: d3.GeoProjection onMount(async () => { const geojson = await fetch('/japan.geojson').then((res) => res.json()) - const w = 500 - const h = 500 - const scale = 1200 + const w = 600 + const h = 600 + const scale = 900 projection = d3 .geoMercator() @@ -60,15 +60,19 @@ $: { .append('circle') .attr('cx', x) .attr('cy', y) - .attr('r', 5) .attr('fill', 'red') - .attr('class', 'fill-red-100') + .attr('class', 'opacity-50') points.set(id, circle) } const point = points.get(id) if (!point) continue - point.attr('r', (s.sindo + 4) * 2) + const normlizedSindo = (s.sindo + 3) / 10 // 0-1 + + // min: 2, max: 10 + const r = 2 + (10 - 2) * normlizedSindo + point.attr('r', r) + .attr('fill', `hsl(${normlizedSindo * 240 + 120}deg, 100%, 50%)`) } } }