|
|
| Line 99: |
Line 99: |
| <div style="width: 100%; overflow: hidden;"> | | <div style="width: 100%; overflow: hidden;"> |
| <div style="border: 2px solid black; padding: 10px; width: auto; border-radius:15px; text-align: center; font-size: 1em; margin: 0 auto; box-sizing: border-box;"> | | <div style="border: 2px solid black; padding: 10px; width: auto; border-radius:15px; text-align: center; font-size: 1em; margin: 0 auto; box-sizing: border-box;"> |
| <h1>''<nowiki><includeonly></nowiki> & <nowiki><noinclude></nowiki>'' - Transclusion</h1> | | <h3>''<nowiki><includeonly></nowiki> & <nowiki><noinclude></nowiki>'' - Transclusion</h3> |
| <p> '''Purpose:''' Sets the condition on a template page that will either be displayed or not when viewing the template when transclusion to a page itself directly using the <nowiki>{{{template:page}}}</nowiki> function.</p> | | <p> '''Purpose:''' Sets the condition on a template page that will either be displayed or not when viewing the template when transclusion to a page itself directly using the <nowiki>{{{template:page}}}</nowiki> function.</p> |
| <h2>''<nowiki><includeonly></nowiki>'' Only Include </h2> | | <h4>''<nowiki><includeonly></nowiki>'' Only Include </h4> |
| <h4>'''Purpose:'''</h4><p> Content wrapped in <nowiki><includeonly></nowiki> tags on a template page will '''only''' be processed and displayed when that template is ''transcluded'' (used) on another page. It will '''not''' be visible when viewing the template page itself directly.</p> | | <p>'''Purpose:'''</h4><p> Content wrapped in <nowiki><includeonly></nowiki> tags on a template page will '''only''' be processed and displayed when that template is ''transcluded'' (used) on another page. It will '''not''' be visible when viewing the template page itself directly.</p> |
| <h4>'''Syntax:'''</h4> <code><nowiki><includeonly></nowiki>Content for transclusion only<nowiki></includeonly></nowiki></code> | | <p>'''Syntax:'''</h4> <code><nowiki><includeonly></nowiki>Content for transclusion only<nowiki></includeonly></nowiki></code> |
| <h2>''<nowiki><noinclude></nowiki>'' No Include </h2> | | <h4>''<nowiki><noinclude></nowiki>'' No Include </h4> |
| <h4>'''Purpose:'''</h4> <p>Content wrapped in <nowiki><noinclude></nowiki> tags on a template page will '''only''' be processed and displayed when viewing the template page itself directly. It will '''not''' be included or displayed when the template is ''transcluded'' onto another page.</p> | | <p>'''Purpose:'''</h4> <p>Content wrapped in <nowiki><noinclude></nowiki> tags on a template page will '''only''' be processed and displayed when viewing the template page itself directly. It will '''not''' be included or displayed when the template is ''transcluded'' onto another page.</p> |
| <h4>'''Syntax:'''</h4> <code><nowiki><noinclude></nowiki>Documentation and categories for the template.<nowiki></noinclude></nowiki></code> | | <p>'''Syntax:'''</h4> <code><nowiki><noinclude></nowiki>Documentation and categories for the template.<nowiki></noinclude></nowiki></code> |
| </div> | | </div> |
| </div> | | </div> |
| Line 115: |
Line 115: |
| <div style="width: 100%; overflow: hidden;"> | | <div style="width: 100%; overflow: hidden;"> |
| <div style="border: 2px solid black; padding: 10px; width: auto; border-radius:15px; text-align: center; font-size: 1em; margin: 0 auto; box-sizing: border-box;"> | | <div style="border: 2px solid black; padding: 10px; width: auto; border-radius:15px; text-align: center; font-size: 1em; margin: 0 auto; box-sizing: border-box;"> |
| <h2>Common Text & Formatting Tags</h2> | | <h3>Common Text & Formatting Tags</h3> |
| <p>These HTML tags are used for basic text formatting and structural elements. While MediaWiki has its own simplified markup for bold, italic, and horizontal rules, these HTML tags offer alternatives and are useful when you need to embed styling directly within more complex HTML structures.</p> | | <p>These HTML tags are used for basic text formatting and structural elements. While MediaWiki has its own simplified markup for bold, italic, and horizontal rules, these HTML tags offer alternatives and are useful when you need to embed styling directly within more complex HTML structures.</p> |
| | | |
This page serves as a comprehensive guide for wiki editors to understand and effectively use various editing syntax and CSS styling within the Starship Simulator wiki. This knowledge is crucial for creating well-formatted, visually appealing, and dynamic pages.
Introduction
This wiki uses MediaWiki's own simplified markup, but also incorporates standard HTML tags and inline CSS for more advanced formatting and layout control. Additionally, MediaWiki provides its own unique tags and parser functions that are essential for template creation and specialized content display.
Understanding these tools will allow you to:
- Format text and elements precisely.
- Create custom layouts and boxes.
- Develop robust and flexible templates.
- Display code examples without unintended rendering.
This guide is divided into the following sections:
- Editing Syntax: Covers both standard HTML elements and MediaWiki-specific tags/functions for content structure and processing.
- Styling with CSS: Explains how to apply visual properties to elements using CSS.
Editing Syntax
This section covers the core syntax used for structuring content on this wiki, including common HTML tags and MediaWiki's specialized tags and parser functions.
<code> - Code Snippet
Purpose: Used to display short fragments of computer code or literal input/output, typically rendered in a monospaced font. It helps to differentiate code from regular text.
Syntax: <code>Value</code>
Examples:
| Code |
Result
|
| Press <code>F</code> to interact!
|
Press F to interact!
|
| To teleport ship type <code>/shiptp</code> into the chat box in game
|
To teleport ship type /shiptp into the chat box in game
|
<div> - Division
Purpose: A generic container tag used to group block-level content. It does not have any inherent visual formatting beyond creating a new line, but it is extremely useful for applying CSS styles to a block of content or for creating complex layouts).
Syntax: <div>Content</div>
Example:
Code
<div style="background-color: #F8F8F8; padding: 10px; border-radius: 5px;">This content is within a custom div box.</div>
Result
This content is within a custom div box.
<span> - Span
Purpose: A generic inline container tag used to group small fragments of text or other inline elements. Like `<div>`, it has no inherent visual formatting but is useful for applying CSS styles to a specific piece of text *without* starting a new line.
Syntax: <span>Text</span>
Example:
| Code |
Result
|
| This is <span style="color: red; font-weight: bold;">urgent</span>!
|
This is urgent!
|
| When the valve is open you will see a <span style="color: green; font-style: italic;">Green</span> light on the display.
|
When the valve is open you will see a Green light on the display.
|
<nowiki> - No Wiki Markup
Purpose: Prevents MediaWiki from parsing any wiki markup (like `links`, `Template:Templates`, `bold`) within its tags. The content is displayed exactly as typed. Essential for showing code examples of wiki markup.
Syntax: <nowiki>Content with {{markup}}</nowiki>
Example:
| Code |
Result
|
| Use <nowiki>[[Magellan Class]] to link to the ship.</nowiki>
|
Use [[Magellan Class]] to link to the ship.
|
| <nowiki>This is a <span style="color: red; font-weight: bold;">example</span>of a '''tag'' being ''ignored!''</nowiki>
|
This is a <span style="color: red; font-weight: bold;">example</span>of a '''tag'' being ''ignored!''
|
<includeonly> & <noinclude> - Transclusion
Purpose: Sets the condition on a template page that will either be displayed or not when viewing the template when transclusion to a page itself directly using the {{{template:page}}} function.
<includeonly> Only Include
Purpose:
Content wrapped in <includeonly> tags on a template page will only be processed and displayed when that template is transcluded (used) on another page. It will not be visible when viewing the template page itself directly.
Syntax: <includeonly>Content for transclusion only</includeonly>
<noinclude> No Include
Purpose:
Content wrapped in <noinclude> tags on a template page will only be processed and displayed when viewing the template page itself directly. It will not be included or displayed when the template is transcluded onto another page.
Syntax: <noinclude>Documentation and categories for the template.</noinclude>
Common Text & Formatting Tags
These HTML tags are used for basic text formatting and structural elements. While MediaWiki has its own simplified markup for bold, italic, and horizontal rules, these HTML tags offer alternatives and are useful when you need to embed styling directly within more complex HTML structures.
| Tag |
Purpose |
Syntax |
Example Code |
Result
|
| <b> / <strong>
|
Bolds text, or indicates strong importance.
|
<b>Bold Text</b> or <strong>Strong Text</strong>
|
The reactor is <b>ONLINE</b>.
|
The reactor is ONLINE.
|
| <i> / <em>
|
Italicizes text, or indicates emphasis.
|
<i>Text</i> or <em>Emphasized Text</em>
|
This is an <i>important</i> detail.
|
This is an important detail.
|
| <u>
|
Underlines text. (Note: Underlining is often discouraged for web text as it can be confused with hyperlinks).
|
<u>Text</u>
|
<u>Warning: Unstable Plasma!</u>
|
Warning: Unstable Plasma!
|
| <br>
|
Creates a single line break.
|
<br> or <br />
|
Section One<br />Section Two
|
Section One Section Two
|
| <hr>
|
Creates a thematic break or horizontal line.
|
<hr> or <hr />
|
Section One<hr />Section Two
|
Section One Section Two
|
| <sup>
|
Displays text slightly above the normal line (superscript).
|
Text<sup>Superscript</sup>
|
Mass: 1.04 x Sol<sup>2</sup>
|
Mass: 1.04 x Sol2
|
| <sub>
|
Displays text slightly below the normal line (subscript).
|
Text<sub>Subscript</sub>
|
Coolant: H<sub>2</sub>O
|
Coolant: H2O
|