Шаблон:JobPageHeader: различия между версиями

Материал из SS220 Skyrat Wiki (SS13)
Перейти к навигации Перейти к поиску
imported>Drewdebonten
(Created page with "<noinclude><code> </noinclude>{|width="100%" cellspacing="0" cellpadding="2" |bgcolor="{{{headerbgcolor|#bbbbbb}}}" align="center" colspan=2|<font color="{{{headerfontcolor|#0...")
 
imported>Quacks
(Overhauled the styling of this template)
Строка 1: Строка 1:
<noinclude><code>
<div style="box-shadow: 0 0 .3em #999; border-radius: .2em; margin: 1em 0 1em 0; padding: 1px;">
</noinclude>{|width="100%" cellspacing="0" cellpadding="2"
<div style="background: #{{{colour|444444}}}; border-radius: .2em; color: {{{hcolour}}}; padding: .4em .8em .5em;"><center>'''{{{stafftype}}}'''</center></div>
|bgcolor="{{{headerbgcolor|#bbbbbb}}}" align="center" colspan=2|<font color="{{{headerfontcolor|#000000}}}">'''{{{stafftype|UNDEFINED}}} STAFF'''</font>
<div style="padding: .15em 0 .15em; overflow: auto; align-items: stretch; display: flex;">
|-
<div style="background: #{{{colour|#444444}}}1e; border-radius: .2em;; padding: .4em .4em .4em; font-size: 1.2em; line-height:1.2em; width: 10%"><center>[[File:{{{img}}}|64px|class=pixelart]]<br>
|width = 150 align=center bgcolor="{{{imagebgcolor|#cccccc}}}"|{{#if:{{{img_generic|}}}| [[File:{{{img_generic|{{{jobtitle}}}.png}}}|64px]] | }} {{#if:{{{img|}}}| [[File:{{{img|{{{jobtitle}}}.png}}}|64px]] | }} {{#if:{{{img|}}} | <br> | {{#if:{{{img_generic|}}} | <br> | }} }} '''{{{jobtitle|Job}}}'''
<div style="background: #{{{bcolour|#444444}}}; border-radius: .2em; color: {{{bhcolour}}}; padding: .4em .4em .4em; line-height:1.2em;"><center><span style="font-weight: bold;">{{{jobtitle|Job}}}</span></center></div></center></div>
|'''Access:''' {{{access|Not defined}}}<br> {{#if:{{{additional|}}}|'''[[Terminology#Additional_Access | Additional Access]]:''' {{{additional|Not defined}}}<br>|}}'''Difficulty:''' {{{difficulty|Not defined}}}<br>'''Supervisors:''' {{{superior|Not defined}}}<br>'''Duties:''' {{{duties|Not defined}}}<br>'''Guides:''' {{{guides|Not defined}}} {{#if: {{{quote|}}} | <br>'''Quote:''' ''{{{quote}}}''}}
<div style="background: #{{{ebcolour|#444444}}}1e; border-radius: .2em;; padding: .4em .4em .4em; line-height:1.2em; width:90%; float: right; margin:.15em;"><div style="float:left; padding: 0 .1em 0">
|}
'''Superiors:''' {{{superior|Not defined}}}
<noinclude></code>
<br>'''Difficulty:''' {{{difficulty|Not defined}}}
<br>'''Guides:''' {{{guides|Not defined}}}
<br>'''Access:''' {{{access|Not defined}}}
<br>'''Duties:''' {{{duties|Not defined}}}
</div></div></div></div>
<noinclude>
This template is intended to be at the top of each of the jobs pages to provide a basic overview of each job.
This template is intended to be at the top of each of the jobs pages to provide a basic overview of each job.


== Meaning of parameters ==
== Meaning of parameters ==


'''headerbgcolor''' is the background color of the upper part which spans the entire width of the screen. This should be a dark color.<br>
'''colour''' is the background color of the header. This will also set the image background colour automatically.<br>
'''headerfontcolor''' is the font color of the same part as headerbgcolor<br>
'''hcolour''' is the font colour for the header. It accepts plaintext colours only.<br>
'''bcolour''' is the color for the job title box.<br>
'''bhcolour''' is the text color for the job title.<br>
'''ebcolour''' is the background color for the section that holds the guides and other info.<br>
'''stafftype''' is the word that is added before STAFF. So adding the word MAINTENANCE here yields MAINTENANCE STAFF. Intended to be in caps.<br>
'''stafftype''' is the word that is added before STAFF. So adding the word MAINTENANCE here yields MAINTENANCE STAFF. Intended to be in caps.<br>
'''imagebgcolor''' is the background color of the space behind the image and the job title. this should be a light color as the job title is always black.<br>
'''img''' Sets the file without the need for the <nowiki>[[File:]]</nowiki> command. The extension and size modifier must still be specified.<br>
'''img''' is the in-action image file, without the "File:" or "Image:" prefix. (see examples below)
'''jobtitle, access, difficulty, guides and duties''' are self-explanatory.
'''img_generic''' is the generic image file, without the "File:" or "Image:" prefix. (see examples below)
'''jobtitle, access, difficulty, guides and duties''' are self-explanatory. '''quote''' will only show if the parameter is specified


== Usage ==
== Usage ==
Example of the finished product. Check the source code for the code that generated the thing below. Please document any changes you make to the template code in the parameters and usage sections
Example of the finished product. Check the source code for the code that generated the thing below. Please document any changes you make to the template code in the parameters and usage sections
No image defined:
{{JobPageHeader
|headerbgcolor = darkblue
|headerfontcolor = white
|stafftype = COMMAND
|imagebgcolor = lightblue
|jobtitle = Captain
|access = All
|additional = N/A
|difficulty = Very hard
|superior = Space Law and Nanotrasen Officials
|duties = Command the ship, protect the nuke disk, stop revolutions, get killed for all mentioned before.
|guides = no separate guides
|quote = Look at me, I am the captain now.
}}
Only in-action image defined:
{{JobPageHeader
|headerbgcolor = darkblue
|headerfontcolor = white
|stafftype = COMMAND
|imagebgcolor = lightblue
|img = Captain_action.png
|jobtitle = Captain
|access = All
|additional = N/A
|difficulty = Very hard
|superior = Space Law and Nanotrasen Officials
|duties = Command the ship, protect the nuke disk, stop revolutions, get killed for all mentioned before.
|guides = no separate guides
}}
Only generic image defined:
{{JobPageHeader
|headerbgcolor = darkblue
|headerfontcolor = white
|stafftype = COMMAND
|imagebgcolor = lightblue
|img_generic = Generic_captain.png
|jobtitle = Captain
|access = All
|additional = N/A
|difficulty = Very hard
|superior = Space Law and Nanotrasen Officials
|duties = Command the ship, protect the nuke disk, stop revolutions, get killed for all mentioned before.
|guides = no separate guides
}}
Both images defined:


{{JobPageHeader
{{JobPageHeader
|headerbgcolor = darkblue
|colour = 265473
|headerfontcolor = white
|hcolour = #FFB300
|stafftype = COMMAND
|bcolour = 265473
|imagebgcolor = lightblue
|bhcolour = #FFB300
|img = Captain_action.png
|ebcolour = 265473
|img_generic = Generic_captain.png
|img = Generic_captain.png
|jobtitle = Captain
|stafftype = COMMAND
|access = All
|jobtitle = Captain
|additional = N/A
|access = All
|difficulty = Very hard
|difficulty = Very hard
|superior = Space Law and Nanotrasen Officials
|superior = Space Law and Nanotrasen Officials
|duties = Command the ship, protect the nuke disk, stop revolutions, get killed for all mentioned before.
|duties = Command the ship, protect the nuke disk, stop revolutions, get killed for all mentioned before.
|guides = no separate guides
|guides = no separate guides
}}
}}


[[Category:Templates]]
[[Category:Templates]]
</noinclude>
</noinclude>

Версия от 13:08, 28 декабря 2021

{{{stafftype}}}
[[File:{{{img}}}|64px|class=pixelart]]
Job

Superiors: Not defined
Difficulty: Not defined
Guides: Not defined
Access: Not defined
Duties: Not defined

This template is intended to be at the top of each of the jobs pages to provide a basic overview of each job.

Meaning of parameters

colour is the background color of the header. This will also set the image background colour automatically.
hcolour is the font colour for the header. It accepts plaintext colours only.
bcolour is the color for the job title box.
bhcolour is the text color for the job title.
ebcolour is the background color for the section that holds the guides and other info.
stafftype is the word that is added before STAFF. So adding the word MAINTENANCE here yields MAINTENANCE STAFF. Intended to be in caps.
img Sets the file without the need for the [[File:]] command. The extension and size modifier must still be specified.
jobtitle, access, difficulty, guides and duties are self-explanatory.

Usage

Example of the finished product. Check the source code for the code that generated the thing below. Please document any changes you make to the template code in the parameters and usage sections

COMMAND
Generic captain.png
Captain

Superiors: Space Law and Nanotrasen Officials
Difficulty: Very hard
Guides: no separate guides
Access: All
Duties: Command the ship, protect the nuke disk, stop revolutions, get killed for all mentioned before.