Widget:MastodonLink: Difference between revisions

From Nottinghack Wiki
Jump to navigation Jump to search
mNo edit summary
Give up on the icon idea
Line 2: Line 2:
Image:Mastodon.svg
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 eq true} -->
[[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 12:


{{#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 18:
;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>

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