-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
192 lines (146 loc) · 5.86 KB
/
index.html
File metadata and controls
192 lines (146 loc) · 5.86 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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
<!DOCTYPE html>
<!-- This is a complete example of an image gallery -->
<html lang="en">
<head>
<!-- use the head section to define meta data and load css and js files -->
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Species of World</title>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/handlebars-v3.0.3.js"></script>
<!--
These are our javascript files.
Albums.js contains the data
gallery.js is the code
-->
<script src="js/AnimalsData.js"> </script>
<script src="js/assignment.js"> </script>
<link href="css/bootstrap.css" rel="stylesheet">
<link href="css/gallery.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="container">
<!-- page tile -->
<div class="page-header">
<h1>Species Albums </h1>
</div>
<!-- A navigation menu that selects different views -->
<ul class="nav nav-tabs">
<li role="" class="active"><a href="#" id="albums-tab" >Albums</a></li>
<li role=""><a href="#" id="photos-tab" >Photos</a></li>
<li role=""><a href="#" id="slideshow-tab" >Slideshow</a></li>
</ul><br/><br/>
<!-- the content section is empty as we will fill it
via javascript and templates -->
<div id="content" class="container-fluid" role="main">
</div>
</div> <!-- / container -->
<!-- Here are our Templates -->
<!-- this is the template for the albums view -->
<!--
it displays the albums in a bootstrap grid format
with one item for each album (using the {{#each}} template expression.
Each album is displayed with a thumbnail image, a name and
the number of photos (using the {{photos.length}} template expression, see my lecture for more details)
-->
<script id="albums-template" type="text/x-handlebars-template">
<div class="row">
{{#each category}}
<div class="col-xs-12 col-md-3">
<div class="album-thumbnail" data-id="{{@index}}">
<div class="caption">
<h4 style="color:blue"> {{name}} </h4>
<p>{{animals.length}} photos</p>
</div>
</div>
</div> <!-- / col -->
{{/each}}
</div> <!-- / row -->
</script>
<!-- this is the template for the photos view of a single album -->
<!--
like albums view it uses a bootstrap grid format to display the photos in an album
Each photos is displayed with anumbnail image, a name and
a description
-->
<script id="photos-template" type="text/x-handlebars-template">
<div class="row">
<!-- xs-12 : small display shows a single column (taking up 12 grid columns)-->
<!-- md-3 : medium and up displays use 3 grid columns per column -->
{{#each animals}}
<div class="col-xs-12 col-md-3">
<div class="photo-thumbnail" data-id="{{@index}}">
<img class="crop-img" src="{{image1}}" alt=""/>
<div class="caption">
<h3>{{name}}</h3>
<p>{{description}}</p>
</div>
</div>
</div> <!-- / col -->
{{/each}}
</div> <!-- / row -->
</script>
<!-- this is the template for the view a single photo -->
<!--
It is displayed as a large image with title and description
-->
<script id="photo-template" type="text/x-handlebars-template">
<div class="row">
<div class="col-xs-12 col-md-12">
<img class="large-img" src="{{image2}}" alt=""/>
<div class="caption">
<h3>{{name}}</h3>
<p>{{description}}</p>
</div>
</div> <!-- / col -->
</div> <!-- / row -->
</script>
<!-- this is the template for the slideshow view of a single album -->
<!--
It uses the carousel view, which is quite complex, see my lecture for details
-->
<script id="slideshow-template" type="text/x-handlebars-template">
<div class="row">
<div class="col-md-6">
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox">
{{#each animals}}
<div class="item {{#if @first}}active{{/if}}">
<img class="carousel-img" src="{{image1}}" alt=""/>
<img class="carousel-img" src="{{image2}}" alt=""/>
<div class="carousel-caption">
Image caption
</div>
</div> <!-- / carousel item -->
{{/each}}
</div>
<!-- Controls -->
<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div> <!-- / carousel -->
</div> <!-- / col -->
</div> <!-- / row -->
</script>
</body>
</html>