This repository has been archived by the owner on Aug 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Carousel.html
58 lines (46 loc) · 1.57 KB
/
Carousel.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
<style disabled>
.item > img {
width: 100%;
}
.carousel-caption > h4 {
text-shadow: 1px 1px 1px black;
}
</style>
<script>
require(['jquery', 'EasyWebApp', 'BootStrap'], function ($, EWA) {
EWA.component(function (data) {
this.on('ready', function () {
this.$_View.find('.carousel').carousel();
});
return {
id: data.id,
list: data
};
});
});
</script>
<div class="carousel slide" id="${view.id}">
<ol class="carousel-indicators" data-name="list">
<li data-target="#${scope.id}" data-slide-to="${view.__index__}"
class="${view.__index__ ? '' : 'active'}"></li>
</ol>
<div class="carousel-inner" role="listbox" is="ListView" data-name="list">
<div class="item ${view.__index__ ? '' : 'active'}">
<img src="${view.image}" />
<div class="carousel-caption">
<h4><!--${view.title}--></h4>
<p><!--${view.detail}--></p>
</div>
</div>
</div>
<a class="carousel-control left" href="#${view.id}"
role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control right" href="#${view.id}"
role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>