diff --git a/zhetic-poc/contact.html b/zhetic-poc/contact.html index 31a17aa..d884301 100644 --- a/zhetic-poc/contact.html +++ b/zhetic-poc/contact.html @@ -14,8 +14,6 @@ | Contact |

-      - The project lives on irc.rizon.net#a-manga-thing

diff --git a/zhetic-poc/contributing.html b/zhetic-poc/contributing.html index 6c8e8be..1e00b25 100644 --- a/zhetic-poc/contributing.html +++ b/zhetic-poc/contributing.html @@ -14,8 +14,6 @@ | Contact |

-      - This service relies on a distributed network of hosts to serve content. The easiest way to help is to keep your ipfs daemon on in the background and use the dashboard on port 5001 to pin content you are interested in. If you have bandwidth to spare, consider consolidating your config files with ours and become a more permanent part of the network.

diff --git a/zhetic-poc/db.json b/zhetic-poc/db.json index 2e4514f..24d4416 100644 --- a/zhetic-poc/db.json +++ b/zhetic-poc/db.json @@ -1,6 +1,5 @@ [ - { "id" : "0", "title" : "Boku no Kokoro no Yabai Yatsu", "cid" : "bafybeihnoou2av5w2bzmwkl6hi25scyzz6sjwdfqp4cwq2ikf6dfmev3ta", "pageNo" : "18" }, - { "id" : "1", "title" : "Otoyomegatari", "cid" : "bafybeigfivshobq4h5x5qwmttgqimaufmcjl6hpjcrsedj7wxxduphp7g4", "pageNo" : "39" }, - { "id" : "2", "title" : "Spy X Family", "cid" : "bafybeibgnpbredeofwp364qomqpth55a6ui3oiy2ucm35fo3eimquoeob4", "pageNo" : "71" } -] - + { "id" : "0", "title" : "Boku no Kokoro no Yabai Yatsu", "cid" : "bafybeihnoou2av5w2bzmwkl6hi25scyzz6sjwdfqp4cwq2ikf6dfmev3ta"}, + { "id" : "1", "title" : "Otoyomegatari", "cid" : "bafybeigfivshobq4h5x5qwmttgqimaufmcjl6hpjcrsedj7wxxduphp7g4"}, + { "id" : "2", "title" : "Spy X Family", "cid" : "bafybeibgnpbredeofwp364qomqpth55a6ui3oiy2ucm35fo3eimquoeob4"} +] \ No newline at end of file diff --git a/zhetic-poc/img/bokuyaba_cover.jpg b/zhetic-poc/img/covers/0.jpg similarity index 100% rename from zhetic-poc/img/bokuyaba_cover.jpg rename to zhetic-poc/img/covers/0.jpg diff --git a/zhetic-poc/img/otoyomegatari_cover.jpg b/zhetic-poc/img/covers/1.jpg similarity index 100% rename from zhetic-poc/img/otoyomegatari_cover.jpg rename to zhetic-poc/img/covers/1.jpg diff --git a/zhetic-poc/img/spyxfamily_cover.jpg b/zhetic-poc/img/covers/2.jpg similarity index 100% rename from zhetic-poc/img/spyxfamily_cover.jpg rename to zhetic-poc/img/covers/2.jpg diff --git a/zhetic-poc/index.html b/zhetic-poc/index.html index 649f967..1e00b25 100644 --- a/zhetic-poc/index.html +++ b/zhetic-poc/index.html @@ -13,16 +13,7 @@ | Contributing | Contact | -
-

This service requires an IPFS client

-

-      - This service is 99% distributed. This means you should start seeding before you start reading and accessing the content. Install an ipfs client and connect through the http gateway it provides for you. This website is just a list of files hosted on a distributed network, a tracker, if you will. For the best possible experience we also recommend that you install the ipfs-companion browser plugin. This does not mean you should rely on the public gateway, because this site would not be able to stay up.
-      - You have the option of either a GUI client or an assortment of other CLI-based tools. Once you have the service running in the background it will translate the content and allow you to view it in your browser.
-      - Make sure to pin your favorite manga to make sure that it sticks around. This tells ipfs to always keep a local copy and help out with content distribution.

