Jump to content

Template:Marriage: Difference between revisions

2,206 bytes removed ,  2 years ago
no edit summary
m (1 revision imported)
en>Vivaporius
No edit summary
Line 1:
<div style="display:inline-block;line-height:normal;{{#if:{{{1|<br>}}}{{{end|{{{reason|}}}}}}|margin:2px 0px}};width:100%;">{{#if:{{{1|}}}
<includeonly><!--
|{{trim|{{#if:{{{end|{{{reason|}}}}}} | {{#if:{{{2|}}}|{{MultiReplace|{{{1|}}}|<br />||<br >||<br/>||<br>|}}|{{#if:{{{3|}}}|{{{1|}}}|{{MultiReplace|{{{1|}}}|<br />||<br >||<br/>||<br>|}}|{{{1|}}}}}}} |{{{1}}}
}}|}}{{#if:{{{end|{{{reason|}}}}}}|{{#if:{{{2|}}}|<br />|{{#if:{{{2|}}}{{{3|}}}|&#32;|<br />}}}}|&#32;}}}}&#40;{{#if:{{{2|}}}
| {{abbr|m.|married}}&nbsp;{{#ifeq:{{{32|}}}|{{get year|{{{32|}}}}}
|{{{2|}}}
|{{hover title|dotted=no|2={{get year|{{{2|}}}}}|1={{{2|{{#time:F j, Y}}}}}}}
}}
|{{#if:{{{3|}}}||{{main other|[[Category:Marriage template errors|U{{PAGENAME}}]]}}<span style="color:red">undated</span>{{#if:{{{end|{{{reason|}}}}}}|&#44;&#32;}}}}
}}{{#if:{{{3|}}}
-->|{{#ifeq:{{{end|{{{reason|}}}}}}|
|{{#if:{{{2|}}}|&#x2060;&#8211;&#x2060;|before&nbsp;}}
|{{#if:{{{2|}}}
|&#59;&#32;
-->}}{{#switch:{{{end|{{{reason|}}}}}}
| d | d. | died = died&nbsp;<!-- this used to be {{abbr|d.|died}} but caused confusion with "divorced" -->
| div | div. | div.divorce | divorced = {{abbr|div.|divorced}}&nbsp;
| a | a. | dann. | d.annul | diedannulled = {{abbr|dann.|diedannulled}}&nbsp;
| w | w. | wid | wid. | widow | widowed = {{main other|[[Category:Marriage template errors|W{{PAGENAME}}]]}}{{dc|{{abbr|wid.|widowed}}&nbsp;}}
| = <!--(reason marriage ended not supplied)-->
| #default = {{{end|{{{reason|}}}}}}&nbsp;
}}
| }}{{#ifeq:{{{3|}}}|{{get year|{{{3|}}}}} |{{{3|}}}
|{{{3|}}}
| {{abbrhover title|1dotted=no|2={{get year|{{{3|}}}}} |21={{{3|}}} }}
}}
|{{#if:{{{2|}}}
|{{#if:{{{end|{{{reason|}}}}}}|&#44;&#32;|}}
}}{{#switch:{{{end|{{{reason|}}}}}}
| d | d. | died = died
| div | div. | divorced = divorced
| w | w. | wid | wid. | widow | widowed = {{main other|[[Category:Marriage template errors|W{{PAGENAME}}]]}}{{dc|widowed}}
| = <!--(reason marriage ended not supplied)-->
| #default = {{{end|{{{reason|}}}}}}
}}
}}&#41;</div>{{#ifeq:{{{4|+}}}|{{{4|-}}}
|{{main other|[[Category:Marriage template errors|*U{{PAGENAME}}]]}}
-->}}<!--
 
--></includeonly><noinclude>{{Documentation}}</noinclude>
To do: Alternate format/s such as "Mildred Harris (1918–20; div.)" rather than "Mildred Harris (m. 1918; div. 1920)".
Producing e.g. {{marriage|1234|1256}} = "(m. 1234–56)" or just "(1234–56)"...?
 
--><span itemscope itemtype="https://en.wikipedia.org/wiki/{{BASEPAGENAME}}"><!--
-->{{#if:{{{show|}}} |{{{show|}}} <!-- (?) - I think this is to accommodate alternate formats from to do list above
-->| {{#if:{{{1|}}} |{{trim|{{{1}}}}}}}&#32;<!-- (Display first parameter (usually a name))
-->{{#switch:{{{()|}}}<!-- (Add options on font size - default to small size (95%)
-->|small|smaller=<span style="font-size:90%;"><!-- (Smaller size if |()=small[er]) keep for backwards compatibility
-->|norm|normal=<!-- (no change to font size if normal)
-->|mini|tiny=<span style="font-size:85%;"><!-- (Even smaller size if mini/tiny, but never less than 85% per MOS:FONTSIZE)
-->|=}}<!-- (Default to normal size)
-->(<!-- (Start parenthesis carrying marriage data)
-->{{abbr|m.|married}}&nbsp;<!-- (Insert "m."/"married") [make optional if context already supplied?]
-->{{#ifeq:{{{2|}}}|{{get year|{{{2|}}}}} |{{{2|}}}<!-- (If {{{2}}} is a year, display as is...
-->| {{abbr|1={{get year|{{{2|}}}}} |2={{{2|{{#time:F j, Y}}}}}}}<!-- ...otherwise extract and display year
-->}}<!-- and present remainder in tooltip)
-->{{#if:{{{3|}}} <!-- (If {{{3}}} supplied...
-->| {{#ifeq:{{{3|}}}| |<!-- ...then if {{{3}}} isn't nothing,
-->| {{#ifeq:{{{end|{{{reason|}}}}}}| |– |&#59;&#32;}}<!-- add {{{end}}} (if supplied))
-->{{#switch:{{{end|{{{reason|}}}}}}
| d | d. | died = {{abbr|d.|died}}&nbsp;
| div | div. | divorced = {{abbr|div.|divorced}}&nbsp;
| w | w. | wid | wid. | widow | widowed = {{main other|[[Category:Marriage template errors]]}}{{abbr|wid.|widowed}}&nbsp;
| = <!--(reason marriage ended not supplied)-->
| #default = {{{end|{{{reason|}}}}}}&nbsp;
}} }}<!--
-->{{#ifeq:{{{end|{{{reason|}}}}}}|
<!----------Adding third parameter (end date) if {{{end}}} not supplied:--------->
| {{#ifexpr:(floor({{#time:Y|{{{3|}}}}}/100))-(floor({{#time:Y|{{{2|}}}}}/100))=0
| {{#ifeq:{{{3|}}}|{{get year|{{{3|}}}}}
| {{padleft: {{#expr:{{#time:Y|{{{3|}}}}}-(floor({{#time:Y|{{{2|}}}}}/100))*100}} |2 |0 }}
| {{abbr|1={{padleft: {{#expr: {{#time:Y|{{{3|}}}}}-(floor({{#time:Y|{{{2|}}}}}/100))*100 }} |2 |0 }} |2={{{3|}}} }}
}}
| {{#ifeq:{{{3|}}}|{{get year|{{{3|}}}}} |{{{3|}}}
| {{abbr|1={{get year|{{{3|}}}}} |2={{{3|}}} }}
}} }}
<!----------Adding third parameter (end date) if {{{end}}} supplied:--------->
| {{#ifeq:{{{3|}}}|{{get year|{{{3|}}}}} |{{{3|}}}
| {{abbr|1={{get year|{{{3|}}}}} |2={{{3|}}} }}
}} }}
|
}}<!--
-->)<!-- (Close parenthesis carrying marriage data)
-->{{#switch:{{{()|}}} |small|smaller=</span>}} <!-- (End smaller size (if |()=small[er]))
-->}}<!--
--></span><!--
--></includeonly><noinclude>{{Documentation}}</noinclude>
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.