-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
219 lines (193 loc) · 7.04 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
---
layout: null
---
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Prawn PDF</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
html {
background: linear-gradient(to bottom, #02004f, #000016) black;
}
html, body {
min-block-size: 100dvh;
height: max-content;
margin: 0;
padding: 0;
}
body {
font-family: sans-serif;
color: white;
contain: layout;
}
header {
padding-block: 4em;
text-align: center;
}
h1 {
margin-block: 2em;
}
main {
display: grid;
grid-template-areas: ". ttfunk prawn pdf-core .";
grid-template-columns: 1fr min-content min-content min-content 1fr;
grid-column-gap: 2em;
}
main article {
inline-size: 12em;
padding: 1em;;
box-sizing: border-box;
border: 0.3ch solid white;
border-radius: 0.5em;
background: rgb(255 255 255 / 0.1);
backdrop-filter: blur(5px);
-webkit-backdrop-filter: blur(5px);
transition: transform 0.4s, filter 0.4s;
}
main article > ul {
padding: 0;
}
main article > ul li {
display: block;
margin-block: 0.4em;
}
:any-link { color: aqua }
:visited { color: #cfc8f9 }
#prawn { grid-area: prawn }
#ttfunk { grid-area: ttfunk }
#pdf-core { grid-area: pdf-core }
@media (min-width: 44em) {
#ttfunk {
transform: perspective(20em) rotateY(-15deg) translateZ(-3em);
}
#ttfunk:hover {
transform: perspective(20em) translateZ(1em);
}
#prawn {
transform: perspective(20em);
}
#prawn:hover {
transform: perspective(20em) translateZ(1em);
}
#pdf-core {
transform: perspective(20em) rotateY(15deg) translateZ(-3em);
}
#pdf-core:hover {
transform: perspective(20em) translateZ(1em);
}
main:has(#pdf-core:hover) {
#ttfunk{
transform: perspective(20em) rotateY(-10deg) translateX(-0.3em) translateZ(-3em);
filter: brightness(60%);
}
#prawn {
transform: perspective(20em) rotateY(5deg) translateX(-0.3em) translateZ(-1em);
filter: brightness(60%);
}
}
main:has(#ttfunk:hover) {
#pdf-core{
transform: perspective(20em) rotateY(10deg) translateX(0.3em) translateZ(-3em);
filter: brightness(60%);
}
#prawn {
transform: perspective(20em) rotateY(-5deg) translateX(0.3em) translateZ(-1em);
filter: brightness(60%);
}
}
main:has(#prawn:hover) {
#ttfunk{
transform: perspective(20em) rotateY(-10deg) translateX(-0.3em) translateZ(-3em);
filter: brightness(60%);
}
#pdf-core {
transform: perspective(20em) rotateY(10deg) translateX(0.3em) translateZ(-3em);
filter: brightness(60%);
}
}
}
@media (max-width: 44em) {
main {
display: block;
}
#prawn, #ttfunk, #pdf-core {
margin: 2em;
inline-size: auto;
transform: none;
&:hover {
transform: none;
}
}
}
body::before {
content: '';
z-index: -1;
position: absolute;
inset: 0;
min-height: 100%;
background:
radial-gradient(circle 3px at calc(30% + sin(var(--wobble) * 2) * 15px) calc(100vh * (1 - var(--raise3))), transparent, rgb(214 235 255) 100%, transparent 101%),
radial-gradient(circle 3px at calc(55% + sin(var(--wobble) * 3) * 15px) calc(100vh * (1.2 - var(--raise3) * 1.5)), transparent, rgb(214 235 255) 100%, transparent 101%),
radial-gradient(circle 5px at calc(15% + sin(var(--wobble) * 4) * 10px) calc(100vh * (1 - var(--raise1))), transparent 0%, rgb(214 235 255) 100%, transparent 101%),
radial-gradient(circle 5px at calc(80% + sin(var(--wobble) * 5) * 10px) calc(100vh * (1.3 - var(--raise1) * 1.5)), transparent 0%, rgb(214 235 255) 100%, transparent 101%),
radial-gradient(circle 7px at calc(40% + sin(var(--wobble) * 6) * 7px) calc(100vh * (1 - var(--raise2))), transparent 0%, rgb(214 235 255) 100%, transparent 101%),
radial-gradient(circle 7px at calc(60% + sin(var(--wobble) * 7) * 5px) calc(100vh * (1.3 - var(--raise2) * 1.5)), transparent 0%, rgb(214 235 255) 100%, transparent 101%),
repeating-conic-gradient(from calc(var(--raise2) * 0.05turn) at 50% -40%, rgb(255 255 255 / 0.15) 0%, transparent, rgb(255 255 255 / 0.15) 1%),
repeating-conic-gradient(from calc(var(--raise1) * -0.05turn) at calc(50% + 100px) -30%, rgb(255 255 255 / 0.2) 0%, transparent 1.25%, rgb(255 255 255 / 0.2) 2.5%)
;
mask-image: radial-gradient(ellipse at top, rgb(0 0 0 / 100%), transparent);
}
</style>
<script>
const wobblePeriod = 5_000; // 5s
const raise1Period = 10_000; // 10s
const raise2Period = 6_000; // 6s
const raise3Period = 15_000; // 15s
let stylesheet = document.createElement('style');
document.head.prepend(stylesheet);
function frame(timestamp) {
let wobble = Math.PI * 2 * (timestamp % wobblePeriod) / wobblePeriod;
let raise1 = (timestamp % raise1Period) / raise1Period;
let raise2 = (timestamp % raise2Period) / raise2Period;
let raise3 = (timestamp % raise3Period) / raise3Period;
stylesheet.textContent = `:root { --wobble: ${wobble}; --raise1: ${raise1}; --raise2: ${raise2}; --raise3: ${raise3}; }`;
window.requestAnimationFrame(frame);
};
document.addEventListener('DOMContentLoaded', function() { frame(0); });
</script>
</head>
<body>
<header>
<img src="{% link /images/prawn.png %}" width="141" height="142" alt="Prawn logo">
<h1>Prawn PDF</h1>
</header>
<main>
<article id="prawn">
<h2>Prawn</h2>
<p>Latest version: <a href="https://rubygems.org/gems/prawn">{% gem_version prawn %}</a></p>
<ul>
<li><a href="/docs/prawn/{% gem_version prawn %}/">Documentation</a></li>
<li><a href="/docs/prawn/{% gem_version prawn %}/manual.pdf">Manual</a></li>
</ul>
</article>
<article id="ttfunk">
<h2>TTFunk</h2>
<p>Latest version: <a href="https://rubygems.org/gems/ttfunk">{% gem_version ttfunk %}</a></p>
<ul>
<li><a href="/docs/ttfunk/{% gem_version ttfunk %}/">Documentation</a></li>
</ul>
</article>
<article id="pdf-core">
<h2>PDF::Core</h2>
<p>Latest version: <a href="https://rubygems.org/gems/pdf-core">{% gem_version pdf-core %}</a></p>
<ul>
<li>
<a href="/docs/pdf-core/{% gem_version pdf-core %}/">Documentation</a>
</li>
</ul>
</article>
</main>
</body>
</html>