Difference between revisions of "Template:Infobox military person"

From The League Wiki
Jump to navigation Jump to search
Template>Ergo Sum
(add alma_mater parameter per talk page discussion)
 
(fix {{text}} appearing when honorific_suffix is not used)
 
(16 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{Infobox
 
{{Infobox
| child       = {{lc:{{{embed}}}}}
+
| child     = {{#ifeq:{{{child|{{{embed|}}}}}}|yes|yes}}
  
 
| bodyclass    = vcard
 
| bodyclass    = vcard
 
| bodystyle    = {{WPMILHIST Infobox style|{{#switch:{{{width_style|}}}|narrow|person|auto=main_box_raw_auto_width|wide|military|#default=main_box_raw}}}}
 
| bodystyle    = {{WPMILHIST Infobox style|{{#switch:{{{width_style|}}}|narrow|person|auto=main_box_raw_auto_width|wide|military|#default=main_box_raw}}}}
  
| title        = {{#ifeq:{{lc:{{{embed}}}}}|yes|{{if empty|{{{embed_title|}}}|'''Military career'''}}}}
+
| subheaderstyle = font-weight:bold;
 +
| subheader    = <center>{{#ifeq:{{lc:{{{embed}}}}}|yes|{{if empty|{{{embed_title|}}}|Military career}}}}</center>
 
| decat        = yes <!-- remove from template:infobox tracking categories -->
 
| decat        = yes <!-- remove from template:infobox tracking categories -->
  
 
| above        = {{br separated entries
 
| above        = {{br separated entries
  |1={{#if:{{{honorific prefix|{{{honorific_prefix|}}}}}}|<div class="honorific-prefix" style="font-size: 77%; font-weight: normal;display:inline;">{{{honorific prefix|{{{honorific_prefix|}}}}}}</div>}}
+
  |1={{#if:{{{honorific prefix|{{{honorific_prefix|}}}}}}|<div class="honorific-prefix" style="font-size: 77%; font-weight: normal;display:inline-block;">{{{honorific prefix|{{{honorific_prefix|}}}}}}</div>}}
  |2={{#if:{{{name|<includeonly>{{PAGENAME}}</includeonly>}}}|<div style="display:inline" class="fn">{{{name|{{PAGENAMEBASE}}}}}</div>}}
+
  |2={{font|size=120%|{{#if:{{{name|<includeonly>{{PAGENAME}}</includeonly>}}}|<div style="display:inline" class="fn">{{{name|{{PAGENAMEBASE}}}}}</div>}}}}
 
  |3={{#if:{{{honorific suffix|{{{honorific_suffix|}}}}}}|<div class="honorific-suffix" style="font-size: 77%; font-weight: normal;display:inline;">{{{honorific suffix|{{{honorific_suffix|}}}}}}</div>}}
 
  |3={{#if:{{{honorific suffix|{{{honorific_suffix|}}}}}}|<div class="honorific-suffix" style="font-size: 77%; font-weight: normal;display:inline;">{{{honorific suffix|{{{honorific_suffix|}}}}}}</div>}}
 
  }}
 
  }}
 
| abovestyle  = {{WPMILHIST Infobox style|header_color}}  
 
| abovestyle  = {{WPMILHIST Infobox style|header_color}}  
  
| image        = {{#if:{{{image|}}}
+
| image        = <center>{{#if:{{{image|}}}
 
   |{{#ifeq:{{Str left | {{{image|}}} | 1 }}|[|{{main other|[[Category:Infobox military person image param needs updating]]}}}}{{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{{image_size|}}}|sizedefault=frameless|upright={{{image_upright|1}}}|alt={{{alt|}}}|suppressplaceholder=yes}}  
 
   |{{#ifeq:{{Str left | {{{image|}}} | 1 }}|[|{{main other|[[Category:Infobox military person image param needs updating]]}}}}{{#invoke:InfoboxImage|InfoboxImage|image={{{image|}}}|size={{{image_size|}}}|sizedefault=frameless|upright={{{image_upright|1}}}|alt={{{alt|}}}|suppressplaceholder=yes}}  
 
   |{{#if:{{{medal|}}}
 
   |{{#if:{{{medal|}}}
 
   |{{#ifeq:{{Str left | {{{medal|}}} | 1 }}|[|{{main other|[[Category:Infobox military person image param needs updating]]}}}}{{#invoke:InfoboxImage|InfoboxImage|image={{{medal|}}}|size={{{medal_size|}}}|sizedefault=frameless|upright={{{medal_upright|0.4}}}|alt={{{medal_alt|}}}|suppressplaceholder=yes}}  
 
   |{{#ifeq:{{Str left | {{{medal|}}} | 1 }}|[|{{main other|[[Category:Infobox military person image param needs updating]]}}}}{{#invoke:InfoboxImage|InfoboxImage|image={{{medal|}}}|size={{{medal_size|}}}|sizedefault=frameless|upright={{{medal_upright|0.4}}}|alt={{{medal_alt|}}}|suppressplaceholder=yes}}  
 
   }}
 
   }}
   }}
+
   }}</center>
 
| imagestyle  = border-bottom: {{WPMILHIST Infobox style|section_border}}; line-height: 1.5em
 
| imagestyle  = border-bottom: {{WPMILHIST Infobox style|section_border}}; line-height: 1.5em
  
| caption      = {{{caption|}}}
+
| caption      = <center>{{{caption|}}}</center>
 
| captionstyle = font-size: 100%
 
| captionstyle = font-size: 100%
  
Line 106: Line 107:
  
 
}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox military person with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox military person]] with unknown parameter "_VALUE_"|ignoreblank=y| allegiance | alma_mater | alt | awards | battles | battles_label | birth_date | birth_name | birth_place | branch | branch_label | caption | children | commands | death_date | death_place | embed | embed_title | homepage | honorific prefix | honorific suffix | honorific_prefix | honorific_suffix | image | image_size | image_upright | laterwork | medal | medal_size | medal_upright | medal_alt | memorials | module | name | native_name | native_name_lang | nickname | other_name | otherwork | placeofburial | placeofburial_coordinates | placeofburial_label | rank | rank_label | relations | servicenumber | serviceyears | serviceyears_label | signature | signature alt | signature_alt | signature_size | spouse | unit | unit_label | URL | website | width_style }}{{#if:{{both|{{{image|}}}|{{{medal|}}}}}|[[Category:Pages using infobox military person with both image and medal]]
 
}}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox military person with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox military person]] with unknown parameter "_VALUE_"|ignoreblank=y| allegiance | alma_mater | alt | awards | battles | battles_label | birth_date | birth_name | birth_place | branch | branch_label | caption | children | commands | death_date | death_place | embed | embed_title | homepage | honorific prefix | honorific suffix | honorific_prefix | honorific_suffix | image | image_size | image_upright | laterwork | medal | medal_size | medal_upright | medal_alt | memorials | module | name | native_name | native_name_lang | nickname | other_name | otherwork | placeofburial | placeofburial_coordinates | placeofburial_label | rank | rank_label | relations | servicenumber | serviceyears | serviceyears_label | signature | signature alt | signature_alt | signature_size | spouse | unit | unit_label | URL | website | width_style }}{{#if:{{both|{{{image|}}}|{{{medal|}}}}}|[[Category:Pages using infobox military person with both image and medal]]
}}<noinclude>{{documentation}}</noinclude>
+
}}{{main other|{{#if:{{{embed|}}}|[[Category:Pages using infobox military person with embed|{{#if:{{{embed_title|}}}|Τ}}{{FULLPAGENAME}}]]
 +
}}}}<noinclude>{{documentation}}</noinclude>

Latest revision as of 23:31, 29 December 2023

{{{text}}}