Wiki Code Cookbook: Difference between revisions

From Portland NET Wiki
integrate content from EditingTeamPages
mNo edit summary
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This cookbook is a repository of tips, tricks, and standards for the NETwiki. The intention is to make article writers better at formatting, and to create standards in the NETwiki that users will recognize to help guide them through the content and make it east to read.
This cookbook is a repository of tips, tricks, and standards for the NETwiki. The intention is to make article writers better at formatting, and to create standards in the NETwiki that users will recognize to help guide them through the content and make it east to read.


Line 12: Line 13:
* [[wikibooks:Editing_Wikitext/Tables|Editing Wikitext/Tables]]: Great article on formatting tables in markup. You can find a similar article on tables [[wikipedia:Help:Table|HERE]].
* [[wikibooks:Editing_Wikitext/Tables|Editing Wikitext/Tables]]: Great article on formatting tables in markup. You can find a similar article on tables [[wikipedia:Help:Table|HERE]].
* [[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.
* [https://www.portland.gov/officeofequity/equity-resources/inclusive-writing-guide City of Portland Inclusive Writing Guide]: The Inclusive Writing Guide is designed to help communicate in a way that serves the entire community. The importance of language is critical when navigating topics of race, ethnicity, disability, gender, gender identity, and sexual orientation.
<br>
<br>
__TOC__
__TOC__
<br>
<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 58:
<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 73:
</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 109:


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 185:


[[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 193:
# '''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>
{{#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}}
</pre>
</pre>
You can see the resul to the right side of this page.
You can see the result to the right side of this page.


<mark>'''NETwiki standard:'''</mark> We recommend (but do not require) right-aligned videos. Left aligned videos interfere with wrapping text and often don't look good. A video caption should always appear in bold text and begin as "'''Video: (title)'''". Width should consistently appear as 430 pixels. Obviously, no video should be posted that includes adult content (e.g. nothing the video would be slapped with [[wikipedia:Motion_Picture_Association_film_rating_system#Rating_components|an "R" rating]] for).
<mark>'''NETwiki standard:'''</mark> We recommend (but do not require) right-aligned videos. Left aligned videos interfere with wrapping text and often don't look good. A video caption should always appear in bold text and begin as "'''Video: (title)'''". Width should consistently appear as 430 pixels. Obviously, no video should be posted that includes adult content (e.g. nothing the video would be slapped with [[wikipedia:Motion_Picture_Association_film_rating_system#Rating_components|an "R" rating]] for).
=== Google Calendar ===
# On the Google Calendar website, click on the <code>...</code> icon next to the calendar you want to share and click <code>Settings</code>
# In the "Integrate calendar" section, copy the text labeled "Public URL to this calendar". Example:  <code><nowiki>https://calendar.google.com/calendar/embed?src=en.usa%23holiday%40group.v.calendar.google.com&ctz=America%2FLos_Angeles</nowiki></code>
# Remove the text up to and including the question mark. Example: <code>src=en.usa%23holiday%40group.v.calendar.google.com&ctz=America%2FLos_Angeles</code>
# Add <code>&mode=AGENDA</code> to the end.
# On the team page, add the wikitext <code>Special:IframePage/GoogleCalendar|path=</code> followed by your calendar code, surrounded by double curly-braces <code><nowiki>{{</nowiki></code> <code><nowiki>}}</nowiki></code>
Example: <code><nowiki>{{Special:IframePage/GoogleCalendar|path=src=en.usa%23holiday%40group.v.calendar.google.com&ctz=America%2FLos_Angeles&mode=AGENDA}}</nowiki></code>


== 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 233:
<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 ===
Line 236: Line 247:


Sometimes color boxes can be used to note specific sections and different meanings. There are a lot of tricks to creating color boxes; best is to visit: https://en.wikipedia.org/wiki/Template:Color_box
Sometimes color boxes can be used to note specific sections and different meanings. There are a lot of tricks to creating color boxes; best is to visit: https://en.wikipedia.org/wiki/Template:Color_box
=== VSF Position Description Template ===
<nowiki>The Wiki includes a template for VSF position descriptions which can be activated by typing "{{VSF Position"</nowiki>


=== Link Templates ===
=== Link Templates ===
Line 291: Line 305:


# ✅ Review the [[NETwiki Content Creators and Editors]] page.
# ✅ Review the [[NETwiki Content Creators and Editors]] page.
# ✅ Update the names (e.g. Team Leader) and contact information in the <nowiki>{{Team}}</nowiki> template.
# <nowiki>✅ Update the names (e.g. Team Leader) and contact information in the {{</nowiki>[[Template:Team|Team]]<nowiki>}} template.</nowiki>
# ✅ Check the link to your Operations Plan, and use the "plan_name" parameter to the <nowiki>{{Team}}</nowiki> template if it doesn't match. (All Ops Plan links are hosted on portland.gov. If yours is out of date, email an updated file to  {{EmailLink|net@portlandoregon.gov|name=net@portlandoregon.gov}}.)
# ✅ Update your team's Earthquake Plan (née Operations Plan) by uploading it to the wiki with the name "Team Earthquake Plan - ''<team name>''.pdf". (''<team name>'' means the name visible at the top of your team's page, e.g. "TaborVilla", not the list of neighborhood names in the team page's URL.)
# ✅ Add/update neighborhood populations in the <nowiki>{{Neighborhood}}</nowiki> templates. (See [https://www.portland.gov/civic/myneighborhood/neighborhood-profile-maps Neighborhood Demographic Profiles] page.)
# <nowiki>✅ Add/update neighborhood populations in the {{</nowiki>[[Template:Neighborhood|Neighborhood]]<nowiki>}} templates. (See </nowiki>[https://www.portland.gov/civic/myneighborhood/neighborhood-profile-maps Neighborhood Demographic Profiles] page.)
# ✅ Add/update BEECN and fire station sites in the <nowiki>{{Neighborhood}}</nowiki> templates. (See [https://pdx.maps.arcgis.com/apps/webappviewer/index.html?id=d3eaa87bf97148a78a5f358207259d72 BEECNs and Fire Stations] map.)
# <nowiki>✅ Add/update BEECN and fire station sites in the {{</nowiki>[[Template:Neighborhood|Neighborhood]]<nowiki>}} templates. (See </nowiki>[https://pdx.maps.arcgis.com/apps/webappviewer/index.html?id=d3eaa87bf97148a78a5f358207259d72 BEECNs and Fire Stations] map.)
# ✅ Add/update schools in the <nowiki>{{Neighborhood}}</nowiki> templates.
# <nowiki>✅ Add/update schools in the {{</nowiki>[[Template:Neighborhood|Neighborhood]]<nowiki>}} templates.</nowiki>
# ✅ Use [[EditingTeamPages#Link Templates|#Link Templates]] for pretty little icons.
# ✅ Use [[EditingTeamPages#Link Templates|#Link Templates]] for pretty little icons.


Line 307: Line 321:
|-
|-
|small inline images (e.g. team members in action)
|small inline images (e.g. team members in action)
|team page
|NET wiki
|-
|-
|small inline neighborhood map
|small inline neighborhood map
|team page
|NET wiki
|-
|Operations plans
|NET wiki
|-
|-
|Photo albums (e.g. team exercises)
|Photo albums (e.g. team exercises)
|send an email to {{EmailLink|net@portlandoregon.gov|name=net@portlandoregon.gov}} for an upload link for PBEM's Lightroom account, or
|send an email to {{EmailLink|net@portlandoregon.gov|name=net@portlandoregon.gov}} for an upload link for PBEM's Lightroom account, or
use 3rd-party hosting (e.g. Google Photos, Flickr)
use 3rd-party hosting (e.g. Google Photos, Flickr)
|-
|Operations plans
|email to {{EmailLink|net@portlandoregon.gov|name=net@portlandoregon.gov}} for hosting at NET Team Operations Plans
|-
|-
|Meeting minutes
|Meeting minutes