Difference between revisions of "KRayWiki:Examples"

From KRayWiki
Jump to navigation Jump to search
(The prior example places too much empty vertical space, so this improves the example.)
(Add some helpful constructs that include unicode characters.)
Line 65: Line 65:
 
</nowiki><br />&lt;/nowiki&gt;&lt;/div&gt;
 
</nowiki><br />&lt;/nowiki&gt;&lt;/div&gt;
 
</div>
 
</div>
 +
 +
== Common Unicode Constructs ==
 +
 +
See Also:
 +
:&nbsp; A searchable [https://unicode-table.com/en/ Unicode character table]
 +
 +
Structures used to render software user interface controls:
 +
 +
# Checkboxes
 +
#: <code>[&#10003;]</code> Checked<br /><code>[&nbsp;]</code> Unchecked
 +
#: <div style="background-color: #EEEEEE; border: dashed; border-width: 1px; font-family: courier; margin: 1ex 1ex; padding: 1ex; white-space: pre;"><nowiki><code>[&amp;#10003;]</code>
 +
<code>[&amp;nbsp;]</code></nowiki></div>
 +
# Small Triangles
 +
#: &#9656; Black Right-Pointing Small Triangle
 +
#: &#9662; Black Down-Pointing Small Triangle
 +
#: <div style="background-color: #EEEEEE; border: dashed; border-width: 1px; font-family: courier; margin: 1ex 1ex; padding: 1ex; white-space: pre;"><nowiki>&amp;#9656;
 +
&amp;#9662;</nowiki></div>
 +
# Modifier Letter Arrowheads
 +
#: <small>'''&#706;'''</small>, or, <small>'''&lt;'''</small>
 +
#: <small>'''&#707;'''</small>, or, <small>'''&gt;'''</small>
 +
#: &#708; &#709;
 +
#: <div style="background-color: #EEEEEE; border: dashed; border-width: 1px; font-family: courier; margin: 1ex 1ex; padding: 1ex; white-space: pre;"><nowiki><small>'''&amp;#706;'''</small>, or, <small>'''&amp;lt;'''</small>
 +
<small>'''&amp;#707;'''</small>, or, <small>'''&amp;gt;'''</small>
 +
&amp;#708; &amp;#709;</nowiki></div>
  
 
</blockquote>
 
</blockquote>

Revision as of 18:41, 31 January 2018

See Also 
About KRayWiki


Instructions

  • Examples are ideally written to allow source copy/paste without opening the editor on this page.
  • Recognize that some complex examples may require an edit to see the wiki markup source.
  • Reserve this page for:
  • Commonly occurring markup that useful for maintaining consistency across the wiki.
  • Markup that is difficult to create using only the available off-site help.

Examples

Back Links and Cross-references

A basic example:

; See Also : [[Main Page]]<br />

A more complex example showing several related resources and a more descriptive link:

; See Also : [[CSDI_Wiki:MediaWiki|CSDI MediaWiki Information and Help Index]] : [[Main Page]]<br />

Note 
It is a best practice to avoid gratuitous linking of pages that appear in either the sidebar or page body.
Note 
Previous recommended placement of <br/> was below the last line, but now, perhaps due to a software upgrade, it appears that this causes an overlarge vertical gap. Current recommended placement is appended to the final line (for aesthetics and efficient use of space).

Category Page Links

[[Category:Software Resources]]

Font Color

  • Set the font color inside a styled tag.
<span style="color: purple;">font color</span>

Redirects

  • A redirect allows more than one possible wiki path to reference the same information. For example, the following redirect could transfer someone from CC Office to Corpus Christi Office if it was saved on a page named CC Office since the term CC is a convenient shortcut.
#REDIRECT [[Corpus Christi Office]]

Preformatted Text Box

  • <pre> tags do not behave as expected when used inside a wiki page. This work-around behaves more like an HTML tag would work.
  • Adjust margin: 1em 2em; to set indent level for the box. The 2em corresponds to one : indent.
  • Adjust margin: 1em 2em; sets the vertical spacing around the box.
<div style="background-color: #EEEEEE; border: dashed; border-width: 1px; font-family: courier; margin: 1em 2em; padding: 1ex; white-space: pre;"><nowiki>
</nowiki></div>

Common Unicode Constructs

See Also:

  A searchable Unicode character table

Structures used to render software user interface controls:

  1. Checkboxes
    [✓] Checked
    [ ] Unchecked
    <code>[&#10003;]</code> <code>[&nbsp;]</code>
  2. Small Triangles
    ▸ Black Right-Pointing Small Triangle
    ▾ Black Down-Pointing Small Triangle
    &#9656; &#9662;
  3. Modifier Letter Arrowheads
    ˂, or, <
    ˃, or, >
    ˄ ˅
    <small>'''&#706;'''</small>, or, <small>'''&lt;'''</small> <small>'''&#707;'''</small>, or, <small>'''&gt;'''</small> &#708; &#709;

Site Templates

An exhaustive listing of local templates is here.

A listing of currently unused templates may be viewed here.

Page Header Templates

Place the indicated markup at the top of a page to insert pre-defined page headers.

Policy

{{Template:Policy}}

Template:Policy

Proprietary

{{Template:Proprietary}}

Template:Proprietary

Restricted

{{Template:Restricted}}

Template:Restricted

WIP

{{Template:WIP}}

Server Templates

Prefer not to refer to server host names, IP address, URLs, etc. Instead, use a logical names like:

{{Template:Server}} 
Unadorned logical name template references should expand to a descriptive server name, or host name.

Append a standard suffix to the logical name template to make it easy remember how to reference the server in other ways:

{{Template:ServerIP}} 
Server IP address
{{Template:ServerURL}} 
Server web link text (i.e. http://...)
{{Template:ServerFileURL}} 
Server file share root reference (i.e. file://...)

By following these conventions, it becomes trivial to change all server references everywhere in the wiki at once with a single edit of affected template pages. When templates are designed well, changes can automatically cascade into related templates without additional edits. For example, consider that a template may itself refer to another template:

If, for example,

{{Template:CompanyInetDomain}} 
expands to:
Template:CompanyInetDomain

Other templates could be written to re-use the base name :

{{Template:CompanyWebsiteURL}} 
is defined as:
Template:URLProtocolTemplate:CompanyInetDomain
expands to:
Template:CompanyWebsiteURL
{{Template:LmnWebsiteURL}} 
is defined as:
{{Template:CompanyWebsiteURL}}/SDwp/lmn
expands to:
Template:LmnWebsiteURL
{{ManWebsiteURL}} 
is defined as:
{{CompanyWebsiteURL}}/SDwp/
expands to:
Template:ManWebsiteURL

In such a set of templates, any change the Domain template trickles down into each subordinate template that references it, whether directly, or indirectly.

Template:WIP