aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPortableProgrammer <[email protected]>2025-01-07 16:17:58 +0000
committerPortableProgrammer <[email protected]>2025-01-07 16:18:36 +0000
commit07702b73c4d4dfeacdb19cd7928e401712ada8a8 (patch)
tree13fe159fa193ce5fc1ea75260211334747baa4ac
parentb3a86ca3d6cb1c776946bb38d67a76459c6d2b35 (diff)
Feat: Card View
Restrict inline image links width to a reasonable size
-rw-r--r--src/mixins/postUtils.pug2
-rw-r--r--src/public/styles.css4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/mixins/postUtils.pug b/src/mixins/postUtils.pug
index b778cbd..b96ff1e 100644
--- a/src/mixins/postUtils.pug
+++ b/src/mixins/postUtils.pug
@@ -60,7 +60,7 @@
60 var result = html; 60 var result = html;
61 matches.forEach((match) => { 61 matches.forEach((match) => {
62 // Replace each occurrence with an actual img tag 62 // Replace each occurrence with an actual img tag
63 result = result.replace(match[0], '<a href="' + match[1] + '"><img src="' + match[1] + '"></a>'); 63 result = result.replace(match[0], '<a href="' + match[1] + '"><img class="inline" src="' + match[1] + '"></a>');
64 }) 64 })
65 65
66 return result; 66 return result;
diff --git a/src/public/styles.css b/src/public/styles.css
index 5996c75..bba485e 100644
--- a/src/public/styles.css
+++ b/src/public/styles.css
@@ -809,3 +809,7 @@ select {
809 border-radius: 2px; 809 border-radius: 2px;
810 border: 4px solid var(--sticky-color); 810 border: 4px solid var(--sticky-color);
811} 811}
812
813.inline {
814 max-width: 100%;
815}