-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
342 lines (250 loc) · 9.62 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
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
<!DOCTYPE html>
<html class="no-js" lang="en">
<head>
<!--- basic page needs
================================================== -->
<meta charset="utf-8">
<title>TW</title>
<meta name="description" content="">
<meta name="author" content="">
<!-- mobile specific metas
================================================== -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<!-- CSS
================================================== -->
<link rel="stylesheet" href="css/base.css">
<link rel="stylesheet" href="css/vendor.css">
<link rel="stylesheet" href="css/main.css">
<!-- script
================================================== -->
<script src="js/modernizr.js"></script>
<script src="js/pace.min.js"></script>
<!-- favicons
================================================== -->
<link rel="shortcut icon" href="abc.png" type="image/x-icon">
<link rel="icon" href="abc.png" type="image/x-icon">
</head>
<body id="top">
<!-- header
================================================== -->
<header>
<div class="header-logo">
<a href="index.html">TW</a>
</div>
</header> <!-- end header -->
<!-- home
================================================== -->
<section id="home">
<div class="overlay"></div>
<div class="home-content-table">
<div class="home-content-tablecell">
<div class="row">
<div class="col-twelve">
<h3 class="animate-intro"></h3>
<h1 class="animate-intro"><br><br>
TWITTERAZZI
</h1>
<div class="more animate-intro">
<a class="smoothscroll button stroke" href="#about">
Learn More
</a>
</div>
</div>
</div> <!-- end col-twelve -->
</div> <!-- end row -->
</div> <!-- end home-content-tablecell -->
</div> <!-- end home-content-table -->
<ul class="home-social-list">
<li class="animate-intro">
<a href="#"><i class="fa fa-facebook-square"></i></a>
</li>
<li class="animate-intro">
<a href="#"><i class="fa fa-twitter"></i></a>
</li>
<li class="animate-intro">
<a href="#"><i class="fa fa-instagram"></i></a>
</li>
<li class="animate-intro">
<a href="#"><i class="fa fa-behance"></i></a>
</li>
<li class="animate-intro">
<a href="#"><i class="fa fa-dribbble"></i></a>
</li>
</ul> <!-- end home-social-list -->
<div class="scrolldown">
<a href="#about" class="scroll-icon smoothscroll">
Scroll Down
<i class="fa fa-long-arrow-right" aria-hidden="true"></i>
</a>
</div>
</section> <!-- end home -->
<!-- about
================================================== -->
<section id="about">
<div class="row about-wrap">
<div class="col-full">
<div class="about-profile-bg"></div>
<div class="intro">
<h3 class="animate-this">About Us</h3>
<p class="lead animate-this"><span>Twitterazi</span> is a web-app designed to tweet the images with a click of a button. After capturing the image, with the use of Clarify API, hashtags are added and posted on the twitter. </p>
</div>
</div> <!-- end col-full -->
</div> <!-- end about-wrap -->
</section> <!-- end about -->
<!-- about
================================================== -->
<section id="services">
<div class="row about-wrap">
<div class="col-full">
<div class="about-profile-bg" style="background: grey;"></div>
<div class="intro">
<h1 class="animate-this" style=" text-align: center; color: #2d9add">Capture Image</h1>
</div> <!-- end col-full -->
</div> <!-- end about-wrap -->
<video id="player" width="560" height="440" autoplay></video>      
<canvas id="canvas" width="560" height="420" ></canvas><br><br>
<button type="button" id="capture" onclick="show();setTimeout(saveImage, 100);" style="color: white; background: transparent; border: 3px solid #2d9add; align-self: center;display: block; margin: 0 auto;">Capture</button><br>
<div id="next">
<button type="button" id="capture1" style="color: white; background: transparent; border: 3px solid #2d9add; align-self: center;display: block; margin: 0 auto; visibility: hidden"><a href="#" onclick="window.open('http://localhost:3082/');window.open('next.html');">NEXT</a></button>
</div>
<script>
function show(){
document.getElementById('capture1').style.visibility = "visible";
document.getElementById('capture').style.display = "none";
}
function myFunction() {
var x = document.getElementById("myDIV");
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
}
const player = document.getElementById('player');
const canvas = document.getElementById('canvas');
const context = canvas.getContext('2d');
const captureButton = document.getElementById('capture');
const constraints = {
video: true,
};
captureButton.addEventListener('click', () => {
// Draw the video frame to the canvas.
context.drawImage(player, 0, 0, canvas.width, canvas.height);
});
// Attach the video stream to the video element and autoplay.
navigator.mediaDevices.getUserMedia(constraints)
.then((stream) => {
player.srcObject = stream;
});
function saveImage() {
var ua = window.navigator.userAgent;
if (ua.indexOf("Chrome") > 0) {
// save image as png
var link = document.createElement('a');
link.download = "test1.png";
link.href = canvas.toDataURL("image/png").replace("image/png", "image/octet-stream");
link.click();
}
}
function displayButton() {
var x = document.getElementById("next");
if (x.style.display === "none") {
x.style.display = "block";
} else {
x.style.display = "none";
}
}
</script>
<!-- To show the upload image as canvas -->
<input type="file" accept="image/*" capture id="file-input" onclick="show().setTimeout(saveImage, 100);">
<div id="next">
<button type="button" id="capture1" style="color: white; background: transparent; border: 3px solid #2d9add; align-self: center;display: block; margin: 0 auto; visibility: hidden"><a href="#" onclick="window.open('http://localhost:3082/');window.open('next.html');">NEXT</a></button>
</div>
<script>
const fileInput = document.getElementById('file-input');
fileInput.addEventListener('change', (e) => doSomethingWithFiles(e.target.files));
</script>
<img id="output">
<script>
const output = document.getElementById('output');
function doSomethingWithFiles(fileList) {
let file = null;
for (let i = 0; i < fileList.length; i++) {
if (fileList[i].type.match(/^image\//)) {
file = fileList[i];
break;
}
}
if (file !== null) {
output.src = URL.createObjectURL(file);
}
}
</script>
</section> <!-- end about -->
<!-- Contact
================================================== -->
<section id="contact"
<div class="row contact-info">
<div class="col-twelve">
<h4>Contact US</h4>
<br><br>
</div>
</div> <!-- /section-intro-->
<div class="col-four tab-full">
<div class="icon">
<i class="icon-pin"></i>
</div>
<h5>Where to find us</h5>
<p>
New York,<br>
US
</p>
</div>
<div class="col-four tab-full collapse">
<div class="icon">
<i class="icon-mail"></i>
</div>
<h5>Email US At</h5>
<p>info@twitterazi.com<br>
</p>
</div>
<div class="col-four tab-full">
<div class="icon">
<i class="icon-phone"></i>
</div>
<h5>Call US At</h5>
<p>Phone: +1 (123) 456 7890<br>
</p>
</div>
</div> <!-- /contact-info -->
</section> <!-- /contact -->
<!-- footer
================================================== -->
<br><br><br>
<footer>
<div class="row">
<div class="col-twelve tab-full pull-right social">
<ul class="footer-social">
<li><a href="https://www.facebook.com/" target="_blank"><i class="fa fa-facebook-square"></i></a></li>
<li><a href="https://www.facebook.com/" target="_blank"><i class="fa fa-twitter"></i></a></li>
<li><a href="https://www.facebook.com/" target="_blank"><i class="fa fa-instagram"></i></a></li>
<li><a href="https://www.facebook.com/" target="_blank"><i class="fa fa-behance"></i></a></li>
<li><a href="https://www.facebook.com/" target="_blank"><i class="fa fa-dribbble"></i></a></li>
</ul>
</div>
<br><br>
<div id="go-top">
<a class="smoothscroll" title="Back to Top" href="#top"><i class="fa fa-long-arrow-up"></i></a>
</div>
</div> <!-- /row -->
</footer>
<div id="preloader">
<div id="loader"></div>
</div>
<!-- Java Script
================================================== -->
<script src="js/jquery-2.1.3.min.js"></script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
</body>
</html>