Template:Spotify: Difference between revisions
No edit summary |
(test) Tag: 2017 source edit |
||
Line 1: | Line 1: | ||
<includeonly><div class="spotify-thumb" style="{{#ifeq:{{{align|}}}| | <includeonly><div class="spotify-thumb" style="{{#ifeq:{{{align|}}}|right|float:left;clear:left;margin-left:0;margin-right:12px;|}}" {{#switch:{{{height|}}}|full|full height|380=id="full-height"|300|280=id="height-280"|350=id="height-350"}}> | ||
{{#tag:spotify||uri="{{#if:{{{album|}}}|spotify:album:{{{album}}}|{{#if:{{{track|}}}|spotify:track:{{{track}}}|{{#if:{{{episode|}}}|spotify:episode:{{{episode}}}|spotify:album:{{{1}}}}}}}}}"|height="{{#if:{{{height|}}}|{{#switch:{{{height|}}}|full|full height=380|300|290=280|#default={{{height}}}}}|76}}"|width=" | {{#tag:spotify||uri="{{#if:{{{album|}}}|spotify:album:{{{album}}}|{{#if:{{{track|}}}|spotify:track:{{{track}}}|{{#if:{{{episode|}}}|spotify:episode:{{{episode}}}|spotify:album:{{{1}}}}}}}}}"|height="{{#if:{{{height|}}}|{{#switch:{{{height|}}}|full|full height=380|300|290=280|#default={{{height}}}}}|76}}"|width=" | ||
{{{width|{{#switch:{{{height|}}}|300|280=260|350=260|380=260|#default=290}}}}}"}} | {{{width|{{#switch:{{{height|}}}|300|280=260|350=260|380=260|#default=290}}}}}"}} | ||
</div></includeonly><noinclude>{{documentation}}[[Category:Templates|Spotify]]</noinclude> | </div></includeonly><noinclude>{{documentation}}[[Category:Templates|Spotify]]</noinclude> |
Revision as of 23:52, 20 June 2021
- artist
- album
- track
- playlist
- episode
- show
Currently, playlist, episode and show do not work. Support may be added in the future. Each of these will be followed by a long string of gibberish.
Let's consider Jubilee as our primary example here. You can easily extract the information you need from either the URI (spotify:album:2KavEgxLOcjbZq8OqoFiMD) or from a simple URL (https://open.spotify.com/album/2KavEgxLOcjbZq8OqoFiMD).
<spotify uri="spotify:album:5nuQd8ibwND43GAVP9FT0B" height="76" width=" 290"></spotify>
- {{spotify|album=5nuQd8ibwND43GAVP9FT0B}} will generate the Spotify embed seen on the right.
Simple right? The same exact logic applies to the other URL types we mentioned. By default, {{Spotify}}
appears as an floating player aligned to the right side of the page.
They can also be aligned to the left side instead.
<spotify uri="spotify:album:62Pk4ZZI82TmstwutgjPod" height="76" width=" 290"></spotify>
align=left produces such a left-aligned Spotify object.
- {{spotify|album=62Pk4ZZI82TmstwutgjPod|align=left}}
Spotify is not available in quite all countries, and not all users will have an account to listen with on the page directly.