Difference between revisions of "Template:Example"

(Created page with "{{Template_All_Teams}} <!-- Declare that you are going to use html code instead of wiki code --> <html> <!-- Start of CSS--> <style type="text/css"> PAGE LAYOUT: ...")
 
(Prototype team template page)
 
(445 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Template_All_Teams}}
 
 
<!-- Declare that you are going to use html code instead of wiki code -->
 
 
<html>
 
<html>
  
<!-- Start of CSS-->
+
<style>
<style type="text/css">
+
  
/* PAGE LAYOUT */
+
/********************************* DEFAULT WIKI SETTINGS  ********************************/
  
/* Change Background color*/
+
#sideMenu, #top_title {display:none;}
body {  
+
#content { padding:0px; width:1000px; margin-top:-7px; margin-left:0px;}
background-color: #fff;
+
body {background-color:white; }
}
+
#bodyContent h1, #bodyContent h2, #bodyContent h3, #bodyContent h4, #bodyContent h5 { margin-bottom: 0px; }
  
/* Creates a container that will wrap all of the content inside your wiki pages. */
+
/********************************* MENU ********************************/
#mainContainer {
+
/* Wrapper for the menu */
width: 978px;
+
.menu_wrapper {  
overflow:hidden;
+
width:150px;  
float:left;
+
height:100vh;  
margin-left:20px;
+
position:fixed;  
margin-bottom: 10px;
+
padding:0px;
background-color: #fff;  
+
float:left;  
border-bottom: 14px solid #565656;
+
background-color:#f2f2f2;  
border-right: 2px solid #565656;
+
text-align:left;
border-left: 2px solid #565656;
+
}
border-top: 2px solid #565656;
+
font-family: "Trebuchet MS", Helvetica, sans-serif;
+
}
+
  
/* Creates the container for the menu */
+
/* styling for the menu items */
#menuContainer  {  
+
.menu_item {
float:left;
+
width:100%;  
width: 134px;
+
margin:-2px 0px 0px -20px;  
padding: 20px 0px;
+
padding: 10px 10px;
border-top: 14px solid #565656;
+
border-bottom: 1px solid #d3d3d3;  
background-color: #E8E8E9;
+
font-weight:bold;
}
+
color:#000000;
 +
cursor: pointer;  
 +
}
  
/* Creates the container for the content */
+
/* when hovering on a menu item */
#contentContainer {
+
.menu_item:hover {  
padding-top:20px;
+
color:#000000;  
padding-right:10px;
+
background-color: #72c9b6;
margin-bottom: 20px;
+
}
width: 814px;
+
padding-left: 20px;
+
float: left;
+
background-color: #fff;
+
border-top: 14px solid #565656;
+
font-family: "Trebuchet MS", Helvetica, sans-serif;
+
}
+
  
/*Set up height place holder for the banner*/
+
/* decoration icon for the menu buttons*/
#bannerContainer {
+
.icon {
height:200px;
+
float:right;
margin:auto;
+
font-size:16px;  
text-align:center;
+
font-weight:bold;  
color: #24B694;
+
}
}
+
 +
/* this is the icon for when the content is collapsed */
 +
.plus::before {
 +
content: "+";
 +
}
 +
/* this is the icon for when the content is expanded */
 +
.less::before {
 +
content: "–";  
 +
}
  
/*VISUAL STYLE (TABLES, FONTS, LINKS, IMAGES, UL) */
+
/* styling for the ul that creates the buttons */
 +
ul.menu_items {
 +
width:100%;
 +
margin-left:0px;
 +
padding:0px;
 +
list-style: none;
 +
}
  
/*Change the styling of text for everything inside main container*/
+
/* styling for the li that are the menu items */
#mainContainer p {  
+
.menu_items li {  
font-size: 13px;
+
width:90%;
color: #000000;
+
margin-top:-2px;  
}
+
padding: 15px 0px 15px 15px ;  
+
display:block;
/*This changes the color and font family */
+
border-bottom: 1px solid #d3d3d3; 
#contentContainer h1, h2, h3, h4, h5, h6 {
+
text-align:left;
color: #565656;
+
font-weight:bold;
border-bottom: none;
+
text-decoration:none;
font-weight: bold;
+
color:#000000;  
font-family: "Trebuchet MS", Helvetica, sans-serif;
+
list-style-type:none;  
margin-top:10px;
+
cursor:pointer;
}
+
-webkit-transition: all 0.4s ease;  
 +
