From f496e29f0a43793bce049bf674562b8270228152 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Sun, 4 Feb 2024 10:08:23 -0800 Subject: [PATCH] chore: clean up webmention comments + styles --- config/filters/index.js | 5 +++++ package.json | 2 +- src/_includes/partials/webmentions/comments.liquid | 2 +- src/assets/styles/widgets/webmentions.css | 12 +----------- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/config/filters/index.js b/config/filters/index.js index 652218ef..c95bb1aa 100644 --- a/config/filters/index.js +++ b/config/filters/index.js @@ -55,6 +55,8 @@ export default { if (url.includes('trakt.tv')) return '#Movies #Watching #Trakt' return tagMap[url] || '' }, + + // webmentions webmentionsByUrl: (webmentions, url) => { if (!webmentions) return null; @@ -114,6 +116,9 @@ export default { return data }, + webmentionsSanitizeComments: (comment) => { + return comment.replace(/\?\?\?\?/g, ''); + }, // dates readableDate: (date) => { diff --git a/package.json b/package.json index 9f26ed79..878ea6c1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "5.2.9", + "version": "5.2.10", "description": "The source for my personal site. Built using 11ty and hosted on Netlify.", "type": "module", "scripts": { diff --git a/src/_includes/partials/webmentions/comments.liquid b/src/_includes/partials/webmentions/comments.liquid index 1c02574d..3289a72a 100644 --- a/src/_includes/partials/webmentions/comments.liquid +++ b/src/_includes/partials/webmentions/comments.liquid @@ -16,7 +16,7 @@
-

{{ mention.content.text }}

+

{{ mention.content.text | webmentionsSanitizeComments }}

diff --git a/src/assets/styles/widgets/webmentions.css b/src/assets/styles/widgets/webmentions.css index 4016990d..282df186 100644 --- a/src/assets/styles/widgets/webmentions.css +++ b/src/assets/styles/widgets/webmentions.css @@ -92,18 +92,8 @@ transition-duration: var(--transition-duration-default); } -.webmentions .interaction .avatar__wrapper .avatar__wrapper-image > * { - width: 100%; - height: 100%; -} - .webmentions .interaction .avatar__wrapper img { - width: 101%; - height: 101%; -} - -.webmentions .interaction .avatar__wrapper img, -.webmentions .interaction .avatar__wrapper .avatar__wrapper-image > * { + width: 100%; border-radius: var(--rounded-full); }