Difference between revisions of "Code Documentation"
Line 10: | Line 10: | ||
<a href= "https://2015.igem.org/Code_Documentation#links"> <li>Links</li></a> | <a href= "https://2015.igem.org/Code_Documentation#links"> <li>Links</li></a> | ||
<a href= "https://2015.igem.org/Code_Documentation#tables"> <li>Tables</li></a> | <a href= "https://2015.igem.org/Code_Documentation#tables"> <li>Tables</li></a> | ||
+ | <a href= "https://2015.igem.org/Code_Documentation#text"> <li>Text</li></a> | ||
+ | <a href= "https://2015.igem.org/Code_Documentation#list"> <li>Lists</li></a> | ||
</ul> | </ul> | ||
<br><br> | <br><br> | ||
− | <h4> | + | <h4>Classes </h4> |
<ul> | <ul> | ||
<a href= "https://2015.igem.org/Code_Documentation#newspost"> <li>News Post</li></a> | <a href= "https://2015.igem.org/Code_Documentation#newspost"> <li>News Post</li></a> | ||
Line 153: | Line 155: | ||
<div class="clear"></div><div class="clear"></div> | <div class="clear"></div><div class="clear"></div> | ||
+ | |||
+ | |||
+ | <h4 id="text">Text</h3> | ||
+ | <p> To create text simply call the < p > tag: </p> | ||
+ | <pre><b> <p> Lorem ipsum dolor sit amet, vis in paulo munere, mel commune ocurreret ex. </p></b></pre> | ||
+ | |||
+ | |||
+ | <div class="clear"></div><div class="clear"></div> | ||
+ | |||
+ | <h4 id="list">List</h3> | ||
+ | <p>To create a simple list you will need to open a < ul > tag and then create < li > list item for every bulleted item you wish to create. You can also use < ol > (ordered list) instead of < ul > (unordered list) to replace the bullet points with numbers</p> | ||
+ | <pre> | ||
+ | <ol> | ||
+ | |||
+ | <li> List item 1 </li> | ||
+ | <li> List item 2 </li> | ||
+ | <li> List item 3 </li> | ||
+ | |||
+ | </ol> | ||
+ | </pre> | ||
+ | <p> Lists can also be nested within themselves, here is an example:</p> | ||
+ | <pre> | ||
+ | <ul> | ||
+ | |||
+ | <li> List item 1 | ||
+ | <ol> | ||
+ | <li> sublist item 1 </li> | ||
+ | <li> sublist item 2 </li> | ||
+ | <li> sublist item 3 </li> | ||
+ | </ol> | ||
+ | </li> | ||
+ | |||
+ | </ul> | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | <div class="clear"></div><div class="clear"></div> | ||
<div class="clear"></div><div class="clear"></div> | <div class="clear"></div><div class="clear"></div> | ||
Revision as of 18:30, 19 March 2015
Creating Content
Classes
This page documents and explains the CSS and HTML used in the 2015 site.
Creating a Page
To create a full width page, use:
{{2015Top}} <html> <div id="fullWidth"> <!-- alert message, the text can be edited ----> <div id="alertMessage"> Please note that the information on this page is information migrated from 2014.igem.org. <br>iGEM HQ is currently working on updating this information for the iGEM 2015 competition. </div> <!-- start of content ----------------------------------------> ********** Your html should be placed here. ********** <!-- end of content ----------------------------------------> </div> <div class="clear"></div> </html> {{2015Bottom}}<html> </div> </html>
To create a Page that will use a side menu use:
{{2015Top}} <html> <div id="leftColumn"> <h4>On this page </h4> <ul> <a href="You link goes here"> <li>Name goes here </li></a> <a href="You link goes here"> <li>Name goes here </li></a> <a href="You link goes here"> <li>Name goes here </li></a> </ul> </div> <div id="rightColumn"> <!-- alert message, the text can be edited ----> <div id="alertMessage"> Please note that the information on this page is information migrated from 2014.igem.org. <br>iGEM HQ is currently working on updating this information for the iGEM 2015 competition. </div> <!-- start of content ----------------------------------------> ********** Your html should be placed here. ********** <!-- end of content ----------------------------------------> </div> <div class="clear"></div> </html> {{2015Bottom}}<html> </div> </html>
Links
Regular links
text<a href="link"> link text </a>
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 |
To create a table use the following html code
<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>
Text
To create text simply call the < p > tag:
<p> Lorem ipsum dolor sit amet, vis in paulo munere, mel commune ocurreret ex. </p>
List
To create a simple list you will need to open a < ul > tag and then create < li > list item for every bulleted item you wish to create. You can also use < ol > (ordered list) instead of < ul > (unordered list) to replace the bullet points with numbers
<ol> <li> List item 1 </li> <li> List item 2 </li> <li> List item 3 </li> </ol>
Lists can also be nested within themselves, here is an example:
<ul> <li> List item 1 <ol> <li> sublist item 1 </li> <li> sublist item 2 </li> <li> sublist item 3 </li> </ol> </li> </ul>
Creating a News post
<div class="newsItem"> <div class="newsDate"> Day/Month</div> <h5>Title of your post</h5> <p>The text will go here </p> </div>
Title of your post
The text will go here
Clear
Clear class helps add vertical spacing
<div class="clear"></div>
Creating a Button
To create a button use:
<a href="Your link goes here "> <div class="button"> TITLE GOES HERE </div> </a>
Images with links
Make images change when hovering, this should be used when the image links to another page.
<img class="imageHover" src=" image address ">
Highlight Text
This class will make your text be red and bold.
<p class="highlightText">Your highlighted text</p>
Your highlighted text
Alert Message
Create an alert message for important information
<div class="alertMessage"><p>Place your message here.</p></div>
Place your message here.
Highlight Boxes
There are two types of boxes that can be created to highlight a particular part of the page.
Highlight box A creates a box that will float on the right side of the page
<div class="highlightBoxA"><p>Place your message here.</p></div>
Title
Place your message here.
Highlight box B creates a box that will float center
<div class="highlightBoxB"><p>Place your message here.</p></div>
Title
Place your message here.
Centering Images
Centers an images to the middle of the page
<div class="centerImages"><img src=" your image " ></div>