User:Djonni/Template sandbox

From GodWiki
< User:Djonni
Revision as of 08:06, 15 October 2019 by Djonni (talk | contribs) (Updating docs to reflect progress and tweaks in behaviour that didn't get documented as I did them. Also laid out some notes for next steps and future possibilities.)
Jump to: navigation, search
Deities of Godville
Djonni/Template sandbox 
📚 Documentation

Example, for editing and testing.



{{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! [ ✔]
|gratitude = e
|might = pi
|templehood = 1.5
|gladiatorship = 1/3
|storytelling = test
|nocat = yes

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. (Tick.png Done: examine the Usergod code to ensure I haven't missed any undocumented variables)

Basic parameters

A title to place before the God's name. In my user page, |title=God
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}}, and will also appear after {{{name}}}. Considering also creating an Achievements section below Pantheons which would show these somehow. (TODO: This isn't really all parameters yet.)
A title for after the God's name. In my user page, |postnomial=the Great
As per {{infobox}}
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.
As per {{infobox}}
All as per existing {{Usergod}}
If supplied, the contents of this parameter will replace Hero: or Heroine: in the label column. So, for example, |herolabel=Champion would result in Champion:   Djonniboy
The God's "domain", their area of influence in the world.

Colour and style

Unstable This is a tricky/clever one which I know, with respect, that FeRDNYC will hate (made this saner). Don't worry, I intend to implement a fuller set of colour and styling parameters (Tick.png Done)! 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), with a # in front, in #RRGGBB format. For example, |highlighthex=#FFBB88.
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.
If you must, you can.
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|}}}

Guild parameters

A position in a guild's organisation.
Guild rank

Pantheon parameters

Unstable If these parameters are given a numeric value (for example, |might=1234), they will display a link to the pantheon position by calling {{Pantheon link|text=none|plain=yes|pantheon|number}}, like so: 1234th. If provided with any non-numeric value, the value of the parameter will be displayed exactly as given. So, if |might=text or templates, the cell will display text or templates.
If set to any value, the template will not apply [[Category:Gods]] to the page in which it appears. The default behaviour for the template is to correctly categorise the page.

Next steps

Notey.png Feedback required

I intend to add:

  • Styling parameters that can set apart the Guild and Pantheons sections with their own highlighthex and style parameters. E.g., |pantheonhighlighthex=#AABBCC, or |pantheonheadercolor=lightblue, etc etc.
  • A set of |transparent=yes, |transparentheaders=yes, |transparentdata=yes which will make all/header/data cells transparent. The cells in the current Usergod are transparent, and some user put background patterns etc behind them. This template should allow people to make whatever cool, or ugly, or horrible style combinations that they want, and not ruin any existing layouts as far as possible. If they want to embed Usergod inside a <div>...</div> with a rainbow background, go for it.

I may still add:

  • Additional pantheons (short term, but not guild)
  • Achievements, see my rambling on talk page that mostly makes sense only to me.

Long-term goals:

  • Rework Template:Hero as well, and then consider the feasibility of WardPhoenix's suggestion to allow hero parameters in this template (probably best implemented through Template:Infobox#Subbox, and therefore part of redesign considerations for {{Hero}}).
  • And if we're going down that route, with {{Hero}} usable in a subbox of {{Usergod}}, why not break out a new {{Pet}} template that can become a subbox inside {{Hero}}? And, hell, while we're at it, why don't we have {{Ark}}, {{Lab-boss}}? With some planning and care, these can be made so they can be used stand-alone or be a sub-box within a superordinate template. (E.g., {{Ark|petname1=Nibbler|petclass1=Ballpoint Penguin|petlevel1=35|...}})