• Welcome to Touhou Wiki!
  • Registering is temporarily disabled. Check in our Discord server to request an account and for assistance of any kind.

Template talk:Navbox

From Touhou Wiki
Jump to navigation Jump to search

About Navbox

OK, now we have navbox so this makes edit easier, but the code seems a bit "dirty", mind someone cleanup it? - KyoriAsh 18:09, December 8, 2009 (UTC)

Switching to Lua

Well, I guess it won't get better without some serious testing.

I'd like to ask for replacing the content with

{{#invoke:navbox|buildNavboxTemplate}}<noinclude>
{{Documentation}}
</noinclude>

I hope there won't be any problems.

The Lua version adds new optional param:

| type = [game|music|printwork]

When unspecified or invalid, the colors of navbox are defined by Common.css. When valid, the navbox is styled according to table defined at the very beginning of Module:Navbox (table generated by script):

List of colors in order from darkest to brigthest one
"type"titleabove, belowgroup,
sub-above/below
sub-groupdark backgroundbackground
printwork#DDE6FF#E1E7FF#E6E9FF#EAECFF#EDF2FF#F4F9FF
music#FFF3B4#FFF6C0#FFF7C8#FFF8D0#FFFBE4#FFFBEE
game#FFC9C2#FFD1CA#FFD9D2#FFE1DA#FFEEE8#FFF4EE

If you're going to use the type param after all, I'd recommend to switch from using {{Navbox subgroup}} to {{Navbox|child}} for the subgroups.

Edit: Actually I'd recommend to switch it anyway, since the {{Navbox subgroup}} again limits the number of params. I'll try to modify the script to make it possible to replace the content of {{Navbox subgroup}} instead of editing all the templates.

And yeah... No intended, undocumented features this time :p

• DennouNeko–[

talk
contribs

08:25, 31 December 2012 (EST)

It seems that subgroups should work too.
New content for {{Navbox subgroup}}:

{{#invoke:navbox|buildNavboxSubgroupTemplate}}<noinclude>
{{Documentation}}
</noinclude>

It also accepts same optional param type. If set for main navbox, should be set to same type for all the subgroups.

• DennouNeko–[

talk
contribs

08:49, 31 December 2012 (EST)

Switched in the Lua code into both templates. Momiji (talk) 00:19, 28 January 2013 (EST)