Difference between revisions of "Template:InfoboxSystem"

From Traveller Wiki - Science-Fiction Adventure in the Far future
Jump to navigation Jump to search
Line 1: Line 1:
 +
{| style="width: 20em; text-align: left; font-size: 95%; float: right"
 +
|-
 +
| colspan="4" style="font-size: larger; background: #ddd;" | '''{{{name}}} System'''
 +
|-
 +
|colspan="4" style="font-size: larger; background: #ddd;"| [[{{{subsector}}} Subsector|{{{subsector}}}]]/[[{{{sector}}} Sector|{{{sector}}}]] {{{hex}}}
 +
|-
 +
|''Position'' ||''Distance''||''Name'' || ''UWP''
 +
|-
 +
|colspan="2"|''Primary
 +
|{{{star}}}
 +
|{{{type}}}
 +
|-
 +
{{#if:{{{P1|}}}
 +
{{!}}1
 +
{{!}}{{{Dist1}}}
 +
{{!}}[[{{{P1}}} (world){{!}}{{{P1}}}]]
 +
{{!}}{{{UWP1}}}
 +
{{!}}-
 +
}}
 +
|}
 +
<!--
 
<table style="width: 20em; text-align: left; font-size: 95%; float: right">
 
<table style="width: 20em; text-align: left; font-size: 95%; float: right">
 
<tr><th colspan="4" style="font-size: larger; background: #ddd;">{{{name}}} System</th></tr>
 
<tr><th colspan="4" style="font-size: larger; background: #ddd;">{{{name}}} System</th></tr>
 
<tr><th colspan="4" style="font-size: larger; background: #ddd;">[[{{{subsector}}} Subsector|{{{subsector}}}]]/[[{{{sector}}} Sector|{{{sector}}}]] {{{hex}}}</th></tr>
 
<tr><th colspan="4" style="font-size: larger; background: #ddd;">[[{{{subsector}}} Subsector|{{{subsector}}}]]/[[{{{sector}}} Sector|{{{sector}}}]] {{{hex}}}</th></tr>
 +
 
<tr><td><i>Position</i></td><td><i>Distance</i></td><td><i>Name</i></td><td><i>UWP</i></td></tr>
 
<tr><td><i>Position</i></td><td><i>Distance</i></td><td><i>Name</i></td><td><i>UWP</i></td></tr>
 
<tr><td colspan="2">Primary</td><td>{{{star}}}</td><td>{{{type}}}</td></tr>
 
<tr><td colspan="2">Primary</td><td>{{{star}}}</td><td>{{{type}}}</td></tr>
Line 15: Line 37:
 
{{#if:{{{P10|}}}|<tr><td>9</td><td>{{{Dist10}}}</td><td>[[{{{P10}}} (world)|{{{P9}}}]]</td><td>{{{UWP10}}}</td></tr>}}
 
{{#if:{{{P10|}}}|<tr><td>9</td><td>{{{Dist10}}}</td><td>[[{{{P10}}} (world)|{{{P9}}}]]</td><td>{{{UWP10}}}</td></tr>}}
 
</table>
 
</table>
 +
-->
 
<noinclude>
 
<noinclude>
 
'''Under construction—Not Tested'''<br>
 
'''Under construction—Not Tested'''<br>
Line 36: Line 59:
  
 
Okay, got over-ambitious. The idea is for each planet entry to have it's own row in the table. I tried doing that direct with html embedded in an #if. Looks like the if is working, but you can't embed html inside template calls. You might be able to do it with wiki-markup table formatting, but I'm not as familiar with that, so it's going to take more poking.
 
Okay, got over-ambitious. The idea is for each planet entry to have it's own row in the table. I tried doing that direct with html embedded in an #if. Looks like the if is working, but you can't embed html inside template calls. You might be able to do it with wiki-markup table formatting, but I'm not as familiar with that, so it's going to take more poking.
 +
:This is correct. This works on Wikipedia because a Wiki extension called HTMLTidy. The request has been made repeatedly. [[User:Tjoneslo|Tjoneslo]] 12:49, 11 November 2007 (UTC)
 +
::Try the above replacement. [[User:Tjoneslo|Tjoneslo]] 12:49, 11 November 2007 (UTC)
 +
 
</noinclude>
 
</noinclude>
 
<includeonly>[[Category:Astrography]]</includeonly>
 
<includeonly>[[Category:Astrography]]</includeonly>
 
<noinclude>[[Category:Infobox|System]]</noinclude>
 
<noinclude>[[Category:Infobox|System]]</noinclude>

Revision as of 12:49, 11 November 2007

{{{name}}} System
[[{{{subsector}}} Subsector|{{{subsector}}}]]/[[{{{sector}}} Sector|{{{sector}}}]] {{{hex}}}
Position Distance Name UWP
Primary {{{star}}} {{{type}}}

Under construction—Not Tested
This infobox is used to display basic information about an entire system.

{{InfoboxSystem
  |name={{System name}}
  |subsector={{Subsector name}}}
  |sector={{Sector name}}}
  |hex={{Hex location (sector reference)}}
  |star=((Star name}}
  |type={{Star type}}
  |P1={{World 1 name}}
  |Dist1={{World 1 distance (AUs)}}|UWP1={{World 1 UWP/Star type}}}
  |P2={{World 2 name}}
  |Dist2={{World 2 distance (AUs)}}|UWP2={{World 2 UWP/Star type}}}
  ...
}}

Needed: Cleanup, most likely. Ability to insert some sort of moon template. Perhaps be able to insert individual asteroids (as opposed to belts as a whole-no orbit number).

Okay, got over-ambitious. The idea is for each planet entry to have it's own row in the table. I tried doing that direct with html embedded in an #if. Looks like the if is working, but you can't embed html inside template calls. You might be able to do it with wiki-markup table formatting, but I'm not as familiar with that, so it's going to take more poking.

This is correct. This works on Wikipedia because a Wiki extension called HTMLTidy. The request has been made repeatedly. Tjoneslo 12:49, 11 November 2007 (UTC)
Try the above replacement. Tjoneslo 12:49, 11 November 2007 (UTC)