Grouse

EditingGuide: Difference between revisions

From Grouse House Wiki

No edit summary
No edit summary
Line 1: Line 1:
This page contains important editing information, tips, and tricks for creating and managing wiki pages.
This page contains important editing information, tips, and tricks for creating and managing wiki pages.


{{H2Static|Color Guide}}
<h2 class="h-static">Color Guide</h2>
Here are some hex codes for some common colors used across the site.
Here are some hex codes for some common colors used across the site.


Line 23: Line 23:
</table>
</table>


{{H2Static|Basic Page Setup}}
<h2 class="h-static">Basic Page Setup</h2>
=== Headers and Sections ===
<h3 class="h-static">Headers and Sections</h3>
Headers define how a section is presented in the article. Sections can be collapsible - either collapsed by default or open by default - or static/noncollapsible. Each type of header is defined using a template. Headers entered without using these templates will not be visible in the article!
Headers define how a section is presented in the article. Sections can be collapsible - either collapsed by default or open by default - or static/noncollapsible. The header of each section must be defined by three elements: a header with a specific class, a div to start the collapsed content (if applicable), and a second header use to get around Mediawiki editing constraints. Headers entered without using a class will not appear on the page!


Right now, the use of templates is only required for H2 and H3 headers - if you're using any header smaller than that, feel free to use equal signs instead!


Right now, the use of these classes are only required for H2 and H3 headers - if you're using any header smaller than that, feel free to use equal signs instead!


==== '''Collapsible Headers''' ====
 
When using collapsible headers, each section should begin with a header template below and end with this end template.
===='''Collapsible Headers'''====
<pre>{{HEnd}}</pre>
When using collapsible headers, each section must begin with a header class and collapsible content div, and end with a
<pre style="margin:0;"></div></pre>
For the section to include a working edit button, you must also add a second header to get around Mediawiki constraints.
 
 
In order to define the top of the collapsible content section, you can add this text. You will change the display style depending on whether or not the content is collapsed by default.
<pre><div class="c-content" style="display: block;"></pre>




For example, a section might appear like this if it is collapsible and open by default.
For example, a section might appear like this if it is collapsible and open by default.
<pre>{{H2Active|Header}}
<pre><h2 class="c-header active">Header</h2>
<div class="c-content" style="display: block;">
== Header ==
Section content.
Section content.
{{HEnd}}</pre>
</div></pre>




'''Open by Default'''
'''Open by Default'''


To create a section that's open by default, use one of the following templates in place of the header.
To create a section that's open by default, add the following class to your header tag and change the collapsible div display style to "block".




Main Header
'''Main Header'''
<pre>{{H2Active|Header}}</pre>
<pre><h2 class="c-header active">Header</h2>
<div class="c-content" style="display: block;"></pre>
 
'''Sub Header'''
<pre><h3 class="c-header active">Header</h3>
<div class="c-content" style="display: block;"></pre>




'''Closed by Default'''
'''Closed by Default'''


To create a section that's open by default, use one of the following templates in place of the header.
To create a section that's open by default, add the following class to your header tag and change the collapsible div display style to "none".




Main Header
'''Main Header'''
<pre>{{H2Hidden|Header}}</pre>
<pre><h2 class="c-header hidden">Header</h2>
<div class="c-content" style="display: none;"></pre>
 
'''Sub Header'''
<pre><h3 class="c-header hidden">Header</h3>
<div class="c-content" style="display: none;"></pre>




'''Static/Noncollapsible'''
'''Static/Noncollapsible'''


To create a section that's static/non-collapsible, use one of the following templates in place of the header. When using a static section, you do not need to use an end template at the end of the section.
<p style="margin:0;">To create a section that's static/non-collapsible, add the following class to your header tag. When using a static section, you do not need to use include <pre><div class="c-content"></pre> or <pre></div></pre> at the end of the section.</p>
 
 
'''Main Header'''
<pre><h2 class="h-static">Header</h2></pre>
 
'''Sub Header'''
<pre><h3 class="h-static">Header</h3></pre>
 
 
'''Examples'''
 
Here are some of the common headers used across the site as examples you can copy and paste.
 
 
'''H2 Collapsed by Default (used on every long page)'''
<pre><h2 class="c-header hidden">Header</h2>
<div class="c-content" style="display: block;">
== Header ==
Section content.
</div></pre>
 
 
'''H3 Collapsed by Default'''
<pre><h3 class="c-header hidden">Header</h3>
<div class="c-content" style="display: block;">
== Header ==
Section content.
</div></pre>




Main Header
'''H2 Static/Noncollapsible'''
<pre>{{H2Static|Header}}</pre>
<pre><h2 class="h-static">Header</h2>
== Header ==</pre>

Revision as of 22:05, 5 February 2024

This page contains important editing information, tips, and tricks for creating and managing wiki pages.

Color Guide

Here are some hex codes for some common colors used across the site.


#252525Dark gray on header
#5388a0Blue used on links and buttons
#007095Dark blue used on hovers and some links
#b0b0b0Header dark gray
#bcbcbcSubheader mid gray
#d4d4d4Sidebar mid gray
#d33Warning red

Basic Page Setup

Headers and Sections

Headers define how a section is presented in the article. Sections can be collapsible - either collapsed by default or open by default - or static/noncollapsible. The header of each section must be defined by three elements: a header with a specific class, a div to start the collapsed content (if applicable), and a second header use to get around Mediawiki editing constraints. Headers entered without using a class will not appear on the page!


Right now, the use of these classes are only required for H2 and H3 headers - if you're using any header smaller than that, feel free to use equal signs instead!


Collapsible Headers

When using collapsible headers, each section must begin with a header class and collapsible content div, and end with a

</div>

For the section to include a working edit button, you must also add a second header to get around Mediawiki constraints.


In order to define the top of the collapsible content section, you can add this text. You will change the display style depending on whether or not the content is collapsed by default.

<div class="c-content" style="display: block;">


For example, a section might appear like this if it is collapsible and open by default.

<h2 class="c-header active">Header</h2>
<div class="c-content" style="display: block;">
== Header ==
Section content.
</div>


Open by Default

To create a section that's open by default, add the following class to your header tag and change the collapsible div display style to "block".


Main Header

<h2 class="c-header active">Header</h2>
<div class="c-content" style="display: block;">

Sub Header

<h3 class="c-header active">Header</h3>
<div class="c-content" style="display: block;">


Closed by Default

To create a section that's open by default, add the following class to your header tag and change the collapsible div display style to "none".


Main Header

<h2 class="c-header hidden">Header</h2>
<div class="c-content" style="display: none;">

Sub Header

<h3 class="c-header hidden">Header</h3>
<div class="c-content" style="display: none;">


Static/Noncollapsible

To create a section that's static/non-collapsible, add the following class to your header tag. When using a static section, you do not need to use include

<div class="c-content">

or

</div>

at the end of the section.


Main Header

<h2 class="h-static">Header</h2>

Sub Header

<h3 class="h-static">Header</h3>


Examples

Here are some of the common headers used across the site as examples you can copy and paste.


H2 Collapsed by Default (used on every long page)

<h2 class="c-header hidden">Header</h2>
<div class="c-content" style="display: block;">
== Header ==
Section content.
</div>


H3 Collapsed by Default

<h3 class="c-header hidden">Header</h3>
<div class="c-content" style="display: block;">
== Header ==
Section content.
</div>


H2 Static/Noncollapsible

<h2 class="h-static">Header</h2>
== Header ==