-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhackathonList.html
More file actions
172 lines (143 loc) · 6.37 KB
/
hackathonList.html
File metadata and controls
172 lines (143 loc) · 6.37 KB
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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<html !doctype>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" type="text/css" href="css/qdIsm.css">
<script type="text/javascript" src="js/script.js"></script>
</head>
<body>
<h1><span class="yellow"><a href="/index.html" style="text-decoration: none">
<div class="link">
<h2>HackToSpons</h2>
</div>
</a></span></h1>
<h2>Need a sponsor for your hackathon? Looking for hackathons to get publicity from? <a rel="nofollow" rel="noreferrer"href="http://pablogarciafernandez.com" target="_blank">We have the solution.</a></h2>
<div class="tab">
<button class="tablinks" onclick="openList(event, 'hackathon')">Hackathons Looking For Sponsors</button>
<button class="tablinks" onclick="openList(event, 'company')">Companies Providing Sponsorships</button>
</div>
<script src="https://www.gstatic.com/firebasejs/3.7.3/firebase.js"></script>
<script>
// Initialize Firebase
var config = {
apiKey: "AIzaSyBZCedSSmWw8zgbJ_IE9mJDjYbepZgsR94",
authDomain: "hacktospons-3cbeb.firebaseapp.com",
databaseURL: "https://hacktospons-3cbeb.firebaseio.com",
storageBucket: "hacktospons-3cbeb.appspot.com",
messagingSenderId: "523367268259"
};
firebase.initializeApp(config); /*global firebase*/
</script>
<div id="hackathon" class="tabcontent">
<table class="container">
<thead>
<tr>
<th><h1>Hackathons</h1></th>
<th><h1>Website</h1></th>
<th><h1>Email</h1></th>
<th><h1>Money Requested</h1></th>
<th><h1>Location</h1></th>
<th><h1>Available From</h1></th>
<th><h1>Available Until</h1></th>
</tr>
</thead>
<tbody id="table_body">
<script type="text/javascript">
var rootRef = firebase.database().ref().child("organizers");
rootRef.on("child_added", snap => {
var name = snap.child("name").val();
var email = snap.child("email").val();
var website = snap.child("website").val();
var money = snap.child("money").val();
var place = snap.child("place").val();
var startDate = snap.child("startDate").val();
var endDate = snap.child("endDate").val();
console.log("hejfd");
console.log(snap);
var table_row=document.getElementById("table_body");
var new_row=table_row.insertRow(table_row.rows.length);
function createCell(cell, text, style) {
var div = document.createElement('div'), // create DIV element
txt = document.createTextNode(text); // create text node
div.appendChild(txt); // append text node to the DIV
div.setAttribute('class', style); // set DIV class attribute
div.setAttribute('className', style); // set DIV class attribute for IE (?!)
cell.appendChild(div); // append DIV to the table cell
}
createCell(new_row.insertCell(0), name, 'row');
createCell(new_row.insertCell(1), website, 'row');
createCell(new_row.insertCell(2), email, 'row');
createCell(new_row.insertCell(3), money, 'row');
createCell(new_row.insertCell(4), place, 'row');
createCell(new_row.insertCell(5), startDate, 'row');
createCell(new_row.insertCell(6), endDate, 'row');
//$("#tbody").insertRow("<tr><td id='nameinsert'></td><td id='emailinsert'></td><td id='websiteinsert'></td><td id='moneyinsert'></td><td id='placeinsert'></td><td id='startDateinsert'></td><td id='endDateinsert'></td></tr>");
document.getElementById("nameinsert").innerHTML = name;
document.getElementById("emailinsert").innerHTML = email;
document.getElementById("websiteinsert").innerHTML = website;
document.getElementById("moneyinsert").innerHTML = money;
document.getElementById("placeinsert").innerHTML = place;
document.getElementById("startDateinsert").innerHTML = startDate;
document.getElementById("endDateinsert").innerHTML = endDate;
});
</script>
</tbody>
</table>
</div>
<div id="company" class="tabcontent">
<table class="container">
<thead>
<tr>
<th><h1>Companies</h1></th>
<th><h1>Website</h1></th>
<th><h1>Email</h1></th>
<th><h1>Money Offered</h1></th>
<th><h1>Location</h1></th>
<th><h1>Available From</h1></th>
<th><h1>Available Until</h1></th>
</tr>
</thead>
<tbody id="table_body2">
<script type="text/javascript">
var rootRef = firebase.database().ref().child("companies");
rootRef.on("child_added", snap => {
var name = snap.child("name").val();
var email = snap.child("email").val();
var website = snap.child("website").val();
var money = snap.child("money").val();
var place = snap.child("place").val();
var startDate = snap.child("startDate").val();
var endDate = snap.child("endDate").val();
console.log("hejfd");
console.log(snap);
var table_row=document.getElementById("table_body2");
var new_row=table_row.insertRow(table_row.rows.length);
function createCell(cell, text, style) {
var div = document.createElement('div'), // create DIV element
txt = document.createTextNode(text); // create text node
div.appendChild(txt); // append text node to the DIV
div.setAttribute('class', style); // set DIV class attribute
div.setAttribute('className', style); // set DIV class attribute for IE (?!)
cell.appendChild(div); // append DIV to the table cell
}
createCell(new_row.insertCell(0), name, 'row');
createCell(new_row.insertCell(1), website, 'row');
createCell(new_row.insertCell(2), email, 'row');
createCell(new_row.insertCell(3), money, 'row');
createCell(new_row.insertCell(4), place, 'row');
createCell(new_row.insertCell(5), startDate, 'row');
createCell(new_row.insertCell(6), endDate, 'row');
document.getElementById("nameinsert").innerHTML = name;
document.getElementById("emailinsert").innerHTML = email;
document.getElementById("websiteinsert").innerHTML = website;
document.getElementById("moneyinsert").innerHTML = money;
document.getElementById("placeinsert").innerHTML = place;
document.getElementById("startDateinsert").innerHTML = startDate;
document.getElementById("endDateinsert").innerHTML = endDate;
});
</script>
</tbody>
</table>
</div>
</body>
</html>