-
Notifications
You must be signed in to change notification settings - Fork 0
/
file.html
180 lines (152 loc) · 3.82 KB
/
file.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<style>
@import url("./yekan/yekan.css");
* {
font-family: "Yekan";
}
.header-container {
min-height: 600px;
font-size: 1.5rem;
}
.line {
width: 40px;
height: 5px;
margin-top: 5px;
background-color: white !important;
transition: transform 0.5s;
}
.change .line-1 {
transform: rotate(45deg) translateX(8px);
}
.change .line-2 {
display: none;
}
.change .line-3 {
transform: rotate(-45deg) translateX(8px);
}
.navbar-header {
font-size: 1.5rem;
}
.navbar-bg-normal {
background-color: rgba(0, 0, 0, 0.5);
}
.navbar-bg-dark {
background-color: rgba(0, 0, 0, 0.7);
}
.navbar-azma {
transition: padding 0.5s;
}
/* Set up the container and cursor */
.typing-text {
direction: ltr;
overflow: hidden;
border-right: 2px solid #fff; /* Cursor */
white-space: nowrap; /* Keep text in one line */
margin: 0 auto; /* Center the container horizontally */
letter-spacing: .0em; /* Adjust spacing between characters */
animation: typing 6s steps(55) infinite;
}
/* Define the typing animation */
@keyframes typing {
from {
width: 0;
}
to {
width: 100%;
}
}
.loading-container img {
filter: brightness(0.1500000);
width: 100%;
height: 100%;
animation: fill-color 4s alternate-reverse infinite; /* Apply the animation */
}
@keyframes fill-color {
0% {
filter: brightness(0.01500000);
clip-path: inset(99% 0 0 0); /* Hide the image except for the bottom */
}
25% {
filter: brightness(0.5);
clip-path: inset(50% 0 0 0); /* Show the entire image */
}
50% {
filter: brightness(1);
clip-path: inset(0 0 0 0); /* Show the entire image */
}
75% {
filter: brightness(0.15000000);
clip-path: inset(100% 0 0 0); /* Show the entire image */
}
100% {
filter: brightness(1);
clip-path: inset(0 0 0 0); /* Show the entire image */
}
}
/*typing animation */
@import url("https://fonts.googleapis.com/css2?family=Russo+One&display=swap");
#animation-loading svg {
font-family: "Russo One", sans-serif;
width: 100%;
height: 100%;
}
#animation-loading svg text {
animation: stroke 5s infinite alternate;
stroke-width: 2;
stroke: #365FA0;
}
@keyframes stroke {
0% {
fill: rgba(72, 138, 204, 0);
stroke: rgba(54, 95, 160, 1);
stroke-dashoffset: 25%;
stroke-dasharray: 0 50%;
stroke-width: 2;
}
70% {
fill: rgba(72, 138, 204, 0);
stroke: rgba(54, 95, 160, 1);
}
80% {
fill: rgba(72, 138, 204, 0);
stroke: rgba(54, 95, 160, 1);
stroke-width: 3;
}
100% {
fill: rgba(72, 138, 204, 1);
stroke: rgba(54, 95, 160, 0);
stroke-dashoffset: -25%;
stroke-dasharray: 50% 0;
stroke-width: 0;
}
}
#animation-loading {
transition: opacity 1s;
background-color: white;
opacity: 1;
}
#animation-loading.hide {
opacity: 0;
}
/* end typing animation */
</style>
OK
<script>
function showAnimation(duration = 5000) {
const template = `<div id="animation-loading" style="z-index: 1040 !important;width: 100%; height: 100vh" class="wrapper position-fixed top-0 end-0 start-0 end-0"><svg style="z-index: 1050 !important;"><text x="50%" y="50%" dy=".100em" text-anchor="middle" class="text-center display-1"></text></svg></div>`;
document.body.innerHTML = template + document.body.innerHTMLwindow.setTimeout(e => {
document.querySelector("#animation-loading").classList.add("hide");
window.setTimeout(event => {
document.querySelector("#animation-loading").remove();
}, 1100)
}, duration)
}
</script>
</body>
</html>