Template:Depticon: Difference between revisions

From Yogstation-13
Jump to navigation Jump to search
(Created a template for department-icons to use in tables)
 
(Fixed bug: Missing size-parameter broke link-title)
Line 1: Line 1:
<includeonly>{{#if: {{{rd|}}}|{{click|img=Depticon minskyrd.png|link=Jobs#Science|size={{{size}}}}}}}{{#if: {{{engi|}}}|{{click|img=Depticon minskyengi.png|link=Jobs#Engineering|size={{{size}}}}}|}}{{#if: {{{sec|}}}|{{click|img=Depticon minskysec.png|link=Jobs#Security|size={{{size}}}}}|}}{{#if: {{{med|}}}|{{click|img=Depticon minskymedicb.png|link=Jobs#Medical|size={{{size}}}}}|}}{{#if: {{{serv|}}}|{{click|img=Depticon nanotransen.png|link=Jobs#Service|size={{{size}}}}}|}}{{#if: {{{sup|}}}|{{click|img=Depticon minskycargo.png|link=Jobs#Supply|size={{{size}}}}}|}}</includeonly><noinclude>
<includeonly>{{#if: {{{rd|}}}|{{click|img=Depticon minskyrd.png|link=Jobs#Science|size={{#if: {{{size|}}}|{{{size}}}|32px}}}}}}{{#if: {{{engi|}}}|{{click|img=Depticon minskyengi.png|link=Jobs#Engineering|size={{#if: {{{size|}}}|{{{size}}}|32px}}}}|}}{{#if: {{{sec|}}}|{{click|img=Depticon minskysec.png|link=Jobs#Security|size={{#if: {{{size|}}}|{{{size}}}|32px}}}}|}}{{#if: {{{med|}}}|{{click|img=Depticon minskymedicb.png|link=Jobs#Medical|size={{#if: {{{size|}}}|{{{size}}}|32px}}}}|}}{{#if: {{{serv|}}}|{{click|img=Depticon nanotransen.png|link=Jobs#Service|size={{#if: {{{size|}}}|{{{size}}}|32px}}}}|}}{{#if: {{{sup|}}}|{{click|img=Depticon minskycargo.png|link=Jobs#Supply|size={{#if: {{{size|}}}|{{{size}}}|32px}}}}|}}</includeonly><noinclude>


== About ==
== About ==

Revision as of 09:00, 20 April 2020


About

Clickable icon for jobs / departments, intended for use in tables like Guide to Research and Development.

Parameter-Usage

Parameters were named for compact use in tables.

Parameter Example Description
size 64px Optional, icon-size. Default: 32px
rd y Optional, department-switch (R&D). Make sure to set a non-empty value. Do not combine with other switches.
engi y Optional, department-switch (Engineering). Make sure to set a non-empty value. Do not combine with other switches.
sec y Optional, department-switch (Security). Make sure to set a non-empty value. Do not combine with other switches.
med y Optional, department-switch (Medical). Make sure to set a non-empty value. Do not combine with other switches.
serv y Optional, department-switch (Service). Make sure to set a non-empty value. Do not combine with other switches.
sup y Optional, department-switch (Supply). Make sure to set a non-empty value. Do not combine with other switches.

Beware: There is no fallback if no department-switch is provided.

Examples

Minimal

{{Depticon|rd=y}}

Depticon minskyrd.png

Adjusted icon-size

{{Depticon
|rd=y
|size=48px
}}

Depticon minskyrd.png

Different departments

Code Example
{{Depticon|rd=y}}
Depticon minskyrd.png
{{Depticon|engi=y}}
Depticon minskyengi.png
{{Depticon|sec=y}}
Depticon minskysec.png
{{Depticon|med=y}}
Depticon minskymedicb.png
{{Depticon|serv=y}}
Depticon nanotransen.png
{{Depticon|sup=y}}
Depticon minskycargo.png

Wrong use: Missing department

{{Depticon}}


Wrong use: Multiple departments

{{Depticon
|engi=y
|med=y
}}

Depticon minskyengi.pngDepticon minskymedicb.png