-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcover.html
173 lines (133 loc) · 6.47 KB
/
cover.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
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
<!DOCTYPE html>
<html lang="en-gb" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Cover - UIkit tests</title>
<script src="js/test.js"></script>
<style>
.test-height { height: 300px; }
</style>
</head>
<body>
<div class="uk-container">
<h1>Cover</h1>
<h2>Fixed Height</h2>
<div class="uk-child-width-1-2@m" uk-grid>
<div>
<h3>Image</h3>
<div class="test-height uk-cover-container uk-light">
<img src="images/photo.jpg" alt="" uk-cover>
<div class="uk-position-cover uk-flex uk-flex-center uk-flex-middle">
<h1>Heading</h1>
</div>
</div>
</div>
<div>
<h3>Video</h3>
<div class="test-height uk-cover-container uk-light">
<video src="https://yootheme.com/site/images/media/yootheme-pro.mp4" autoplay loop muted playsinline uk-cover></video>
<div class="uk-position-cover uk-flex uk-flex-center uk-flex-middle">
<h1>Heading</h1>
</div>
</div>
</div>
<div>
<h3>Iframe (YouTube)</h3>
<div class="test-height uk-cover-container uk-light">
<iframe src="https://www.youtube-nocookie.com/embed/c2pz2mlSfXA?autoplay=1&controls=0&showinfo=0&rel=0&loop=1&modestbranding=1&wmode=transparent&playsinline=1" width="1920" height="1080" allowfullscreen uk-cover></iframe>
<div class="uk-position-cover uk-flex uk-flex-center uk-flex-middle">
<h1>Heading</h1>
</div>
</div>
</div>
<div>
<h3>Iframe (Vimeo)</h3>
<div class="test-height uk-cover-container uk-light">
<iframe src="https://player.vimeo.com/video/1084537?title=0&background=1&keyboard=0" width="500" height="281" allowfullscreen uk-cover></iframe>
<div class="uk-position-cover uk-flex uk-flex-center uk-flex-middle">
<h1>Heading</h1>
</div>
</div>
</div>
</div>
<h2>Responsive Height</h2>
<div class="uk-child-width-1-2@m" uk-grid>
<div>
<h3>Video (JS)</h3>
<div class="uk-cover-container uk-light">
<canvas width="600" height="400"></canvas>
<video src="https://yootheme.com/site/images/media/yootheme-pro.mp4?test2" autoplay loop muted playsinline uk-cover></video>
<div class="uk-position-cover uk-flex uk-flex-center uk-flex-middle">
<h1>Heading</h1>
</div>
</div>
</div>
<div>
<h3>Iframe (YouTube)</h3>
<div class="uk-cover-container uk-light">
<canvas width="600" height="400"></canvas>
<iframe src="https://www.youtube-nocookie.com/embed/c2pz2mlSfXA?autoplay=1&controls=0&showinfo=0&rel=0&loop=1&modestbranding=1&wmode=transparent&playsinline=1" width="1920" height="1080" allowfullscreen uk-cover></iframe>
<div class="uk-position-cover uk-flex uk-flex-center uk-flex-middle">
<h1>Heading</h1>
</div>
</div>
</div>
</div>
<h2>Viewport Height</h2>
<div class="uk-child-width-1-2@m" uk-grid>
<div>
<h3>Video (JS)</h3>
<div class="uk-cover-container uk-light" uk-height-viewport>
<video src="https://yootheme.com/site/images/media/yootheme-pro.mp4?test3" autoplay loop muted playsinline uk-cover></video>
<div class="uk-position-cover uk-flex uk-flex-center uk-flex-middle">
<h1>Heading</h1>
</div>
</div>
</div>
<div>
<h3>Iframe (YouTube)</h3>
<div class="uk-cover-container uk-light" uk-height-viewport>
<iframe src="https://www.youtube-nocookie.com/embed/c2pz2mlSfXA?autoplay=1&controls=0&showinfo=0&rel=0&loop=1&modestbranding=1&wmode=transparent&playsinline=1" width="1920" height="1080" allowfullscreen uk-cover></iframe>
<div class="uk-position-cover uk-flex uk-flex-center uk-flex-middle">
<h1>Heading</h1>
</div>
</div>
</div>
</div>
<h2>JavaScript Options</h2>
<div class="uk-overflow-auto">
<table class="uk-table uk-table-striped">
<thead>
<tr>
<th>Option</th>
<th>Value</th>
<th>Default</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>automute</code></td>
<td>Boolean</td>
<td>true</td>
<td>Automutes the video.</td>
</tr>
<tr>
<td><code>width</code></td>
<td>Number</td>
<td></td>
<td>The element's width.</td>
</tr>
<tr>
<td><code>height</code></td>
<td>Number</td>
<td></td>
<td>The element's height.</td>
</tr>
</tbody>
</table>
</div>
</div>
</body>
</html>