Difference between revisions of "Team:CLSB-UK/Templates/NavBar"

 
(128 intermediate revisions by 2 users not shown)
Line 6: Line 6:
  
 
#sideMenu, #top_title {display:none;}
 
#sideMenu, #top_title {display:none;}
#content { padding:0px; width:1000px; margin-top:-7px; margin-left:0px;}
+
#content { padding:0px; margin-top:-7px; margin-left:0px;}
 
body {background-color:white; }
 
body {background-color:white; }
 
#bodyContent h1, #bodyContent h2, #bodyContent h3, #bodyContent h4, #bodyContent h5 { margin-bottom: 0px; }
 
#bodyContent h1, #bodyContent h2, #bodyContent h3, #bodyContent h4, #bodyContent h5 { margin-bottom: 0px; }
  
/********************************* MENU ********************************/
+
/********************************* MAIN BODY  ********************************/
 +
#content { background-color: transparent !important }
 +
body { font-family: Verdana,Geneva,sans-serif !important; line-height: normal; }
 +
#mainbox {
 +
background-color: rgba(235,235,235,0.85);
 +
position: absolute;
 +
width: 25vw;
 +
top: 200px;
 +
left: 3vw;
 +
border-style: solid;
 +
border-width: 0px 0px 0px 2px;
 +
padding: 5px;
 +
}
  
</style>
+
h2 {
 +
font-size: 30px !important;
 +
}
 +
h3 {
 +
font-size: 25px;
 +
}
 +
h4 {
 +
font-size: 20px;
 +
color: #6cd94e;
 +
}
 +
h5 {
 +
font-size: 18px;
 +
}
  
<div id="top_header">
+
p {
 +
font-size: 16px !important;
 +
}
  
<img src="https://static.igem.org/mediawiki/2016/c/c6/T--CLSB-UK--HeaderPic.png">
+
#verticalselector {
 +
position: absolute;
 +
left: 28vw;
 +
top: 200px;
 +
list-style:none;
 +
margin: 0 0 0 10px;
 +
padding:0;
 +
z-index: 500;
 +
}
  
<ul id="accordion" class="accordion">
+
#verticalselector li {
 +
position: relative;
 +
float: top;
 +
padding: 0;
 +
height: 50px;
 +
margin: 0px 0px;
 +
}
  
<li class="menu_item"> <a href="https://2016.igem.org/Team:CLSB-UK">HOME </a> </li>
+
#verticalselector li img {
 +
position: relative;
 +
float: left;
 +
padding: 0;
 +
height: 50px;
 +
width: 50px;
 +
margin: 0px;
 +
}
  
 +
#verticalselector li div {
 +
position: absolute;
 +
left: 50px;
 +
display: none;
 +
padding: 7px;
 +
height: 36px;
 +
margin: 0px;
 +
font-family: "Quicksand", Helvetica, sans;
 +
font-size: 30px;
 +
}
  
<li class="menu_item"> <div class="icon plus"></div> TEAM
+
#verticalselector li a {
<ul class="submenu">
+
color: #ffffff;
<li> <a href=" https://2016.igem.org/Team:CLSB-UK/Team"> Team  </a> </li>
+
}
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Collaborations">★  Collaborations </a> </li>
+
                    </ul>
+
                </li>
+
  
<li class="menu_item"> <div class="icon plus"></div> PROJECT 
+
#verticalselector a:hover > div {
<ul class="submenu">
+
display:block;
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Description"> ★  Description </a></li>
+
}
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Design"> ★ Design </a></li>
+
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Experiments"> Experiments </a></li>
+
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Proof"> ★ Proof of Concept </a></li>
+
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Demonstrate"> ★ Demonstrate </a></li>
+
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Results"> Results </a></li>
+
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Notebook"> Notebook </a></li>
+
                    </ul>
+
                </li>
+
  
<li class="menu_item"> <div class="icon plus"></div> PARTS 
+
#contentbox {
<ul class="submenu">
+
background-color: rgba(235,235,235,0.85);
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Parts">Parts </a></li>
+
position: absolute;
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Basic_Part"> ★ Basic Parts </a></li>
+
width: 57vw;
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Composite_Part"> ★ Composite Parts </a></li>
+
top: 200px;
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Part_Collection"> ★ Part Collection </a></li>
+
left: 40vw;
                    </ul>
