Widget:Tweet: Difference between revisions
m extend noinclude element oops |
change classes of light and dark tweets |
||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
<div style="max-width: 100%;<!--{if isset($float)}--> float: right; clear: right; margin-top: -10px; margin-bottom: calc(0.5em - 10px); margin-left: 1em;<!--{/if}--> width: <!--{if isset($float)}--><!--{$width|escape:'html'|default:'440'}--><!--{else}--><!--{$width|escape:'html'|default:'550'}--><!--{/if}-->px;"> | <div style="max-width: 100%;<!--{if isset($float)}--> float: right; clear: right; margin-top: -10px; margin-bottom: calc(0.5em - 10px); margin-left: 1em;<!--{/if}--> width: <!--{if isset($float)}--><!--{$width|escape:'html'|default:'440'}--><!--{else}--><!--{$width|escape:'html'|default:'550'}--><!--{/if}-->px;"> | ||
<blockquote class="twitter-tweet" data-dnt="true" data-theme="light"> | <blockquote class="twitter-tweet-dark" data-dnt="true" data-theme="light"> | ||
<a href="https://twitter.com/_/status/<!--{$id|escape:'urlpathinfo'}-->"></a> | <a href="https://twitter.com/_/status/<!--{$id|escape:'urlpathinfo'}-->"></a> | ||
</blockquote> | </blockquote> | ||
<blockquote class="twitter-tweet" data-dnt="true" data-theme="dark"> | <blockquote class="twitter-tweet-light" data-dnt="true" data-theme="dark"> | ||
<a href="https://twitter.com/_/status/<!--{$id|escape:'urlpathinfo'}-->"></a> | <a href="https://twitter.com/_/status/<!--{$id|escape:'urlpathinfo'}-->"></a> | ||
</blockquote> | </blockquote> |
Revision as of 08:21, 31 July 2023
This widget allows you to add a Tweet card to your wiki page.
Using this widget
To insert this widget, use the following syntax:
{{#widget:Tweet|id = example}}
Replace example
with the ID of the Tweet found in the URL. You can also add the following optional parameters (separated using |
symbols within the brackets):
width = W
(replaceW
with the desired width in pixels)float
(places the video along the right side of the page, also changes the default width)