-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsuccess.php
141 lines (115 loc) · 3.07 KB
/
success.php
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
<?php
session_start();
include_once("config.php");
echo "";
?>
<style>
.success-message {
text-align: center;
max-width: 500px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.success-message__icon {
max-width: 75px;
}
.success-message__title {
color: #3DC480;
transform: translateY(25px);
opacity: 0;
transition: all 200ms ease;
}
.active .success-message__title {
transform: translateY(0);
opacity: 1;
}
.success-message__content {
color: #B8BABB;
transform: translateY(25px);
opacity: 0;
transition: all 200ms ease;
transition-delay: 50ms;
}
.active .success-message__content {
transform: translateY(0);
opacity: 1;
}
.icon-checkmark circle {
fill: #3DC480;
transform-origin: 50% 50%;
transform: scale(0);
transition: transform 200ms cubic-bezier(0.22, 0.96, 0.38, 0.98);
}
.icon-checkmark path {
transition: stroke-dashoffset 350ms ease;
transition-delay: 100ms;
}
.active .icon-checkmark circle {
transform: scale(1);
}
</style>
<!DOCTYPE html>
<html lang="en" >
<head>
<meta charset="UTF-8">
<title>Success Message</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
<link rel="stylesheet" href="./style.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body>
<!-- partial:index.partial.html -->
<div class="success-message">
<svg viewBox="0 0 76 76" class="success-message__icon icon-checkmark">
<circle cx="38" cy="38" r="36"/>
<path fill="none" stroke="#FFFFFF" stroke-width="5" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M17.7,40.9l10.9,10.9l28.7-28.7"/>
</svg>
<h1 class="success-message__title">You're Signed Up</h1>
<div class="success-message__content">
<p>Please wait until your account will be verified </p>
<a href='index.php'>Login now</a>
</div>
</div>
<!-- partial -->
<script src="./script.js"></script>
</body>
</html>
<script>
function PathLoader(el) {
this.el = el;
this.strokeLength = el.getTotalLength();
// set dash offset to 0
this.el.style.strokeDasharray =
this.el.style.strokeDashoffset = this.strokeLength;
}
PathLoader.prototype._draw = function (val) {
this.el.style.strokeDashoffset = this.strokeLength * (1 - val);
}
PathLoader.prototype.setProgress = function (val, cb) {
this._draw(val);
if(cb && typeof cb === 'function') cb();
}
PathLoader.prototype.setProgressFn = function (fn) {
if(typeof fn === 'function') fn(this);
}
var body = document.body,
svg = document.querySelector('svg path');
if(svg !== null) {
svg = new PathLoader(svg);
setTimeout(function () {
document.body.classList.add('active');
svg.setProgress(1);
}, 200);
}
document.addEventListener('click', function () {
if(document.body.classList.contains('active')) {
document.body.classList.remove('active');
svg.setProgress(0);
return;
}
document.body.classList.add('active');
svg.setProgress(1);
});
</script>