fuck mods and fuck jquery

main
zhetic 4 years ago
parent 7c0bce0199
commit 6fe70abb19
  1. 27
      catalog/catalog.html
  2. 30
      catalog/css/stylesheet.css
  3. 21
      catalog/db.json
  4. BIN
      catalog/img/covers/0.jpg
  5. BIN
      catalog/img/covers/1.jpg
  6. BIN
      catalog/img/covers/2.jpg
  7. 35
      catalog/js/catalog.js

@ -0,0 +1,27 @@
<html>
<head>
<title>/a/ manga thing</title>
<meta charset="UTF-8">
<link rel="stylesheet" href="css/stylesheet.css">
</head>
<body>
<center>
<img src="img/out.png"/>
<h1>/a/ manga thing</h1>
| <a href="index.html">Home</a>
| <a href="manga.html">Manga</a>
| <a href="contributing.html">Contributing</a>
| <a href="contact.html">Contact</a> |
</center>
<p>
&nbsp&nbsp&nbsp&nbsp
Generated from /db.json
<center>
<input id="search" type="text" placeholder="Search">
<button id="loadButton" type="button" onclick="load();">load</button>
</center>
<table id="titles">
</table>
<script type="text/javascript" src="js/catalog.js"></script>
</body>
</html>

@ -0,0 +1,30 @@
body {
font-family: 'Courier New', monospace;
margin-left: 15%;
margin-right: 15%;
margin-top: 2%;
}
table {
width: 100%;
}
.thumbnail {
height: 250px;
width: 175px;
}
.cover {
height: 250px;
width: 175px;
}
.description {
padding: 25px;
vertical-align: top;
}
#search {
width: 50%;
height: 15px;
}

@ -0,0 +1,21 @@
[
{
"id" : "0", "title" : "Boku no Kokoro no Yabai Yatsu", "cid" : "bafybeihnoou2av5w2bzmwkl6hi25scyzz6sjwdfqp4cwq2ikf6dfmev3ta",
"chapters" : [
{ "pages" : "18" }
]
},
{
"id" : "1", "title" : "Otoyomegatari", "cid" : "bafybeigfivshobq4h5x5qwmttgqimaufmcjl6hpjcrsedj7wxxduphp7g4",
"chapters" : [
{ "pages" : "39" }
]
},
{
"id" : "2", "title" : "Spy X Family", "cid" : "bafybeibgnpbredeofwp364qomqpth55a6ui3oiy2ucm35fo3eimquoeob4",
"chapters" : [
{ "pages" : "71" }
]
}
]

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

@ -0,0 +1,35 @@
function load() {
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function () {
if(this.readyState == 4 && this.status == 200){
console.log("loaded");
console.log(this.responseText);
var res = JSON.parse(this.responseText);
var strCatalog = "";
res.forEach(manga => {
strCatalog += '<tr>\
<td class="cover">\
<img class="thumbnail" src="img/covers/'+manga["id"]+'.jpg"/>\
</td>\
<td class="description">\
<p><b>'+manga["title"]+'</b></p>\
<p>Scanlation: ?</p>\
<p>Status: ?</p>\
<p>Chapters: ?</p>\
<p>Last update: ?</p>\
<p>\
Link:\
<a href="reader.html?id='+manga["id"]+'">reader</a>\
</p>\
</td>\
</tr>';
});
console.log(strCatalog);
document.getElementById("titles").innerHTML = strCatalog;
}
}
xmlhttp.open("GET", "https://amangathing.ddns.net/db.json", true);
xmlhttp.send();
}
document.onreadystatechange = load();
Loading…
Cancel
Save