MORE ORGANIZE!!!
This commit is contained in:
parent
bfcad31cb4
commit
ace19a693d
7 changed files with 13 additions and 19 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -132,3 +132,4 @@ dist
|
||||||
|
|
||||||
# Violet's Purgatory
|
# Violet's Purgatory
|
||||||
static/cached
|
static/cached
|
||||||
|
cached
|
Before Width: | Height: | Size: 145 KiB After Width: | Height: | Size: 145 KiB |
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
4
index.js
4
index.js
|
@ -15,11 +15,13 @@ app.listen(PORT, () => {
|
||||||
console.log("Violet's Purgatory is now listening on port: " + 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 fontPath = path.join(staticpath, "fonts")
|
||||||
|
var assetPath = path.join(__dirname, "assets")
|
||||||
|
|
||||||
app.use("/fonts", express.static(fontPath))
|
app.use("/fonts", express.static(fontPath))
|
||||||
app.use("/cached", express.static(cachePath))
|
app.use("/cached", express.static(cachePath))
|
||||||
|
app.use("/imgs", express.static(path.join(assetPath, "Images")))
|
||||||
|
|
||||||
if (!fs.existsSync(cachePath)) {
|
if (!fs.existsSync(cachePath)) {
|
||||||
fs.mkdirSync(cachePath)
|
fs.mkdirSync(cachePath)
|
||||||
|
|
|
@ -85,7 +85,7 @@ module.exports = {
|
||||||
function get_img(activity, size = "large_image") {
|
function get_img(activity, size = "large_image") {
|
||||||
if (cachedImages[get_img_url(activity, size)]) {
|
if (cachedImages[get_img_url(activity, size)]) {
|
||||||
var fn = 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 {
|
} else {
|
||||||
return '/imgs/notFound.png'
|
return '/imgs/notFound.png'
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,16 +122,7 @@ module.exports = {
|
||||||
|
|
||||||
var filePath = (req.baseUrl + req.path).trim()
|
var filePath = (req.baseUrl + req.path).trim()
|
||||||
|
|
||||||
if (filePath.includes("cached") || filePath.includes("imgs")) {
|
if (!filePath.includes(".")) {
|
||||||
filePath = path.join(__dirname, 'static', filePath)
|
|
||||||
res.send(fs.readFileSync(filePath))
|
|
||||||
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
if (filePath.includes(".")) {
|
|
||||||
|
|
||||||
} else {
|
|
||||||
if (filePath.charAt(filePath.length - 1) != '/') {
|
if (filePath.charAt(filePath.length - 1) != '/') {
|
||||||
res.redirect(filePath + '/')
|
res.redirect(filePath + '/')
|
||||||
return
|
return
|
||||||
|
@ -256,7 +247,7 @@ function socketeer() {
|
||||||
if (get_img_url(activity)) {
|
if (get_img_url(activity)) {
|
||||||
var url = get_img_url(activity)
|
var url = get_img_url(activity)
|
||||||
var fn = Math.ceil(Math.random() * 100_000_000_000).toString()
|
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]) {
|
if (!cachedImages[url]) {
|
||||||
const response = await (await fetch(url)).arrayBuffer()
|
const response = await (await fetch(url)).arrayBuffer()
|
||||||
|
@ -270,7 +261,7 @@ function socketeer() {
|
||||||
if (get_img_url(activity, "small_image")) {
|
if (get_img_url(activity, "small_image")) {
|
||||||
var url = 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 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]) {
|
if (!cachedImages[url]) {
|
||||||
const response = await (await fetch(url)).arrayBuffer()
|
const response = await (await fetch(url)).arrayBuffer()
|
||||||
|
|
|
@ -54,12 +54,12 @@
|
||||||
transform: scale(0.9);
|
transform: scale(0.9);
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
rotate: 0deg;
|
rotate: 0deg;
|
||||||
transition: rotate 2s cubic-bezier(0.39, 0.575, 0.565, 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.pfp:active {
|
.pfp:active {
|
||||||
rotate: 1440deg;
|
rotate: 7200deg;
|
||||||
transition: rotate 5s cubic-bezier(0.445, 0.05, 0.55, 0.95);
|
transform: scale(1.1);
|
||||||
|
transition: all 5s cubic-bezier(0.445, 0.05, 0.55, 0.95) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.CLAlign {
|
.CLAlign {
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
img:not(.project-inner > div > img):not(.activity>img) {
|
img:not(.project-inner > div > img):not(.activity>img) {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 168px;
|
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) {
|
@media screen and (min-width: 850px) {
|
||||||
|
|
Loading…
Reference in a new issue