Difference between revisions of "Template:Honor infobox"
From Pathfinder Wiki
DesignerThan (talk | contribs) |
DesignerThan (talk | contribs) m (Reverted edits by DesignerThan (talk) to last revision by W126jep) Tag: Rollback |
||
Line 3: | Line 3: | ||
==Mechanics== | ==Mechanics== | ||
− | The mechanics are just opaque magic (sorry). | + | The mechanics are just opaque magic (sorry). And Examples won't work because the template gets the honorname from the page title. |
==Example== <!--T:3--> | ==Example== <!--T:3--> | ||
<div class="toccolours"> | <div class="toccolours"> | ||
− | |||
:<nowiki>{{</nowiki>Honor infobox<br/> | :<nowiki>{{</nowiki>Honor infobox<br/> | ||
− | ::| | + | ::|honorname=Camping Skills IV<br/> |
::|skill=2<br/> | ::|skill=2<br/> | ||
::|year=2001<br/> | ::|year=2001<br/> | ||
Line 18: | Line 17: | ||
::|master1=Wilderness<br/> | ::|master1=Wilderness<br/> | ||
:}} | :}} | ||
− | <nowiki> | + | :<nowiki>{{</nowiki>Honor infobox<br/> |
− | </ | + | ::|honorname=Camping Skills IV |
− | + | :}} | |
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | }} | ||
</div> | </div> | ||
+ | |||
<!--T:4--> | <!--T:4--> | ||
[[Category:UsesLoops]]</noinclude> | [[Category:UsesLoops]]</noinclude> | ||
Line 40: | Line 30: | ||
}}|{{#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"> | ||
− | { | + | {| class="honor-infobox" style="table-layout: fixed; width: 100%;" |
− | | | + | |- |
− | | | + | |colspan="2" id="infobox-title"|{{GetHonorName}} |
− | | | + | |- |
− | | | + | | colspan="2" |[[AY Honors/{{#var:localCategory}}{{GetLangSuffix}}|{{Localize|{{#var:localCategory}}}}]] |
+ | |- | ||
+ | |colspan="2" style="padding: .5rem 2rem;"| | ||
+ | {{#if:{{{insignia_source|{{GetHonorMetaData|language=/en|parameter=insignia_source}}}}} | ||
|{{Superimpose | |{{Superimpose | ||
| base = {{#var:patch}} | | base = {{#var:patch}} | ||
| base_width = 100% | | base_width = 100% | ||
| base_max_width = 150px | | base_max_width = 150px | ||
− | | float = {{ | + | | float = {{#lst:Localization:All{{GetLangSuffix}}|Not available at AdventSource}} |
| float_width = 170px | | float_width = 170px | ||
| align=center | | align=center | ||
Line 62: | Line 55: | ||
}} | }} | ||
}} | }} | ||
− | | | + | |- |
− | + | | colspan="2" class="infobox-value text-light bg-secondary" |<span class="infobox-value-emphasize">{{Localize|Skill Level}}</span><br>{{Honor infobox/echoSkillLevel | skill={{{skill|{{GetHonorMetaData|parameter=skill}}}}}}} | |
− | | | + | |- |
− | + | | class="infobox-value text-light bg-secondary" | <span class="infobox-value-emphasize">{{Localize|Approval authority}}</span><br>{{#if:{{{authority|}}}|{{Localize|{{{authority}}}|Authorities}}|{{GetHonorMetaData|parameter=authority}}}} | |
− | | | + | | class="infobox-value text-light bg-secondary" | <span class="infobox-value-emphasize">{{Localize|Year of Introduction}}</span><br> |
− | + | {{#vardefine:localYear|{{{year|{{GetHonorMetaData|language=/en|parameter=year}}}}}}}{{#iferror:{{#expr:1+{{#var:localYear|X}} }}|{{Localize|Unknown}}|{{#var:localYear}} }} | |
− | | | + | {{#if:{{#var:locSeeAlsoLess}}|{{!}}- |
− | + | {{!}}colspan="2" id="infobox-part-of" class="infobox-value text-light bg-secondary" {{!}}<span class="infobox-value-emphasize">{{Localize|See also}}</span><br> | |
− | + | {{#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:{{!}}- | |
− | + | {{!}} colspan="2" {{!}}<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> |
− | } | ||
− | </div> | ||
</includeonly> | </includeonly> |
Revision as of 03:39, 30 January 2022
This template creates an infobox for an honor.
Mechanics
The mechanics are just opaque magic (sorry). And Examples won't work because the template gets the honorname from the page title.
Example
- {{Honor infobox
- |honorname=Camping Skills IV
- |skill=2
- |year=2001
- |category=Recreation
- |authority=General Conference
- |insignia=Camping_Skills_IV.png
- |insignia_source=foo
- |master1=Wilderness
- |honorname=Camping Skills IV
- }}
- {{Honor infobox
- |honorname=Camping Skills IV
- }}