diff --git a/zhetic-poc/js/catalog.js b/zhetic-poc/js/catalog.js new file mode 100644 index 0000000..137988f --- /dev/null +++ b/zhetic-poc/js/catalog.js @@ -0,0 +1,35 @@ +function load() { + $.ajax({ + dataType: "json", + url: "/db.json", + headers: { "Accept": "application/json"}, + success: function (res) { + let strCatalog = ""; + let strSearch = document.getElementById("search").value; + res.forEach(manga => { + if (strSearch != "" && !manga["title"].toLowerCase().includes(strSearch.toLowerCase())) + return; + strCatalog += '\ + \ + \ + \ + \ +

'+manga["title"]+'

\ +

Scanlation: ?

\ +

Status: ?

\ +

Chapters: ?

\ +

Last update: ?

\ +

\ + Link:\ + reader\ +

\ + \ + '; + }); + document.getElementById("titles").innerHTML = strCatalog; + } + }); +} +$(document).ready(function () { + load(); +}); diff --git a/zhetic-poc/js/reader.js b/zhetic-poc/js/reader.js index 1d41be5..c0ff32d 100644 --- a/zhetic-poc/js/reader.js +++ b/zhetic-poc/js/reader.js @@ -97,22 +97,31 @@ $(document).ready(function () { let url = new URL(window.location.href); let id = url.searchParams.get("id"); + let domain = window.location.hostname; $.ajax({ dataType: "json", - url: "https://amangathing.ddns.net/db.json", + url: "/db.json", headers: { "Accept": "application/json"}, success: function (res) { - pageNo = res[id]["pageNo"]; - title = res[id]["title"]; - cid = res[id]["cid"]; - $("#pageCounter").html(`${pageCurrent}/${pageNo}`); - $("#titlebarText").html(`${title}`); - $("title").html(`${title}`); - for (let i = 1; i <= pageNo; i++) { - $("#pageView").append(``); - $(`#image${i}`).hide(); - } - loadPage(); + pageNo = 0; + $.ajax({ + dataType: "json", + url: "https://ipfs.io/api/v0/ls/"+res[id]["cid"], + headers: { "Accept": "application/json"}, + success: function (r) { + pageNo = r["Objects"][0]["Links"].length; + title = res[id]["title"]; + cid = res[id]["cid"]; + $("#pageCounter").html(`${pageCurrent}/${pageNo}`); + $("#titlebarText").html(`${title}`); + $("title").html(`${title}`); + for (let i = 1; i <= pageNo; i++) { + $("#pageView").append(``); + $(`#image${i}`).hide(); + } + loadPage(); + } + }); } }); diff --git a/zhetic-poc/manga.html b/zhetic-poc/manga.html index cafcc78..2589ef6 100644 --- a/zhetic-poc/manga.html +++ b/zhetic-poc/manga.html @@ -3,6 +3,8 @@ /a/ manga thing + +
@@ -13,58 +15,14 @@ | Contributing | Contact |
-
-

This service requires an IPFS client

-

     - This part could be js driven and pull the metadata from some kind of database, alternatively from ipfs through the public gateway at ipfs.io. The manga pages would be pulled from localhost and displayed in a built-in manga reader.

+ Generated from /db.json
+
- - - - - - - - - - - - - +
- - -

Boku no Kokoro no Yabai Yatsu

-

Scanlation: idgaf

-

Status: ongoing

-

Chapters: x

-

Last update: recently

-

Link: - QmeKZdHoERmKUekcRxb3ao4ZuLDcF9qNbjYr3ZmeKAjC2s

-
- - -

Otoyomegatari

-

Scanlation: idgaf

-

Status: ongoing

-

Chapters: x

-

Last update: recently

-

Link: - QmbciPyqhjrbkrJVAkWFaUMSS9BXS7MH34ibhErnzzKEtN

-
- - -

Spy x Family

-

Scanlation: idgaf

-

Status: ongoing

-

Chapters: x

-

Last update: recently

-

Link: - QmQvdWNqGU8q5c2DyqwxhVfYZt8Cw8PFxAQD6zHfR49ojc

-