+
border-style: solid;
                </li>
+
border-width: 0px 2px 0px 0px;
 +
padding: 5px;
 +
}
  
 +
.imagebox {
 +
background-color: rgba(200,200,200,0.7);
 +
border-style: solid;
 +
border-width: 1px;
 +
padding: 5px;
 +
margin: 10px;
 +
clear: left;
 +
}
  
<li class="menu_item"> <a href="https://2016.igem.org/Team:CLSB-UK/Safety"> SAFETY </a> </li>
+
.imagebox img {
 +
width: 100%;
 +
display: block;
 +
margin-left: auto;
 +
margin-right: auto;
 +
}
  
  
<li class="menu_item"> <a href="https://2016.igem.org/Team:CLSB-UK/Attributions">★  ATTRIBUTIONS </a></li>
 
  
 +
/********************************* MENU ********************************/
  
<li class="menu_item"> <div class="icon plus"></div> HUMAN PRACTICES
+
#top_header {
<ul class="submenu">
+
position: relative;
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Human_Practices"> Human Practices </a></li>
+
height: 164px;
<li> <a href="https://2016.igem.org/Team:CLSB-UK/HP/Silver">★ Silver </a></li>
+
width: 100vw;
<li> <a href="https://2016.igem.org/Team:CLSB-UK/HP/Gold">★ Gold </a></li>
+
background-color: #262626;
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Integrated_Practices"> ★ Integrated Practices </a></li>
+
}
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Engagement">★ Engagement </a></li>
+
                    </ul>
+
                </li>
+
  
 +
#top_action {
 +
position: absolute;
 +
left: 50%;
 +
margin-left: -495px;
 +
height: 180px;
 +
width: 990px;
 +
}
  
<li class="menu_item"> <div class="icon plus"></div> AWARDS
+
#accordion {
<ul class="submenu">
+
float: left;
<li><a href="https://2016.igem.org/Team:CLSB-UK/Entrepreneurship"> ★ Entrepreneurship </a></li>
+
position: absolute;
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Hardware"> ★ Hardware </a></li>
+
list-style:none;
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Software">★ Software </a></li>
+
margin:0;
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Measurement">★  Measurement </a></li>
+
padding:0;
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Model">★ Model </a></li>
+
left: 50%;
 +
margin-left: -400px; /* half of the width - change if menu changes */
 +
top: 147px;
 +
z-index: 1000;
 +
color: #FFFFFF;
 +
font-weight: bold;
 +
}
  
                    </ul>
+
#accordion a
                </li>
+
{
</ul>
+
display:block;
 +
color:#333;
 +
text-decoration:none;
 +
font-weight:700;
 +
font-size:12px;
 +
line-height:32px;
 +
padding:0 15px;
 +
font-family: Verdana,Geneva,sans-serif;
 +
}
  
</div>
+
#accordion li
 +
{
 +
background-color: #94e295;
 +
position:relative;
 +
float:left;
 +
padding:0;
 +
width: 150px;
 +
margin: 0px 5px;
 +
}
  
<script>
+
#accordion li:hover
 +
{
 +
background:#6aa16b;
 +
}
  
// This is the jquery part of your template.  Try not modify any of this code since it makes your menu work.
+
.submenu
 +
{
 +
list-style:none;
 +
display:none;
 +
position:absolute;
 +
top:100%;
 +
left:0;
 +
background:#fff6ee;
 +
padding:0;
 +
margin:0 !important;
 +
}
  
