init commit

This commit is contained in:
Jill 2022-01-02 06:57:52 +03:00
commit c5bf674d5a
30 changed files with 2717 additions and 0 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
/node_modules/
/public/build/
.DS_Store

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# heysora.oat.zone (oat-zone-modfiles)
A lil' Svelte app to maintain a modfile collection and display it!

1824
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

23
package.json Normal file
View File

@ -0,0 +1,23 @@
{
"name": "oat-zone-modfiles",
"version": "1.0.0",
"private": true,
"scripts": {
"build": "rollup -c",
"dev": "rollup -c -w",
"start": "sirv public --no-clear"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-node-resolve": "^11.0.0",
"rollup": "^2.3.4",
"rollup-plugin-css-only": "^3.1.0",
"rollup-plugin-livereload": "^2.0.0",
"rollup-plugin-svelte": "^7.0.0",
"rollup-plugin-terser": "^7.0.0",
"svelte": "^3.0.0"
},
"dependencies": {
"sirv-cli": "^1.0.0"
}
}

BIN
public/assets/1fbg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

BIN
public/assets/colorsbg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

BIN
public/assets/fuckbg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
public/assets/obamabg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

BIN
public/assets/onyonbg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

BIN
public/assets/ratbg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

BIN
public/assets/sexbg.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

BIN
public/assets/thanksbg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

BIN
public/assets/toiletbg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 KiB

BIN
public/assets/ummubg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 KiB

BIN
public/assets/wakeupbg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

BIN
public/assets/wormsbg.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

BIN
public/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

75
public/global.css Normal file
View File

