✨ feat: COLLECTIONS WORKING !!
This commit is contained in:
parent
bbb17a1f4f
commit
3f43316a58
4 changed files with 67 additions and 5 deletions
2
dist/style/style.css
vendored
2
dist/style/style.css
vendored
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,12 @@
|
||||||
---
|
---
|
||||||
layout: layout.liquid
|
layout: layout.liquid
|
||||||
---
|
---
|
||||||
{{ collections }}
|
<div class="Gallery">
|
||||||
|
{% for source in buttons %}
|
||||||
|
{% for button in source[1] %}
|
||||||
|
<a href="{{ credits[source[0]] }}" target="_blank">
|
||||||
|
<img src="/collections/images/buttons/{{ source[0] }}/{{ button }}" alt="{{ source[0] }}">
|
||||||
|
</a>
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
|
|
@ -1,20 +1,73 @@
|
||||||
const {readdir} = require('node:fs/promises')
|
const {readdir} = require('node:fs/promises')
|
||||||
const {resolve} = require('node:path')
|
const {resolve} = require('node:path')
|
||||||
|
|
||||||
|
const credits = {
|
||||||
|
key: 'https://keysklubhouse.neocities.org/',
|
||||||
|
GIFCollection: 'https://cyber.dabamos.de/88x31/',
|
||||||
|
cinni: 'https://cinni.net/',
|
||||||
|
fairytrash: 'https://fairytrash.neocities.org/portal/oldweb.html',
|
||||||
|
'webcore-galore': 'https://www.deviantart.com/webcore-galore',
|
||||||
|
'molly-stamps': 'https://www.deviantart.com/molly-stamps',
|
||||||
|
murderawrz: 'https://www.deviantart.com/murderawrz',
|
||||||
|
'minecr-aft': 'https://www.deviantart.com/minecr-aft',
|
||||||
|
gaarumageddon: 'https://www.deviantart.com/gaarumageddon',
|
||||||
|
morecentipedes: 'https://www.deviantart.com/morecentipedes/',
|
||||||
|
gendercute: 'https://www.deviantart.com/gendercute',
|
||||||
|
uzkost: 'https://www.deviantart.com/uzkost',
|
||||||
|
fawntoy: 'https://www.deviantart.com/fawntoy',
|
||||||
|
antikrist: 'https://antikrist.neocities.org/',
|
||||||
|
panstarry: 'https://www.deviantart.com/panstarry',
|
||||||
|
'rogue-ranger': 'https://www.deviantart.com/rogue-ranger',
|
||||||
|
'virus-xenon': 'https://www.deviantart.com/virus-xenon',
|
||||||
|
kittyjewelpet78: 'https://www.deviantart.com/kittyjewelpet78',
|
||||||
|
dustyhyena: 'https://www.deviantart.com/dustyhyena',
|
||||||
|
'sugary-stardust': 'https://www.deviantart.com/sugary-stardust',
|
||||||
|
tamriei: 'https://www.deviantart.com/tamriei',
|
||||||
|
'100hosts': 'https://www.deviantart.com/100ghosts',
|
||||||
|
dameinatrix: 'https://www.deviantart.com/dameinatrix',
|
||||||
|
nyanfuw: 'https://www.deviantart.com/nyanfuw',
|
||||||
|
skystamps: 'https://www.deviantart.com/skystamps',
|
||||||
|
'hyper--drunk': 'https://www.deviantart.com/hyper--drunk',
|
||||||
|
stampmakerlkj: 'https://www.deviantart.com/stampmakerlkj',
|
||||||
|
beepudding: 'https://www.deviantart.com/beepudding',
|
||||||
|
princessskyler: 'https://www.deviantart.com/princessskyler',
|
||||||
|
buniis: 'https://www.deviantart.com/buniis',
|
||||||
|
goredoq: 'https://www.deviantart.com/goredoq',
|
||||||
|
ufocatchers: 'https://www.deviantart.com/ufocatchers',
|
||||||
|
stitchlovergirl96: 'https://www.deviantart.com/stitchlovergirl96',
|
||||||
|
midousujii: 'https://www.deviantart.com/midousujii',
|
||||||
|
glittersludge: 'https://www.deviantart.com/glittersludge',
|
||||||
|
amekin: 'https://www.deviantart.com/amekin',
|
||||||
|
stratosqueer: 'https://www.deviantart.com/stratosqueer',
|
||||||
|
puppystamps: 'https://www.deviantart.com/puppystamps',
|
||||||
|
turbuggy: 'https://www.deviantart.com/turbuggy',
|
||||||
|
aestheticstamps: 'https://www.deviantart.com/aestheticstamps',
|
||||||
|
kittyjewelpet74: 'https://www.deviantart.com/kittyjewelpet74',
|
||||||
|
'king-lulu-deer': 'https://www.deviantart.com/king-lulu-deer',
|
||||||
|
'r0se-designs': 'https://www.deviantart.com/r0se-designs',
|
||||||
|
aomiarmster: 'https://www.deviantart.com/aomiarmster',
|
||||||
|
'nerdy-pixel-girl': 'https://www.deviantart.com/nerdy-pixel-girl',
|
||||||
|
crystalstamps: 'https://www.deviantart.com/crystalstamps',
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = async function () {
|
module.exports = async function () {
|
||||||
const imagesDir = 'src/collections/images'
|
const imagesDir = 'src/collections/images'
|
||||||
let collections = {}
|
let collections = {}
|
||||||
const categories = await readdir(resolve(imagesDir))
|
const categories = await readdir(resolve(imagesDir))
|
||||||
|
|
||||||
for (const category of categories) {
|
for (const category of categories) {
|
||||||
collections[category] = await readdir(resolve(`${imagesDir}/${category}`))
|
collections[category] = {}
|
||||||
|
|
||||||
for (const source of collections[category]) {
|
const sources = await readdir(resolve(`${imagesDir}/${category}`))
|
||||||
|
|
||||||
|
for (const source of sources) {
|
||||||
collections[category][source] =
|
collections[category][source] =
|
||||||
(await readdir(resolve(`${imagesDir}/${category}/${source}`), {withFileTypes: true}))
|
(await readdir(resolve(`${imagesDir}/${category}/${source}`), {withFileTypes: true}))
|
||||||
.map(item => item.name)
|
.map(item => item.name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return {collections: collections}
|
collections.credits = credits
|
||||||
|
console.log(collections.buttons)
|
||||||
|
return collections
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,5 +2,6 @@
|
||||||
|
|
||||||
.Gallery {
|
.Gallery {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
gap: theme.$spacer-2xs;
|
gap: theme.$spacer-2xs;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue