Difference between revisions of "Template:Northwestern"

Line 12: Line 12:
 
/********************************* MENU ********************************/
 
/********************************* MENU ********************************/
  
        /* Wrapper for the menu */
+
      html, body {
.menu_wrapper {  
+
    margin: 0;
width:150px;  
+
    padding: 0;
height:100vh;  
+
    background-color: aliceblue;
position:fixed;  
+
   
padding:0px;
+
    font-family: 'century gothic', arial, sans-serif;
float:left;  
+
    color: #000;
background-color:#f2f2f2;
+
}
text-align:left;
+
}
+
  
/* styling for the menu items */
+
.fixed-nav li,ul {
.menu_item {
+
    list-style: none;
width:100%;  
+
    box-sizing: border-box;
margin:-2px 0px 0px -20px;
+
    border: 1px #fff solid;
padding: 10px 10px;
+
}
border-bottom: 1px solid #d3d3d3;
+
font-weight:bold;
+
color:#000000;
+
cursor: pointer;  
+
}
+
  
/* when hovering on a menu item */
+
a {
.menu_item:hover {  
+
    text-decoration: none;
color:#ffffff;  
+
    color: #aaa;
background-color: #4f2984;
+
}
}
+
  
/* decoration icon for the menu buttons*/
+
.fixed-nav {
.icon {
+
    position: fixed;
float:right;
+
    top: 0;
font-size:16px;  
+
    left: 0;
font-weight:bold;  
+
    right: 0;
}
+
    box-sizing: border-box;
+
    padding-top: 16px;
/* this is the icon for when the content is collapsed */
+
    padding-left: 16px;
.plus::before {
+
    padding-bottom: 16px;
content: "+";  
+
    display: inline-block;
}
+
    z-index: 9999;
/* this is the icon for when the content is expanded */
+
    width: 100%;
.less::before {
+
   
content: "–";  
+
    background-color: #fff;
}
+
   
 +
    font-size: 14px;
 +
    text-align: left;
 +
    color: #aaa;
 +
}
  
/* styling for the ul that creates the buttons */
+
.fixed-nav:hover > .primary {
ul.menu_items {
+
    width: auto;
width:100%;  
+
    margin-right: 10px;
margin-left:0px;  
+
    padding-right: 2px;
padding:0px;
+
    border-radius: 0px;
list-style: none;  
+
    border: #fff solid 1px;
}
+
   
 +
    text-align: left;
 +
   
 +
            transition: all 0.5s ease-out;
 +
    -webkit-transition: all 0.5s ease-out;
 +
}
  
/* styling for the li that are the menu items */
+
.primary {
.menu_items li {  
+
    position: relative;
width:90%;  
+
    display: inline-block;
margin-top:-2px;  
+
    float: left;
padding: 15px 0px 15px 15px ;  
+
   
display:block;
+
    width: 18px; height: 20px;
border-bottom: 1px solid #d3d3d3;
+
    margin-right: 2px;
text-align:left;  
+
    padding-left: 2px;
font-weight:bold;
+
    padding-right: 2px;
text-decoration:none;  
+
    border-radius: 50%;
color:#000000;  
+
    border: #aaa solid 1px;
list-style-type:none;  
+
    overflow: hidden;
cursor:pointer;  
+
   
-webkit-transition: all 0.4s ease;  
+
    text-align: center;
-moz-transition: all 0.4s ease;  
+
    font-size: 14px;
-ms-transition: all 0.4s ease;  
+
    line-height: 18px;
-o-transition: all 0.4s ease; transition: all 0.4s ease;
+
   
}
+
            transition: all 0.5s ease-out;
 +
    -webkit-transition: all 0.5s ease-out;
 +
}
  
.menu_item a {
+
.submenu_top:hover {
width: 100%;
+
    overflow: visible;
margin-left: -20px;
+
}
padding: 12px 90px 12px 20px;
+
text-decoration: none;
+
color: #000000;
+
}
+
  
        /* When hovering on a menu link */
+
.submenu {
        .menu_item a:hover {
+
    position: absolute;
color: #ffffff;
+
    padding: 5px;
}
+
    margin: 0;
 +
    display: inline-block;
 +
    white-space: nowrap;
 +
    text-align: left;
 +
    background-color: #fff;
 +
    line-height: 30px;
 +
    box-sizing: border-box;
 +
}
  
/* When hovering on a menu item */
+
a:hover {
.menu_items li:hover {
+
    color: #8b008b;
                background-color:#4f2984;
+
}
color: #ffffff;
+
}
+
 
