From c16a4eba11b45f52ba6077275e2ddbdfef979785 Mon Sep 17 00:00:00 2001 From: onezDerv Date: Sat, 31 Aug 2024 20:07:40 -0400 Subject: [PATCH] Add a proper viewer --- 0.svg => comics/0.svg | 0 index.css | 25 +++++++++++++++++++++++++ index.html | 15 ++++++++++++++- index.js | 6 ++++++ 4 files changed, 45 insertions(+), 1 deletion(-) rename 0.svg => comics/0.svg (100%) create mode 100644 index.css create mode 100644 index.js diff --git a/0.svg b/comics/0.svg similarity index 100% rename from 0.svg rename to comics/0.svg diff --git a/index.css b/index.css new file mode 100644 index 0000000..20ac7d5 --- /dev/null +++ b/index.css @@ -0,0 +1,25 @@ +.ui { + display: inline-block; + margin: 10px; + text-decoration: none; + font-size: 1.2rem; + background: rgb(130, 130, 130); + border: solid rgb(100, 100, 100) 2px; + padding: 10px; + font-weight: bold; + color: rgb(255,255,255); + border-radius: 10px; +} + +.ui-right { + float: right; +} + +img.art { + display: block; + margin: auto; + border: none; + border-radius: 0; + width: 500px; + max-width: 80vw; +} diff --git a/index.html b/index.html index 8abf773..e4e46cc 100644 --- a/index.html +++ b/index.html @@ -1,8 +1,21 @@ + + + + -

See comics

+
+

Onez's Comics

+ + Previous + Next + Source + More +
+ + diff --git a/index.js b/index.js new file mode 100644 index 0000000..7e87d22 --- /dev/null +++ b/index.js @@ -0,0 +1,6 @@ +let params = new URLSearchParams(window.location.search); +let comicPage = params.get('id') || 0; + +document.querySelector('.comic').src = `comics/${comicPage}.svg`; +document.querySelector('.ui-left').href = `?id=${comicPage * 1 - 1}`; +document.querySelector('.ui-right').href = `?id=${comicPage * 1 + 1}`;