-moz-transition: all 0.4s ease;
 +
-ms-transition: all 0.4s ease;  
 +
-o-transition: all 0.4s ease; transition: all 0.4s ease;
 +
}
  
/*Style of the links - links are different inside the menu */
+
.menu_item a {
#contentContainer a {
+
width: 100%;
font-weight: bold;
+
margin-left: -20px;
color: #23b593;
+
padding: 11px 90px 12px 20px;
}
+
text-decoration: none;
 +
color:black;
 +
}
  
  /* Styling links on hover- links are different inside the menu */
+
/* When hovering on a menu item */
#contentContainer a:hover {  
+
.menu_items li:hover {  
color: #59bf92;
+
background-color:#72c9b6;
}
+
color: #000000;
 +
}
  
/*Change the styling of tables */
+
/* styling for the submenus */
        #contentContainer table {
+
.submenu {
    border: 1px solid #565656;
+
width:100%;  
    border-collapse: collapse;
+
display: none;
    width: 90%
+
font-weight:bold;
    margin: auto;
+
cursor:pointer;  
    margin-bottom: 15px;
+
    margin-top: 15px;
+
    margin-right: 10px;
+
    margin-left: 10px;
+
    }
+
  
/*Change the styling of table cells*/
+
}
    #contentContainer  td {
+
    padding: 10px;
+
    border: 1px solid #565656;
+
    border-collapse: collapse;
+
    vertical-align: text-top;
+
    }
+
  
/*Change the styling of table headers */
+
/* moving the margin for the submenu ul list */
    #contentContainer th {
+
ul.submenu {  
    background-color: #E8E8E9;
+
width: 100%;
    padding: 10px;
+
margin: 10px 0px -11px 0px;
    border: 1px solid #565656;
+
list-style: none;
    border-collapse: collapse;
+
}
    vertical-align: text-top;
+
    }
+
  
 +
/*styling for the submenu buttons */
 +
.submenu li {
 +
width: 100%;
 +
margin-left: 10px;
 +
margin-bottom: 0px;
 +
}
  
  
/*MENU STYLING */
+
/* hover state for the submenu buttons */
 +
.submenu li a {
 +
width: 100%;
 +
padding: 5px 10px;
 +
display: inline-block;
 +
border-bottom: 1px solid #d3d3d3;
 +
background-color:white;
 +
text-decoration:none;
 +
color:#000000;
 +
}
  
/*Styling for the links in the menu */
 
#menuContainer a {
 
color: #565656;
 
text-decoration:none;
 
font-weight: bold;
 
}
 
  
/* Sets the style for lists inside menuContainer  */
 
#menuContainer ul {
 
list-style: none;
 
margin-left:0px;
 
}
 
  
/*Styles the list items to become menu buttons */
+
.submenu li a:hover  {
#menuContainer ul li {  
+
background-color:#000000;  
text-align: center;
+
color: #72c9b6;
display: block;
+
}
width: 100%;
+
height:30px;
+
padding-top:10px;
+
}
+
  
/*For the menu buttons, changes the color when hovering*/
 
#menuContainer li:hover {
 
color:  #FFF;
 
background-color: #24B694;
 
}
 
  
/*Submenus are not displayed as default*/
+
/* When the screen is smaller than 680px, the menu has the option to hide/show - this button controls that */
#menuContainer li ul {
+
.collapsable_menu_control {  
display: none;
+
width:100%;
padding-top:15px;
+
padding: 15px 0px;
margin-left: -19px;
+
display:none;  
}
+
background-color:#000000;  
 +
text-align:center; 
 +
font-weight:bold;
 +
color:#72c9b6;
 +
cursor:pointer;
 +
-webkit-transition: all 0.4s ease;
 +
-moz-transition: all 0.4s ease;
 +
-ms-transition: all 0.4s ease;
 +
-o-transition: all 0.4s ease;
 +
transition: all 0.4s ease;  
 +
}
  
