Skip to content

Commit 123296d

Browse files
committed
Show thankyou and links after clicking download
1 parent 24a41c1 commit 123296d

File tree

3 files changed

+118
-8
lines changed

3 files changed

+118
-8
lines changed

index.html

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,16 @@
111111
d="M137.85 33.08c.21.71.26 1.89-.03 2.48a2.3 2.3 0 0 1-1.44 1.23l-14.56 4.05c-4.59.83-6.59-2.59-5.54-5.66s9.05-15.2 9.55-15.77 1.03-1.54.78-2.4a3.8 3.8 0 0 0-2.08-2.54 4.6 4.6 0 0 0-3.33-.2 4.2 4.2 0 0 0-2.64 1.98 6 6 0 0 0-.72 3.12c0 .07.02.84-.02 1.14l-.01.07a3.1 3.1 0 0 1-2.11 2.47c-1.56.45-3.22-.55-3.79-2.25l-.07-.21a11.23 11.23 0 0 1 .16-4.72 10.72 10.72 0 0 1 7.53-7.41q2.76-.8 5.43-.22 2.69.57 4.71 2.38a10 10 0 0 1 2.86 4.59c.62 2.04.64 4.09-.05 5.7s-8.63 12.3-8.45 12.91l10.66-2.94c.79-.23 1.62 0 2.24.55a4 4 0 0 1 .93 1.62Z"
112112
/>
113113
</symbol>
114+
<symbol id="icon-discord" viewBox="0 0 16 16">
115+
<path
116+
d="M13.54 2.9a13.2 13.2 0 00-3.25-1c-.02 0-.04 0-.05.02-.15.25-.3.58-.41.83a12.18 12.18 0 00-3.66 0 8.4 8.4 0 00-.41-.83.05.05 0 00-.05-.02 13.16 13.16 0 00-3.28 1.03 13.5 13.5 0 00-2.34 9.14c1.37 1 2.7 1.61 4 2.02.01 0 .04 0 .05-.02.3-.42.58-.86.82-1.33a.05.05 0 00-.03-.07 8.76 8.76 0 01-1.25-.6.05.05 0 010-.08l.24-.2a.05.05 0 01.05 0 9.46 9.46 0 008.05 0h.05l.25.2c.03.02.02.07 0 .09-.4.23-.82.43-1.26.59a.05.05 0 00-.02.07c.24.47.51.91.81 1.33.02.02.04.03.06.02a13.23 13.23 0 004.02-2.06 13.41 13.41 0 00-2.39-9.12zm-8.2 7.31c-.78 0-1.43-.72-1.43-1.6 0-.9.64-1.62 1.44-1.62.8 0 1.45.73 1.43 1.61 0 .89-.63 1.61-1.43 1.61zm5.32 0c-.79 0-1.43-.72-1.43-1.6 0-.9.63-1.62 1.43-1.62.81 0 1.45.73 1.44 1.61 0 .89-.63 1.61-1.44 1.61z"
117+
/>
118+
</symbol>
119+
<symbol id="icon-github" viewBox="0 0 16 16">
120+
<path
121+
d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"
122+
/>
123+
</symbol>
114124
</svg>
115125
<nav class="floating-nav" id="js-nav">
116126
<a href="#" class="nav-home" aria-label="Source 2 Viewer - Back to top">
@@ -122,18 +132,14 @@
122132
<a href="#features">Features</a>
123133
<a href="#changelog">Changelog</a>
124134
<a href="https://discord.gg/s9QQ7Wg7r4">
125-
<svg aria-hidden="true" viewBox="0 0 16 16" width="16" height="16">
126-
<path
127-
d="M13.54 2.9a13.2 13.2 0 00-3.25-1c-.02 0-.04 0-.05.02-.15.25-.3.58-.41.83a12.18 12.18 0 00-3.66 0 8.4 8.4 0 00-.41-.83.05.05 0 00-.05-.02 13.16 13.16 0 00-3.28 1.03 13.5 13.5 0 00-2.34 9.14c1.37 1 2.7 1.61 4 2.02.01 0 .04 0 .05-.02.3-.42.58-.86.82-1.33a.05.05 0 00-.03-.07 8.76 8.76 0 01-1.25-.6.05.05 0 010-.08l.24-.2a.05.05 0 01.05 0 9.46 9.46 0 008.05 0h.05l.25.2c.03.02.02.07 0 .09-.4.23-.82.43-1.26.59a.05.05 0 00-.02.07c.24.47.51.91.81 1.33.02.02.04.03.06.02a13.23 13.23 0 004.02-2.06 13.41 13.41 0 00-2.39-9.12zm-8.2 7.31c-.78 0-1.43-.72-1.43-1.6 0-.9.64-1.62 1.44-1.62.8 0 1.45.73 1.43 1.61 0 .89-.63 1.61-1.43 1.61zm5.32 0c-.79 0-1.43-.72-1.43-1.6 0-.9.63-1.62 1.43-1.62.81 0 1.45.73 1.44 1.61 0 .89-.63 1.61-1.44 1.61z"
128-
/>
135+
<svg aria-hidden="true" width="16" height="16">
136+
<use href="#icon-discord" />
129137
</svg>
130138
Discord
131139
</a>
132140
<a href="https://github.com/ValveResourceFormat/ValveResourceFormat" aria-label="GitHub repository">
133-
<svg aria-hidden="true" viewBox="0 0 16 16" width="16" height="16">
134-
<path
135-
d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"
136-
/>
141+
<svg aria-hidden="true" width="16" height="16">
142+
<use href="#icon-github" />
137143
</svg>
138144
GitHub
139145
</a>
@@ -244,6 +250,31 @@ <h3>Fully open-source and reverse-engineered.</h3>
244250
alt="Screenshot of Source 2 Viewer displaying a 3D rendered map of Inferno Night with detailed lighting and textures"
245251
class="hero-screenshot"
246252
>
253+
<div class="thank-you-banner" id="js-thank-you">
254+
<h2>Thanks for downloading!</h2>
255+
<div class="thank-you-links">
256+
<a href="https://github.com/ValveResourceFormat/ValveResourceFormat" target="_blank">
257+
<svg aria-hidden="true" viewBox="0 0 16 16" width="20" height="20">
258+
<path
259+
d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Z"
260+
/>
261+
</svg>
262+
Star on GitHub
263+
</a>
264+
<a href="https://discord.gg/s9QQ7Wg7r4" target="_blank">
265+
<svg aria-hidden="true" width="20" height="20">
266+
<use href="#icon-discord" />
267+
</svg>
268+
Join Discord
269+
</a>
270+
<a href="https://github.com/ValveResourceFormat/ValveResourceFormat/issues" target="_blank">
271+
<svg aria-hidden="true" width="20" height="20">
272+
<use href="#icon-github" />
273+
</svg>
274+
Report Issues
275+
</a>
276+
</div>
277+
</div>
247278
<div class="hero-screenshot-author">
248279
<svg
249280
width="16"

