-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
79 lines (63 loc) · 2.88 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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Egyptian Geeks Archive</title>
<link rel="shortcut icon" href="img/favicon.ico" type="image/png" />
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link href="css/style.css" rel="stylesheet" />
<script type="text/javascript" src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script src="lib/handlebars-v1.3.0.js"></script>
<script src="lib/moment.min.js"></script>
<script type="text/javascript" src="lib/common.js"></script>
<script type="text/javascript">
function getLastSummeryIndex()
{
var index=1;
$.ajax({url:"data/summaryindex.txt", async: false,success:function(result){
index=Number(result);
}});
return index;
}
try {
var summaryId = getLastSummeryIndex();
if (QueryString != undefined && QueryString.page != undefined) {
summaryId =getLastSummeryIndex()-Number(QueryString.page)+1;
}
$.getJSON('data/summary/summary_page_' + summaryId + '.json', function (summaryData) {
$.get('summaryTemplate.html', function (summaryTemplate) {
var summaryCompiledTemplate = Handlebars.compile(summaryTemplate);
var summaryHtml = summaryCompiledTemplate(summaryData);
$('#summaryDiv').html(summaryHtml);
});
if (summaryId != getLastSummeryIndex()) {
$('#navArrows').html("<a href='index.html?page=" + (getLastSummeryIndex()- parseInt(summaryId)) + "'><span class='glyphicon glyphicon-chevron-left'></span></a>");
}
$('#navArrows').append(" Page " + (getLastSummeryIndex()- parseInt(summaryId)+1) + " ");
$('#navArrows').append("<a href='index.html?page=" + (getLastSummeryIndex()- parseInt(summaryId) + 2) + "'><span class='glyphicon glyphicon-chevron-right'></span></a>");
});
}
catch (error) {
console.log(error);
}
</script>
</head>
<body class="container">
<div>
<a href="index.html"><img class="pull-left" alt="Egyptian Geeks" src="img/EgyptianGeeksLogo.png" /></a>
<h1 class ="text-right">Egyptian Geeks Archive</h1>
<h4 class ="text-right"><a href="https://www.facebook.com/groups/egyptian.geeks/">Visit us on Facebook</a></h4>
</div>
<br />
<div class="pull-right">
<input id="searchText" type="text"/>
<input id="searchSubmit" value="Search" type="submit" onclick="search()"/><br/>
<input id="commentsCheck" type="checkbox" value="commentsCheck">Include comments in search
</div>
<br /><br />
<div id="summaryDiv"></div>
<div id="navArrows" class="text-center">
</div>
<br />
</body>
</html>