/*Submenus are displayed when hovering the menu button */
+
/* when hovering on that button */
#menuContainer li:hover ul {
+
.collapsable_menu_control:hover {  
/*display: inline-block; */
+
background-color: #72c9b6;
display: block;  
+
color:#000000;
position: absolute;
+
}
float:right;
+
margin-left: 134px;
+
margin-top:-42px;
+
}
+
  
/*Style the submenu buttons*/
+
/********************************* CONTENT OF THE PAGE ********************************/
#menuContainer li ul li{
+
background-color: #59BF92;
+
padding-left:20px;
+
padding-right:20px;
+
height:30px;
+
padding-top:10px;
+
margin-top:-2px;
+
color: #565656;
+
width: 150px;
+
}
+
  
/*CLASSES */
+
/* Wrapper for the content */
 +
.content_wrapper {
 +
width: 85%;
 +
margin-left:150px;
 +
padding:10px 0px;
 +
float:left;
 +
background-color:white;
 +
}
  
/*Clear class for all the pages, adds spacing too*/
+
/*LAYOUT */
.clear{
+
.column  {  
clear:both;
+
padding: 10px 0px;
height: 10px;
+
float:left;
}
+
background-color:white;  
 +
}
  
 +
.full_size {
 +
width:100%;
 +
}
  
/* highlight box for special messages */
+
.full_size img {  
    .highlightBox {
+
padding: 10px 15px;
        width:500px;
+
width:96.5%;  
        margin:auto;
+
}
        background-color: #E8E8E9;
+
margin-bottom: 15px;
+
margin-top: 15px;
+
padding: 15px;
+
padding-top: 5px;
+
    }
+
  
 +
.half_size {
 +
width: 50%;
 +
}
 +
.half_size img {
 +
padding: 10px 15px;
 +
width: 93%;
 +
}
  
</style>
 
<!-- End of CSS -->
 
  
 +
.clear {
 +
clear:both;
 +
}
  
<!-- Start of the template html elements. -->
+
.highlight {
<div id ="mainContainer"><!--The closing tag for mainContainer should be placed at the bottom of each content page.-->
+
width: 90%;
 +
margin: auto;
 +
padding: 15px 5px;
 +
background-color: #f2f2f2;
 +
}
  
 +
.judges-will-not-evaluate {
 +
border: 4px solid #72c9b6;
 +
display: block;
 +
margin: 5px 15px;
 +
width: 95%;
 +
font-weight:bold;
 +
}
  
<div id="bannerContainer">
 
<br><br>
 
<h2> Add a banner to your wiki! </h2>
 
 
<p>You can make the image 980px  by  200px</p>
 
<p> Remember to call the file: "<i>Team_Example_banner.jpg</i>" </p>
 
</div>
 
  
<!-- Start of menu -->
+
/*STYLING */
<div id="menuContainer">
+
  
<!-- This list is your menu, every list item is a menu button and nested listed become submenu buttons -->
+
/* styling for the titles */
<ul>
+
.content_wrapper h1, .content_wrapper h2 {
<a href="https://2015.igem.org/Team:Example"><li>HOME</li></a>
+
padding:5px 15px;
 +
border-bottom:0px;
 +
color:#72c9b6;
  
<a href="https://2015.igem.org/Team:Example/Team"><li>TEAM</li></a>
+
}
 +
.content_wrapper h3, .content_wrapper h4, .content_wrapper h5, .content_wrapper h6 {
 +
padding:5px 15px;
 +
border-bottom:0px;
 +
color: #000000; 
 +
}
 +
 
 +
 
 +
/* font and text */
 +
.content_wrapper p {
 +
padding:0px 15px;
 +
font-size: 13px;
 +
font-family:Tahoma, Geneva, sans-serif;
 +
}
 +
 
 +
/* Links */
 +
.content_wrapper a {
 +
font-weight: bold;
 +
text-decoration: underline;
 +
text-decoration-color:#72c9b6;
 +
color: #72c9b6;
 +
-webkit-transition: all 0.4s ease;
 +
-moz-transition: all 0.4s ease;
 +
-ms-transition: all 0.4s ease;
 +
-o-transition: all 0.4s ease;
 +
transition: all 0.4s ease;
 +
}
 +
 
 +