+
/* styling for the submenus */
+
.submenu {
+
width:100%;
+
display: none; 
+
font-weight:bold;
+
cursor:pointer;
+
 
+
}
+
 
+
/* moving the margin for the submenu ul list */
+
ul.submenu {
+
width: 100%;
+
margin: 10px 0px -11px 0px;
+
list-style: none;
+
}
+
 
+
/*styling for the submenu buttons */
+
.submenu li {
+
width: 100%;
+
margin-left: 10px;
+
margin-bottom: 0px;
+
}
+
 
+
 
+
/* 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:#3b3b3b;
+
}
+
 
+
 
+
 
+
.submenu li a:hover  {
+
background-color:#c29ef4;
+
color: #ffffff;
+
}
+
 
+
 
+
/* When the screen is smaller than 680px, the menu has the option to hide/show - this button controls that */
+
.collapsable_menu_control {
+
width:100%;
+
                position: fixed;
+
padding: 15px 0px;
+
display:none;
+
background-color:#ffffff;
+
text-align:center; 
+
font-weight:bold;
+
color:#4f2984;
+
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;
+
}
+
 
+
/* when hovering on that button */
+
.collapsable_menu_control:hover {
+
background-color: #4f2984;
+
color:#ffffff; 
+
}
+
 
+
/********************************* CONTENT OF THE PAGE ********************************/
+
 
+
/* Wrapper for the content */
+
.content_wrapper {
+
width: 85%;
+
margin-left:150px;
+
padding:10px 0px;
+
float:left;
+
background-color:white;
+
}
+
 
+
/*LAYOUT */
+
.column  {
+
padding: 10px 0px;
+
float:left;
+
background-color:white;
+
}
+
 
+
.full_size {
+
width:100%;
+
}
+
 
+
.full_size img {
+
padding: 10px 15px;
+
width:96.5%;
+
}
+
 
+
.half_size {
+
width: 50%;
+
}
+
.half_size img {
+
padding: 10px 15px;
+
width: 93%;
+
}
+
 
+
 
+
.clear {
+
clear:both;
+
}
+
 
+
.highlight {
+
width: 90%;
+
margin: auto;
+
padding: 15px 5px;
+
background-color: #f2f2f2;
+
}
+
 
+
.judges-will-not-evaluate {
+
border: 4px solid #7849b9;
+
display: block;
+
margin: 5px 15px;
+
width: 95%;
+
font-weight:bold;
+
}
+
 
+
 
+
/*STYLING */
+
 
+
/* styling for the titles */
+
.content_wrapper h1, .content_wrapper h2 {
+
padding:5px 15px;
+
border-bottom:0px;
+
color:#4f2984;
+
 
+
}
+
.content_wrapper h3, .content_wrapper h4, .content_wrapper h5, .content_wrapper h6 {
+
padding:5px 15px;
+
border-bottom:0px;
+
color: #7849b9; 
+
}
+
 
+
 
+
/* 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: none;
+
color: #000000;
+
-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: #7849b9;
+
}
+
 
+
/* 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: #7849b9;
+
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:#7849b9;
+
}
+
  
 
/********************************* RESPONSIVE STYLING ********************************/
 
/********************************* RESPONSIVE STYLING ********************************/
Line 332: Line 112:
 
@media only screen and (max-width: 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;}
+
 
}
 
}
  
Line 344: Line 119:
  
 
@media only screen and (max-width: 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;}
+
 
}
 
}
  
Line 364: Line 132:
 
<!-- This tells the browser that your page is responsive -->
 
<!-- This tells the browser that your page is responsive -->
  
<head>  
+
<!DOCTYPE html>
<meta name="viewport" content="width=device-width, initial-scale=1">  
+
<html>
</head>
+
    <head>
 +
        <meta charset="utf-8">
 +
        <meta name="viewport" content="width=device-width, initial-scale=1">
 +
        <title>Menu</title>
 +
        <link rel="stylesheet" type="text/css" href='nav.css'>
 +
        <script src="https://use.fontawesome.com/9a70aea62c.js"></script>
 +
    </head>
  
 
+
    <body>
 
+
        <nav class="fixed-nav">
 
+
            <div class="primary">
<div class="menu_wrapper" >
+
                <a href="https://2016.igem.org/Team:Northwestern"><li><i class="fa fa-home" aria-hidden="true"></i> Home</li></a>
 
+
            </div>
 
+
            <div class="primary submenu_top">
 
+
                <li><i class="fa fa-user" aria-hidden="true"></i> Team
 
+
                    <ul class="submenu">
<div class="collapsable_menu_control"> MENU ▤ </div>
+
                        <a href=" https://2016.igem.org/Team:Northwestern/Team"><li class="secondary"><i class="fa fa-newspaper-o" aria-hidden="true"></i> About Us</li></a>
 
