Wiki Code Cookbook: Difference between revisions

From Portland NET Wiki
Jump to navigation Jump to search
Line 35: Line 35:
</pre>
</pre>


=== Simple yellow highlight ===
=== Simple yellow highlight on text ===
Wiki syntax comes with a simple and easy way to place a yellow highlight on selected text. Simply brace it inside the code you see below.
Wiki syntax comes with a simple and easy way to place a yellow highlight on selected text. Simply brace it inside the code you see below.


Line 44: Line 44:
</pre>
</pre>


=== Elaborate highlights ===
=== Elaborate text highlights ===
Highlighting text in a color other than yellow can be done, but it's a pain in the ass. Still, if you gotta have that ''je ne sais quoi,'' there is a way to do it by marking it up with a <nowiki><span>. For example: </nowiki>
Highlighting text in a color other than yellow can be done, but it's a pain in the ass. Still, if you gotta have that ''je ne sais quoi,'' there is a way to do it by marking it up with a <nowiki><span>. For example: </nowiki>


Line 50: Line 50:
<pre>
<pre>
<span style="background:black; color:white">'''All PBEM employees must stop crying before returning to work.'''</span>
<span style="background:black; color:white">'''All PBEM employees must stop crying before returning to work.'''</span>
</pre>In that example, I also made the text white. But naturally, you can change the color of the text, also, to create all manner of page design monstrosity.
</pre>If I want to make that text string less of an eyesore, I might also take care to color highlight a space before and after, like this:
 
 
In that example, I also made the text white. But naturally, you can change the color of the text, also, to create all manner of page design monstrosity.

Revision as of 17:39, 15 July 2025

Emphasis in Type

Sometimes you need your words to pop in order to place emphasis on them. For the most part, these tools should be used sparingly. After all, if everything is emphasized, nothing is. And your article looks like crap.

Essential/Non-essential headers

If you are writing a particularly long article and/or an article required for Basic NET training, you may want to indicate some sections as "essential" reading and other sections as "supplemental". This is not a trick with text so much as it's a very small table that sits at the top of a page section. For an example in context, see: Basic NET Class Goals.

NETwiki standard:

  • "Essential" should be a single line table in "firebrick" red, spanning 25% of the page, white bold text.
  • "Supplemental" should be a single line table in "gold", spanning 25% of the page, white bold text.
Section Importance: Essential
{|class="wikitable" style="width: 25%; "
|+
| style="background: firebrick; color: white" |'''Section Importance: Essential'''
|}
Section Importance: Supplemental
{| class="wikitable" style="width: 25%; 
|+
|style="background: gold; color: black"|'''Section Importance: Supplemental'''
|}

Simple yellow highlight on text

Wiki syntax comes with a simple and easy way to place a yellow highlight on selected text. Simply brace it inside the code you see below.

Example: The quick brown fox jumps over the lazy dog.

'''Example:''' <mark>The quick brown fox</mark> jumps over the lazy dog.

Elaborate text highlights

Highlighting text in a color other than yellow can be done, but it's a pain in the ass. Still, if you gotta have that je ne sais quoi, there is a way to do it by marking it up with a <span>. For example:

All PBEM employees must stop crying before returning to work.

<span style="background:black; color:white">'''All PBEM employees must stop crying before returning to work.'''</span>

If I want to make that text string less of an eyesore, I might also take care to color highlight a space before and after, like this:


In that example, I also made the text white. But naturally, you can change the color of the text, also, to create all manner of page design monstrosity.