fix: wrap webmentions widget in is-land for lazy loading
The webmentions sidebar widget uses Alpine.js + fetch API but was missing the is-land on:visible wrapper that all other JS-dependent sidebar widgets have. This defers its initialization until scrolled into view, consistent with social-activity, github-repos, funkwhale, blogroll, and feedland widgets.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
{# Recent Webmentions Widget - site-wide inbound/outbound activity #}
|
||||
{# Uses client-side fetch from /webmentions/api/mentions (same as /interactions page) #}
|
||||
{# Outbound tab uses Eleventy collections (likes, replies, bookmarks, reposts) #}
|
||||
<is-land on:visible>
|
||||
<div class="widget" x-data="webmentionsWidget()" x-init="init()">
|
||||
<h3 class="widget-title flex items-center gap-2">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
@@ -148,3 +149,4 @@ function webmentionsWidget() {
|
||||
};
|
||||
}
|
||||
</script>
|
||||
</is-land>
|
||||
|
||||
Reference in New Issue
Block a user