/
index.html
106 lines (75 loc) · 2.94 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>FormBlogs</title>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js'></script>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<link rel="stylesheet" href="css/style.css">
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.min.css'>
</head>
<body>
<script src='https://cdnjs.cloudflare.com/ajax/libs/tabletop.js/1.5.1/tabletop.min.js'></script>
<script type='text/javascript'>
var dataGlobal;
var publicSpreadsheetUrl =
"https://docs.google.com/spreadsheets/d/1E11-MvtZuxvNKfh3ljyvt2Tvt2_d0NZ_DyPYIQLibjA/edit?usp=sharing";
function init() {
Tabletop.init({
key: publicSpreadsheetUrl,
callback: showInfo,
simpleSheet: true
})
}
function showInfo(data, tabletop) {
console.log('Successfully processed!');
console.log(data);
var i;
for (i = 0; i < data.length; i++) {
var mainDiv = document.getElementById("info");
var newContRow = document.createElement('div');
newContRow.setAttribute('class', "row");
var newContRowCol = document.createElement('div');
newContRowCol.setAttribute('class', "col-sm");
newContRowCol.innerHTML = "<h3>" + data[i].Title + "</h3>" + "<span class=\"light\">" +
data[i].Timestamp + "->" + "</span><span class=\"light\">" + data[i].Location + "</span>";
console.log("[Loop] " + i);
newContRow.appendChild(newContRowCol);
var newContRowColBody = document.createElement('div');
newContRowColBody.setAttribute('class', "postBody");
newContRowColBody.innerHTML = marked(data[i].Post);
newContRowCol.appendChild(newContRowColBody);
while (newContRow.firstChild) {
mainDiv.appendChild(newContRow.firstChild);
}
}
var images = document.getElementsByTagName('img');
console.log(images);
if (images) {
for (i = 0; i < images.length; i++) {
images[i].setAttribute('class', 'img-fluid');
console.log("[LoopImg] " + i);
}
}
}
window.addEventListener('DOMContentLoaded', init);
</script>
<div class="container">
<nav class="navbar navbar-light bg-light sticky-top navbar-expand{-sm|-md|-lg|-xl}">
<span class="navbar-brand">
Wierd Manifestations
</span>
<div class="my-2 my-lg-0">
<a class="nav-link" href="http://rohitg.in/about/">About</a>
</div>
</nav>
</div>
<div class="container main" id="info">
</div>
</div>
</div>
<script src='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.2.1/js/bootstrap.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/popper.min.js'></script>
</body>
</html>