Difference between revisions of "User:Djonni/Template sandbox"

From GodWiki
Jump to: navigation, search
m (Example in documentation for sanity. highlighthex now DOES take leading # symbol. Changed default background color to light, neutral, boring grey. Styled subheader, support subheaderstyle, fixed a couple of style bugs.)
m (Experimental implementation of herolabel parameter.)
Line 1: Line 1:
 
{{infobox
 
{{infobox
 
| title = [[:Category:Gods|Deities]] of Godville
 
| title = [[:Category:Gods|Deities]] of Godville
| above = {{#if: {{{title|}}} | {{{title}}} }}{{#if: {{{name|}}} |{{{name}}} {{medal|hr = {{{temple|}}}{{{hr|}}}|zv = {{{breeder|}}}{{{animalist|}}}{{{zv|}}}|ar = {{{ark|}}}{{{ar|}}}|tr = {{{shop|}}}{{{tr|}}}|cm = {{{pairs|}}}{{{cm|}}}}}| {{God|{{PAGENAME}}|plain=yes|temple = {{{temple|}}}{{{hr|}}}|breeder = {{{breeder|}}}{{{animalist|}}}{{{zv|}}}|ark = {{{ark|}}}{{{ar|}}}|shop = {{{shop|}}}{{{tr|}}}|pairs = {{{pairs|}}}{{{cm|}}}}}}}{{#if: {{{postnomial|}}} | {{{postnomial}}}}}
+
| above = {{#if: {{{title|}}} | {{{title}}} }}{{#if: {{{name|}}} |{{{name}}}{{medal|hr = {{{temple|}}}{{{hr|}}}|zv = {{{breeder|}}}{{{animalist|}}}{{{zv|}}}|ar = {{{ark|}}}{{{ar|}}}|tr = {{{shop|}}}{{{tr|}}}|cm = {{{pairs|}}}{{{cm|}}}}}|{{God|{{PAGENAME}}|plain=yes|temple = {{{temple|}}}{{{hr|}}}|breeder = {{{breeder|}}}{{{animalist|}}}{{{zv|}}}|ark = {{{ark|}}}{{{ar|}}}|shop = {{{shop|}}}{{{tr|}}}|pairs = {{{pairs|}}}{{{cm|}}}}}}}{{#if: {{{postnomial|}}} | {{{postnomial}}}}}
 
| subheaderstyle = background: {{{captioncolor|{{{highlighthex|#F2F3F4}}}33}}}; border-bottom: 2px solid {{{bordercolor|#f8f9fa}}}; {{{subheaderstyle|}}}
 
| subheaderstyle = background: {{{captioncolor|{{{highlighthex|#F2F3F4}}}33}}}; border-bottom: 2px solid {{{bordercolor|#f8f9fa}}}; {{{subheaderstyle|}}}
 
| imagestyle = padding: 0; background: {{{imagecolor|{{{highlighthex|#F2F3F4}}}33}}}; border-bottom: 2px solid {{{bordercolor|#f8f9fa}}}; {{{imagestyle|}}}
 
| imagestyle = padding: 0; background: {{{imagecolor|{{{highlighthex|#F2F3F4}}}33}}}; border-bottom: 2px solid {{{bordercolor|#f8f9fa}}}; {{{imagestyle|}}}
Line 14: Line 14:
 
| image = {{Infobox image|{{{avatar|}}}}}
 
| image = {{Infobox image|{{{avatar|}}}}}
 
| caption = {{{caption|}}}
 
| caption = {{{caption|}}}
| label1 = Hero:
+
| label1 = {{#if: {{{herolabel|}}}|{{{herolabel}}}:|{{#if:{{{heroine|}}}|Heroine:|Hero:}}}}
| data1 = {{#if: {{{hero|}}}|[[{{{hero}}}]]}}
+
| data1 = {{#if: {{{hero|}}}|[[{{{hero}}}]]}}{{#if: {{{heroine|}}}|[[{{{heroine}}}]]}}
| label2 = Heroine:
 
| data2 = {{#if: {{{heroine|}}}|[[{{{heroine}}}]]}}
 
 
| label3 = Personality:
 
| label3 = Personality:
 
| data3 = {{{personality|}}}
 
| data3 = {{{personality|}}}
Line 62: Line 60:
 
|avatar = Moloch_the_god.gif
 
|avatar = Moloch_the_god.gif
 
|hero = Djonniboy
 
|hero = Djonniboy
 +
|herolabel = Champion
 
|gender = Divine
 
|gender = Divine
 
|guild = The Forsakens Lament
 
|guild = The Forsakens Lament
Line 86: Line 85:
 
|avatar = Moloch_the_god.gif
 
|avatar = Moloch_the_god.gif
 
|hero = Djonniboy
 
|hero = Djonniboy
 +
|herolabel = Champion
 
|gender = Divine
 
|gender = Divine
 
|guild = The Forsakens Lament
 
|guild = The Forsakens Lament
Line 175: Line 175:
 
;guild
 
;guild
 
:All as per existing {{tl|Usergod}}
 
:All as per existing {{tl|Usergod}}
 +
 +
;herolabel
 +
:If supplied, the contents of this parameter will replace either <code>Hero:</code> or <code>Heroine:</code> in the label column. So, for example, {{para|herolabel|Champion}} would result in <code>Champion: &nbsp; Djonniboy</code>
  
 
;domain
 
;domain

Revision as of 15:54, 14 October 2019

Deities of Godville
Djonni/Template sandbox 
📚 Documentation

Example, for editing and testing.

Deities of Godville
God Djonni/Template sandbox  the Great
This is a subheader.
Moloch_the_god.gif
This is a caption.
Champion: Djonniboy
Personality: Adjective
Gender: Divine
Domain: God of perfectly shaped spoons
Motto: In ƒor a penny!
⚜️Guild 
The Forsakens Lament
Guild position: Avatar of Lust; Daily Bugler
Guild rank: Patriarch
🏆Pantheons 
Gratitude: 19th
Might: 5000th
Templehood: 11162nd
Gladiatorship: 10000th
Storytelling: 3rd
{{User:Djonni/Template sandbox|
<!--|highlighthex = FFDD88-->
|title = God
<!--|name = Djonni-->
|postnomial = the Great
|subheader=This is a subheader.
|temple = 23rd of January, 2015
|animalist = 2nd of December, 2018
|ark = 2nd of March, 2019
|avatar = Moloch_the_god.gif
|hero = Djonniboy
|herolabel = Champion
|gender = Divine
|guild = The Forsakens Lament
|position = Avatar of Lust; Daily Bugler
|rank = Patriarch
|personality = Adjective 
|domain = God of perfectly shaped spoons
|motto = In ƒor a penny! [http://godvillegame.com/forums/show_topic/2481 ✔]
|gratitude = 19
|might = 5000
|templehood = 11162
|gladiatorship = 10000
|storytelling = 3
}}

Brief documentation of parameters.

This template is NOT stable. You're welcome to use and test it, but be aware, I may make changes without warning. If I do see anyone using it, I'll drop you a message on your talk page if something changes.

This is a list of pages (therefore users) that link to this page:

I have (hopefully) incorporated all variables used in {{Usergod}}, so that this can be a drop-in replacement. (TODO: examine the Usergod code to ensure I haven't missed any undocumented variables)

title
A title to place before the God's name. In my user page, |title=God
name
The name of the God. This is only required if the current {{PAGENAME}} is not the God's name. So, should basically never be needed, I expect.
All parameters of the {{medal}} template
These will correctly render as medals in {{God}}. Considering also creating an Achievements section below Pantheons which would show these somehow.
postnomial
A title for after the God's name. In my user page, |postnomial=the Great
subheader
As per {{infobox}}
highlighthex
This is a tricky/clever one which I know, with respect, that FeRDNYC will hate. Don't worry, I intend to implement a fuller set of colour and styling parameters! But honestly, take a look at the code. Clever, right? Single variable, and BAM, coherent colour scheme.
This parameter takes a six-character hex code for the highlight colour (headers, row labels), without a # in front, in RRGGBB format. For example, |highlighthex=FFBB88
headercolor
datacolor
Unstable These parameters can be used instead of |highlighthex=RRGGBB to specify a color for the headers and labels (with |headercolor=) and the data cells (with |datacolor=). These parameters will cause |highlighthex= to be ignored in the relevant places.
Any valid HTML color value can be set here. Hex values (including the leading #: #RRGGBB), color names (purple), etc.
bordercolor
If you must, you can.
subheaderstyle
imagestyle
captionstyle
abovestyle
belowstyle
navstyle
headerstyle
labelstyle
datastyle
Know CSS? Want to place your own custom CSS into any of these fields? Go ahead! The contents of these parameters will be passed directly to {{Infobox}} after the default styles, meaning that the values you supply here will overwrite and replace what comes before them. This will allow you to create your own interesting, spectaular, creative and horrible styles for your Usergod infobox. With great power comes greatly ugly infoboxes.
Below is the way the style parameters here are placed, for clarity:
| subheaderstyle = background: {{{captioncolor|{{{highlighthex|#F2F3F4}}}33}}}; border-bottom: 2px solid {{{bordercolor|#f8f9fa}}}; {{{subheaderstyle|}}}
| imagestyle = padding: 0; background: {{{imagecolor|{{{highlighthex|#F2F3F4}}}33}}}; border-bottom: 2px solid {{{bordercolor|#f8f9fa}}}; {{{imagestyle|}}}
| captionstyle = background: {{{captioncolor|{{{highlighthex|#F2F3F4}}}33}}}; border-bottom: 2px solid {{{bordercolor|#f8f9fa}}}; {{{captionstyle|}}}
| abovestyle = background: {{{headercolor|{{{highlighthex|#F2F3F4}}}}}}; border-bottom: 2px solid {{{bordercolor|#f8f9fa}}}; {{{abovestyle|}}}
| belowstyle = background: {{{headercolor|{{{highlighthex|#F2F3F4}}}}}}; border-bottom: 2px solid {{{bordercolor|#f8f9fa}}}; {{{belowstyle|}}}
| navstyle = background: {{{headercolor|{{{highlighthex|#F2F3F4}}}}}}; padding-right:0.5em; {{{navstyle|}}}
| headerstyle = background: {{{headercolor|{{{highlighthex|#F2F3F4}}}}}}; border-bottom: 2px solid {{{bordercolor|#f8f9fa}}}; {{{headerstyle|}}}
| labelstyle = background: {{{headercolor|{{{highlighthex|#F2F3F4}}}}}}; vertical-align: top; min-width: 8em; border-bottom: 2px solid {{{bordercolor|#f8f9fa}}}; {{{labelstyle|}}}
| datastyle = background: {{{datacolor|{{{highlighthex|#F2F3F4}}}33}}}; vertical-align: top; min-width: 12em; border-bottom: 2px solid {{{bordercolor|#f8f9fa}}}; {{{datastyle|}}}


avatar
As {{Usergod}}, except that for now this uses a placeholder image. I've since taken a took, and there are users of Usergod who haven't put avatar images in, so this will be changed.
caption
As per {{infobox}}
hero
heroine
personality
gender
motto
town
guild
All as per existing {{Usergod}}
herolabel
If supplied, the contents of this parameter will replace either Hero: or Heroine: in the label column. So, for example, |herolabel=Champion would result in Champion:   Djonniboy
domain
The God's "domain", their area of influence in the world.

Guild parameters

position
A position in a guild's organisation.
rank
Guild rank

Pantheon parameters

gratitude
might
templehood
gladiatorship
storytelling
Unstable Currently, these parameters take just the position number. This may (probably will) be changed somehow.