-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
92 lines (75 loc) · 2.73 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0" />
<title>Voi - Main</title>
<!-- CSS -->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="css/materialize.css" type="text/css" rel="stylesheet" media="screen,projection" />
<link href="css/style.css" type="text/css" rel="stylesheet" media="screen,projection" />
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body>
<nav class="green lighten-1" role="navigation">
<div class="nav-wrapper container"><a id="logo-container" href="/" class="brand-logo voi">Voi</a>
<ul class="right hide-on-med-and-down">
</ul>
<ul id="nav-desktop" class="right nav-desktop">
</ul>
<ul id="nav-mobile" class="sidenav">
</ul>
<a href="#" data-target="nav-mobile" class="sidenav-trigger"><i class="material-icons">menu</i></a>
</div>
</nav>
<div class="row" style="margin-top: 16px">
<div class="col s12 m9 l6" id="post_page">
<span class="input-field">
<input type="text" id="query_text">
<label for="query_text">Search...</label>
<a class="waves-effect waves-dark white black-text btn-flat" type="submit" name="action"
onclick="activateSearch(1)" style="float: right; margin-top:-50px"><i
class="material-icons right">search</i></a>
</span>
</div>
</div>
<div class="row">
<div class="col s12 m9 l6" id="main_feed">
</div>
</div>
<div class="row">
<div class="col s12 m9 l6" id="feed_pagination">
</div>
</div>
<footer id="footer" class="page-footer green">
</footer>
<!-- Scripts-->
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="js/materialize.js"></script>
<script src="js/init.js"></script>
<script src="js/scripts.js"></script>
<script>
let id = getCookie('user_id');
console.log(id);
if (id == null) {
console.log("Has no id cookie");
window.location.href = websiteUrl + "/login.html";
} else {
fetch(api + 'user/' + id)
.then(response => response.json())
.then(result => {
let login = result['login'];
if (id == null) {
window.location.href = websiteUrl + "/login.html";
} else {
defaultHeaderButtons();
}
})
}
fillContent();
window.onload = getFeed;
</script>
</body>
</html>