/* hover for the links */
 +
.content_wrapper a:hover {
 +
text-decoration:none;
 +
color:#000000;
 +
}
 +
 
 +
/* non numbered lists */
 +
.content_wrapper ul {
 +
padding:0px 20px;
 +
font-size: 13px;
 +
font-family:Tahoma, Geneva, sans-serif;
 +
}
 +
 
 +
/* numbered lists */
 +
.content_wrapper ol {
 +
padding:0px;
 +
font-size: 13px;
 +
font-family:Tahoma, Geneva, sans-serif;
 +
}
 +
 
 +
/* Table */
 +
.content_wrapper table {
 +
width: 97%;
 +
margin:15px 10px;
 +
border: 1px solid #d3d3d3;
 +
border-collapse: collapse;
 +
}
 +
 
 +
/* table cells */
 +
.content_wrapper  td {
 +
padding: 10px;
 +
vertical-align: text-top;
 +
border: 1px solid #d3d3d3;
 +
border-collapse: collapse;
 +
}
 +
 
 +
/* table headers */
 +
.content_wrapper th {
 +
padding: 10px;
 +
vertical-align: text-top;
 +
border: 1px solid #d3d3d3;
 +
border-collapse: collapse;
 +
background-color:#f2f2f2;
 +
}
 +
 
 +
/* Button class */
 +
.button_click {
 +
margin: 10px auto;
 +
padding: 15px; width:12%; 
 +
text-align:center;
 +
font-weight:bold;
 +
background-color: #72c9b6;
 +
cursor:pointer; 
 +
-webkit-transition: all 0.4s ease;
 +
-moz-transition: all 0.4s ease;
 +
-ms-transition: all 0.4s ease;
 +
-o-transition: all 0.4s ease;
 +
transition: all 0.4s ease;
 +
}
 +
 
 +
/* button class on hover */
 +
.button_click:hover { 
 +
background-color:#000000;
 +
color:#72c9b6;
 +
}
 +
 
 +
/********************************* RESPONSIVE STYLING ********************************/
 +
 
 +
/* IF THE SCREEN IS LESS THAN 1000PX */
 +
 
 +
@media only screen and (max-width: 1000px) {
 +
 
 +
#content {width:100%; }
 +
.menu_wrapper {width:15%;}
 +
.content_wrapper {margin-left: 15%;}
 +
.menu_item {display:block;}
 +
.icon {display:none;}
 +
.highlight {padding:10px 0px;}
 +
}
 +
 
 +
 
 +
/* IF THE SCREEN IS LESS THAN 680PX */
 +
 
 +
@media only screen and (max-width: 680px) {
 +
.collapsable_menu_control { display:block;}
 +
.menu_item {display:none;}
 +
.menu_wrapper { width:100%; height: 15%; position:relative;}
 +
.content_wrapper {width:100%; margin-left:0px;}
 +
.column.half_size {width:100%; }
 +
.column img { width: 100%; padding: 5px 0px;}
 +
.icon {display:block;}
 +
.highlight {padding:15px 5px;}
 +
}
 +
 
 +
</style>
 +
 
 +
 
 +
 
 +
 
 +
<!--- THIS IS WHERE THE HTML BEGINS --->
 +
 
 +
 
 +
<!-- This tells the browser that your page is responsive -->
 +
 
 +
<head>
 +
<meta name="viewport" content="width=device-width, initial-scale=1">
 +
</head>
 +
 
 +
 
 +
 
 +
 
 +
<div class="menu_wrapper" >
 +
 
 +
 
 +
 
 +
 
 +
<div class="collapsable_menu_control"> MENU ▤ </div>
 +
 
 +
<ul id="accordion" class="accordion">
 +
 
 +
<li class="menu_item"> <a href="https://2016.igem.org/Team:Example">HOME </a> </li>
 +
 
 +
 
 +
<li class="menu_item"> <div class="icon plus"></div> TEAM
 +
<ul class="submenu">
 +
<li> <a href=" https://2016.igem.org/Team:Example/Team"> Team  </a> </li>
 +
