/
userIndex.html
executable file
·160 lines (142 loc) · 7.34 KB
/
userIndex.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
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<!-- ======================================================================================================================== -->
<title>Cuty Face</title>
<link rel="shortcut icon" href="favicon.ico" />
<style>
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
</style>
<!-- Custom styles for this template -->
<link href="css/floating-labels.css" rel="stylesheet">
</head>
<body>
<div class="container col-7">
<div class="row ">
<div class="logo" ></div>
</div>
<div class="row ">
<div class="col" style="">
<div class="card rounded shadow" style="margin: 0 auto;">
<div class="card-body" style="">
<div class="row">
<div class="col-sm-8" >
<video id="video" class="rounded" width="100%" height="auto" autoplay></video>
</div>
<div class="col-sm-4" >
<div style="font-size: 2rem;font-weight: 100;letter-spacing: 0.2rem;font-family: Alien League; ">
2019/05/14
</div>
<div style="font-size: 3rem;font-weight: 100;letter-spacing: 1rem;font-family: Alien League;">
08:28
</div>
<br/>
<button id="snap" data-toggle="modal" onclick="goNextPage()" data-target="#exampleModalCenter" class="btn-block btn btn-lg bg-danger align-text-bottom text-white rounded-pill" type="button">上班</button>
<button class="btn-block btn btn-lg bg-warning align-text-bottom text-white rounded-pill" type="button">下班</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row col">
<p class="" style="font-size: 0.4rem;text-align: center;width: 100%;margin-top:1em ;color: #707070 " >Cuty LALA Studio.版權所有</p>
</div>
<img data-brackets-id='1445' class="BgDec" src="image/BgDec01.png" style="right:-15%;bottom:-35%;" >
<img data-brackets-id='1446' class="BgDec" src="image/BgDec02.png" style="left :-21%;bottom:-20%" >
<img data-brackets-id='1447' class="BgDec" src="image/BgDec03.png" style="right: -13%;top:-15%" >
</div>
<div id="particles-js" style="position: absolute;width: 100%;height: 100%;z-index: -2;"></div>
<!-- Modal -->
<div class="modal fade" id="exampleModalCenter" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content">
<div class="modal-header alert alert-dangerr">
<h5 class="modal-title " id="exampleModalCenterTitle">上班打卡</h5>
<!--
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
-->
</div>
<div class="modal-body" style=" text-align: center;">
<canvas id="canvas" width="300" height="220" style=""></canvas>
</div>
<div class="modal-footer justify-content-center" >
<img src="image/loading.gif" >
</div>
</div>
</div>
</div>
<script src='lib/particlesjs/particles.min.js'></script>
<script>
// particlesJS.load('particles-js', 'lib/particlesjs/particlesjs-config2.json', function() {
// console.log('callback - particles.js config loaded');
// });
</script>
<script>
// Put event listeners into place
window.addEventListener("DOMContentLoaded", function() {
// Grab elements, create settings, etc.
var canvas = document.getElementById('canvas');
var context = canvas.getContext('2d');
var video = document.getElementById('video');
var mediaConfig = { video: true };
var errBack = function(e) {
console.log('An error has occurred!', e)
};
// Put video listeners into place
if(navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
navigator.mediaDevices.getUserMedia(mediaConfig).then(function(stream) {
//video.src = window.URL.createObjectURL(stream);
video.srcObject = stream;
video.play();
});
}
/* Legacy code below! */
else if(navigator.getUserMedia) { // Standard
navigator.getUserMedia(mediaConfig, function(stream) {
video.src = stream;
video.play();
}, errBack);
} else if(navigator.webkitGetUserMedia) { // WebKit-prefixed
navigator.webkitGetUserMedia(mediaConfig, function(stream){
video.src = window.webkitURL.createObjectURL(stream);
video.play();
}, errBack);
} else if(navigator.mozGetUserMedia) { // Mozilla-prefixed
navigator.mozGetUserMedia(mediaConfig, function(stream){
video.src = window.URL.createObjectURL(stream);
video.play();
}, errBack);
}
// Trigger photo take
document.getElementById('snap').addEventListener('click', function() {
context.drawImage(video, 0, 0, 300, 220);
});
}, false);
function goNextPage(){
setTimeout(function(){location.href='userSucess.html'},2000);
}
</script>
<!-- ======================================================================================================================== -->
<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
</body>
</html>