Skip to content

Commit de65419

Browse files
committed
Delete workshop section
1 parent b9fc53f commit de65419

4 files changed

Lines changed: 4 additions & 203 deletions

File tree

index.html

Lines changed: 4 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
<link rel="image_src" href="https://s2v.app/static/preview.jpg">
1111
<link rel="preload" href="static/Manrope.woff2" as="font" type="font/woff2" crossorigin>
1212
<link rel="preconnect" href="https://api.github.com">
13-
<link rel="stylesheet" href="static/style.css?v=1772031956">
14-
<script src="static/main.js?v=1772031956" type="module"></script>
13+
<link rel="stylesheet" href="static/style.css?v=1772031957">
14+
<script src="static/main.js?v=1772031957" type="module"></script>
1515
<meta name="description" content="Browse VPK archives, view, extract, and decompile Source 2 assets. Supports CS2, Dota 2, Deadlock, Half-Life: Alyx, and more.">
1616
<meta property="og:description" content="Browse VPK archives, view, extract, and decompile Source 2 assets. Supports CS2, Dota 2, Deadlock, Half-Life: Alyx, and more.">
1717
<meta property="og:url" content="https://s2v.app/">
@@ -184,7 +184,7 @@ <h2>ValveResourceFormat</h2>
184184
<a href="https://github.com/ValveResourceFormat/ValveResourceFormat">GitHub</a>
185185
<a href="/ValveResourceFormat/api/ValveResourceFormat.html">API Docs</a>
186186
</div>
187-
<p>.NET library that powers Source 2 Viewer, also known as VRF. This library can be used to <a href="/ValveResourceFormat/guides/read-resource.html">open and extract Source 2 resource files</a> programmatically.</p>
187+
<p>.NET library that powers Source 2 Viewer (S2V), also known as VRF. This library can be used to <a href="/ValveResourceFormat/guides/read-resource.html">open and extract Source 2 resource files</a> programmatically.</p>
188188
</div>
189189
</div>
190190
<div class="library">
@@ -409,61 +409,11 @@ <h3>Additional File Formats</h3>
409409
<h2>Changelog</h2>
410410
</div>
411411

412-
<div class="workshop" id="workshop">
413-
<div class="workshop-bg"></div>
414-
<div class="container">
415-
<div class="workshop-grid">
416-
<a href="#" class="workshop-item">
417-
<img class="workshop-image" alt="" src="data:,">
418-
<span class="workshop-title">Loading…</span>
419-
<span class="workshop-info">&nbsp;</span>
420-
</a>
421-
<a href="#" class="workshop-item">
422-
<img class="workshop-image" alt="" src="data:,">
423-
<span class="workshop-title"></span>
424-
<span class="workshop-info">&nbsp;</span>
425-
</a>
426-
<a href="#" class="workshop-item">
427-
<img class="workshop-image" alt="" src="data:,">
428-
<span class="workshop-title"></span>
429-
<span class="workshop-info">&nbsp;</span>
430-
</a>
431-
<a href="#" class="workshop-item">
432-
<img class="workshop-image" alt="" src="data:,">
433-
<span class="workshop-title"></span>
434-
<span class="workshop-info">&nbsp;</span>
435-
</a>
436-
<a href="#" class="workshop-item">
437-
<img class="workshop-image" alt="" src="data:,">
438-
<span class="workshop-title"></span>
439-
<span class="workshop-info">&nbsp;</span>
440-
</a>
441-
<a href="#" class="workshop-item">
442-
<img class="workshop-image" alt="" src="data:,">
443-
<span class="workshop-title"></span>
444-
<span class="workshop-info">&nbsp;</span>
445-
</a>
446-
<a href="#" class="workshop-item">
447-
<img class="workshop-image" alt="" src="data:,">
448-
<span class="workshop-title"></span>
449-
<span class="workshop-info">&nbsp;</span>
450-
</a>
451-
<a href="#" class="workshop-item">
452-
<img class="workshop-image" alt="" src="data:,">
453-
<span class="workshop-title"></span>
454-
<span class="workshop-info">&nbsp;</span>
455-
</a>
456-
</div>
457-
<div class="workshop-how">Trending workshop items. If you want to appear here, add a link to Source 2 Viewer in the item description: https://valveresourceformat.github.io</div>
458-
</div>
459-
</div>
460-
461412
<div class="footer">
462413
<div class="container">
463414
<div class="footer-left">
464415
Available under the <a href="https://github.com/ValveResourceFormat/ValveResourceFormat/blob/master/LICENSE">MIT license</a>.<br>
465-
Created and maintained by <a href="https://github.com/ValveResourceFormat/ValveResourceFormat/graphs/contributors">various contributors</a>.<br>
466-
Source 2 Viewer is also known as S2V.
416+
Created and maintained by <a href="https://github.com/ValveResourceFormat/ValveResourceFormat/graphs/contributors">various contributors</a>.
467417
</div>
468418
<div class="footer-right">
469419
This project is not affiliated with Valve Software.<br>

static/main.js

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -255,64 +255,4 @@ function OpenMediaModal(src, type) {
255255
modal.showModal();
256256
}
257257