@ -0,0 +1,75 @@
html, body {
position: relative;
width: 100%;
height: 100%;
accent-color: var(--fg, #DD5B5A);
}
body {
color: #fff;
background-color: #000;
margin: 0;
padding: 8px;
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}
ul {
list-style: none; /* Remove default bullets */
}
ul li::before {
content: "➜";
color: var(--fg, #DD5B5A); /* Change the color */
font-weight: bolder; /* If you want it to be bold */
display: inline-block; /* Needed to add space between the bullet and the text */
width: 1em; /* Also needed for space (tweak if needed) */
margin-left: -1em; /* Also needed for space (tweak if needed) */
}
a {
color: var(--fg, #DD5B5A);
text-decoration: none;
transition: 0.2s color;
}
a:hover {
color: var(--fg2, #f0a2a2);
text-decoration: none;
}
label {
display: block;
}
input, button, select, textarea {
font-family: inherit;
font-size: inherit;
-webkit-padding: 0.4em 0;
padding: 0.4em;
margin: 0 0 0.5em 0;
box-sizing: border-box;
border: 1px solid rgb(68, 68, 68);
border-radius: 2px;
}
input:disabled {
color: #ccc;
}
button {
color: rgb(235, 235, 235);
background-color: #111111;
outline: none;
}
button:disabled {
color: rgb(112, 112, 112);
}
button:not(:disabled):active {
background-color: rgb(68, 68, 68);
}
button:focus {
border-color: rgb(165, 164, 164);
}

20
public/index.html Normal file
View File

@ -0,0 +1,20 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width,initial-scale=1'>
<title>oat.heysora.net</title>
<link rel='icon' type='image/png' href='/favicon.png'>
<link rel='stylesheet' href='/global.css'>
<link rel='stylesheet' href='/build/bundle.css'>
<script defer src='/build/bundle.js'></script>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
</head>
<body>
</body>
</html>

76
rollup.config.js Normal file
View File

@ -0,0 +1,76 @@
import svelte from 'rollup-plugin-svelte';
import commonjs from '@rollup/plugin-commonjs';
import resolve from '@rollup/plugin-node-resolve';
import livereload from 'rollup-plugin-livereload';
import { terser } from 'rollup-plugin-terser';
import css from 'rollup-plugin-css-only';
const production = !process.env.ROLLUP_WATCH;
function serve() {
let server;
function toExit() {
if (server) server.kill(0);
}
return {
writeBundle() {
if (server) return;
server = require('child_process').spawn('npm', ['run', 'start', '--', '--dev'], {
stdio: ['ignore', 'inherit', 'inherit'],
shell: true
});
process.on('SIGTERM', toExit);
process.on('exit', toExit);
}
};
}
export default {
input: 'src/main.js',
output: {
sourcemap: true,
format: 'iife',
name: 'app',
file: 'public/build/bundle.js'
},
plugins: [
svelte({
compilerOptions: {
// enable run-time checks when not in production
dev: !production
}
}),
// we'll extract any component CSS out into
// a separate file - better for performance
css({ output: 'bundle.css' }),
// If you have external dependencies installed from
// npm, you'll most likely need these plugins. In
// some cases you'll need additional configuration -
// consult the documentation for details:
// https://github.com/rollup/plugins/tree/master/packages/commonjs
resolve({
browser: true,
dedupe: ['svelte']
}),
commonjs(),
// In dev mode, call `npm run start` once
// the bundle has been generated
!production && serve(),
// Watch the `public` directory and refresh the
// browser on changes when not in production
!production && livereload('public'),
// If we're building for production (npm run build
// instead of npm run dev), minify
production && terser()
],
watch: {
clearScreen: false
}
};

91
src/App.svelte Normal file
View File

@ -0,0 +1,91 @@
<script>
import Panel from './Panel.svelte';
import Modfiles from './Modfiles.svelte';
import { sort, sortMode, sortingModes, groups, groupsEnabled } from './modfiles';
</script>
<style>
.columns {
display: flex;
justify-content: center;
gap: 30px;
flex-flow: row wrap;
align-items: flex-start;
}
.nowrap {
display: inline-block;
}
@media screen and (max-width: 953px) {
:global(.panel) {
position: inherit !important;
}
.columns {
justify-content: center;
}
.columns:nth-child(3) {
order: 1;
}
}
.columns:nth-child(1) {
order: 0;
}
.columns:nth-child(2) {
order: 2;
}
.columns:nth-child(3) {
order: 3;
}
.options {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.options button {
border: 2px solid var(--fg);
box-shadow: 2px 2px 0 #000, 4px 4px 0 var(--bg);
border-radius: 0px;
padding: 4px;
background: linear-gradient(180deg, black 0%, var(--fg, white) 0% 100%);
background-repeat: no-repeat;
background-position: 0px -40px;
transition: 0.2s background-position, 0.2s color;
cursor: pointer;
}
.options button.selected {
color: #000;
background-position: 0px 0px;
}
</style>
<div class="columns">
<Panel type="hi!" --fg="#3FA58C" --bg="#3a7a6a" --fg2="#89e8d0" --position="sticky">
this is my cozy little space for modfiles, hosted by <a href="https://heysora.net/">HeySora</a>! you'll be able to find <span class="nowrap"><b><i class="material-icons">unarchive</i> pack downloads</b></span>, <span class="nowrap"><b><i class="material-icons">music_note</i> song links</b></span>, <span class="nowrap"><b><i class="material-icons">video_library</i> video lineouts</b></span> and most importantly <span class="nowrap"><b><i class="material-icons">file_download</i> downloads</b></span> for my files here.<br><br>
here's a few useful links:<br>
<ul>
<li><a target="_blank" rel="noopener noreferrer" href="https://notitg.heysora.net/">NotITG's homepage</a></li>
<li><a target="_blank" rel="noopener noreferrer" href="https://oat.zone/">my homepage</a></li>
<li><a target="_blank" rel="noopener noreferrer" href="https://uksrt.heysora.net/discord">NotITG Discord</a></li>
</ul>
</Panel>
<Panel type="modfiles" --fg="#DD5B5A" --bg="#7e3a3a" --width="450px">
<Modfiles --fg="#DD5B5A" --bg="#7e3a3a"/>
</Panel>
<Panel type="sorting" --fg="#B6C436" --bg="#747c26" --position="sticky">
<b>Sort:</b><br>
<div class="options">
{#each sortingModes as mode}<button class:selected={mode === $sortMode} on:click={() => {sort(mode)}}>{mode}</button>{/each}
</div>
<b>Include:</b><br>
<div class="options">
{#each groups as mode, i}<button class:selected={$groupsEnabled[i]} on:click={() => {$groupsEnabled[i] = !$groupsEnabled[i]}}>{mode}</button>{/each}
</div>
</Panel>
</div>

193
src/Modfiles.svelte Normal file
View File

@ -0,0 +1,193 @@
<script>
import { files } from './modfiles.js';
</script>
<style>
.title {
font-size: xx-large;
line-height: 0.8;
margin-bottom: 35px;
padding-top: 20px;
}
.title small {
display: inline-block;
}
.file {
margin-left: -20px;
padding-left: 20px;
margin-right: -20px;
padding-right: 20px;
animation-duration: 1s;
animation-name: fadein;
animation-fill-mode: backwards;
flex: auto 1 1;
}
.dark.file {
color: #111;
background-color: #eee;
}
.buttons {
position: relative;
background-color: var(--fg, white);
width: calc(100% + 20px);
left: -20px;
height: 38px;
display: flex;
align-items: center;
justify-content: space-between;
padding-left: 10px;
padding-right: 10px;
color: #000;
}
.difficulties {
flex: auto 1 1;
display: flex;
align-items: center;
justify-content: flex-start;
}
.buttonsreal {
display: flex;
align-items: center;
justify-content: flex-end;
}
.buttonsreal a {
font-size: 34px;
height: 38px;
display: block;
line-height: 1;
color: #000;
background: linear-gradient(180deg, var(--fg, white) 0%, black 0% 100%);
background-repeat: no-repeat;
background-position: 0px -38px;
transition: 0.1s color, 0.1s background-position;
text-align: center;
width: 38px;
}
.buttonsreal a:hover {
color: #fff;
background-position: 0px 0px;
}
.difficulty {
border-right: 2px rgba(0, 0, 0, 0.1) solid;
margin-right: 5px;
padding-right: 5px;
vertical-align: middle;
white-space: nowrap;
}
.difficulty-expert {
color: #8200a1;
}
.difficulty-challenge {
color: #605ace;
}
.difficulty-edit {
color: #b5b8ba;
}
.difficultyrating {
display: inline-block;
width: 28px;
height: 28px;
font-size: 22px;
/*border: solid 2px #000;
border-radius: 9px;*/
text-align: center;
vertical-align: middle;
line-height: 1.08; /* css crimes */
}
.difficulty .difficultyname {
white-space: nowrap;
font-size: medium;
color: #333;
}
.difficultyrating {
font-weight: bold;
}
.difficulty:last-child {
border-right: none;
}
.metadata {
display: flex;
align-items: baseline;
width: 100%;
gap: 8px;
justify-content: space-between;
flex-wrap: wrap;
}
.pack {
flex: auto 0 0;
color: #eee;
opacity: 0.9;
align-self: flex-start;
margin-top: 12px;
}
.dark .pack {
color: #111;
}
.collabicon {
display: block;
user-select: none;
color: #000;
opacity: 0.3;
font-size: 12px;
line-height: 0.7;
width: 38px;
text-align: center;
}
@keyframes fadein {
from {opacity: 0;}
to {opacity: 1;}
}
</style>
<span>
{#each $files as file, i}
<div class="file" class:dark={file.flipColors} style="background: center / cover no-repeat url({file.imageUrl}); animation-delay: {i/12}s">
<div class="metadata">
<div class="title"><b>{file.name}</b> {#if file.subtitle}<small>{file.subtitle}</small>{/if}</div>
{#if file.pack}<small class="pack">from {file.pack}</small>{/if}
</div><br>
<div class="buttons">
<div class="difficulties">
{#each file.difficulties as difficulty}
<div class="difficulty">
<span class:intended={difficulty.intended} class="difficultyrating difficulty-{difficulty.type}">
{difficulty.rating}
</span>
<span class="difficultyname">
{#if difficulty.intended}{difficulty.name}{/if}
</span>
</div>
{/each}
</div>
<div class="buttonsreal">
{#if file.collab}
<div class="collabicon" title="This is a collab{file.collabPartners ? ' with ' + file.collabPartners : ''}"><i class="material-icons">link</i></div>
{/if}
{#if file.packUrl}
<a target="_blank" rel="noopener noreferrer" href={file.packUrl} title="Download {file.pack}">
<i class="material-icons">unarchive</i>
</a>
{/if}
{#if file.songUrl}
<a target="_blank" rel="noopener noreferrer" href={file.songUrl} title="Song">
<i class="material-icons">music_note</i>
</a>
{/if}
{#if file.videoUrl}
<a target="_blank" rel="noopener noreferrer" href={file.videoUrl} title="Video">
<i class="material-icons">video_library</i>
</a>
{/if}
{#if file.downloadUrl}
<a target="_blank" rel="noopener noreferrer" href={file.downloadUrl} title="Download">
<i class="material-icons">file_download</i>
</a>
{/if}
</div>
</div>
</div>
{/each}
</span>

30
src/Panel.svelte Normal file
View File

@ -0,0 +1,30 @@
<script>
export let type;
</script>
<style>
.panel {
position: var(--position, initial);
top: 10px;
font-size: large;
width: var(--width, 350px);
padding: 20px;
border: 4px solid var(--fg, white);
box-shadow: 3px 3px #000, 10px 10px var(--bg, white);
}
@media only screen and (max-width: 560px) {
.panel {
width: calc(100% - 60px);
}
}
h1 {
margin-top: -8px; /* #csscrimes */
}
</style>
<div class="panel {type}">
<h1>{type}</h1>
<slot></slot>
</div>

7
src/main.js Normal file
View File

@ -0,0 +1,7 @@
import App from './App.svelte';
const app = new App({
target: document.body
});
export default app;

371
src/modfiles.js Normal file
View File

@ -0,0 +1,371 @@
import { writable } from 'svelte/store';
const modfiles = [
{
name: 'UMMU',
downloadUrl: 'UMMU.zip',
videoUrl: 'https://www.youtube.com/watch?v=5fxjVo7KL1k',
songUrl: 'https://www.youtube.com/watch?v=om5yLpQp748',
imageUrl: 'assets/ummubg.png',
pack: 'OISRT',
packUrl: 'https://oisrt.heysora.net/download/day-2',
difficulties: [
{
type: 'challenge',
rating: 10,
intended: true,
name: 'She',
},
],
order: 1,
},
{
name: 'ihavesex',
downloadUrl: 'ihavesex.zip',
videoUrl: 'https://www.youtube.com/watch?v=s4fi_9KWyUg',
songUrl: 'https://soundcloud.com/explorersoftheinternet/ihavesex',
imageUrl: 'assets/sexbg.gif',
difficulties: [
{
type: 'challenge',
rating: 9,
intended: true,
name: 'oat',
},
],
order: 2,
},
{
name: 'Easy Scapegoats',
downloadUrl: 'Easy_Scapegoats.zip',
videoUrl: 'https://www.youtube.com/watch?v=wgBfgmHU8F4',
songUrl: 'https://soundcloud.com/discipleroundtable/easyscapegoats',
imageUrl: 'assets/easyscapegoatsbg.png',
difficulties: [
{
type: 'challenge',
rating: 14,
intended: true,
name: 'oatmealbean',
},
],
order: 3,
},
{
name: 'ONYON',
downloadUrl: 'ONYON.zip',
videoUrl: 'https://www.youtube.com/watch?v=fT0camVIR5w',
songUrl: 'https://soundcloud.com/therealgpf/gpf-x-dj-onion-ft-the-greazy-elite-onyon',
pack: 'Mod Rush Couples 2',
flipColors: true,
packUrl: 'https://drive.google.com/file/d/1okqcDiV09evIGp1hPktBHY5wjQfwZ2j7/edit',
imageUrl: 'assets/onyonbg.png',
difficulties: [
{
type: 'challenge',
rating: 69,
intended: true,
name: '-YOSEFU- x Kirby5464 ft. oatmealine',
},
],
order: 4,
collab: true,
collabPartners: 'Kirby5464 and -YOSEFU-',
},
{
name: 'How You Like That',
subtitle: '(BilliumMoto Remix)',
downloadUrl: 'How_You_Like_That.zip',
videoUrl: 'https://www.youtube.com/watch?v=F4XyR-0PVOw',
songUrl: 'https://soundcloud.com/billiummoto/how-you-like-that-remix',
imageUrl: 'assets/howyoulikethatbg.png',
pack: 'Mod Rush Couples 2',
packUrl: 'https://drive.google.com/file/d/1okqcDiV09evIGp1hPktBHY5wjQfwZ2j7/edit',
difficulties: [
{
type: 'expert',
rating: 14,
name: 'smaller gloop, less yoinky',
},
{
type: 'challenge',
rating: 14,
intended: true,
name: 'yasmeal64',
},
],
order: 5,
collab: true,
collabPartners: 'Yasmyn64',
},
{
name: 'OBAMONSTA',
downloadUrl: 'OBAMONSTA.zip',
videoUrl: 'https://youtu.be/2IEXF7NLDr0',
songUrl: 'https://www.youtube.com/watch?v=D64X-twhXE8',
imageUrl: 'assets/obamabg.png',
difficulties: [
{
type: 'expert',
rating: 13,
name: 'obamoat but not terrible',
},
{
type: 'challenge',
rating: 14,
intended: true,
name: 'obamoat',
},
],
order: 6,
},
{
name: '#1f1e33',
downloadUrl: '1f1e33.zip',
videoUrl: 'https://www.youtube.com/watch?v=zB9_K9PnEkA',
songUrl: 'https://www.youtube.com/watch?v=w4U9S5eX3eY',
imageUrl: 'assets/1fbg.png',
pack: 'White Elephant 2020',
packUrl: 'https://www.dropbox.com/s/dcf4togg3a7kwby/Sea%20of%20Clouds%20White%20Elephant%202020.zip?dl=1',
difficulties: [
{
type: 'challenge',
rating: 14,
name: 'oat channels her inner camellia',
intended: true,
}
],
order: 7,
},
{
name: 'Star Factory',
downloadUrl: 'Star_Factory.zip',
videoUrl: 'https://www.youtube.com/watch?v=51fOAHDnhVI',
flipColors: true,
songUrl: 'https://www.youtube.com/watch?v=nLMNkulQdkA',
imageUrl: 'assets/starfactorybg.png',
pack: 'Mod Rush 2',
packUrl: 'https://www.dropbox.com/s/cjkh3h588ivurc7/Mod%20Rush%203.zip?dl=1',
difficulties: [
{
type: 'challenge',
rating: 12,
name: 'poly-she',
intended: true,
},
{
type: 'edit',
rating: 16,
name: 'like 2 or so more steps (slumpo)'
}
],
order: 8,
},
{
name: 'theyaremanycolors',
downloadUrl: 'theyaremanycolors.zip',
videoUrl: 'https://youtu.be/uUPKErc8WHI',
songUrl: 'https://soundcloud.com/frums/theyaremanycolors',
imageUrl: 'assets/colorsbg.png',
pack: 'Mod Rush Couples',
packUrl: 'https://drive.google.com/file/d/16mVwJh0pn-k43nCQQ_aWNrLrE3TOPXIm/view',
difficulties: [
{
type: 'challenge',
rating: 13,
name: 'segoat',
intended: true,
}
],
order: 9,
collab: true,
collabPartners: 'segaskulll',
},
{
name: 'Fuck With The Baddest',
downloadUrl: 'Fuck_With_The_Baddest.zip',
videoUrl: 'https://youtu.be/w-5DSGOgpns',
songUrl: 'https://soundcloud.com/gearbox-digital/anderex-expulze-the-baddest-preview-free-download',
imageUrl: 'assets/fuckbg.png',
pack: 'Mod Rush Couples',
packUrl: 'https://drive.google.com/file/d/16mVwJh0pn-k43nCQQ_aWNrLrE3TOPXIm/view',
difficulties: [
{
type: 'challenge',
rating: 14,
name: 'Kirby5464 + oatmealine',
intended: true,
}
],
order: 10,
collab: true,
collabPartners: 'Kirby5464',
},
{
name: 'Year of the Rats',
downloadUrl: 'Year_of_the_Rats.zip',
videoUrl: 'https://www.youtube.com/watch?v=7yib2XNfZjg',
songUrl: 'https://www.youtube.com/watch?v=1_mZggt6aUg',
flipColors: true,
imageUrl: 'assets/ratbg.png',
difficulties: [
{
type: 'challenge',
rating: 12,
name: 'oat learns how to ease',
intended: true,
}
],
order: 10.5,
},
{
name: 'Wake Up',
downloadUrl: 'Wake_Up.zip',
videoUrl: 'https://www.youtube.com/watch?v=2dJ0-cBcBvY',
songUrl: 'https://soundcloud.com/frums/wake-up',
imageUrl: 'assets/wakeupbg.png',
difficulties: [
{
type: 'challenge',
rating: 16,
name: 'oat & rya',
intended: true,
},
{
type: 'edit',
rating: 18,
name: 'stuck in the nightmare (slump)'
}
],
order: 11,
collab: true,
collabPartners: 'Rya',
},
{
name: 'if god didn\'t want us to snort worms he wouldn\'t have made them cylindrical!!!!!!!!',
downloadUrl: 'igdwutswhwhmtc.zip',
videoUrl: 'https://www.youtube.com/watch?v=jCz808VVk7Q',
songUrl: 'https://mimideath.bandcamp.com/track/if-god-didnt-want-us-to-snort-worms-he-wouldnt-have-made-them-cylindrical',
imageUrl: 'assets/wormsbg.png',
difficulties: [
{
type: 'challenge',
rating: 9,
name: 'xeroOline',
intended: true,
}
],
order: 12,
collab: true,
collabPartners: 'XeroOl',
},
{
name: '745 sticky',
subtitle: '(short ver)',
downloadUrl: '745_sticky.zip',
videoUrl: 'https://www.youtube.com/watch?v=HDiol53Vxyw',
songUrl: 'https://100gecs.bandcamp.com/track/745-sticky',
imageUrl: 'assets/745stickybg.png',
packUrl: 'https://www.dropbox.com/s/c7tza0gyn2xph92/Mod%20Rush%202.zip?dl=1',
difficulties: [
{
type: 'challenge',
rating: 14,
name: '100 oats',
intended: true,
}
],
order: 13,
},
{
name: 'Polish toilet spin basshunter ITG homosex K19191',
subtitle: '(Po twojej pysznej zupie)',
downloadUrl: 'Polish_toilet_spin.zip',
videoUrl: 'https://www.youtube.com/watch?v=Npgz48I8lG8',
imageUrl: 'assets/toiletbg.png',
difficulties: [
{
type: 'challenge',
rating: 14,
name: 'oat + aiko',
intended: true,
}
],
order: 13.5,
collab: true,
collabPartners: 'Aikoyori',
},
{
name: 'Tung Tiied',
subtitle: '(Anamana GAMERMEGAMIX)',
downloadUrl: 'Tung_Tiied_GAMERMEGAMIX.zip',
videoUrl: 'https://www.youtube.com/watch?v=53hUlR75UCg',
imageUrl: 'assets/tungtiiedbg.png',
difficulties: [
{
type: 'challenge',
rating: 13,
name: 'oat vs Rya',
intended: true,
},
{
type: 'edit',
rating: 17,
name: 'true gamer (Slumpage)'
}
],
order: 14,
collab: true,
collabPartners: 'Rya',
},
{
name: 'thanks',
downloadUrl: 'thanks.zip',
videoUrl: 'https://www.youtube.com/watch?v=RaOgSS6pWpo',
songUrl: 'https://pilotredsun.bandcamp.com/track/thanks',
imageUrl: 'assets/thanksbg.png',
difficulties: [
{
type: 'challenge',
rating: 7,
name: 'oat',
},
{
type: 'edit',
rating: 15,
name: 'sluumpaage',
intended: true,
}
],
order: 15,
},
];
export let files = writable(modfiles);
export let sortMode = writable('Chronological');
export let sortingModes = ['Chronological', 'Alphabetical', 'Difficulty'];
export let groupsEnabled = writable([true, true]);
export let groups = ['Packs', 'Collabs'];
sortMode.subscribe(mode => {
if (mode === 'Chronological') {
files.update(f => f.sort((a, b) => a.order - b.order));
} else if (mode === 'Alphabetical') {
files.update(f => f.sort((a, b) => a.name.localeCompare(b.name)));
} else if (mode === 'Difficulty') {
files.update(f => f.sort((a, b) => a.difficulties.find(l => l.intended).rating - b.difficulties.find(l => l.intended).rating));
}
});
export function sort(mode) {
if (mode) {
sortMode.set(mode);
} else {
sortMode.update(v => v);
}
}
groupsEnabled.subscribe(v => {
files.set(modfiles.filter(f => (f.pack ? v[0] : true) && (f.collab ? v[1] : true)));
sort();
});