static/main.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,4 +286,8 @@ function OpenMediaModal(src, type) {
286286
modal.showModal();
287287
}
288288

289+
document.getElementById('js-download').addEventListener('click', () => {
290+
document.getElementById('js-thank-you').classList.add('visible');
291+
});
292+
289293
LoadReleases();

static/style.css

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ a {
253253
}
254254

255255
.hero-right {
256+
position: relative;
256257
display: flex;
257258
flex-direction: column;
258259
align-self: center;
@@ -286,6 +287,80 @@ a {
286287
color: inherit;
287288
}
288289
}
290+
291+
.hero-screenshot,
292+
.hero-screenshot-author {
293+
transition: opacity 0.4s ease;
294+
}
295+
296+
&:has(.thank-you-banner.visible) {
297+
.hero-screenshot,
298+
.hero-screenshot-author {
299+
opacity: 0;
300+
pointer-events: none;
301+
}
302+
}
303+
304+
.thank-you-banner {
305+
position: absolute;
306+
inset: 0;
307+
display: flex;
308+
flex-direction: column;
309+
align-items: center;
310+
justify-content: center;
311+
gap: 1.5rem;
312+
text-align: center;
313+
padding: 2rem;
314+
opacity: 0;
315+
pointer-events: none;
316+
transition: opacity 0.4s ease;
317+
318+
svg {
319+
fill: currentColor;
320+
flex-shrink: 0;
321+
}
322+
323+
&.visible {
324+
opacity: 1;
325+
pointer-events: auto;
326+
}
327+
328+
h2 {
329+
margin: 0;
330+
font-size: 3rem;
331+
color: #fff;
332+
}
333+
}
334+
335+
.thank-you-links {
336+
display: flex;
337+
flex-wrap: wrap;
338+
justify-content: center;
339+
gap: 1rem;
340+
341+
a {
342+
display: flex;
343+
align-items: center;
344+
gap: 0.6rem;
345+
padding: 0.75rem 1.5rem;
346+
font-size: 1.2rem;
347+
border: 1px solid rgb(255 255 255 / 15%);
348+
border-radius: 0.5rem;
349+
color: hsl(216 30% 80%);
350+
text-decoration: none;
351+
font-weight: 500;
352+
transition:
353+
border-color 0.2s,
354+
color 0.2s,
355+
background 0.2s;
356+
357+
&:hover {
358+
border-color: var(--color-accent);
359+
color: var(--color-accent);
360+
background: rgb(255 255 255 / 5%);
361+
}
362+
}
363+
}
289364
}
290365

291366
@media (max-width: 1300px) {

0 commit comments

Comments
 (0)