Merge pull request #1 from kurisufriend/main
dynamic catalog, public ipfs gateway, removed hardcoded linksmain
commit
80f016dddf
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 185 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
@ -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 += '<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>'; |
||||
}); |
||||
document.getElementById("titles").innerHTML = strCatalog; |
||||
} |
||||
}); |
||||
} |
||||
$(document).ready(function () { |
||||
load(); |
||||
}); |
Loading…
Reference in new issue