Vorlage:Card: Unterschied zwischen den Versionen

Aus Afterbuy-Wiki
Wechseln zu:Navigation, Suche
Zeile 2: Zeile 2:
 
{{#vardefine:imageheight|{{#if:{{{title|{{{text|}}} }}} | h-50 mh-50 | h-100 mh-100}} }}
 
{{#vardefine:imageheight|{{#if:{{{title|{{{text|}}} }}} | h-50 mh-50 | h-100 mh-100}} }}
 
{{#vardefine:faheight|{{#if:{{{title|{{{text|}}} }}} | 4.5 | 2.5}} }}
 
{{#vardefine:faheight|{{#if:{{{title|{{{text|}}} }}} | 4.5 | 2.5}} }}
{{#vardefine:externallink|{{#pos:link|http}} }}
+
{{#vardefine:externallink|{{#pos:{{{link|#}}}|http}} }}
 
{{#vardefine:image| {{#ifexist: File:{{{fa|user}}} | <span class="d-inline-block align-self-center p-3"><img src="{{filepath:{{{fa|user}}}}}" class="img-fluid p-4 m-4" style="max-width:{{#expr: {{#var:cardheight}}/1.2 round 0}}px;max-height:{{#expr: {{#var:cardheight}}/2.5 round 0 }}px;"></span> | {{Icon|{{{fa|user}}}|{{#expr:{{#var:cardheight}}/{{#var:faheight}} round 0 }}|#fde200}}}}}}
 
{{#vardefine:image| {{#ifexist: File:{{{fa|user}}} | <span class="d-inline-block align-self-center p-3"><img src="{{filepath:{{{fa|user}}}}}" class="img-fluid p-4 m-4" style="max-width:{{#expr: {{#var:cardheight}}/1.2 round 0}}px;max-height:{{#expr: {{#var:cardheight}}/2.5 round 0 }}px;"></span> | {{Icon|{{{fa|user}}}|{{#expr:{{#var:cardheight}}/{{#var:faheight}} round 0 }}|#fde200}}}}}}
 
{{#vardefine:card|<div style="min-height:{{#var:cardheight}}px;max-height:{{#var:cardheight}}px;height:{{#var:cardheight}}px;max-width:{{#var:cardheight}}px;min-width:{{#var:cardheight}}px;width:{{#var:cardheight}}px;" class="cardbutton shadow p-3 m-3 text-left rounded-0 text-decoration-none {{#ifright:edit|{{#ifexist:{{{link|}}}| |border border-danger}}|}}  "><div class="d-flex text-center {{#var:imageheight}} justify-content-center">{{#var:image}}</div>{{#if: {{{title|}}} | <div class="h5 text-dark font-weight-bold px-2"><span class="text-dark">{{{title|card-title}}}</span></div>|}}{{#if: {{{text|}}} | <div class="text-dark px-2">{{{text|card-text}}}</div>|}}</div>}}
 
{{#vardefine:card|<div style="min-height:{{#var:cardheight}}px;max-height:{{#var:cardheight}}px;height:{{#var:cardheight}}px;max-width:{{#var:cardheight}}px;min-width:{{#var:cardheight}}px;width:{{#var:cardheight}}px;" class="cardbutton shadow p-3 m-3 text-left rounded-0 text-decoration-none {{#ifright:edit|{{#ifexist:{{{link|}}}| |border border-danger}}|}}  "><div class="d-flex text-center {{#var:imageheight}} justify-content-center">{{#var:image}}</div>{{#if: {{{title|}}} | <div class="h5 text-dark font-weight-bold px-2"><span class="text-dark">{{{title|card-title}}}</span></div>|}}{{#if: {{{text|}}} | <div class="text-dark px-2">{{{text|card-text}}}</div>|}}</div>}}

Version vom 30. November 2021, 08:41 Uhr