Template Documentation for Teams
On this page you will find:
HTML:
Colors,
Text,
Titles,
Links,
Images,
Unordered list,
Ordered list,
Nested list, and
Tables.
Layout Classes,
Support Classes:
Highlight,
Styling highlight class,
Button,
Clear.
Menu and Templates.
CSS:
Creating a new class,
Creating a new class under an existing one,
Changing the color of an element.
JQUERY
This page will help you edit and build your wiki based on the default template given to your team. You will find code examples that you can simply copy and paste on your wiki to create tables, links and images to document your project.
You can also visit the Wiki Editing Help page ato find quick links and other resources to help you get started working on your wiki.
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, the general css styling and the javascript code for a group of pages. Another good use is to have a banner on your template so it appears on every of your wiki pages, ypu can take a look at previous teams to get some inspiration.
HTML
Hypertext Markup Language, or HTML, is a standardized system for tagging text to create font, color, graphic, and hyperlink styling on websites. Below we will go over the general tags used to create a standard wiki page.
Colors
The colors used on your template are:
#635d5d | #484848 | #00a19b | #085156 | #cecece | #ececec | #ffb819 |
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 Link
<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 three types of layout options having three, two or just one column. For one column call the class column full_size and for two columns call column two_thirds_size and for three columns third_size. Below are a few layout options, we recommend adding a div with the clear class (see below) in between rows to ensure rows are separated.
<div class="column full_size" >
</div>
<div class="column two_thirds_size" >
</div>
<div class="column third_size" >
</div>
<div class="column third_size" >
</div>
<div class="column third_size" >
</div>
<div class="column third_size" >
</div>
Support Classes
Highlight
Highlight will need to be declared inside another layout box, this highlight class will add extra padding to the div and can be styled for different effects.
<div class="column half_size" >
<div class="highlight">
</div>
</div>
Styling highlight class
There are ways to style the highlight class, you can add:
- highlight decoration_background to add a gray background
- highlight decoration_A_top to add a blue decorative line on top
- highlight decoration_B_top to add a orange decorative line on top
- highlight decoration_A_full to add a blue border around the div
- highlight decoration_B_full to add a orange border around the div
These classes can be combined to create different effects, as seen in the next examples.
<div class="column third_size" >
<div class="highlight decoration_background decoration_A_top">
</div>
</div>
<div class="column third_size" >
<div class="highlight decoration_B_full">
</div>
</div>
<div class="column third_size" >
<div class="highlight decoration_background decoration_A_full">
</div>
</div>
Button
You can use the button class to highlight a link in your wiki.
<div class="button_link"> <a href="URL"> EXAMPLE BUTTON </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>
Menu and Templates
The menu is automatically generated by the {{IGEM_TopBar}} template. This menu includes all the links that the judges will use to evaluate your team's wiki.
This template also has all the CSS and Javascript to make the template work. There is a second template on each of your wiki pages {{TeamName}}, that you can edit freely.
If you wish to replace the menu and get rid of the default template, you will have to follow these steps:
- Login to your iGEM account
- Go to your team's wiki page and click 'edit' from the top black bar menu
- Delete the following line from the page '{{IGEM_TopBar}}'
You will have to repeat on each page of your team wiki in order to remove the TopBar style
If you want to clear all default wiki settings, do the edits to your team's template {{TeamName}}:
- Login to your iGEM account
- Go to your team's template page and click 'edit' from the top black bar menu
- Add this inside the 'style' tags:
#sideMenu, #top_title, .patrollink, #firstHeading, #home_logo, #sideMenu { display:none; }
#content { padding:0px; width:100%; margin-top:-7px; margin-left:0px; border:none;}
body, html {background-color:white; width: 100%; height: 100%;}
#bodyContent h1, #bodyContent h2, #bodyContent h3, #bodyContent h4, #bodyContent h5 { margin-bottom: 0px; }
#bodyContent a[href ^="https://"], .link-https { padding-right:0px;}
CSS
CSS will provide styling for your HTML elements, the attributes are ordered alpahabetically in the template and each of them modifies the function and appareance of the class. Here is a list of the most common attributes used in the code.
Take a look at the code and see how each element is defined, if you want change a color for a particular thing, you can modify the hex code for that color or modify the size or anything you need!
- size
- width
- height
- layout
- position
- margin
- padding
- float
- display
- color
- border
- background-color
- font
- text-align
- font-weight
- text decoration
- color
- other
- list-style-type
- cursor
- -transition
Creating a new class
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. The following code shows how to make a class that changes the color of text.
/* highlight with a full orange border decoration */
.igem_2021_team_content .igem_2021_team_column_wrapper .orange_text {
color: #ffb819;
}
<p class="orange_text"> Orange text </p>
Creating a new class under an existing one
In this example we are going to create a new class for an orange background under the highlight class. You will need to follow the precise naming of the classes in the code for it to work correclty when you call it in your html. First declare the two content wrappers: ".igem_2021_team_content .igem_2021_team_column_wrapper" and then specify the highlight class and the name of your new class: ".highlight.orange_background" Next you will find the necessary CSS code and then and example of how to call it on your html.
/* highlight with a full orange border decoration */
.igem_2021_team_content .igem_2021_team_column_wrapper .highlight.orange_background {
background-color: #ffb819;
}
<p class="orange_text"> Example of an orange background </p>
Change the color of an element
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 change the color of h1 and h2 to orange.
/* styling for the titles h1 h2 */
.igem_2021_team_content .igem_2021_team_column_wrapper h1, .igem_2021_team_content .igem_2021_team_column_wrapper h2 {
padding:5px 15px;
border-bottom: 0px;
color: #ffb819;
}
<h1> This is now orange </h1>
<h2> This is now orange </h2>
This is now orange
This is now orange
JQUERY
Javascript and Jquery make the menu and other interactive elements in the website work, for example the open and closing of the submenus along with the icon that reflects the state of said submenu. You can learn more about by visiting: https://learn.jquery.com/