forked from toddmotto/fluidvids-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·74 lines (70 loc) · 1.56 KB
/
index.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
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>FluidVids: React.js</title>
<!-- React, JSXTransformer -->
<script src="lib/react.js"></script>
<script src="lib/JSXTransformer.js"></script>
<style>
/** fluidvid styles */
.fluidvids {
display: block;
width: 100%;
max-width: 100%;
position: relative;
}
.fluidvids iframe {
vertical-align: bottom;
position: absolute;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<div class="wrapper">
<div class="fluidvids-vimeo"></div>
<div class="fluidvids-youtube"></div>
</div>
<script type="text/jsx" src="react.fluidvids.js"></script>
<script type="text/jsx">
/**
* @jsx React.DOM
*/
React.renderComponent(
<FluidVid src="http://player.vimeo.com/video/23919731" />,
document.querySelector('.fluidvids-vimeo')
);
React.renderComponent(
<FluidVid src="http://www.youtube.com/embed/JMl8cQjBfqk" />,
document.querySelector('.fluidvids-youtube')
);
</script>
<style>
/* demo stuff, ignore */
.wrapper {
margin: 0 auto;
text-align: center;
width: 60%;
}
.fluidvids {
background: #000;
box-shadow: 0 1px 4px #000;
margin: 30px 0;
}
@media only screen and (min-width: 320px) {
.wrapper {
width: 95%;
}
}
@media only screen and (min-width: 800px) {
.wrapper {
width: 50%;
}
}
</style>
</body>
</html>