@shindakun I’ve done some CSS and other tweaks and have it looking more to my liking. I'd like to get rid of the Like and Share buttons totally, but when I removed them from the HTML everything broke. 😒 meanwhile I'm hiding the text. I also rearranged a couple of items. So pleasing. Thank you again.
@Miraz Yeah I've been thinking about getting rid of the buttons myself. If you remove the label section near the top of the "render" functions that should allow you to remove the HTML for the buttons. For example:
var label = reposts.length + (reposts.length === 1 ? ' share' : ' shares');
document.getElementById('share-count').innerHTML = label;
@manton Do you know whether or not it's the case that even if one were to keep the native M.b webmention code intact, incoming webmentions will only use that third-party function, and therefore once you turn on displaying native webmentions, all mentions in the meantime won't have gotten picked up by M.b?
@Miraz Ack! Looks like I left out
<ul class="shares" id="shares"></ul> in the HTML on the post. I also noticed I didn't mention that you need to supply an image for shares. The code looks for
/images/anon-avatar.png by default.
@matpacker There is something odd about the post that webmention.io recieved, looking at the JSON returned to the page its coming in as:
"sentence_html": "<a href=\"[www.mathewpacker.com/2019/12/2...](https://www.mathewpacker.com/2019/12/2523/)\">someone</a> posted '' linking to <a href=\"[miraz.me/2019/12/2...](https://miraz.me/2019/12/21/thanks-to-shindakun.html)\">[miraz.me/2019/12/2...](https://miraz.me/2019/12/21/thanks-to-shindakun.html)</a>"
So, it knows you send something just doesn't appear to have written the text.
Thanks for testing that, I had completely forgotten about it.
@matpacker Hmm doesn't look like it's updated in the data sent back to the page (at least not yet). I haven't used that plugin, so I don't know to much about how its sending to webmention.io that mention definietly is much ligher on details then the ones from micro.blog. I wonder if that's why the original implmentation I based my post on only shows a name and profile icon for "shares". Though the other examples of them I found do appear to have comment text. Maybe the issue is specific to the plugin, can't install it on the free wordpress.com account. :(
@Miraz it looks like you should be alright once you add the "shares" <ul> .
It got left out of the HTML in my original post by mistake, it should have included three elements:
<ul class="replies" id="replies"></ul>
<ul class="likes" id="likes"></ul>
<ul class="shares" id="shares"></ul>
I imagine a variant could be written that finds the permalink URL for every post on a page and then goes and asks webmention.io for a count, for each post, and displays that with the post on the homepage, but it’s probably that much more complex….
div placeholder, and then you’d have counts with each post on the homepage. So maybe 80% of the JS is the same?
@matpacker @shindakun I just noticed that Miraz’s post is reporting “4 shares” (and wondered what they were…), which coincidentally corresponds to 4 “speaking head” icons from mathewpacker.com, so webmention.io is seeing them as shares and not replies, I guess…if that helps any in debugging….
New Microblog — $5/month
We'll create and host a microblog for you at username.micro.blog or your own domain name. Includes cross-posting, pages, themes, and publishing from the web, iOS, and Mac.
Upgrade to Microcast + Video — $10/month
All the features of a hosted microblog plus podcast and video hosting. Upload MP3s via the web or use the companion iPhone app Wavelength to record and edit your own microcast. We'll create a podcast feed for you.
Upgrade to Teams — $20/month
Great for businesses or families. Add people to your blog so that your whole team can write blog posts. Also includes podcasting and video upload.