From 12fca724805bd86bfed5099092faa93d7673240d Mon Sep 17 00:00:00 2001 From: "Max L." Date: Fri, 24 Nov 2023 12:08:19 +0100 Subject: [PATCH 1/5] Filter out duplicate carousel cards Also respect reply config option in carousel --- script.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index b87dded..02e5f8d 100644 --- a/script.js +++ b/script.js @@ -165,9 +165,17 @@ const updateCarousel = function(slides, posts) { var newHTML = ` ` newHTML += ` `; @@ -196,7 +198,7 @@ const updateCarousel = function(slides, posts) {

- ${timeAgo(secondsAgo(new Date(post.created_at)))} + ${timeAgo(secondsAgo(new Date(post.created_at)))} ${post.favourites_count ? `, ${post.favourites_count} mal favorisiert` : '' } ${post.replies_count ? `, ${post.replies_count} mal kommentiert` : '' } ${post.reblogs_count ? `, ${post.reblogs_count} mal geteilt` : '' } From 6f9459fb3e43a37d69b8b85e192bfc4b57c54eb6 Mon Sep 17 00:00:00 2001 From: "Max L." Date: Fri, 24 Nov 2023 12:26:44 +0100 Subject: [PATCH 3/5] Fix post content not being child of card-text --- script.js | 2 +- styles.css | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/script.js b/script.js index d7b2b46..2efb796 100644 --- a/script.js +++ b/script.js @@ -193,7 +193,7 @@ const updateCarousel = function(slides, posts) {


- ${post.media_attachments[0] ? `

${DOMPurify.sanitize(post.content)}

` : `

${DOMPurify.sanitize(post.content)}

`} + ${post.media_attachments[0] ? `
${DOMPurify.sanitize(post.content)}
` : `
${DOMPurify.sanitize(post.content)}
`} ${post.media_attachments[0] ? `
` : ''}

diff --git a/styles.css b/styles.css index b2f4fc5..dd40322 100644 --- a/styles.css +++ b/styles.css @@ -50,6 +50,10 @@ margin-bottom: 1px !important; } +.carousel .card-text { + font-size: 1.4em; +} + .card { font-size: 0.9em; /* adjust this value to get the desired text size */ } @@ -186,10 +190,6 @@ body { margin-bottom: 20px !important; } -.card-text ~ p { - font-size: 1.4em; -} - .card-img-bottom { max-width: 600px; max-height: 500px; From 876f2bb7ad154153ad1215fb73251e6a36ff0f97 Mon Sep 17 00:00:00 2001 From: "Max L." Date: Fri, 24 Nov 2023 12:45:28 +0100 Subject: [PATCH 4/5] Try to deal better with overflow ALso align images right in carousel --- script.js | 8 +++++++- styles.css | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/script.js b/script.js index 2efb796..f2722dd 100644 --- a/script.js +++ b/script.js @@ -185,6 +185,7 @@ const updateCarousel = function(slides, posts) { else { newHTML += `