+
                        <a href="https://2016.igem.org/Team:Northwestern/Collaborations"><li class="secondary"><i class="fa fa-users" aria-hidden="true"></i> Collaborations</li></a>
<ul id="accordion" class="accordion">
+
                    </ul>
 
+
<li class="menu_item"> <a href="https://2016.igem.org/Team:Northwestern">HOME </a> </li>
+
 
+
 
+
<li class="menu_item"> <div class="icon plus"></div> TEAM
+
<ul class="submenu">
+
<li> <a href=" https://2016.igem.org/Team:Northwestern/Team"> About Us   </a> </li>
+
<li> <a href="https://2016.igem.org/Team:Northwestern/Collaborations">★  Collaborations </a> </li>
+
                    </ul>
+
 
                 </li>
 
                 </li>
 
+
            </div>
<li class="menu_item"> <div class="icon plus"></div> PROJECT 
+
            <div class="primary submenu_top">
<ul class="submenu">
+
                <li><i class="fa fa-scissors" aria-hidden="true"></i> Project
<li> <a href="https://2016.igem.org/Team:Northwestern/Description"> ★  Description </a></li>
+
                    <ul class="submenu">
<li> <a href="https://2016.igem.org/Team:Northwestern/Design"> ★ Design </a></li>
+
                        <a href="https://2016.igem.org/Team:Northwestern/Description"><li class="secondary"><i class="fa fa-file-text" aria-hidden="true"></i> Description</li></a>
<li> <a href="https://2016.igem.org/Team:Northwestern/Experiments"> Experiments </a></li>
+
                        <a href="https://2016.igem.org/Team:Northwestern/Design"><li class="secondary"><i class="fa fa-lightbulb-o" aria-hidden="true"></i> Design</li></a>
<li> <a href="https://2016.igem.org/Team:Northwestern/Proof"> Proof of Concept </a></li>
+
                        <a href="https://2016.igem.org/Team:Northwestern/Experiments"><li class="secondary"><i class="fa fa-flask" aria-hidden="true"></i> Experiments</li></a>
<li> <a href="https://2016.igem.org/Team:Northwestern/Demonstrate"> ★ Demonstrate </a></li>
+
                        <a href="https://2016.igem.org/Team:Northwestern/Proof"><li class="secondary"><i class="fa fa-shield" aria-hidden="true"></i> Proof of Concept</li></a>
<li> <a href="https://2016.igem.org/Team:Northwestern/Results"> Results </a></li>
+
                        <a href="https://2016.igem.org/Team:Northwestern/Demonstrate"><li class="secondary"><i class="fa fa-film" aria-hidden="true"></i> Demonstrate</li></a>
<li> <a href="https://2016.igem.org/Team:Northwestern/Notebook"> Notebook </a></li>
+
                        <a href="https://2016.igem.org/Team:Northwestern/Results"><li class="secondary"><i class="fa fa-bar-chart" aria-hidden="true"></i> Results</li></a>
                    </ul>
+
                        <a href="https://2016.igem.org/Team:Northwestern/Notebook"><li class="secondary"><i class="fa fa-book" aria-hidden="true"></i> Notebook</li></a>
 +
                    </ul>
 
                 </li>
 
                 </li>
 
+
            </div>
<li class="menu_item"> <div class="icon plus"></div> PARTS 
+
            <div class="primary submenu_top">
<ul class="submenu">
+
                <a href="https://2016.igem.org/Team:Northwestern/Parts"><li><i class="fa fa-wrench" aria-hidden="true"></i> Parts
<li> <a href="https://2016.igem.org/Team:Northwestern/Parts">Parts </a></li>
+
                    <ul class="submenu">
<li> <a href="https://2016.igem.org/Team:Northwestern/Basic_Part"> ★ Basic Parts </a></li>
+
                        <a href="https://2016.igem.org/Team:Northwestern/Basic_Part"><li class="secondary"><i class="fa fa-cog" aria-hidden="true"></i> Basic Parts</li></a>
<li> <a href="https://2016.igem.org/Team:Northwestern/Composite_Part"> ★ Composite Parts </a></li>
+
                        <a href="https://2016.igem.org/Team:Northwestern/Composite_Part"><li class="secondary"><i class="fa fa-cogs" aria-hidden="true"></i> Composite Parts</li></a>
<li> <a href="https://2016.igem.org/Team:Northwestern/Part_Collection"> ★ Part Collection </a></li>
+
                        <a href="https://2016.igem.org/Team:Northwestern/Part_Collection"><li class="secondary"><i class="fa fa-briefcase" aria-hidden="true"></i> Part Collection</li></a>
                    </ul>
