better blog browse on mobile

This commit is contained in:
Christoph J. Scherr 2023-10-09 23:16:45 +02:00
parent 327200a4b0
commit 3754ba5359
1 changed files with 5 additions and 0 deletions

View File

@ -63,4 +63,9 @@ document.querySelectorAll(".reset-empty-button").forEach((element) => {
document.querySelectorAll(".cardrow").forEach((element) => { document.querySelectorAll(".cardrow").forEach((element) => {
var level = Math.min(Math.floor(screen.width / 200), 6); var level = Math.min(Math.floor(screen.width / 200), 6);
element.classList.add("row-cols-" + level); element.classList.add("row-cols-" + level);
if (screen.width < 580) {
element.querySelectorAll(".card").forEach((element) => {
element.classList.add("w-75");
});
}
}); });