"Fix" formatting again on activities ?
This commit is contained in:
parent
5c29e62af7
commit
0312806c99
3 changed files with 7 additions and 32 deletions
27
index.js
27
index.js
|
@ -21,33 +21,6 @@ var fontPath = path.join(staticpath, "fonts")
|
||||||
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.get("/disc", (req, res) => {
|
|
||||||
res.setHeader("X-Accel-Buffering", "no")
|
|
||||||
res.write(fs.readFileSync(path.join(__dirname, "resources/disc.html")))
|
|
||||||
|
|
||||||
var iterations = 0
|
|
||||||
var lastAct = null
|
|
||||||
|
|
||||||
function loop() {
|
|
||||||
var currentAct = pageUpdater.getActivities()
|
|
||||||
if (currentAct != lastAct) {
|
|
||||||
lastAct = currentAct
|
|
||||||
iterations += 1
|
|
||||||
res.write(`<div id="loop${iterations}">`)
|
|
||||||
res.write(currentAct.substring(currentAct.indexOf("<div")))
|
|
||||||
res.write(`</div>`)
|
|
||||||
res.write(`<style>#loop${iterations - 1} {display: none;}</style>`)
|
|
||||||
}
|
|
||||||
setTimeout(() => {
|
|
||||||
if (!res.closed) {
|
|
||||||
loop()
|
|
||||||
res.write(" ")
|
|
||||||
}
|
|
||||||
}, 1000);
|
|
||||||
}
|
|
||||||
loop()
|
|
||||||
})
|
|
||||||
|
|
||||||
if (!fs.existsSync(cachePath)) {
|
if (!fs.existsSync(cachePath)) {
|
||||||
fs.mkdirSync(cachePath)
|
fs.mkdirSync(cachePath)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -141,7 +141,7 @@ p {
|
||||||
|
|
||||||
img {
|
img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 135px;
|
/* max-width: 135px; */
|
||||||
transition: all 2s cubic-bezier(0.075, 0.82, 0.165, 1);
|
transition: all 2s cubic-bezier(0.075, 0.82, 0.165, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,18 +63,20 @@
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
overflow-wrap: anywhere;
|
overflow-wrap: anywhere;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
padding: 5px;
|
padding: 3px;
|
||||||
|
line-height: 1.5rem;
|
||||||
align-self: center;
|
align-self: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activity>img {
|
.activity>img {
|
||||||
width: 128px;
|
width: 40%;
|
||||||
aspect-ratio: 1/1;
|
aspect-ratio: 1/1;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activity>img:not(.smallimg) {
|
.activity>img:not(.smallimg) {
|
||||||
min-width: 128px;
|
min-width: 150px;
|
||||||
|
max-width: 150px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activity>.smallimg {
|
.activity>.smallimg {
|
||||||
|
@ -96,7 +98,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: 135px;
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue