Difference between revisions of "Template:Honor infobox"
From Pathfinder Wiki
m (grammar and spelling) |
DesignerThan (talk | contribs) (implement Template:Infobox and make Examples possible) |
||
Line 3: | Line 3: | ||
==Mechanics== | ==Mechanics== | ||
− | The mechanics are just opaque magic (sorry) | + | The mechanics are just opaque magic (sorry). |
==Example== <!--T:3--> | ==Example== <!--T:3--> | ||
<div class="toccolours"> | <div class="toccolours"> | ||
+ | <nowiki><div style="max-width: 300px"></nowiki> | ||
:<nowiki>{{</nowiki>Honor infobox<br/> | :<nowiki>{{</nowiki>Honor infobox<br/> | ||
− | ::| | + | ::|honorlandingpage=AY Honors/Camping Skills IV<br/> |
::|skill=2<br/> | ::|skill=2<br/> | ||
::|year=2001<br/> | ::|year=2001<br/> | ||
Line 17: | Line 18: | ||
::|master1=Wilderness<br/> | ::|master1=Wilderness<br/> | ||
:}} | :}} | ||
− | + | <nowiki></div></nowiki> | |
− | : | + | </div> |
− | + | <div style="max-width: 300px"> | |
+ | {{Honor infobox | ||
+ | |honorlandingpage=AY Honors/Camping Skills IV | ||
+ | |skill=2 | ||
+ | |year=2001 | ||
+ | |category=Recreation | ||
+ | |authority=General Conference | ||
+ | |insignia=Camping_Skills_IV.png | ||
+ | |insignia_source=foo | ||
+ | |master1=Wilderness | ||
+ | }} | ||
</div> | </div> | ||
− | |||
<!--T:4--> | <!--T:4--> | ||
[[Category:UsesLoops]]</noinclude> | [[Category:UsesLoops]]</noinclude> | ||
Line 30: | Line 40: | ||
}}|{{#lst:Localization:All{{GetLangSuffix}}|No Patch}}}}}} | }}|{{#lst:Localization:All{{GetLangSuffix}}|No Patch}}}}}} | ||
<templatestyles src="Honor infobox/style.css" /><div class="mw-parser-output noprint"> | <templatestyles src="Honor infobox/style.css" /><div class="mw-parser-output noprint"> | ||
− | {| | + | {{Infobox |
− | | | + | |bodyclass=honor-infobox |
− | | | + | |above={{GetHonorName|page={{{honorlandingpage|}}}}} |
− | | | + | |subheader=[[AY Honors/{{#var:localCategory}}{{GetLangSuffix}}|{{Localize|{{#var:localCategory}}}}]] |
− | + | |image={{#if:{{{insignia_source|{{GetHonorMetaData|language=/en|parameter=insignia_source}}}}} | |
− | | | ||
− | |||
− | {{#if:{{{insignia_source|{{GetHonorMetaData|language=/en|parameter=insignia_source}}}}} | ||
|{{Superimpose | |{{Superimpose | ||
| base = {{#var:patch}} | | base = {{#var:patch}} | ||
Line 55: | Line 62: | ||
}} | }} | ||
}} | }} | ||
− | | | + | |col1_label1={{Localize|Skill Level}} |
− | + | |col1_data1={{Honor infobox/echoSkillLevel | skill={{{skill|{{GetHonorMetaData|parameter=skill}}}}}}} | |
− | | | + | |col1_label2={{Localize|Approval authority}} |
− | + | |col1_data2={{#if:{{{authority|}}}|{{Localize|{{{authority}}}|Authorities}}|{{GetHonorMetaData|parameter=authority}}}} | |
− | | | + | |col2_label2={{Localize|Year of Introduction}} |
− | {{#vardefine:localYear|{{{year|{{GetHonorMetaData|language=/en|parameter=year}}}}}}}{{#iferror:{{#expr:1+{{#var:localYear|X}} }}|{{Localize|Unknown}}|{{#var:localYear}} }} | + | |col2_data2={{#vardefine:localYear|{{{year|{{GetHonorMetaData|language=/en|parameter=year}}}}}}}{{#iferror:{{#expr:1+{{#var:localYear|X}} }}|{{Localize|Unknown}}|{{#var:localYear}} }} |
− | + | |rowclass3=honor-infobox-seeAlso | |
− | + | |col1_label3={{Localize|See also}} | |
− | {{#var:locSeeAlsoLess}}{{#if: {{#var:locSeeAlsoMore}}| | + | |col1_data3={{#var:locSeeAlsoLess}}{{#if: {{#var:locSeeAlsoMore}}| |
<div id="infobox-see-also" class="mw-collapsible mw-collapsed" data-expandtext="{{Localize|More}}" data-collapsetext="{{Localize|Less}}"><br> | <div id="infobox-see-also" class="mw-collapsible mw-collapsed" data-expandtext="{{Localize|More}}" data-collapsetext="{{Localize|Less}}"><br> | ||
{{#var:locSeeAlsoMore}} | {{#var:locSeeAlsoMore}} | ||
− | </div> | + | </div>}} |
− | {{#ifsysop: | + | |col1_noDefaultStyle4=true |
− | + | |col1_data4={{#ifsysop:<div class="dropdown"><htmltag tagname="button" class="btn btn-accent dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{{Localize|Downloads}}</htmltag><div class="dropdown-menu" aria-labelledby="dropdownMenuButton"><htmltag tagname="a" href="{{fullurl:{{#titleparts:{{PAGENAME}}|2|1}}/Requirements{{GetLangSuffix}}|action=mpdf}}" class="dropdown-item">{{Localize|Requirements}} | |
</htmltag><htmltag tagname="a" href="{{fullurl:{{#titleparts:{{PAGENAME}}|2|1}}/Answer Key{{GetLangSuffix}}|action=mpdf}}" class="dropdown-item">{{Localize|Answer Key}}</htmltag></div></div>|}} | </htmltag><htmltag tagname="a" href="{{fullurl:{{#titleparts:{{PAGENAME}}|2|1}}/Answer Key{{GetLangSuffix}}|action=mpdf}}" class="dropdown-item">{{Localize|Answer Key}}</htmltag></div></div>|}} | ||
− | |}</div> | + | |col1_class4=honor-infobox-button |
+ | }} | ||
+ | </div> | ||
</includeonly> | </includeonly> |
Revision as of 20:43, 14 January 2022
This template creates an infobox for an honor.
Mechanics
The mechanics are just opaque magic (sorry).
Example
<div style="max-width: 300px">
- {{Honor infobox
- |honorlandingpage=AY Honors/Camping Skills IV
- |skill=2
- |year=2001
- |category=Recreation
- |authority=General Conference
- |insignia=Camping_Skills_IV.png
- |insignia_source=foo
- |master1=Wilderness
- |honorlandingpage=AY Honors/Camping Skills IV
- }}
</div>