Widget:MastodonLink: Difference between revisions

From Nottinghack Wiki
Jump to navigation Jump to search
Add icon option (I'm not expecting this to work)
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<includeonly>
Image:Mastodon.svg
<a href="https://<!--{$site|escape:'html'}-->/@<!--{$user|escape:'html'}-->" rel="me">
<a href="https://<!--{$site|escape:'html'}-->/@<!--{$user|escape:'html'}-->" rel="me">
<!-- {if $icon} -->
[[Image:Mastodon.svg|width=25px]]
<!-- {else} -->
@<!--{$user|escape:'html'}-->@<!--{$site|escape:'html'}-->
@<!--{$user|escape:'html'}-->@<!--{$site|escape:'html'}-->
<!-- {/if} -->
</a>
</a>
</includeonly><noinclude>
</includeonly><noinclude>
Line 16: Line 11:


{{#widget:MastodonLink|site=hachyderm.io|user=nottinghack}}
{{#widget:MastodonLink|site=hachyderm.io|user=nottinghack}}
{{#widget:MastodonLink|site=hachyderm.io|user=nottinghack|icon}}


==Parameters==
==Parameters==
Line 24: Line 17:
;username
;username
:The mastodon username
:The mastodon username
;icon
:Show mastodon icon instead of text link (set or do not set)
[[Category:Widget]]
[[Category:Widget]]
</noinclude>
</noinclude>

Latest revision as of 00:04, 12 March 2025

This widget basically just generates a hyperlink with the rel="me" attribute/value.

Example

{{#widget:MastodonLink|site=hachyderm.io|user=nottinghack}}

@nottinghack@hachyderm.io

Parameters

site
The mastodon site domain
username
The mastodon username