Difference between revisions of "Code Documentation"
m |
|||
Line 19: | Line 19: | ||
<a href= "https://2015.igem.org/Code_Documentation#clearclass"> <li>Clear</li></a> | <a href= "https://2015.igem.org/Code_Documentation#clearclass"> <li>Clear</li></a> | ||
<a href= "https://2015.igem.org/Code_Documentation#button"> <li>Buttons</li></a> | <a href= "https://2015.igem.org/Code_Documentation#button"> <li>Buttons</li></a> | ||
+ | <a href= "https://2015.igem.org/Code_Documentation#imagehover"> <li>Hover images</li></a> | ||
+ | <a href= "https://2015.igem.org/Code_Documentation#highlightText"> <li>Highlight Text</li></a> | ||
</ul> | </ul> | ||
</div> | </div> | ||
Line 194: | Line 196: | ||
<h3 id="imagehover">Images with links</h3> | <h3 id="imagehover">Images with links</h3> | ||
<p>Make images change when hovering, this should be used when the image links to another page.</p> | <p>Make images change when hovering, this should be used when the image links to another page.</p> | ||
− | <pre><img class="imageHover" src=" image address " > | + | <pre><img class="imageHover" src=" image address "> |
</pre> | </pre> | ||
+ | <br> | ||
+ | <img class="imagehover" src="https://static.igem.org/mediawiki/2015/e/e4/IGEM_2015logo.jpg" width="50px"> | ||
+ | |||
+ | <div class="clear"></div><div class="clear"></div> | ||
+ | |||
+ | |||
+ | <h3 id="highlightText">Highlight Text</h3> | ||
+ | <p>This class will make your text be red and bold.</p> | ||
+ | <pre><p class="highlightText "> Your highlighted text</p> | ||
+ | </pre> | ||
+ | |||
+ | <p class="highlightText"> Your highlighted text </p> | ||
+ | |||
+ | |||
+ | <div class="clear"></div><div class="clear"></div> | ||
+ | |||
+ | |||
+ | <h3 id="alertmessage">Alert Message</h3> | ||
+ | <p>Make images change when hovering, this should be used when the image links to another page.</p> | ||
+ | <pre><p class="highlightText "> Your highlighted text</p> | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | |||
Revision as of 15:11, 19 March 2015
Creating Content
Using 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>
Creating a News post on the Main Page
<div class="newsItem"> <div class="newsDate"> Day/Month</div> <h5>Title of your post</h5> <p>The text will go here </p> </div>
Clear
Clear class helps add vertical spacing
<div class="clear"></div>
Creating a Button
Buttons will align center and will display:
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
Make images change when hovering, this should be used when the image links to another page.
<p class="highlightText "> Your highlighted text</p>