Created
November 29, 2019 16:29
-
-
Save encarsia/6c63d9433b05878b7c751036a903f8d0 to your computer and use it in GitHub Desktop.
Pixelfed shortcode for Nikola (Mako template)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%doc> | |
Template engine: Mako | |
Usage: | |
{{% pixelfed status=https://instance.domain/p/user/postnr %}} | |
Optional parameters: | |
width (default: 400) | |
Example: {{% pixelfed status=https://instance.domain/p/user/postnr % width=500}} will show a frame of 500 px width instead of the default 400 | |
</%doc> | |
% if width is UNDEFINED: | |
<% w = 400 %> | |
% else: | |
<% w = width %> | |
% endif | |
<iframe src="${status}/embed?caption=true&likes=false&layout=full" class="pixelfed__embed" style="max-width: 100%; border: 0" width=${w} allowfullscreen="allowfullscreen"></iframe><script async defer src="https://pixelfed.social/embed.js"></script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment