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'
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) => {

View file

@ -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": {

View file

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

View file

@ -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);
}