+
                    </ul>
 +
                </li></a>
 +
            </div>
 +
            <div class="primary">
 +
                <a href="https://2016.igem.org/Team:Northwestern/Safety"><li><i class="fa fa-exclamation-triangle" aria-hidden="true"></i> Safety</li></a>
 +
            </div>
 +
            <div class="primary">
 +
                <a href="https://2016.igem.org/Team:Northwestern/Attributions"><li><i class="fa fa-heart" aria-hidden="true"></i> Attributions</li></a>
 +
            </div>
 +
            <div class="primary submenu_top">
 +
                <a href="https://2016.igem.org/Team:Northwestern/Human_Practices"><li><i class="fa fa-street-view" aria-hidden="true"></i> Human Practices
 +
                    <ul class="submenu">
 +
                        <a href="https://2016.igem.org/Team:Northwestern/HP/Silver"><li class="secondary"><i class="fa fa-moon-o" aria-hidden="true"></i> Silver</li></a>
 +
                        <a href="https://2016.igem.org/Team:Northwestern/HP/Gold"><li class="secondary"><i class="fa fa-sun-o" aria-hidden="true"></i> Gold</li></a>
 +
                        <a href="https://2016.igem.org/Team:Northwestern/Integrated_Practices"><li class="secondary"><i class="fa fa-globe" aria-hidden="true"></i> Integrated Practices</li></a>
 +
                        <a href="https://2016.igem.org/Team:Northwestern/Engagement"><li class="secondary"><i class="fa fa-comments-o" aria-hidden="true"></i> Engagement</li></a>
 +
                    </ul>
 +
                </li></a>
 +
            </div>
 +
            <div class="primary submenu_top">
 +
                <li><i class="fa fa-trophy" aria-hidden="true"></i> Awards
 +
                    <ul class="submenu">
 +
                        <a href="https://2016.igem.org/Team:Northwestern/Entrepreneurship"><li class="secondary"><i class="fa fa-industry" aria-hidden="true"></i> Entrepreneurship</li></a>
 +
                        <a href="https://2016.igem.org/Team:Northwestern/Hardware"><li class="secondary"><i class="fa fa-sitemap" aria-hidden="true"></i> Hardware</li></a>
 +
                        <a href="https://2016.igem.org/Team:Northwestern/Software"><li class="secondary"><i class="fa fa-code-fork" aria-hidden="true"></i> Software</li></a>
 +
                        <a href="https://2016.igem.org/Team:Northwestern/Measurement"><li class="secondary"><i class="fa fa-balance-scale" aria-hidden="true"></i> Measurement</li></a>
 +
                        <a href="https://2016.igem.org/Team:Northwestern/Model"><li class="secondary"><i class="fa fa-cubes" aria-hidden="true"></i> Model</li></a>
 +
                    </ul>
 
                 </li>
 
                 </li>
 
+
            </div>
 
+
        </nav>
<li class="menu_item"> <a href="https://2016.igem.org/Team:Northwestern/Safety"> SAFETY </a> </li>
+
   
 
+
        <script src="https://2016.igem.org/Team:Northwestern/libraries/jquery"></script>
 
+
     </body>
<li class="menu_item"> <a href="https://2016.igem.org/Team:Northwestern/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:Northwestern/Human_Practices"> Human Practices </a></li>
+
<li> <a href="https://2016.igem.org/Team:Northwestern/HP/Silver">★ Silver </a></li>
+
<li> <a href="https://2016.igem.org/Team:Northwestern/HP/Gold">★ Gold </a></li>
+
<li> <a href="https://2016.igem.org/Team:Northwestern/Integrated_Practices"> ★ Integrated Practices </a></li>
+
<li> <a href="https://2016.igem.org/Team:Northwestern/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:Northwestern/Entrepreneurship"> ★ Entrepreneurship </a></li>
+
<li> <a href="https://2016.igem.org/Team:Northwestern/Hardware"> ★ Hardware </a></li>
+
<li> <a href="https://2016.igem.org/Team:Northwestern/Software">★ Software </a></li>
+
<li> <a href="https://2016.igem.org/Team:Northwestern/Measurement">★  Measurement </a></li>
+
<li> <a href="https://2016.igem.org/Team:Northwestern/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 , " ")  );
+
}
+
 
+
 
+
 
+
 
+
$('#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();
+
});
+
 
+
 
+
});
+
 
+
 
+
 
+
 
+
</script>
+
 
+
 
+
 
</html>
 
</html>

Revision as of 16:17, 9 August 2016

Menu