Wiki Code Cookbook: Difference between revisions

From Portland NET Wiki
integrate content from EditingTeamPages
relocate "Referring to main article" to the Miscellaneous Tricks section, since it's niche and definitely shouldn't be the lead item on the page
Line 13: Line 13:
* [[wikipedia:Template:Vertical_header/doc|Vertical headers]]: NETwiki is capable of publishing vertical headers in tables; the article will show you how.
* [[wikipedia:Template:Vertical_header/doc|Vertical headers]]: NETwiki is capable of publishing vertical headers in tables; the article will show you how.
<br>
<br>
__TOC__
__TOC__
<br>
== NETwiki Standard Layouts ==
=== Referring to a main article ===
NETwiki follows the standard found in Wikipedia: offset in italic with a link to the main article. For example:
:''Main article: [[Background Checks|Criminal Background Checks]]''
The markup to do something like that looks like this (note particularly the colon at the start of the line, which adds an indent):
<pre>
:''Main article: [[Background Checks|Criminal Background Checks]]''
</pre>
== Basic Font Stuff ==
== Basic Font Stuff ==
It's much easier to change a font's style, such as into '''bold''' or ''italic'', using the [[wikipedia:WYSIWYG|WYSIWYG]] interface. But we do have a few NETwiki standards for these font styles to help keep our wiki readable.
It's much easier to change a font's style, such as into '''bold''' or ''italic'', using the [[wikipedia:WYSIWYG|WYSIWYG]] interface. But we do have a few NETwiki standards for these font styles to help keep our wiki readable.
Line 66: Line 56:
<mark>'''NETwiki standard:'''</mark>
<mark>'''NETwiki standard:'''</mark>


* "Essential" should be a single line table in "firebrick" red, spanning 25% of the page, white bold text.  
* "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.
* "Supplemental" should be a single line table in "gold", spanning 25% of the page, white bold text.


{|class="wikitable" style="width: 25%; "
{| class="wikitable" style="width: 25%; "
|+
|+
| style="background: firebrick; color: white" |'''Section Importance: Essential'''
| style="background: firebrick; color: white" |'''Section Importance: Essential'''
Line 81: Line 71:
</pre>
</pre>


{| class="wikitable" style="width: 25%;  
{| class="wikitable" style="width: 25%; "
|+
|+
|style="background: gold; color: black"|'''Section Importance: Supplemental'''
| style="background: gold; color: black" |'''Section Importance: Supplemental'''
|}
|}


Line 117: Line 107:


In that example, I also made the text white. But naturally, you can <span style="background:purple; color:red">change the color</span><span style="background:orange; color:green"> of the text and background</span><span style="background:pink; color:grey"> to create all manner of page design monstrosity.</span>
In that example, I also made the text white. But naturally, you can <span style="background:purple; color:red">change the color</span><span style="background:orange; color:green"> of the text and background</span><span style="background:pink; color:grey"> to create all manner of page design monstrosity.</span>
</br>
<br>
</br>
<br>


== Table Adjustments ==
== Table Adjustments ==
Line 193: Line 183:


[[File:Video Embed Code.png]]
[[File:Video Embed Code.png]]
{{#ev:youtube|1S2nuZsBz8g|430|right|'''''Video: Exegesis addressing Kierkegaard's views on the meaning of life'''''|frame}}
{{#ev:youtube|1S2nuZsBz8g|430|right|'''''Video: Exegesis addressing Kierkegaard's views on the meaning of life'''''|frame}}
Let's go over each part of this phrase in Wiki syntax; each part is '''''required''''' for the code to post successfully and each part must be segregated by the "|" symbol. The numbers in magenta correspond to the list below:
Let's go over each part of this phrase in Wiki syntax; each part is '''''required''''' for the code to post successfully and each part must be segregated by the "|" symbol. The numbers in magenta correspond to the list below:
Line 200: Line 191:
# '''youtube'''  this part should be completed according to which video service is going into the embed. In this example, it is YouTube, but it could be Vimeo if the embed is coming from Vimeo.
# '''youtube'''  this part should be completed according to which video service is going into the embed. In this example, it is YouTube, but it could be Vimeo if the embed is coming from Vimeo.
# '''1S2nuZsBz8g'''  this is the most important part of the embed. It is the unique identifier for the video you plan to use.
# '''1S2nuZsBz8g'''  this is the most important part of the embed. It is the unique identifier for the video you plan to use.
# '''430'''  this indicates the width of the video.  
# '''430'''  this indicates the width of the video.
# '''Right'''  this indicates where on the page the video will be aligned on the page. It can be right, left, or centered.  
# '''Right'''  this indicates where on the page the video will be aligned on the page. It can be right, left, or centered.
# This part of the phrase is the caption of the video that anyone viewing the page will see. It will not change a video's header title from Vimeo or YouTube.
# This part of the phrase is the caption of the video that anyone viewing the page will see. It will not change a video's header title from Vimeo or YouTube.
# '''Frame'''  I don't know what this actually means, just don't leave it out.  
# '''Frame'''  I don't know what this actually means, just don't leave it out.
# '''<nowiki>}}</nowiki>'''  closing braces.
# '''<nowiki>}}</nowiki>'''  closing braces.
<pre>
<pre>
Line 213: Line 204:


== Miscellaneous Tricks ==
== Miscellaneous Tricks ==
=== Referring to a main article ===
NETwiki follows the standard found in Wikipedia: offset in italic with a link to the main article. For example:
:''Main article: [[Background Checks|Criminal Background Checks]]''
The markup to do something like that looks like this (note particularly the colon at the start of the line, which adds an indent):
<pre>
:''Main article: [[Background Checks|Criminal Background Checks]]''
</pre>


=== Reference Sections ===
=== Reference Sections ===
Line 222: Line 221:
<references />
<references />
</pre>
</pre>
That much is fairly simple. But say you want to cite the same footnote more than once. To do that, you have to assign a name to the reference. Click on the demonstration page above to see the code for it.<br>
That much is fairly simple. But say you want to cite the same footnote more than once. To do that, you have to assign a name to the reference. Click on the demonstration page above to see the code for it.


=== Horizontal lines ===
=== Horizontal lines ===