258-
function LoadWorkshop() {
259-
fetch('https://steamdb.info/api/Source2ViewerWorkshop/')
260-
.then((response) => {
261-
if (!response.ok) {
262-
throw new Error('Failed to fetch workshop items');
263-
}
264-
265-
return response.json();
266-
})
267-
.then((response) => {
268-
if (!response.success || !response.data) {
269-
throw new Error('Failed to fetch workshop items');
270-
}
271-
272-
const dateFormatter = new Intl.DateTimeFormat(undefined, {
273-
dateStyle: 'medium',
274-
});
275-
276-
const dom = document.querySelectorAll('.workshop-item');
277-
278-
for (let i = 0; i < response.data.length && i < dom.length; i++) {
279-
const file = response.data[i];
280-
const element = dom[i];
281-
const date = new Date(file.time_created * 1000);
282-
283-
const params = new URLSearchParams();
284-
params.set('id', file.id);
285-
params.set('utm_source', 'Source 2 Viewer');
286-
params.set('searchtext', 'valveresourceformat');
287-
288-
element.href = `https://steamcommunity.com/sharedfiles/filedetails/?${params}`;
289-
const image = element.querySelector('.workshop-image');
290-
image.src = file.preview_url;
291-
image.alt = file.title;
292-
element.querySelector('.workshop-title').textContent = file.title;
293-
element.querySelector('.workshop-info').textContent =
294-
`${dateFormatter.format(date)}${file.subscriptions.toLocaleString()} subscribers`;
295-
}
296-
});
297-
}
298-
299258
LoadReleases();
300-
301-
if ('IntersectionObserver' in window) {
302-
const observer = new window.IntersectionObserver(
303-
(entries) => {
304-
entries.forEach((entry) => {
305-
if (entry.isIntersecting) {
306-
observer.disconnect();
307-
LoadWorkshop();
308-
}
309-
});
310-
},
311-
{
312-
rootMargin: '200px 0px 0px 0px',
313-
},
314-
);
315-
observer.observe(document.querySelector('.workshop'));
316-
} else {
317-
LoadWorkshop();
318-
}

static/style.css

Lines changed: 0 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -463,87 +463,6 @@ a.hljs-built_in {
463463
color: #dcc6e0;
464464
}
465465

466-
.workshop {
467-
max-width: 1800px;
468-
margin: 5rem auto 0;
469-
border-top-left-radius: 2rem;
470-
border-top-right-radius: 2rem;
471-
background: linear-gradient(
472-
in oklab,
473-
hsl(216 70% 30%) 0%,
474-
hsl(216 40% 8%) 100%
475-
);
476-
border-bottom: 1px solid hsl(216 70% 30%);
477-
position: relative;
478-
overflow: hidden;
479-
}
480-
481-
.workshop-bg {
482-
background: url(workshop.webp);
483-
position: absolute;
484-
width: 100%;
485-
height: 100%;
486-
background-position: center -12em;
487-
background-repeat: no-repeat;
488-
z-index: 0;
489-
mask-image: linear-gradient(to bottom, black 5em, transparent 20em);
490-
}
491-
492-
.workshop .container {
493-
padding-top: 14em;
494-
padding-bottom: 4em;
495-
z-index: 2;
496-
position: relative;
497-
}
498-
499-
.workshop-grid {
500-
display: grid;
501-
grid-template-columns: repeat(4, minmax(0, 1fr));
502-
gap: 2em;
503-
}
504-
505-
.workshop-item {
506-
display: flex;
507-
flex-direction: column;
508-
text-decoration: none;
509-
}
510-
511-
.workshop-image {
512-
display: flex;
513-
width: 100%;
514-
border-radius: 10px;
515-
aspect-ratio: 16 / 9;
516-
box-shadow: 2px 2px 10px hsl(216 40% 8%);
517-
background: #000;
518-
object-fit: contain;
519-
}
520-
521-
.workshop-item:hover .workshop-image,
522-
.workshop-item:focus .workshop-image {
523-
box-shadow: 2px 2px 10px var(--color-accent);
524-
}
525-
526-
.workshop-title {
527-
margin-top: 5px;
528-
white-space: nowrap;
529-
overflow: hidden;
530-
text-overflow: ellipsis;
531-
text-decoration: underline;
532-
}
533-
534-
.workshop-info {
535-
margin-top: 2px;
536-
font-size: 12px;
537-
color: #999;
538-
}
539-
540-
.workshop-how {
541-
text-align: center;
542-
margin-top: 3em;
543-
font-size: 14px;
544-
color: #999;
545-
}
546-
547466
.main-logo {
548467
vertical-align: middle;
549468
margin-right: 0.25rem;
@@ -626,21 +545,13 @@ a.hljs-built_in {
626545
.footer .footer-right {
627546
text-align: center;
628547
}
629-
630-
.workshop-grid {
631-
grid-template-columns: repeat(2, minmax(0, 1fr));
632-
}
633548
}
634549

635550
@media (max-width: 500px) {
636551
.hero-left h1 {
637552
font-size: 1.5rem;
638553
}
639554

640-
.workshop-grid {
641-
grid-template-columns: 1fr;
642-
}
643-
644555
.hero .download,
645556
.hero .download-footer,
646557
.hero .supported {

static/workshop.webp

-76.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)