Vorlage:CSS image crop: Unterschied zwischen den Versionen

Aus kommunalflaggen.eu
Wechseln zu: Navigation, Suche
Zeile 1: Zeile 1:
<includeonly><div class="{{#if:{{{Description|}}}|thumb <!--
+
<includeonly><div class="{{#ifeq: {{{Location|}}} | center |center"><div class="|{{#ifeq: {{{Description|}}}|||thumb}}}} {{#switch: {{{Location|}}} | right = t | left = t | none = t | = {{#ifeq: {{{Description|}}}|||tright}}}}{{{Location|}}}">
-->{{#switch:{{{Location|}}}
+
{{#ifeq: {{{Description|}}}|||<div style="width: {{{cWidth}}}px;" class="thumbinner">}}
| none | tnone = tnone
+
<div style="width:{{{cWidth}}}px;height:{{{cHeight}}}px;overflow:hidden;">
| left | tleft = tleft
+
<div style="position:relative;top:-{{{oTop}}}px;left:-{{{oLeft}}}px;width:{{{bSize}}}">
| right | tright = tright
+
[[Datei:{{{Image}}}|{{{bSize}}}px|class=noresize]]
| center = center
+
</div>{{#ifeq: {{{Description|}}}|||</div><div class="thumbcaption">{{{Description}}}</div>}}
| #default = tright }}|<!-- if no description:
+
-->{{#switch:{{{Location|}}}
+
| none = floatnone
+
| left = floatleft
+
| right = floatright
+
| center = center }}}}">
+
{{#if:{{{Description|}}}|<div class="thumbinner" style="width: {{{cWidth}}}px;">}}
+
<div style="width: {{{cWidth}}}px; height: {{{cHeight}}}px; overflow: hidden;">
+
<div style="position: relative; top: -{{{oTop}}}px; left: -{{{oLeft}}}px; width: {{{bSize}}}px"><!--
+
-->[[File:{{{Image}}}|{{{bSize}}}px|alt={{{Alt|{{{Description|{{{Image}}}}}}}}}{{#if:{{{Link|}}}|{{!}}link={{{Link}}}}}{{#if:{{{Page|}}}|{{!}}page={{{Page}}}}}]]<!--
+
--></div>
+
{{#if:{{{Description|}}}|</div>
+
<div class="thumbcaption">
+
{{{Description}}}
+
</div>}}
+
 
</div>
 
</div>
</div>{{#ifeq:1|{{ifnumber|{{{cWidth|}}}{{{cHeight|}}}{{{oTop|}}}{{{oLeft|}}}{{{bSize|}}}}}||[[Category:CSS image crop using invalid parameters]]}}</includeonly><noinclude>
+
</div>{{#ifeq: {{{Location|}}} | center |</div>|}}</includeonly><noinclude>
{{documentation}}
+
 
</noinclude>
 
</noinclude>

Version vom 4. Februar 2016, 17:38 Uhr