Difference between revisions of "Template:Teaser"

From Culture.si
(restored by csi_restorechanges)
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{{image={{#arr:getitem|{{#arr:getitem|{{#arr:match|{{{1}}}|(File:{{!}}Image:{{!}}image\{{!}}).*\.(jpg{{!}}JPG)}}|0|}}|0|}}}}}{{{intro={{first_sentence|{{{1}}}}}}}}
+
<noinclude><pre><nowiki>
{{#if:{{#str:trim|{{{1|}}}}}|{{dataRow|Teaser100|{{{intro}}}}}
+
{{Teaser
{{ImageDataRow|TeaserImg|{{{image}}}}}{{dataRow|TeaserText|{{#eval:text|{{{intro}}}}}}}
+
| image = FileName.jpg
<div id="teaser">
+
| caption = Caption for the teaser image, will be read from the image page if missing
 +
|  
 +
Text of the teaser .... Use 1= if the text contains equal signs.
 +
}}
 +
</nowiki></pre></noinclude><includeonly><div id="teaser">
 +
{{#if:{{{image|}}}
 +
| {{#ifeq:{{{caption}}}|{{{caption|}}}|{{Image|{{{image}}}|caption={{{caption}}}}}|{{Image|{{{image}}}}}
 +
}}{{#set:TeaserImgDesc={{{caption|{{#show:image:{{{image}}}|?Description}}}}}}}
 +
}}
 
{{{1}}}
 
{{{1}}}
 
</div>
 
</div>
{{#data:set|Teaser|page={{FULLPAGENAME}}|intro={{{intro}}}|image={{{image}}}}}
+
{{{=
{{setProp|Teaser100|{{#eval:parse|{{{intro}}}}}}}
+
| real_image = {{#if:{{{image|}}}|File:{{{image}}}|{{#arr:getitem|{{#arr:getitem|{{#arr:match|{{{1}}}|(File:{{!}}Image:{{!}}image\{{!}}).*\.(jpg{{!}}JPG)}}|0|}}|0|}}}}
{{setProp|teaser|{{#replace:{{#replace:{{#replace:{{{1|}}}|320px|576px}} |250px|576px}}  |568px|576px}}}}
+
| intro = {{first_sentence|{{{1}}}}}
{{#prop:set|Teaser|{{#replace:{{#replace:{{#replace:{{{1|}}}|320px|576px}} |250px|576px}}  |568px|576px}}}}}}</includeonly>
+
}}}{{#if:{{#str:trim|{{{1|}}}}}
 +
|{{dataRow|Teaser100|{{{intro}}}
 +
}}{{ImageDataRow|TeaserImg|{{{real_image}}}
 +
}}{{dataRow|TeaserText|{{#eval:text|{{{intro}}}}}
 +
}}{{#data:set|Teaser|page={{FULLPAGENAME}}|intro={{{intro}}}|image={{{real_image}}}
 +
}}{{setProp|Teaser100|{{#eval:parse|{{{intro}}}}}
 +
}}{{setProp|teaser|{{#replace:{{#replace:{{#replace:{{{1|}}}|320px|576px}} |250px|576px}}  |568px|576px}}
 +
}}{{#prop:set|Teaser|{{#replace:{{#replace:{{#replace:{{{1|}}}|320px|576px}} |250px|576px}}  |568px|576px}}}}}}</includeonly>

Latest revision as of 18:36, 13 April 2021

{{Teaser
| image = FileName.jpg
| caption = Caption for the teaser image, will be read from the image page if missing
| 
Text of the teaser .... Use 1= if the text contains equal signs.
}}