-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·180 lines (162 loc) · 4.87 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Earth ¡Supriyo Rana </title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap');
// <uniquifier>: Use a unique and descriptive class name
// <weight>: Use a value from 400 to 900
.playfair-display-<uniquifier> {
font-family: "Playfair Display", serif;
font-optical-sizing: auto;
font-weight: <weight>;
font-style: normal;
}
</style>
<style>
body {
margin: 0;
padding: 0;
font-family: "Playfair Display"
}
.main {
position: relative;
display: flex;
justify-content: center;
font-size: 10vw;
}
h1 {
position: absolute;
color: #FFFFFF;
}
.para {
position: relative;
display: flex;
justify-content: center;
font-size: 10vw;
padding: 1vh 10vw;
}
p {
position: absolute;
color: #AAAAAA;
top: 70%;
text-align: center;
}
.btn {
--border-color: linear-gradient(-45deg, #ffae00, #7e03aa, #00fffb);
--border-width: 0.125em;
--curve-size: 0.5em;
--blur: 30px;
--bg: #080312;
--color: #afffff;
color: var(--color);
cursor: pointer;
/* use position: relative; so that BG is only for .btn */
position: absolute;
isolation: isolate;
display: inline-grid;
place-content: center;
padding: 0.5em 1.5em;
font-size: 17px;
border: 0;
text-transform: uppercase;
box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.6);
clip-path: polygon(
/* Top-left */
0% var(--curve-size),
var(--curve-size) 0,
/* top-right */
100% 0,
100% calc(100% - var(--curve-size)),
/* bottom-right 1 */
calc(100% - var(--curve-size)) 100%,
/* bottom-right 2 */
0 100%);
transition: color 250ms;
top: 80%;
left: 45%;
}
.btn::after,
.btn::before {
content: "";
position: absolute;
inset: 0;
}
.btn::before {
background: var(--border-color);
background-size: 300% 300%;
animation: move-bg7234 5s ease infinite;
z-index: -2;
}
@keyframes move-bg7234 {
0% {
background-position: 31% 0%;
}
50% {
background-position: 70% 100%;
}
100% {
background-position: 31% 0%;
}
}
.btn::after {
background: var(--bg);
z-index: -1;
clip-path: polygon(
/* Top-left */
var(--border-width) calc(var(--curve-size) + var(--border-width) * 0.5),
calc(var(--curve-size) + var(--border-width) * 0.5) var(--border-width),
/* top-right */
calc(100% - var(--border-width)) var(--border-width),
calc(100% - var(--border-width)) calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5)),
/* bottom-right 1 */
calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5)) calc(100% - var(--border-width)),
/* bottom-right 2 */
var(--border-width) calc(100% - var(--border-width)));
transition: clip-path 500ms;
}
.btn:where(:hover, :focus)::after {
clip-path: polygon(
/* Top-left */
calc(100% - var(--border-width)) calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5)),
calc(100% - var(--border-width)) var(--border-width),
/* top-right */
calc(100% - var(--border-width)) var(--border-width),
calc(100% - var(--border-width)) calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5)),
/* bottom-right 1 */
calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5)) calc(100% - var(--border-width)),
/* bottom-right 2 */
calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5)) calc(100% - var(--border-width)));
transition: 200ms;
}
.btn:where(:hover, :focus) {
color: #fff;
}
a {
color: #fff;
}
</style>
<script type="importmap">
{
"imports": {
"three": "https://cdn.jsdelivr.net/npm/[email protected]/build/three.module.js",
"three/addons/": "https://cdn.jsdelivr.net/npm/[email protected]/examples/jsm/"
}
}
</script>
</head>
<body>
<div class="main">
<h1>Earth</h1>
</div>
<div class="paragraph">
<p>
The third planet from the sun, Earth is the only place in the known universe confirmed to host life.<br>
With a radius of 3,959 miles, Earth is the fifth largest planet in our solar system, and it's the only one known for sure to have liquid water on its surface.<br>
Earth is also unique in terms of monikers.<a href="https://science.nasa.gov/earth/facts/">learn more</a>
</p>
</div>
<script type="module" src="/main.js"></script>
</body>
</html>