<li> <a href="https://2016.igem.org/Team:Example/Collaborations">★  Collaborations </a> </li>
 +
                    </ul>
 +
                </li>
 +
 
 +
<li class="menu_item"> <div class="icon plus"></div> PROJECT 
 +
<ul class="submenu">
 +
<li> <a href="https://2016.igem.org/Team:Example/Description"> ★  Description </a></li>
 +
<li> <a href="https://2016.igem.org/Team:Example/Design"> ★ Design </a></li>
 +
<li> <a href="https://2016.igem.org/Team:Example/Experiments"> Experiments </a></li>
 +
<li> <a href="https://2016.igem.org/Team:Example/Proof"> ★ Proof of Concept </a></li>
 +
<li> <a href="https://2016.igem.org/Team:Example/Demonstrate"> ★ Demonstrate </a></li>
 +
<li> <a href="https://2016.igem.org/Team:Example/Results"> Results </a></li>
 +
<li> <a href="https://2016.igem.org/Team:Example/Notebook"> Notebook </a></li>
 +
                    </ul>
 +
                </li>
 +
 
 +
<li class="menu_item"> <div class="icon plus"></div> PARTS 
 +
<ul class="submenu">
 +
<li> <a href="https://2016.igem.org/Team:Example/Parts">Parts </a></li>
 +
<li> <a href="https://2016.igem.org/Team:Example/Basic_Part"> ★ Basic Parts </a></li>
 +
<li> <a href="https://2016.igem.org/Team:Example/Composite_Part"> ★ Composite Parts </a></li>
 +
<li> <a href="https://2016.igem.org/Team:Example/Part_Collection"> ★ Part Collection </a></li>
 +
                    </ul>
 +
                </li>
 +
 
 +
 
 +
<li class="menu_item"> <a href="https://2016.igem.org/Team:Example/Safety"> SAFETY </a> </li>
 +
 
 +
 
 +
<li class="menu_item"> <a href="https://2016.igem.org/Team:Example/Attributions">★  ATTRIBUTIONS </a></li>
 +
 
 +
 
 +
<li class="menu_item"> <div class="icon plus"></div> HUMAN PRACTICES
 +
<ul class="submenu">
 +
<li> <a href="https://2016.igem.org/Team:Example/Human_Practices"> Human Practices </a></li>
 +
<li> <a href="https://2016.igem.org/Team:Example/HP/Silver">★ Silver </a></li>
 +
<li> <a href="https://2016.igem.org/Team:Example/HP/Gold">★ Gold </a></li>
 +
<li> <a href="https://2016.igem.org/Team:Example/Integrated_Practices"> ★ Integrated Practices </a></li>
 +
<li> <a href="https://2016.igem.org/Team:Example/Engagement">★ Engagement </a></li>
 +
                    </ul>
 +
                </li>
 +
 
 +
 
 +
<li class="menu_item"> <div class="icon plus"></div> AWARDS
 +
<ul class="submenu">
 +
<li><a href="https://2016.igem.org/Team:Example/Entrepreneurship"> ★ Entrepreneurship </a></li>
 +
<li> <a href="https://2016.igem.org/Team:Example/Hardware"> ★ Hardware </a></li>
 +
<li> <a href="https://2016.igem.org/Team:Example/Software">★ Software </a></li>
 +
<li> <a href="https://2016.igem.org/Team:Example/Measurement">★  Measurement </a></li>
 +
<li> <a href="https://2016.igem.org/Team:Example/Model">★ Model </a></li>
 +
 
 +
                    </ul>
 +
                </li>
 +
</ul>
 +
 
 +
</div>
 +
 
 +
 
 +
 
 +
 
 +
 
 +
<div class="content_wrapper">
 +
 
 +
 
 +
 
 +
<h1 id="team_name">  </h1>
 +
<h4 id="page_name">  </h4>
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
<script>
 +
 
 +
// This is the jquery part of your template.  Try not modify any of this code since it makes your menu work.
 +
 
 +