$(document).ready(function() {
+
.submenu li
 +
{
 +
float:none;
 +
width: 150px;
 +
background-color:#fff6ee !important;
 +
margin: 0px 0px !important;
 +
}
  
$("#HQ_page").attr('id','');
+
.submenu li:hover
+
{
  
if ( wgPageName.substring( 0,  8) == "Template")  {  // if the page is a template it displays the full name in a single line
+
background-color:#dcd3cc !important;
$("#team_name").html( wgPageName );  
+
}
}
+
  
else if (  ( (wgPageName.match(/\//g) || []).length ) == 0 ) { // if it is the home page , just print the team's name
+
.submenu a
$("#team_name").html( wgPageName.substring( 5, wgPageName.length ) );  
+
{
}
+
line-height:120%;
 +
padding:10px 15px;
 +
}
  
else {
+
.menu_item:hover > .submenu
// this adds the team's name as an h1
+
{
$("#team_name").html( wgPageName.substring( 5 , wgPageName.indexOf("/")  ) );  
+
display:block;
 +
}
  
// this adds the page's title as an h4
 
$("#page_name").html (    ( wgPageName.substring( wgPageName.indexOf("/") + 1, wgPageName.length ) ).replace( /\/|_/g , " ")  );
 
}
 
  
 +
</style>
  
 +
<div id="top_header">
 +
<div id="top_action">
  
 +
<a href="https://2016.igem.org/Team:CLSB-UK"> <img src="https://static.igem.org/mediawiki/2016/5/5b/T--CLSB-UK--header2.png"> </a>
  
$('#accordion').find('.menu_item').click(function(){
+
<ul id="accordion" class="accordion">
  
//Expand or collapse this panel
+
<li class="menu_item"> <a href="https://2016.igem.org/Team:CLSB-UK/Description"> Project </a> 
submenu = $(this).find('.submenu');
+
<ul class="submenu">
submenu.toggle();
+
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Project/BPV_Cell"> Fuel Cell </a></li>
 +
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Project/Synechocystis"> Synechocystis </a></li>
 +
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Project/Future"> Future Research </a></li>
 +
                    </ul>
 +
                </li>
  
icon = $(this).find('.icon');
+
<li class="menu_item"> <a href="https://2016.igem.org/Team:CLSB-UK/Lab"> Lab </a> 
 +
<ul class="submenu">
 +
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Strategy"> Strategy </a></li>
 +
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Experiments"> Experiments </a></li>
 +
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Notebook"> Notebook </a></li>
 +
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Parts"> Parts </a></li>
 +
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Proof"> Proof of Concept </a></li>
 +
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Results"> Results </a></li>
 +
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Demonstrate"> Demonstrate </a></li>
 +
                    </ul>
 +
                </li>
  
if ( !$( submenu ).is(':visible') ) {
+
<li class="menu_item"> <a href="https://2016.igem.org/Team:CLSB-UK/HP"> Human Practices </a>
icon.removeClass("less").addClass("plus");
+
<ul class="submenu">
}
+
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Human_Practices"> Human Practices </a></li>
else {
+
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Engagement"> Engagement </a></li>
icon.removeClass("plus").addClass("less");
+
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Safety"> Safety </a> </li>
}
+
<li> <a href="https://2016.igem.org/Team:CLSB-UK/HP/Silver"> Silver Medal </a> </li>
 +
                    </ul>
 +
                </li>
  
//Hide the other panels
+
                <li class="menu_item"> <a href="https://2016.igem.org/Team:CLSB-UK/Medals"> Judging </a> </li>
$(".submenu").not(submenu).hide();
+
$(".icon").not(icon).removeClass("less").addClass("plus");
+
});
+
  
 
+
                <li class="menu_item"> <a href="https://2016.igem.org/Team:CLSB-UK/People"> People </a>
$(".collapsable_menu_control").click(function() {
+
<ul class="submenu">
$(".menu_item").toggle();
+
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Team"> Team </a> </li>
});
+
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Collaborations"> Collaborations </a> </li>
 
+
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Attributions"> Attributions </a></li>
$( window ).resize(function() {
+
<li> <a href="https://2016.igem.org/Team:CLSB-UK/Sponsors"> Sponsors </a></li>
$(".menu_item").show();
+
                    </ul>
});
+
                </li>
 
+
</ul>
});
+
</div>
 
+
</div>
</script>
+
  
 
</html>
 
</html>

Latest revision as of 16:50, 19 October 2016