sort webring boards, skip empty or errored ones and change column width

merge-requests/208/head
fatchan 5 years ago
parent eb8f87978e
commit 7d9e3c184f
  1. 10
      configs/webring.json.example
  2. 2
      gulp/res/css/style.css
  3. 6
      helpers/build.js
  4. 3
      schedules/webring.js

@ -0,0 +1,10 @@
{
"following": [
"https://vch.moe/webring.json"
],
"blacklist": [
"spacechan.xyz",
"bunkerchan.xyz",
"16chan.xyz"
]
}

@ -724,7 +724,7 @@ hr + .thread {
table.boardtable td:nth-child(3),table.boardtable td:nth-child(4),table.boardtable td:nth-child(5),
table.boardtable th:nth-child(3),table.boardtable th:nth-child(4),table.boardtable th:nth-child(5) {
min-width: 80px;
min-width: 90px;
}
@media only screen and (max-width: 600px) {

@ -227,11 +227,15 @@ module.exports = {
enableWebring ? cache.get('webring:boards') : null,
Files.activeContent() //size of all files
]);
var sorted
if (webringBoards) {
sorted = webringBoards.sort((a, b) => { return b.uniqueUsers - a.uniqueUsers })
}
const html = render('index.html', 'home.pug', {
totalPosts: totalPosts,
activeUsers,
boards,
webringBoards,
webringBoards: sorted,
fileStats,
});
const end = process.hrtime(start);

@ -19,6 +19,9 @@ module.exports = async () => {
for (let i = 0; i < rings.length; i++) {
//this could really use some validation/sanity checking
const ring = rings[i];
if (!ring || !ring.name) {
return;
}
if (ring.following && ring.following.length > 0) {
found = found.concat(ring.following);
}

Loading…
Cancel
Save