Line 471: | Line 471: | ||
<div class="clear"></div> | <div class="clear"></div> | ||
− | <div class="column half_size"> | + | <div class="column half_size" id="clear"> |
<h3> Clear </h3> | <h3> Clear </h3> | ||
<p> This class clears the content, it is basically the same as clicking "enter" when you are writing a text. <br> | <p> This class clears the content, it is basically the same as clicking "enter" when you are writing a text. <br> | ||
Line 494: | Line 494: | ||
<div class="clear extra_space"></div> | <div class="clear extra_space"></div> | ||
− | <div class="column full_size"> | + | <div class="column full_size" id="menu"> |
<h2> Adding items to your Menu </h2> | <h2> Adding items to your Menu </h2> | ||
− | <div class="column half_size"> | + | <div class="column half_size" id="adding_submenu"> |
<h3> Adding a submenu item </h3> | <h3> Adding a submenu item </h3> | ||
<p> To add another submenu page to your menu, just copy the following code and place it inside the desired submenu wrapper. | <p> To add another submenu page to your menu, just copy the following code and place it inside the desired submenu wrapper. | ||
Line 526: | Line 526: | ||
− | <div class="column half_size"> | + | <div class="column half_size" id="adding_menu"> |
<h3> Adding a menu item </h3> | <h3> Adding a menu item </h3> | ||
<p> Highlight will need to be declared inside another layout box, this highlight class will make the background gray and the size will be slightly smaller. </p> | <p> Highlight will need to be declared inside another layout box, this highlight class will make the background gray and the size will be slightly smaller. </p> | ||
Line 547: | Line 547: | ||
− | <div class="column half_size"> | + | <div class="column half_size" id="adding_submenu_menu"> |
<h3> Adding a menu item with submenu </h3> | <h3> Adding a menu item with submenu </h3> | ||
<p> Highlight will need to be declared inside another layout box, this highlight class will make the background gray and the size will be slightly smaller. </p> | <p> Highlight will need to be declared inside another layout box, this highlight class will make the background gray and the size will be slightly smaller. </p> | ||
Line 644: | Line 644: | ||
<div class="clear extra_space"></div> | <div class="clear extra_space"></div> | ||
− | <div class="column third_size"> | + | <div class="column third_size" id="new_class"> |
<h3> Creating a new class </h3> | <h3> Creating a new class </h3> | ||
<p> In this example we are going to create a new class, it is best practice to name your classes with specific names so other code won't override them. | <p> In this example we are going to create a new class, it is best practice to name your classes with specific names so other code won't override them. | ||
Line 652: | Line 652: | ||
− | <div class="column third_size"> | + | <div class="column third_size" > |
<div class="highlight gray"> | <div class="highlight gray"> | ||
<p> /* create a div with a yellow background*/ <br> | <p> /* create a div with a yellow background*/ <br> | ||
Line 682: | Line 682: | ||
<div class="clear"></div> | <div class="clear"></div> | ||
− | <div class="column third_size"> | + | <div class="column third_size" id="new_class_under"> |
<h3> Creating a new class under an existing one </h3> | <h3> Creating a new class under an existing one </h3> | ||
<p> In this example we are going to create a new class under the highlight class | <p> In this example we are going to create a new class under the highlight class | ||
Line 718: | Line 718: | ||
<div class="clear"></div> | <div class="clear"></div> | ||
− | <div class="column third_size"> | + | <div class="column third_size" id="changing_color"> |
<h3> Change the color of an element </h3> | <h3> Change the color of an element </h3> | ||
<p>This is very simple and easy thing to do. First, you will need to find which element or class you want to modify and then replace the hex code for the color. In the following example we | <p>This is very simple and easy thing to do. First, you will need to find which element or class you want to modify and then replace the hex code for the color. In the following example we |
Revision as of 17:02, 21 March 2017
Template Documentation for Teams
This page will help you edit and build your team wiki based on the default template given to your team.
The template is composed of html, css and jquery, you can find the original code here: Template: Example 2
Templates are a very useful to avoid repeating the same code or text. The way they are used in the iGEM wiki is that they host the menu and the general css styling for a group of pages. another good use is to have a banner on top of every page.
HTML
Text
To write text use the < p > tag
<p> Text </p>
Titles
You can add title using the h tag, here is how the different sizes look:
Title one
Title two
Title three
Title four
Title five
Title six
<h1>Title one </h1>
<h2>Title two </h2>
<h3>Title three </h3>
<h4>Title four </h4>
<h5>Title five </h5>
<h6>Title six </h6>
Links
When creating links use the < a > tag, links will display : Example
<a href="link url "> LINK </a>
Images
You can add images to your website by using the img tag, remember all your images must be hosted on the iGEM server.
<img src="image URL ">
Unordered Lists
Use the following example to create a simple list.
Painting materials:
- Brushes
- Acrylic paint
- Watercolors
<b>Painting Materials</b>
<ul>
<li> Brushes </li>
<li> Acrylic paint </li>
<li> Watercolors </li>
</ul>
Numbered Lists
To create an ordered list, use:
Things to buy:
- Milk
- Eggs
- Flour
<b>Things to buy: </b>
<ol>
<li> Milk </li>
<li> Eggs </li>
<li> Flour </li>
</ol>
Nested Lists
Here is an example of a nested list.
- Cold Colors
- Warm Colors
- Red
- Orange
- Yellow
<ul>
<li> Cold Colors </li>
<li> Warm Colors
<ol>
<li> Red </li>
<li> Orange </li>
<li> Yellow </li>
</ol>
</li>
</ul>
Tables
Tables created within in a page already have styling and will display:
Header 1 | Header 2 |
---|---|
Content A 1 | Content B 1 |
Content A 2 | Content B 2 |
<table>
<tr>
<th> Header 1 </th> <th> Header 2 </th>
</tr>
<tr>
<td> Content A 1 </td> <td> Content B 1 </td>
</tr>
<tr>
<td> Content A 2 </td> <td> Content B 2 </td>
</tr>
</table>
Layout classes
Columns
Layout classes will help structure your page. You will need to call it when you start your page to have the proper layout and make it responsive. There are two types of layout options having two columns or just one. For one column call the class column full_size and for two columns call column half_size. Here is an example to the right.
<div class="column half_size" >
<p> Content goes here </p>
</div>
Support Classes
Highlight
Highlight will need to be declared inside another layout box, this highlight class will make the background gray and the size will be slightly smaller.
<div class="column half_size" >
<div class="highlight">
</div>
</div>
Styling highlight class
There are ways to style the highlight class, you can add:
- class="highlight gray" to add a gray background
- class="highlight blue_top" to add a blue decorative line on top
- class="highlight blue_border" to add a blue border around the div
These classes can be combined to create different effects, as seen in the next examples.
<div class="column half_size" >
<div class="highlight gray blue_top">
</div>
</div>
<div class="column half_size" >
<div class="highlight gray blue_border">
</div>
</div>
Button
You can use the button class to highlight a link in your wiki.
<div class="button"> <a href="URL"> REGISTER NOW! </a> </div>
Clear
This class clears the content, it is basically the same as clicking "enter" when you are writing a text.
If you add the "extra_space" class, it will add extra vertical spacing between your divs.
<div class="clear extra_space"> </div>