-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
69 lines (65 loc) · 2.91 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>manga reader</title>
<script src="js/mithril.js"></script>
<link rel="shortcut icon" type="image/png" href="logo.png"/>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/jquery-ui.css">
<script src="js/jquery-3.3.1.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/routes.js"></script>
<script src="js/helpers.js"></script>
<link rel="stylesheet" href="css/main.css">
</head>
<body class="container-fluid">
<div id="add-db" title="Add database...">
<p>You can add your own database hash here:</p>
<input type="text" name="hash" id="hash"><button type="submit" onclick="changeDatabase($('#hash').val())">ok</button><br>
<p>You can also select database here</p>
<select id="db_change" oninput="db_select_selector($('#db_change').val())">
</select>
</div>
<nav role="navigation" class="row">
<div class="col-1"><a id="homepage" href="/"><img src="logo.png" id="logo"></img></a></div>
<div class="col" style="font-family: 'Montserrat', sans-serif; color: white;"><a id="open-db" style="cursor:pointer;">Add database</a></div>
<div class="col" style="font-family: 'Montserrat', sans-serif; color: white;">manga reader</div>
</nav>
<article>
<section id="app" class="col-10" style="margin: 0 auto;"></section>
</article>
<script>
db_selector_generate();
selectRow("SELECT hash FROM hashes WHERE defaultHash='1'", (res) => {
changeHash(res[0].name);
Home.view();
})
document.querySelector("#homepage").href = path+"#!/";
m.route(document.querySelector("#app"), "/", {
"/": Home,
"/g/:gallery_id": Gallery,
"/g/:gallery_id/page/:page_id": Page,
});
$(function() {
$('#add-db').dialog({
width: 600,
autoOpen:false,
});
$('#open-db').click(() => {
$('#add-db').dialog('open');
});
});
db.transaction((tx) => {
tx.executeSql("CREATE TABLE IF NOT EXISTS hashes (hash unique, defaultHash)");
tx.executeSql("INSERT INTO hashes(hash, defaultHash) VALUES ('QmNhHspzusAC4sXjjGx9BaNLVEhnsHMGLH6V7AzmRPYGZp', '0')")
tx.executeSql("INSERT INTO hashes(hash, defaultHash) VALUES ('QmUw3xviDCfsgXX7qdipSkpS5X8V5kfVzxTuAWQasoYYX7', '1')")
tx.executeSql("INSERT INTO hashes(hash, defaultHash) VALUES ('QmSk3xmLhu8aoYV1RDTi57EBSjaHDehtM7NDVj3aVpjV77', '0')")
});
</script>
</body>
</html>