-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
113 lines (97 loc) · 4 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
107
108
109
110
111
112
113
<html>
<head>
<title>
Biblia
</title>
<meta name=viewport content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#3A506B" />
<link href="https://fonts.googleapis.com/css?family=Lato|Roboto" rel="stylesheet">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/skeleton.css">
<link rel="stylesheet" href="css/site.css">
<link rel="stylesheet" href="css/popup.css">
</head>
<body>
<div class="container">
<header class="cd-header">
<nav class="fixed-nav-bar">
<div id="menu" class="menu row" style="position:relative">
<h1 id="pageTitle" class="left"></h1>
<a class="cd-primary-nav-trigger right" href="#">
<span class="cd-menu-icon"></span>
</a> <!-- cd-primary-nav-trigger -->
</div>
</nav>
</header>
<nav>
<ul class="cd-primary-nav">
</ul>
</nav>
<div id="app"></div>
</div>
<script type="text/template" id="bookListTemplate">
<li class="row">
<a class="book" href="#books/<%= book %>"><%= book %></a>
<ul>
<li><a href="#books/<%= book %>">Intro</a></li>
<% _.each(chapters, function(chapter){ %>
<li>
<a href="#passage/<%= book + ' ' + chapter.ch %>">
<span class="chapter"><%= chapter.ch %></span>
<span class="desc"><%= chapter.desc %></span>
</a>
</li>
<% }); %>
</ul>
</li>
</script>
<script type="text/template" id="bookTemplate">
<div >
<h2><%= book %></h2>
<% _.each(chapters, function(chapter){ %>
<div>
<a href="#passage/<%= book + ' ' + chapter.ch %>" style="font-weight:bold"><%= chapter.ch %></a>
<span><%= chapter.desc %></span>
</div>
<% }); %>
</div>
</script>
<script type="text/template" id="passageTemplate">
<div >
<!-- <h2><%= passage %></h2> -->
<%= content %>
</div>
</script>
<script src="js/jquery.js"></script>
<script src="js/underscore.js"></script>
<script src="js/backbone.js"></script>
<script src="js/popup.js"></script>
<script src="js/app.js"></script>
<script type="text/javascript">
$(document).ready(function(){
biblia.Router = new biblia.Router();
biblia.books = new biblia.Books();
biblia.books.fetch({
success: function(){
biblia.booksView = new biblia.BooksView({model:biblia.books});
biblia.booksView.render();
$(".cd-primary-nav").html(biblia.booksView.el);
$(".cd-primary-nav a:not(.book)").on("click", function(){
$(".cd-primary-nav-trigger").trigger("click");
});
$(".cd-primary-nav .book").on("click", function(evt){
evt.preventDefault();
var $list = $(this).next();
if ( $list.is( ":hidden" ) ) {
$list.slideDown( "slow" );
} else {
$list.slideUp("slow");
}
});
Backbone.history.start();
}
});
});
</script>
</body>
</html>