MORE ORGANIZE!!!

This commit is contained in:
bingus_violet 2024-04-18 21:39:08 -05:00
parent bfcad31cb4
commit ace19a693d
7 changed files with 13 additions and 19 deletions

3
.gitignore vendored
View file

@ -131,4 +131,5 @@ dist
.pnp.*
# Violet's Purgatory
static/cached
static/cached
cached

View file

Before

Width:  |  Height:  |  Size: 145 KiB

After

Width:  |  Height:  |  Size: 145 KiB

View file

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View file

@ -15,11 +15,13 @@ app.listen(PORT, () => {
console.log("Violet's Purgatory is now listening on port: " + PORT)
})
var cachePath = path.join(staticpath, 'cached')
var cachePath = path.join(__dirname, 'cached')
var fontPath = path.join(staticpath, "fonts")
var assetPath = path.join(__dirname, "assets")
app.use("/fonts", express.static(fontPath))
app.use("/cached", express.static(cachePath))
app.use("/imgs", express.static(path.join(assetPath, "Images")))
if (!fs.existsSync(cachePath)) {
fs.mkdirSync(cachePath)

View file

@ -85,7 +85,7 @@ module.exports = {
function get_img(activity, size = "large_image") {
if (cachedImages[get_img_url(activity, size)]) {
var fn = cachedImages[get_img_url(activity, size)]
var fp = path.join(__dirname, 'static/cached', fn)
var fp = path.join(__dirname, 'cached', fn)
} else {
return '/imgs/notFound.png'
}

View file

@ -122,16 +122,7 @@ module.exports = {
var filePath = (req.baseUrl + req.path).trim()
if (filePath.includes("cached") || filePath.includes("imgs")) {
filePath = path.join(__dirname, 'static', filePath)
res.send(fs.readFileSync(filePath))
return
}
if (filePath.includes(".")) {
} else {
if (!filePath.includes(".")) {
if (filePath.charAt(filePath.length - 1) != '/') {
res.redirect(filePath + '/')
return
@ -256,7 +247,7 @@ function socketeer() {
if (get_img_url(activity)) {
var url = get_img_url(activity)
var fn = Math.ceil(Math.random() * 100_000_000_000).toString()
var fp = path.join(__dirname, 'static/cached', fn)
var fp = path.join(__dirname, 'cached', fn)
if (!cachedImages[url]) {
const response = await (await fetch(url)).arrayBuffer()
@ -270,7 +261,7 @@ function socketeer() {
if (get_img_url(activity, "small_image")) {
var url = get_img_url(activity, "small_image")
var fn = Math.ceil(Math.random() * 100_000_000_000).toString()
var fp = path.join(__dirname, 'static/cached', fn)
var fp = path.join(__dirname, 'cached', fn)
if (!cachedImages[url]) {
const response = await (await fetch(url)).arrayBuffer()

View file

@ -54,12 +54,12 @@
transform: scale(0.9);
border-radius: 50%;
rotate: 0deg;
transition: rotate 2s cubic-bezier(0.39, 0.575, 0.565, 1);
}
.pfp:active {
rotate: 1440deg;
transition: rotate 5s cubic-bezier(0.445, 0.05, 0.55, 0.95);
rotate: 7200deg;
transform: scale(1.1);
transition: all 5s cubic-bezier(0.445, 0.05, 0.55, 0.95) !important;
}
.CLAlign {
@ -69,7 +69,7 @@
img:not(.project-inner > div > img):not(.activity>img) {
width: 100%;
max-width: 168px;
/* transition: all 2s cubic-bezier(0.075, 0.82, 0.165, 1); */
transition: all 2s cubic-bezier(0.075, 0.82, 0.165, 1);
}
@media screen and (min-width: 850px) {