Difference between revisions of "Template:Duesseldorf"

Line 6: Line 6:
  
 
#top_title {display:none;}
 
#top_title {display:none;}
#content { padding:0px; width:auto; margin-top:-7px; margin-left:0px;}
+
#content { padding:0px; width:1000px; 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; }
Line 15: Line 15:
  
 
/* Wrapper for the menu*/
 
/* Wrapper for the menu*/
.menu_bar {  
+
.menu_bar {
width:auto;
+
width:1000px;
 +
display:inline-block;
 
background-color:white;
 
background-color:white;
 +
margin: 10px auto;
 +
position: relative;
 
text-align:center;
 
text-align:center;
 
}
 
}
 
/* Menu container */
 
/* Menu container */
.menu_container {  
+
.menu_container {
display:inline-block;  
+
display:inline-block;
width: 100px;  
+
width: 100px;
height: 50px;  
+
height: 50px;
text-align: center;  
+
text-align: center;
 
}
 
}
  
Line 31: Line 34:
 
/* Wrapper for the content */
 
/* Wrapper for the content */
 
.content_wrapper {
 
.content_wrapper {
width: 1000px;
+
width: auto;
margin: 0 auto;
+
padding:10px 0px;
 +
float:left;  
 
background-color:white;  
 
background-color:white;  
 
}
 
}
Line 234: Line 238:
  
  
 +
 +
 +
 +
 +
 +
<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 , " ")  );
 +
}
 +
 +
 +
 +
 +
$('#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");
 +
}
 +
 +
//Hide the other panels
 +
$(".submenu").not(submenu).hide();
 +
$(".icon").not(icon).removeClass("less").addClass("plus");
 +
});
 +
 +
 +
$(".collapsable_menu_control").click(function() {
 +
$(".menu_item").toggle();
 +
});
 +
 +
$( window ).resize(function() {
 +
$(".menu_item").show();
 +
});
 +
 +
 +
});
  
 
</div>
 
</div>
 +
 +
 +
</script>
 +
  
 
</html>
 
</html>

Revision as of 12:28, 16 June 2016

iGEM Team Düsseldorf