-
Notifications
You must be signed in to change notification settings - Fork 6
/
example.htm
94 lines (78 loc) · 3.54 KB
/
example.htm
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
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick-theme.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha/css/bootstrap.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/styles/github.min.css">
<link rel="stylesheet" href="slick-fullscreen.css">
<style type="text/css">
body {
margin: 0;
padding: 0;
}
.jumbotron {
background-color: #00bcd4;
color: #fff;
}
.jumbotron .lead {
color: #064850;
}
section img {
margin-right: 8px;
}
section a:hover {
text-decoration: none;
}
</style>
</head>
<body>
<section class="jumbotron">
<div class="container">
<h1 class="jumbotron-heading">Fullscreen Slick Slider</h1>
<p class="lead text-muted">Use the power of slick.js in fullscreen mode.</p>
</div>
</section>
<div class="container">
<section data-slick-fullscreen='{"target": "a", "slick":{ "dots": true, "centerMode": true, "centerPadding": "60px", "speed": 0 }}' class="form-group">
<a href="https://placeholdit.imgix.net/~text?txtsize=33&txt=image1&w=1280&h=1024">
<img src="https://placeholdit.imgix.net/~text?txtsize=33&txt=image1&w=100&h=100">
</a>
<a href="https://placeholdit.imgix.net/~text?txtsize=33&txt=image2&w=1280&h=1024">
<img src="https://placeholdit.imgix.net/~text?txtsize=33&txt=image2&w=100&h=100">
</a>
<a href="https://placeholdit.imgix.net/~text?txtsize=33&txt=image3&w=1280&h=1024">
<img src="https://placeholdit.imgix.net/~text?txtsize=33&txt=image3&w=100&h=100">
</a>
<a href="https://placeholdit.imgix.net/~text?txtsize=33&txt=image4&w=300&h=300">
<img src="https://placeholdit.imgix.net/~text?txtsize=33&txt=image4&w=100&h=100">
</a>
</section>
<section>
<h2>Usage</h2>
<p>1. Include <code>slick-fullscreen.js</code> and <code>slick-fullscreen.css</code> in your project.</p>
<p>2. Add <code>data-slick-fullscreen</code> to the container you want to open images in fullscreen.</p>
<pre><code class="html"><section data-slick-fullscreen>
<a href="image1.jpg">
<img src="image1-thumb.jpg">
</a>
<a href="image2.jpg">
<img src="image2-thumb.jpg">
</a>
</section></code></pre>
<p>By default all anchor tags are picked and used for the images, you can customise a different target by changing <code>target</code> along with any other options slick provides.</p>
<pre><code class="html"><section data-slick-fullscreen='{"target": "img", "slick":{ "dots": true, "centerMode": true, "centerPadding": "60px"}}'>
<img src="image1.jpg">
<img src="image2.jpg">
</section></code></pre>
</section>
</div>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.6.0/slick.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/highlight.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.5.0/languages/xml.min.js"></script>
<script type="text/javascript" src="slick-fullscreen.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</body>
</html>