|
|
(One intermediate revision by the same user not shown) |
Line 1: |
Line 1: |
| <includeonly><!-- | | <includeonly><!-- |
| + | --><span class="dropinitial" style="float:left; line-height:1.00em; <!-- |
| + | -->{{#if:{{{z-index|}}}|z-index:{{{z-index}}}; position:relative; |}}<!-- |
| | | |
− | --><templatestyles src="Dropinitial/styles.css" /><!-- | + | -->font-size:{{#if:{{{font-size|{{{2|}}}}}}|{{{font-size|{{{2|}}}}}}|3.00em}}; <!-- |
| + | -->margin:{{#if:{{{margin-top|{{{3|}}}}}}|{{{margin-top|{{{3|}}}}}}|0.00em}} <!-- |
| + | -->{{#if:{{{margin-right|{{{4|}}}}}}|{{{margin-right|{{{4|}}}}}}|0.10em}} <!-- |
| + | -->{{#if:{{{margin-bottom|{{{5|}}}}}}|{{{margin-bottom|{{{5|}}}}}}|0.00em}} <!-- |
| + | -->{{#if:{{{margin-left|{{{6|}}}}}}|{{{margin-left|{{{6|}}}}}}|0.00em}}; <!-- |
| + | -->text-indent:{{#if:{{{text-indent|{{{7|}}}}}}|text-indent|0.00em}};"><!-- |
| | | |
− | # outer class sets things like the text indent, because the inner spans have different
| + | -->{{#if:{{{fl|}}}|<span style="font-size:40%; position:relative; top:-1.00em;">{{{fl}}}</span>}}<!-- |
− | # font-size, so that make it confusing when using relative units like em
| |
− | --><span class="dropinitial {{#if:{{{image|}}}|drop-initial-image|drop-initial-no-image}}" {{optional style|text-indent={{{text-indent|{{{7|}}}}}}}}><!-- | |
| | | |
− | # preceding text
| + | -->{{{1|A}}}<!-- |
− | -->{{#if:{{{fl|}}}|<span class="dropinitial-fl">{{{fl}}}</span>}}<!--
| |
| | | |
− | # middle span - this is used so you can target CSS like margins without having it affected by the inner-span's font-size
| |
− | # but also without having it on the directly float:left'd span (.dropinitial), which has a different effect
| |
− | --><span class="dropinitial-mid"><!--
| |
− |
| |
− | # main initial
| |
− | --><span class="dropinitial-initial" {{optional style
| |
− | | z-index = {{{z-index|}}}
| |
− | | position = {{#if:{{{z-index|}}}|relative|}}
| |
− | | font-size = {{{font-size|{{{2|}}}}}}
| |
− | | margin-top = {{{margin-top|{{{3|}}}}}}
| |
− | | margin-right = {{{margin-right|{{{4|}}}}}}
| |
− | | margin-bottom = {{{margin-bottom|{{{5|}}}}}}
| |
− | | margin-left = {{{margin-left|{{{6|}}}}}}
| |
− | }}><!--
| |
− |
| |
− | # the initial
| |
− | -->{{#if:{{{image|}}}<!--
| |
− | image
| |
− | -->|[[File:{{{image}}}{{#if:{{{imgsize|}}}|{{!}}{{{imgsize}}}}}{{!}}alt={{{1|}}}]]<!--
| |
− | text
| |
− | -->|{{{1|A}}}<!--
| |
− | -->}}<!--
| |
− |
| |
− | # close spans .dropinitial-initial and .dropinitial-mid
| |
− | --></span></span><!--
| |
− |
| |
− | # close outer span .dropinitial
| |
| --></span><!-- | | --></span><!-- |
− |
| |
− | # tracking categories
| |
− | -->{{#if:{{{image|}}}|{{category handler|[[Category:Dropinitials with image]]}}}}<!--
| |
− | -->{{#if:{{{image|}}}|{{#if:{{{1|}}}||{{category handler|[[Category:Dropinitials with image but no alt text]]}}}}}}<!--
| |
− | -->{{#if:{{{1|}}}||[[Category:Dropinitials with no initial]]}}<!--
| |
− | -->{{#if:{{{font-size|{{{2|}}}}}}|{{category handler|page=[[Category:Dropinitials using font-size]]}}}}<!--
| |
− | -->{{#if:{{{margin-top|{{{3|}}}}}}|{{category handler|page=[[Category:Dropinitials using margin-top]]}}}}<!--
| |
− | -->{{#if:{{{margin-right|{{{4|}}}}}}|{{category handler|page=[[Category:Dropinitials using margin-right]]}}}}<!--
| |
− | -->{{#if:{{{margin-bottom|{{{5|}}}}}}|{{category handler|page=[[Category:Dropinitials using margin-bottom]]}}}}<!--
| |
− | -->{{#if:{{{margin-left|{{{6|}}}}}}|{{category handler|page=[[Category:Dropinitials using margin-left]]}}}}<!--
| |
− | -->{{#if:{{{text-indent|{{{7|}}}}}}|{{category handler|page=[[Category:Dropinitials using text-indent]]}}}}<!--
| |
− | -->{{#if:{{{fl|}}}|{{category handler|page=[[Category:Dropinitials using fl]]}}}}<!--
| |
− | -->{{#if:{{{z-index|}}}|{{category handler|page=[[Category:Dropinitials using z-index]]}}}}<!--
| |
− | -->{{#if:{{{fontfam|}}}|{{category handler|page=[[Category:Dropinitials using fontfam]]}}}}<!--
| |
− |
| |
− | -->{{#if:{{{1|}}}|<!--
| |
− | -->{{#ifeq:{{#invoke:String|find|source={{{1|}}}|[Ff]ile:|plain=false}}|0<!--
| |
− | -->||[[Category:Dropinitials with image in parameter 1]]<!--
| |
− | -->}}<!--
| |
− | -->{{#ifeq:{{#invoke:String|find|source={{{1|}}}|[Mm]edia:|plain=false}}|0<!--
| |
− | -->||[[Category:Dropinitials with image in parameter 1]]<!--
| |
− | -->}}<!--
| |
− | -->{{#ifeq:{{#invoke:String|find|source={{{1|}}}|[Ii]mage:|plain=false}}|0<!--
| |
− | -->||[[Category:Dropinitials with image in parameter 1]]<!--
| |
− | -->}}<!--
| |
− | -->}}<!--
| |
| --></includeonly><!-- | | --></includeonly><!-- |
| --><noinclude> | | --><noinclude> |
| {{documentation}} | | {{documentation}} |
| </noinclude> | | </noinclude> |