Difference between revisions of "Template:Teaser"

From Culture.si
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{{#if:{{#str:trim|{{{1|}}}}}|{{dataRow|Teaser100|{{first_sentence|{{{1}}}}}}}
+
<noinclude><pre><nowiki>
{{ImageDataRow|TeaserImg|{{#if:{{{image}}}|File:{{{image}}}|{{#arr:getitem|{{#arr:getitem|{{#arr:match|{{{1}}}|(File:{{!}}Image:{{!}}image\{{!}}).*\.(jpg{{!}}JPG)}}|0|}}|0|}}}}}}{{dataRow|TeaserText|{{#eval:text|{{first_sentence|{{{1}}}}}}}}}
+
{{Teaser
<div id="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.
 +
}}
 +
</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>
{{setProp|Teaser100|{{#eval:parse|{{first_sentence|1={{{1}}}}}}}}}
+
{{{=
{{setProp|teaser|{{#replace:{{#replace:{{#replace:{{{1|}}}|320px|282px}} |250px|221px}}  |568px|282px}}}}
+
| real_image = {{#if:{{{image|}}}|File:{{{image}}}|{{#arr:getitem|{{#arr:getitem|{{#arr:match|{{{1}}}|(File:{{!}}Image:{{!}}image\{{!}}).*\.(jpg{{!}}JPG)}}|0|}}|0|}}}}
{{#prop:set|Teaser|{{#replace:{{#replace:{{#replace:{{{1|}}}|320px|282px}} |250px|221px}}  |568px|282px}}}}}}</includeonly>
+
| intro = {{first_sentence|{{{1}}}}}
 +
}}}{{#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.
}}