-
Notifications
You must be signed in to change notification settings - Fork 484
/
Copy pathtestimonial-carousel.html
84 lines (68 loc) · 1.63 KB
/
testimonial-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
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
<style type="text/css">
div.testimonial-carousel-container {
width: 100%;
}
div.testimonial-slide-container {
display: none;
font-size: smaller;
align: left;
}
div.carousel-slide {
border: 0;
padding: 0;
margin: 0;
}
div.carousel-slide .attribution img {
padding-left: 1em;
padding-right: 1em;
border-left: 1px solid #ccd3d6;
height: 4em;
width: auto;
}
div.carousel-slide p {
margin: 0;
font-style: italic;
padding-bottom: 0.25em;
}
div.carousel-slide .attribution .readable { margin-right: 1em; }
div.carousel-slide .attribution {
color: #647782;
text-align: right;
font-family: "Open Sans", "Segoe UI", Tahoma, sans-serif;
font-weight: 700;
text-transform: uppercase;
font-size: 0.75em;
display: flex;
justify-content: flex-end;
margin-top: 1em;
}
</style>
<h3>
Hear what people have to say about OpenSearch...
</h3>
<div class="testimonial-carousel-container">
{% assign filter_testimonial = site.testimonials %}
{% for testimonial in site.testimonials | where: "featured","true" %}
<div class="testimonial-slide-container" id="slide{{ forloop.index0 }}"
{% if forloop.first %}
style="display: inline;"
{% endif %}
>
{% include testimonial-carousel-slide.html testimonial=testimonial %}
</div>
{% endfor %}
</div>
<script>
setInterval(function() {
thingies = jQuery(".testimonial-slide-container");
for(i = 0; i < thingies.length; i++)
{
if($("div#slide" + i).is(":visible"))
{
$("div#slide" + i).slideUp("slow");
$("div#slide" + ((i + 1) % thingies.length)).slideDown("slow");
break;
}
}
}, 20000);
</script>