$(document).ready(function() {
 +
 
 +
$("#HQ_page").attr('id','');
 +
 +
 
 +
if ( wgPageName.substring( 0,  8) == "Template")  {  // if the page is a template it displays the full name in a single line
 +
$("#team_name").html( wgPageName );
 +
}
 +
 
 +
else if (  ( (wgPageName.match(/\//g) || []).length ) == 0 ) {  // if it is the home page , just print the team's name
 +
$("#team_name").html( wgPageName.substring( 5, wgPageName.length ) );
 +
}
 +
 
 +
else {
 +
// this adds the team's name as an h1
 +
$("#team_name").html( wgPageName.substring( 5 , wgPageName.indexOf("/")  ) );
 +
 
 +
// this adds the page's title as an h4
 +
$("#page_name").html (    ( wgPageName.substring( wgPageName.indexOf("/") + 1, wgPageName.length ) ).replace( /\/|_/g , " ")  );
 +
}
 +
 
 +
 
 +
if( ($(location).attr('href')).indexOf("submit") >= 0  ) {
 +
$(".menu_wrapper").css( { "position": "absolute", "height": "auto"});
 +
$("#wpTextbox1").css( 'margin-top', '440px');
 +
}
 +
 
 +
 
 +
 
 +
 
 +
$('#accordion').find('.menu_item').click(function(){
 +
 
 +
//Expand or collapse this panel
 +
submenu = $(this).find('.submenu');
 +
submenu.toggle();
 +
 
 +
icon = $(this).find('.icon');
 +
 
 +
if ( !$( submenu ).is(':visible') ) {
 +
icon.removeClass("less").addClass("plus");
 +
}
 +
else {
 +
icon.removeClass("plus").addClass("less");
 +
}
  
<a href="#"><li>PROJECT
+
//Hide the other panels
            <ul>
+
$(".submenu").not(submenu).hide();
<a href="https://2015.igem.org/Team:Example/Description"><li>Description</li></a>
+
$(".icon").not(icon).removeClass("less").addClass("plus");
<a href="https://2015.igem.org/Team:Example/Experiments"><li>Experiments &amp; Protocols</li></a> 
+
});
<a href="https://2015.igem.org/Team:Example/Results"><li>Results</li></a> 
+
<a href="https://2015.igem.org/Team:Example/Design"><li>Design</li></a>
+
</ul>
+
</li></a>
+
  
<a href="#"><li>PARTS
 
            <ul>
 
<a href="https://2015.igem.org/Team:Example/Parts"><li>Team Parts</li></a>
 
<a href="https://2015.igem.org/Team:Example/Basic_Part"><li>Basic Parts</li></a> 
 
<a href="https://2015.igem.org/Team:Example/Composite_Part"><li>Composite Parts</li></a>
 
<a href="https://2015.igem.org/Team:Example/Part_Collection"><li>Part Collection</li></a> 
 
</ul>
 
</li></a>
 
  
<a href="https://2015.igem.org/Team:Example/Notebook"><li>NOTEBOOK</li></a>
+
$(".collapsable_menu_control").click(function() {
     
+
$(".menu_item").toggle();
<a href="https://2015.igem.org/Team:Example/Attributions"><li>ATTRIBUTIONS</li></a>
+
});
  
<a href="https://2015.igem.org/Team:Example/Collaborations"><li>COLLABORATIONS</li></a>
+
$( window ).resize(function() {
 +
$(".menu_item").show();
 +
});
  
<a href="https://2015.igem.org/Team:Example/Practices"><li>HUMAN PRACTICES</li></a>
 
  
<a href="https://2015.igem.org/Team:Example/Safety"><li>SAFETY</li></a>
+
});
  
<a href="https://2015.igem.org/Team:Example/Modeling"><li>MODELING</li></a>
 
  
<a href="https://2015.igem.org/Team:Example/Measurement"><li>MEASUREMENT</li></a>
 
  
<a href="https://2015.igem.org/Team:Example/Software"><li>SOFTWARE</li></a>
 
  
<a href="https://2015.igem.org/Team:Example/Entrepreneurship"><li>ENTREPRENEURSHIP</li></a>
+
</script>
  
</ul>
 
</div>
 
<!-- End of menu  -->
 
  
<!-- Start of content -->
 
<div id="contentContainer"> <!--The closing tag for contentContainer should be placed at the bottom of each content page.-->
 
 
</html>
 
</html>

Latest revision as of 16:05, 22 March 2017