Vorlage:W502: Unterschied zwischen den Versionen

Zur Navigation springen Zur Suche springen
 
(67 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
{{#vardefine: width
+
Testbild
|{{{rw|{{{rahmen_w|240}}} }}}
+
<div class='testbild'><!--
 +
--><onlyinclude><!--
 +
 
 +
Bilder
 +
 
 +
-->{{#vardefine: img1 |{{{1|kasuga_lanterns3.jpg}}} }}<!-- 
 +
-->{{#vardefine: img2 |{{{2|kasuga4.jpg}}} }}<!--
 +
 
 +
Bildtext kurz
 +
 
 +
-->{{#vardefine:text1
 +
| {{#if: {{{ref|}}}|{{ref|bild={{{1|}}} }} }} {{{3|}}}
 +
}}<!-- 
 +
-->{{#vardefine:text2
 +
| {{#if: {{{ref|}}}|{{ref|bild={{{2|}}} }} }} {{{4|}}}
 +
}}<!-- 
 +
 +
Standardweite Einzelbild, stw, rw
 +
 
 +
-->{{#vardefine:stw|{{#if:{{{max|}}}|700|500 }}}}<!--
 +
-->{{#vardefine:rw|{{#if:{{{max|}}}|340|240 }}}}<!--   
 +
-->{{#vardefine:rw1 | {{{rw1|{{#var:rw}} }}} }}<!--
 +
-->{{#vardefine:rw2 | {{{rw2|{{#var:rw}} }}} }}<!--
 +
 
 +
Prozent rw1, rw2
 +
240 > % von 500
 +
340 > % von 700
 +
 
 +
-->{{#vardefine:rw1%
 +
| {{#expr: {{#var:rw1}}*100/{{#var:stw}} }}
 +
}}<!--
 +
-->{{#vardefine:rw2% 
 +
| {{#expr: {{#var:rw2}}*100/{{#var:stw}} }}  
 
}}<!--
 
}}<!--
-->{{#vardefine: height
+
 
|{{{rh|{{{rahmen_h|300}}} }}}
+
Standardhöhe, rh
 +
 
 +
-->{{#vardefine:rh | {{{rh|250}}} }}<!--
 +
-->{{#vardefine:rh1 | {{{rh1|{{#var:rh}} }}} }}<!--
 +
-->{{#vardefine:rh2 | {{{rh2|{{#var:rh}} }}} }}<!--
 +
 
 +
Abstände
 +
 
 +
-->{{#vardefine:t1|{{{t1|{{{top1|}}}}}}}}<!--   
 +
-->{{#vardefine:l1|{{{l1|{{{left1|{{{lr1|0}}}}}}}}}}}<!--   
 +
-->{{#vardefine:r1|{{{r1|{{{right1|{{{lr1|0}}}}}}}}}}}<!--
 +
-->{{#vardefine:b1|{{{b1|}}}}}<!--
 +
 
 +
-->{{#vardefine:t2|{{{t2|{{{top2|}}}}}}}}<!--   
 +
-->{{#vardefine:l2|{{{l2|{{{left2|{{{lr2|0}}}}}}}}}}}<!--   
 +
-->{{#vardefine:r2|{{{r2|{{{right2|{{{lr2|0}}}}}}}}}}}<!--
 +
-->{{#vardefine:b2|{{{b2|}}}}}<!--   
 +
 
 +
Caption:
 +
 
 +
-->{{#vardefine:caption
 +
| {{#if: {{{caption| }}}
 +
|<div class='bildtext caption'>{{{caption|}}}</div>
 +
}}
 +
}}<!--   
 +
 
 +
class
 +
 
 +
-->{{#vardefine:max|{{#if:{{{max|}}}|imax }}}}<!-- 
 +
 
 +
-->{{#vardefine:showPopup
 +
| {{#ifeq:{{{noviewer|}}}|1
 +
  | 0
 +
  | {{{ref|0}}}
 +
  }}
 +
}}<!--   
 +
 
 +
-->{{#vardefine:showPopup2
 +
| {{#var:showPopup}}
 +
}}<!--   
 +
 
 +
 
 +
HTML
 +
 
 +
--><div class='imgWrap {{{hell|}}}'><div class='i500  {{#var:max}}' style='
 +
display:grid;
 +
grid-template-columns: {{#var:rw1}}fr 20fr {{#var:rw2}}fr;
 +
'>
 +
<div style=''>
 +
{{Dia
 +
| img={{#var:img1}}
 +
| text={{#var:text1}}
 +
| rw={{#var:rw1}}
 +
| rh={{#var:rh1}}
 +
| t={{#var:t1}}
 +
| l={{#var:l1}} 
 +
| r={{#var:r1}}
 +
| b={{#var:b1}}
 +
| showPopup={{#var:showPopup}}
 +
}}
 +
</div><div class=spaceDiv></div>
 +
<div style=''>
 +
{{Dia
 +
| img= {{#var:img2}}
 +
| text={{#var:text2}}
 +
| rw={{#var:rw2}}
 +
| rh={{#var:rh2}}
 +
| t={{#var:t2}}
 +
| l={{#var:l2}} 
 +
| r={{#var:r2}}
 +
| b={{#var:b2}}
 +
| showPopup={{#var:showPopup2}}
 +
}}
 +
</div><!-- 
 +
--></div>{{#var:caption}}</div><!-- 
 +
 
 +
CSS
 +
 
 +
-->{{#css:
 
}}<!--
 
}}<!--
--><div class= "bildbox bildtext"><!--  
+
 
--><table class= "bildbox bildtext" ><tr>
+
Vorlage Ende
<td width={{#expr: {{{rahmen_w1|{{#var:width}} }}}+12}}>{{Dia
+
 
| {{{1|hiroshige_asakusa_fischer.jpg}}}| rahmen_w={{{rahmen_w1|{{#var:width}} }}}| rahmen_h={{{rahmen_h1|{{#var:height}} }}}| w={{{w1|{{#var:width}} }}} | top={{{top1|0}}}|left={{{left1|0}}}
+
--></onlyinclude></div>
  }}{{#if:{{{3|}}}
+
----
|<div>{{#if: {{{ref|}}}|{{ref|bild={{{1|}}} }} }} {{{3|}}} </div>
+
Parameter:
}}
+
: Divhell
</td><!--
+
: Bilder: rw, rh
--><td width={{{rahmen_w2|{{#var:width}} }}}+12}}>{{Dia
+
: Bild1: 1, w1, rw1, rh1, t1, r1, l1, lr1
| {{{2|hiroshige_asakusa.jpg}}}| rahmen_w={{{rahmen_w2|{{#var:width}} }}}| rahmen_h={{{rahmen_h2|{{#var:height}} }}}| w={{{w2|{{#var:width}} }}} | top={{{top2|0}}}|left={{{left2|0}}}
+
: Bild2: 2, w2, rw2, rh2, t2, r2, l2, lr2
}}{{#if:{{{4|}}}
+
: Text: 3, 4, caption, ref
|<div>{{#if: {{{ref|}}}|{{ref|ref={{{ref|}}}|bild={{{2|}}} }} }} {{{4|}}}</div>
+
 
}}
+
rw1 und rw2 ändern die Proportionen, sollten aber zusammen 480 ergeben (500 - 4%)
</td></tr><!--
 
-->{{#if: {{{caption|}}}
 
|<tr><td colspan=2><div> {{#if: {{{ref|}}}| {{#if:{{{3|}}}||{{ref|ref={{{ref|}}}|bild={{{1|}}} }} }} {{#if:{{{4|}}}||{{ref|ref={{{ref|}}}|bild={{{2|}}} }} }} }} {{{caption|}}}</div></td></tr>
 
}}</table></div>
 

Aktuelle Version vom 5. November 2023, 16:49 Uhr

Testbild

Kasuga lanterns3.jpg
Kasuga4.jpg

Parameter:

Div: hell
Bilder: rw, rh
Bild1: 1, w1, rw1, rh1, t1, r1, l1, lr1
Bild2: 2, w2, rw2, rh2, t2, r2, l2, lr2
Text: 3, 4, caption, ref

rw1 und rw2 ändern die Proportionen, sollten aber zusammen 480 ergeben (500 - 4%)