chore: clean up webmention comments + styles

This commit is contained in:
Cory Dransfeldt 2024-02-04 10:08:23 -08:00
parent d31d0fcdd5
commit f496e29f0a
No known key found for this signature in database
4 changed files with 8 additions and 13 deletions

View file

@ -55,6 +55,8 @@ export default {
if (url.includes('trakt.tv')) return '#Movies #Watching #Trakt' if (url.includes('trakt.tv')) return '#Movies #Watching #Trakt'
return tagMap[url] || '' return tagMap[url] || ''
}, },
// webmentions
webmentionsByUrl: (webmentions, url) => { webmentionsByUrl: (webmentions, url) => {
if (!webmentions) return null; if (!webmentions) return null;
@ -114,6 +116,9 @@ export default {
return data return data
}, },
webmentionsSanitizeComments: (comment) => {
return comment.replace(/\?\?\?\?/g, '');
},
// dates // dates
readableDate: (date) => { readableDate: (date) => {

View file

@ -1,6 +1,6 @@
{ {
"name": "coryd.dev", "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.", "description": "The source for my personal site. Built using 11ty and hosted on Netlify.",
"type": "module", "type": "module",
"scripts": { "scripts": {

View file

@ -16,7 +16,7 @@
</a> </a>
<div class="comment"> <div class="comment">
<a href={{mention.url}}> <a href={{mention.url}}>
<p>{{ mention.content.text }}</p> <p>{{ mention.content.text | webmentionsSanitizeComments }}</p>
<time>{{ mention.published | isoDateOnly }}</time> <time>{{ mention.published | isoDateOnly }}</time>
</a> </a>
</div> </div>

View file

@ -92,18 +92,8 @@
transition-duration: var(--transition-duration-default); transition-duration: var(--transition-duration-default);
} }
.webmentions .interaction .avatar__wrapper .avatar__wrapper-image > * {
width: 100%;
height: 100%;
}
.webmentions .interaction .avatar__wrapper img { .webmentions .interaction .avatar__wrapper img {
width: 101%; width: 100%;
height: 101%;
}
.webmentions .interaction .avatar__wrapper img,
.webmentions .interaction .avatar__wrapper .avatar__wrapper-image > * {
border-radius: var(--rounded-full); border-radius: var(--rounded-full);
} }