/
index.html
147 lines (112 loc) · 8.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
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
<!doctype HTML>
<html>
<head>
<title>A Ajax/jQuery HTML Template system</title>
<script type="text/javascript" src="https://code.jquery.com/jquery-latest.min.js"></script>
<style>
@import url(http://fonts.googleapis.com/css?family=Viga);
html,body{height: 100%; width: 100%;font-family: Viga;padding: 0px; margin: 0px;}
section.container{width: 970px; margin: 0 auto;}
header nav{display: table; width: 100%; table-layout: fixed;}
header nav a{display: table-cell; text-align: center; vertical-align: middle; height: 40px; font-size: 20px;}
#template-element{font-size:0;width: 100%; padding: 0px; marrgin: 0px; -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box; /* Opera/IE 8+ */}
#template-element h3{font-size: 16px;}
#template-element .video-entry {-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ -moz-box-sizing: border-box; /* Firefox, other Gecko */ box-sizing: border-box; /* Opera/IE 8+ */font-size: 0;display: inline-block; width: 100%; margin-bottom: 10px;padding: 10px; border-radius: 10px; border: 2px solid #888;}
#template-element .video-entry section.thumbnail{-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ -moz-box-sizing: border-box; /* Firefox, other Gecko */ box-sizing: border-box; /* Opera/IE 8+ */height: auto; width: 15%; float: left;margin: 0px; padding: 0px; font-size: 0;}
#template-element .video-entry section.thumbnail img{display: block; width: 100%; height: 100%; -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box; /* Opera/IE 8+ */margin:0px;padding: 0px;}
#template-element .video-entry section.details{padding-left: 10px; -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box; /* Opera/IE 8+ */display: block; overflow: hidden; line-height: 150%; font-size: 15px;}
#template-element .video-entry section.details h4 a{color: #000; text-decoration: none;}
#template-element .video-entry section.details h4{ margin-top: 0px; padding-top: 0px;}
#template-element .video-entry section.details h4 a:hover{color: #888; text-decoration: underline;}
#template-element .video-entry section.details p{font-weight: 300px; line-height: 20px; font-size: 12px;}
/*Search form*/
#youtube-search{ display: block; background-color: #888; padding: 5px; margin-bottom: 10px;}
#youtube-search div.search-text{display: block; overflow: hidden;}
#youtube-search div.search-text input[type="text"]{width: 100%; padding: 5px; height: 30px; -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box; }
#youtube-search button{width: 30px;float: right; padding: 5px; height: 30px;}
/*Pagination*/
#youtube-navigation{display: table; table-layout: fixed; width: 100%; border-radius: 10px; border: 1px solid black; text-align: left; padding: 0px; margin: 0px; overflow: hidden;position: relative;}
#youtube-navigation a{display: table-cell; font-size: 14px; color: #000000; height: 30px; width: 30px; text-align: center; vertical-align: middle;}
#youtube-navigation a:nth-child(even){border-left: 1px solid black; border-right: 1px solid black;}
#youtube-navigation a:first-child{border-top-left-radius: 10px;border-bottom-left-radius: 10px; border-left: none;}
#youtube-navigation a:last-child{border-top-right-radius: 10px;border-bottom-right-radius: 10px; border-right: none;}
.paginate-selected{background-color: #ccc; color: #fff;}
/*Modal*/
.modal-wrapper{position: fixed; left: 0; top:0; width: 100%; height: 100%; display: table; z-index: 500; -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box;}
.modal{display: table-cell;vertical-align: middle; text-align: center;}
.modal-window{display: inline-block; width: 50%; padding: 5px;
background-color: #131517;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
border-top: solid 1px #2f2f2f;
-webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
-moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
box-shadow: 0px 2px 4px rgba(0,0,0,0.8);}
.modal header{position: relative; color: #fff;}
.modal header .modal-close{position: absolute; right: 0px; top: 0px; width: 20px; border-radius: 20px;color: #000000; font-size: 10px;font-weight: 800;background-color: #fff;border: 1px solid #fff;}
.modal-background{position: fixed; left: 0; top:0; width: 100%; height: 100%; display: table; z-index: 499;background:rgb(0,0,0);
background: transparent\9;
background:rgba(0,0,0,0.4);
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#66000000,endColorstr=#66000000);
zoom: 1;display: none;}
/*footer*/
.container > footer{padding: 20px;}
/*Keft and eight side of main*/
.left-side{display: inline-block; width: 30%;}
.right-side{display: inline-block; width: 70%;font-size: 12px; vertical-align: top;-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
-moz-box-sizing: border-box; /* Firefox, other Gecko */
box-sizing: border-box; padding-left: 5px;}
section.container main{font-size: 0;}
/*Single video display for right side of content*/
.video-entry-single h4 a{color: #000; text-decoration: none; font-size: 20px;}
.video-entry-single h4{ margin-top: 0px; padding-top: 0px;}
.video-entry-single h4 a:hover{color: #888; text-decoration: underline;}
.video-entry-single section.details p{font-weight: 300px; line-height: 20px; font-size: 12px;}
.video-entry-single section.thumbnail{width: 100%; height: 300px; display: inline-block;}
.video-entry-single section.thumbnail img{-webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */ -moz-box-sizing: border-box; /* Firefox, other Gecko */ box-sizing: border-box; /* Opera/IE 8+ */height: auto; width: 100%; margin: 0px; padding: 0px; font-size: 0;}
</style>
<head>
<body>
<section class = "container">
<header>
<h1>Ajax/jQuery Template example</h1>
<section id = "youtube-search">
<button type = "button" id = "search-youtube-button">Go</button><div class = "search-text"><input type = "text" id = "search-youtube" placeholder="Search Youtube" /> <label><input type = "radio" value = "user" name = "youtubeSearchType" checked /> User</label> <label><input type = "radio" value = "search" name = "youtubeSearchType" /> Search</label></div>
</section>
</header>
<main>
<section class = "left-side">
<section id = "template-element"></section>
</section>
<section class = "right-side">
<section id = "template-element-latest-video"></section>
</section>
</main>
<footer>
© TumbleSoftware
</footer>
</section>
<script src = "./youtubePlugin.js" type = "text/javascript"></script>
<script type="text/javascript">
var youtubeVideos = $('#template-element').tumblesYoutubePlugin({searchStr: 'TumbleSoftware',numberPerPage: 25,'searchType': 'user', 'userStr': 'OverTheGun','numberPerPage': '5', 'displayPagination': true,'videoPlaybackTemplate':'youtubevideoplay.html','videoEntryTemplate':'youtubevideo.html','videoPagiTemplate':'youtubepaginate.html','pagiLength': 1});
$('#template-element-latest-video').tumblesYoutubePlugin({searchStr: 'TumbleSoftware',numberPerPage: 1,'searchType': 'search', 'userStr': 'TumbleSoftware', 'displayPagination': false,'videoPlaybackTemplate':'singlevideo/youtubevideoplay.html','videoEntryTemplate':'singlevideo/youtubevideo.html','videoPagiTemplate':'singlevideo/youtubepaginate.html'});
youtubeVideos.availableData();
$(document).ready(function(){
$('#search-youtube-button').click(function(){
youtubeVideos.refreshList($('#search-youtube').val(),0, $('input[name=youtubeSearchType]:checked').val());
});
});
</script>
</body>
</html>