Jump to content

Template:Star Data: Difference between revisions

From Starship Simulator
m Updated
m Updated reset default collapsed state
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
{| class="wikitable {{{collapsed|wikitable mw-collapsible mw-collapsed}}}" style="float:{{{float|right}}}; margin-left:1em; width:{{{width|300px}}}; font-size:{{{font_size|90%}}};"  
{| class="wikitable {{{collapsed|}}}" style="float:{{{float|right}}}; margin-left:1em; width:{{{width|300px}}}; font-size:{{{font_size|90%}}};"  
! colspan="2" | '''{{{title|}}}'''
! colspan="2" | '''{{{title|}}}'''
|-
|-
Line 58: Line 58:
| {{{Frost Line|Unknown}}}
| {{{Frost Line|Unknown}}}
|}
|}
<noinclude>
<noinclude>
This template is used to display standardized data tables for individual stars.
This template is used to display standardized data tables for individual stars.
For other celestial objects (planets, comets, etc.), separate templates may be used.
For other celestial objects (planets, comets, etc.), separate templates may be used.


== Use Case ==
=== Usage ===
The '''<nowiki>{{Star_Data}}</nowiki>''' template is designed to display a consistent block of information for various stellar objects, adapting its layout based on where it's used.
* '''For floating infoboxes (like on individual star pages):'''
 
<nowiki>{{Star_Data</nowiki>
=== Case 1: Individual Star Pages (e.g., [[Sol]], [[Sirius]]) ===
<nowiki>| title = [[Star Name]]</nowiki> (Required: The name of the object, often linked to its page)
* '''Purpose:''' To present a compact, floating infobox on the right side of an individual star's page, summarizing its key data.
<nowiki>| Common Name = Common Name (e.g., The Sun)</nowiki> (Optional)
* '''Typical Parameters Used:''' You'll generally use all relevant parameters to provide as much detail as possible for that specific star. These typically include `title`, `common_name`, `system_name`, `location`, `spectral_class` (or `object_class`), `temp`, `mass`, `radius`, `luminosity`, `hab_zone`, `planets`, and `caption_suffix` for additional context.
<nowiki>| System = [[System Name]]</nowiki> (Optional: The system it belongs to)
* '''Styling:''' No special styling parameters are needed, as the template's defaults will create the desired floating infobox.
<nowiki>| Location = X, Y, Z</nowiki> (Optional: Galactic Coordinates)
 
<nowiki>| Object Class = Object type for non-stars (e.g., Supermassive Black Hole)</nowiki> (Optional: Use for objects like Sgr A* instead of Spectral Class)
Example on a star page (e.g., [[Sol]]):
<nowiki>| Spectral Class = [[Star types|Spectral Class]]</nowiki> (Optional: For stars)
  <nowiki>{{Star_Data </nowiki>
  <nowiki>| Temperature = Temperature (e.g., ~5,778 K)</nowiki> (Optional: Surface Temperature)
  | title = Sol
  <nowiki>| Mass = Mass (e.g., 1 M☉)</nowiki> (Optional)
  | common_name = The Sun
  <nowiki>| Radius = Radius (e.g., 1 R☉)</nowiki> (Optional)
  | system_name = [[Sol System]]
  <nowiki>| Luminosity = Luminosity (e.g., 1 L☉)</nowiki> (Optional)
  | location = -26670, 0, 56
  <nowiki>| Habitable Zone = Habitable Zone range (e.g., ~0.63 AU – ~1.23 AU)</nowiki> (Optional)
  | spectral_class = G2V
  <nowiki>| Planets = Number or description of planets (e.g., 8 (plus Dwarf Planets))</nowiki> (Optional)
  | temp = ~5,778 K
  <nowiki>| Roche Limit = Roche Limit (e.g., 1,077,467 KM)</nowiki> (Optional)
  | mass = 1 M☉ (Solar Mass)
  <nowiki>| Hill Radius = Hill Radius (e.g., 3.62 LY)</nowiki> (Optional)
  | radius = 1 R☉ (Solar Radius)
  <nowiki>| Dust Sublimation = 2000K Dust Sublimation (e.g., 2,726,012 KM)</nowiki> (Optional)
  | luminosity = 1 L☉ (Solar Luminosity)
  <nowiki>| Lava Line = 1200K Lava Line (e.g., 7,272,256 KM)</nowiki> (Optional)
  | hab_zone = ~0.63 AU – ~1.23 AU
  <nowiki>| Habitable Zone Start = 320K Habitable Zone Start (e.g., 0.63 AU)</nowiki> (Optional)
  | planets = 8 (plus Dwarf Planets)
<nowiki>| Habitable Zone End = 230K Habitable Zone End (e.g., 1.23 AU)</nowiki> (Optional)
  <nowiki>}}</nowiki>
  <nowiki>| Frost Line = 150K Frost Line (e.g., 2.89 AU)</nowiki> (Optional)
<nowiki>| caption_suffix = (Any additional text for 'Stellar Data' caption, e.g., Approx. / Reference - Sirius A)</nowiki> (Optional)
  <nowiki>}}</nowiki>  


