Difference between revisions of "User:Murph"

From Kerbal Space Program Wiki
Jump to: navigation, search
m (Template:Versions: oops, cut & paste, not copy & paste…)
m (Template:Versions: Test version with default style and real lists instead of long lines)
Line 160: Line 160:
 
|list5      = {{if lang link|0.18.3}} {{pipe}} [[0.13.3|0.13.3 ({{Dict|old}})]]
 
|list5      = {{if lang link|0.18.3}} {{pipe}} [[0.13.3|0.13.3 ({{Dict|old}})]]
 
|below = {{if lang link|Version history|de=Versionsgeschichte|ru=История версий|fr=Historique des Versions|ja=バージョン履歴|ko=개발 연혁}}
 
|below = {{if lang link|Version history|de=Versionsgeschichte|ru=История версий|fr=Historique des Versions|ja=バージョン履歴|ko=개발 연혁}}
 +
}}
 +
 +
===== Test version with default style and real lists instead of long lines =====
 +
{{/Template:Navbox
 +
| name      = Versions
 +
| title      = {{if lang link|Version history|en=Kerbal Space Program versions|ru=версии KSP|fr=Versions de Kerbal Space Program|ja=Kerbal Space Program のバージョン|ko=커발 스페이스 프로그램의 버전}}
 +
| bodyclass  = versions
 +
| listclass  = hlist
 +
| state      = {{{state|}}}
 +
 +
| group1    = {{lang|en=Upcoming|ru=Предстоящие|ja=更新予定|fr=À venir|ko=예정}}
 +
| list1      =
 +
* {{if lang link|Planned features|ru=планируемые новшества|fr=Fonctionnalités prévues|ko=개발 예정인 항목}}
 +
 +
| group2    = {{lang|en=Official release|fr=Versions officielles|ko=정식}}
 +
| list2      =
 +
* {{if lang link|1.0.2}}
 +
* {{if lang link|1.0.1}}
 +
* {{if lang link|1.0}}
 +
 +
| group3    = {{lang|en=Beta|fr=Bêta|ja=ベータ|ko=베타}}
 +
| list3      =
 +
* {{if lang link|0.90.0}}
 +
 +
| group4    = {{lang|en=Alpha|ja=アルファ|ko=알파}}
 +
| list4      =
 +
* {{if lang link|0.25}}
 +
* {{if lang link|0.24.2}}
 +
* {{if lang link|0.24.1}}
 +
* {{if lang link|0.24}}
 +
* {{if lang link|0.23.5}}
 +
* {{if lang link|0.23}}
 +
* {{if lang link|0.22}}
 +
* {{if lang link|0.21.1}}
 +
* {{if lang link|0.21}}
 +
* {{if lang link|0.20.2}}
 +
* {{if lang link|0.20.1}}
 +
* {{if lang link|0.20}}
 +
* {{if lang link|0.19.1}}
 +
* {{if lang link|0.19}}
 +
* {{if lang link|0.18.4}}
 +
* {{if lang link|0.18.2}}
 +
* {{if lang link|0.18.1}}
 +
* {{if lang link|0.18}}
 +
* {{if lang link|0.17.1}}
 +
* {{if lang link|0.17}}
 +
* {{if lang link|0.16}}
 +
* {{if lang link|0.15.2}}
 +
* {{if lang link|0.15.1}}
 +
* {{if lang link|0.15}}
 +
* {{if lang link|0.14.4}}
 +
* {{if lang link|0.14.3}}
 +
* {{if lang link|0.14.2}}
 +
* {{if lang link|0.14.1}}
 +
* {{if lang link|0.14}}
 +
* {{if lang link|0.13.2}}
 +
* {{if lang link|0.13.1}}
 +
* {{if lang link|0.13}}
 +
* {{if lang link|0.12}}
 +
* {{if lang link|0.11.1}}
 +
* {{if lang link|0.11}}
 +
* {{if lang link|0.10.1}}
 +
* {{if lang link|0.10}}
 +
* {{if lang link|0.9}}
 +
* {{if lang link|0.8.5}}
 +
* {{if lang link|0.8.4}}
 +
* {{if lang link|0.8.3}}
 +
* {{if lang link|0.8.2}}
 +
* {{if lang link|0.8.1}}
 +
* {{if lang link|0.8}}
 +
* {{if lang link|0.7.3}}
 +
 +
| group5    = {{lang|en=Demo|fr=Démo|ja=デモ|ko=|체험판}}
 +
| list5      =
 +
* {{if lang link|0.18.3}}
 +
* [[0.13.3|0.13.3 ({{Dict|old}})]]
 +
 +
| below      = {{if lang link|Version history|de=Versionsgeschichte|ru=История версий|fr=Historique des Versions|ja=バージョン履歴|ko=개발 연혁}}
 
}}
 
}}
  

Revision as of 00:03, 31 May 2015

I'm just using this page as my personal sandbox. Please do not edit this page or any of its subpages without my express permission (unless you are an official wiki admin, of course, and it's actually causing any problems).

Template:Documentation

See User talk:Murph#Template:Documentation.

/Template:Navbox

Things I'd like to improve

  • The current {{Navbox}} template is a horribly dense block of wiki script code. It carries a warning not to edit it due to the complexity, which is quite justified, but the complexity is made far worse by it being collapsed into a single block of impossible to maintain code (I rate it as impossible for anyone to reliably maintain, even seasoned MediaWiki experts).
  • We're using raw {{FlipBox}} templates as navboxes, with each instance containing its own style information and variances. This makes it harder to maintain a consistent visual result across the wiki, as well as duplicating maintenance effort and potential errors/variations.
  • Wikipedia provide w:Wikipedia:WikiProject Transwiki/Template:Navbox for other wikis to freely use under the CC BY-SA license. It looks like our existing Navbox may have been based on a version of this, in breach of the Wikipedia license (it is not attributed to them, there's no attribution provided at all).

Goals

  • Work towards a "one true navbox" template which covers all of our major cases and covers them convincingly well.
  • Replace existing navbox template with an uncollapsed version that will be maintainable (with care, it's still going to be complex).
  • Comply with Wikipedia's license.

Use cases

The CSS used by my test template is not currently on the site, it's being loaded locally for me only. The test boxes will not be correctly formatted for anyone else.


Simple short test with missing group

Simple 20 group test

Template:Versions

Current production version
Test version
Test version with default style
Test version with default style and real lists instead of long lines

Template:Stock craft

Current production version
Test version

Template:Parts

Current production version
Test version
Subgroups collapsed

/Template:Navbar

Support template for Template:Navbox