Skip to content

Commit

Permalink
Mention United Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kristofzerbe committed Sep 16, 2024
1 parent 4c5912a commit 6d44acb
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ meta_generator: Hexo 7.2.0
offline: false
features_available:
pirsch: false
mentions_united: true

# Site
title: kiko.io
Expand Down Expand Up @@ -62,6 +61,7 @@ syndication_hosts: # on extension see article.styl '.syndication-link'
# Services
osm_tile_server: https://tile.openstreetmap.org/
favicon_service_url: https://t2.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url={URL}&size=32
api-proxy-base-url: https://mentions-united-api-proxy.up.railway.app

# URL
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
Expand Down
8 changes: 5 additions & 3 deletions themes/landscape/layout/_partial/post/interaction.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,14 @@
<% if (synPixelfed) { %>
mentionsUnited.register(new MentionsUnitedProvider_Pixelfed({
sourceUrl: "<%- synPixelfed.url %>",
apiBaseUrl: "https://mentions-united-api-proxy.up.railway.app/pixelfed"
apiBaseUrl: "<%- config.api-proxy-base-url %>/pixelfed"
}));
<% } %>
mentionsUnited.load()
.then(() => { return mentionsUnited.show(); })
.then(() => {
return mentionsUnited.show();
})
.then((count) => {
let msg = document.querySelector(".article-interactions .message");
if (count === 0) {
Expand All @@ -118,7 +120,7 @@
} else {
msg.remove();
}
})
});
});
</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
* @see {@link https://github.com/kristofzerbe/MentionsUnited|GitHub}
*
* Options:
* - {String} placeholderId = ID of the element which will be replaced
* - {String} typeVerb = Type verb if interactions to show as avatars ... like, repost or else
* - {Callback} [afterRender] = JS function to call after render
* - {String} placeholderId = ID of the element which will be replaced by the generated HTML
* - {String} typeVerb = Type verb for filtering the interactions and to show as avatars ... like, repost or else
* - {Callback} [afterRender] = Function to call after the generated HTML was inserted into the page
*/
class MentionsUnitedRenderer_AvatarsByType extends MentionsUnited.Renderer {
key = "avatars-by-type"; // must be unique across all renderer plugins for registration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Options:
* - {String} placeholderId = ID of the element which will be replaced with list of interactions
* - {String} [skipTypes] = Comma-separated list of type-verbs to skip
* - {Callback} [afterRender] = JS function to call after render
* - {Callback} [afterRender] = Function to call after the generated HTML was inserted into the page
*/
class MentionsUnitedRenderer_List extends MentionsUnited.Renderer {
key = "list"; // must be unique across all renderer plugins for registration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
* @see {@link https://github.com/kristofzerbe/MentionsUnited|GitHub}
*
* Options:
* - {String} placeholderId = ID of the element which will be replaced with total number anchor
* - {String} placeholderId = ID of the element which will be replaced by the generated HTML
* - {String} [pageKey] = Unique identifier of the page, e.g. slug, for caching feature
* - {String} [anchorTargetId] = ID of the element to jump to on click for rendering as anchor
* - {Callback} [afterRender] = JS function to call after render
* - {Callback} [afterRender] = Function to call after the generated HTML was inserted into the page
*/
class MentionsUnitedRenderer_TotalNumber extends MentionsUnited.Renderer {
key = "total-number"; // must be unique across all renderer plugins for registration
Expand Down

0 comments on commit 6d44acb

Please sign in to comment.