=== Case 2: List Pages (e.g., [[Locations]]) ===
* '''For full-width, collapsible tables (like on the Locations page):'''
* '''Purpose:''' To display a series of full-width, collapsible tables for multiple stars within a list, allowing users to expand them for details.
Add the following parameters to the above:
* '''Typical Parameters Used:''' You'll select the parameters relevant for a summary view on a list. These often include `title`, `location`, `planets`, `spectral_class` (or `object_class`), and the orbital parameters (`roche_limit`, `hill_radius`, `dust_sublimation`, `lava_line`, `hab_start`, `hab_end`, `frost_line`).
  <nowiki>| collapsed = mw-collapsible mw-collapsed</nowiki>
* '''Styling:''' You MUST use specific styling parameters to make these tables full-width and collapsible:
  <nowiki>| float = none</nowiki>
  | collapsed = mw-collapsible mw-collapsed`
  <nowiki>| width = 100%</nowiki>
  | float = none
  <nowiki>| font_size = 100%</nowiki> (or adjust as needed)
  | width = 100%
  | font_size = 100%` (or adjust as needed to match surrounding text)


* Remember to use '''<nowiki>{{clear}} or <br style="clear:both;" /></nowiki>''' after each template call on list pages to prevent subsequent content from flowing incorrectly.
All parameters are optional. If a parameter is not provided, its row will not appear in the table.
 
Example on a list page (e.g., [[Locations]] for [[Alpha Centauri]]):
<nowiki>{{Star_Data</nowiki>
| collapsed = mw-collapsible mw-collapsed
| title = [[Alpha Centauri]]
| float = none
| width = 100%
| font_size = 100%
| location = -26667,-3,56
| planets = 15
| spectral_class = G / K
| roche_limit = ~1,109,538 KM (Primary G star)
| hill_radius = ~4.58 LY (System)
| dust_sublimation = ~2,859,989 KM (Primary G star)
| lava_line = ~7,944,413 KM (Primary G star)
| hab_start = ~0.67 AU (Primary G star)
| hab_end = ~1.29 AU (Primary G star)
| frost_line = ~3.03 AU (Primary G star)
<nowiki>}}</nowiki>


[[Category:Formatting templates]]
[[Category:Formatting templates]]
</noinclude>
</noinclude>

Latest revision as of 17:08, 5 July 2025

'
Stellar Data
Common Name Unknown
System Unknown
Location (Galactic Coordinates) Unknown
Object Class Unknown
Spectral Class Unknown
Temperature (Surface) Unknown
Mass Unknown
Radius Unknown
Luminosity Unknown
Habitable Zone Unknown
Planets Unknown
Roche Limit Unknown
Hill Radius Unknown
2000K Dust Sublimation Unknown
1200K Lava Line Unknown
320K Habitable Zone Start Unknown
230K Habitable Zone End Unknown
150K Frost Line Unknown


This template is used to display standardized data tables for individual stars. For other celestial objects (planets, comets, etc.), separate templates may be used.

Usage

  • For floating infoboxes (like on individual star pages):
{{Star_Data
| title = [[Star Name]] (Required: The name of the object, often linked to its page)
| Common Name = Common Name (e.g., The Sun) (Optional)
| System = [[System Name]] (Optional: The system it belongs to)
| Location = X, Y, Z (Optional: Galactic Coordinates)
| Object Class = Object type for non-stars (e.g., Supermassive Black Hole) (Optional: Use for objects like Sgr A* instead of Spectral Class)
| Spectral Class = [[Star types|Spectral Class]] (Optional: For stars)
| Temperature = Temperature (e.g., ~5,778 K) (Optional: Surface Temperature)
| Mass = Mass (e.g., 1 M☉) (Optional)
| Radius = Radius (e.g., 1 R☉) (Optional)
| Luminosity = Luminosity (e.g., 1 L☉) (Optional)
| Habitable Zone = Habitable Zone range (e.g., ~0.63 AU – ~1.23 AU) (Optional)
| Planets = Number or description of planets (e.g., 8 (plus Dwarf Planets)) (Optional)
| Roche Limit = Roche Limit (e.g., 1,077,467 KM) (Optional)
| Hill Radius = Hill Radius (e.g., 3.62 LY) (Optional)
| Dust Sublimation = 2000K Dust Sublimation (e.g., 2,726,012 KM) (Optional)
| Lava Line = 1200K Lava Line (e.g., 7,272,256 KM) (Optional)
| Habitable Zone Start = 320K Habitable Zone Start (e.g., 0.63 AU) (Optional)
| Habitable Zone End = 230K Habitable Zone End (e.g., 1.23 AU) (Optional)
| Frost Line = 150K Frost Line (e.g., 2.89 AU) (Optional)
| caption_suffix = (Any additional text for 'Stellar Data' caption, e.g., Approx. / Reference - Sirius A) (Optional)
}} 
  • For full-width, collapsible tables (like on the Locations page):

Add the following parameters to the above:

| collapsed = mw-collapsible mw-collapsed
| float = none
| width = 100%
| font_size = 100% (or adjust as needed)

All parameters are optional. If a parameter is not provided, its row will not appear in the table.