Difference between revisions of "Template:Hong Kong-CUHK"

 
(93 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
 
<html>
 
<html>
  
<script>
+
<head>
  
// This is the jquery part of your template.
+
  <!-- External scripts -->
// Try not modify any of this code too much since it makes your menu work.
+
<link href="https://fonts.googleapis.com/css?family=Architects+Daughter|Caveat+Brush|Indie+Flower|Permanent+Marker|Quicksand|Roboto|Schoolbell|Sedgwick+Ave" rel="stylesheet">
 +
<link href="https://fonts.googleapis.com/css?family=Quicksand:400,500" rel="stylesheet">
 +
<link href="https://fonts.googleapis.com/css?family=Bangers|Boogaloo|Josefin+Sans|Luckiest+Guy|Magra|News+Cycle|Oswald" rel="stylesheet">
 +
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
 +
<script src="http://code.jquery.com/jquery-2.1.0.min.js"></script>
 +
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
  
$(document).ready(function() {
 
  
$("#HQ_page").attr('id','');
+
  <style>
  
// call the functions that control the menu
 
menu_functionality();
 
hide_show_menu();
 
  
 +
#sideMenu, #top_title {display:none;}
 +
#content { padding:0px; width:90%; margin-top:-15px; margin-left:5%;, margin-right: 5%}
 +
body {background-color:white; }
 +
#bodyContent h1, #bodyContent h2, #bodyContent h3, #bodyContent h4, #bodyContent h5 { margin-bottom: 0px; }
  
  
//this function controls the expand and collapse buttons of the menu and changes the +/- symbols
+
    body,
function menu_functionality() {
+
    html{
 +
      margin: 0;
 +
      padding:0;
 +
      font-size: 12px;
 +
      font-weight: 500;
 +
      font-family: 'Quicksand', sans-serif;
 +
    }
  
//when clicking on a "menu_button", it will change the "+/-" accordingly and it will show/hide the corresponding submenu
+
    /* REMOVE UNWANTED ELEMENTS AND STYLE OTHERS */
$(".menu_button").click(function(){
+
    .firstHeading{
 +
      display:none;
 +
    }
 +
    #top-section{
 +
      background:#000000;
 +
      margin-left:0 !important;
 +
      width:100%;
 +
      left:0;
 +
    }
  
// add or remove the class "open" , this class holds the "-"
 
$(this).children().toggleClass("open");
 
// show or hide the submenu
 
$(this).next('.submenu_wrapper').fadeToggle(400);
 
});
 
  
// when the screen size is smaller than 100px, the display_menu_control button appears and will show/hide the whole menu
+
    /* LOADING SCREEN */
$("#display_menu_control").click(function(){
+
    .loading{
$('#menu_content').fadeToggle(400);
+
      position:fixed;
});
+
      width:100%;
 +
      height:100%;
 +
      top:0;
 +
      left:0;
  
// call the current page highlight function
+
      z-index:5;
highlight_current_page();
+
}
+
  
 +
      background-color:#000000;
 +
      color:#000000;
 +
      text-align: center;
 +
    }
 +
    .loading p{
 +
      position: relative;
 +
      width:100%;
 +
      height:10%;
 +
      top:45%;
 +
      left:0;
 +
    }
  
// call the highlight current page function to show it on the menu with a different background color
+
    /* MENU STYLING */
function highlight_current_page() {
+
    .menu{
 +
      position:fixed;
 +
      width:100%;
 +
      height:110px;
 +
      top:10px;
 +
      background-color: #000000;
  
// select a page from the menu based on the id assigned to it and the current page name and add the class "current page" to make it change background color
+
      z-index:4;
$("#"+  wgPageName.substring(wgPageName.lastIndexOf("/")+1, wgPageName.length ) + "_page").addClass("current_page");
+
  
// now that the current_page class has been added to a menu item, make the submenu fade in
+
      border-collapse: collapse;
$(".current_page").parents(".submenu_wrapper").fadeIn(400);
+
      text-align:center;
// change the +/- symbol of the corresponding menu button
+
    }
$(".current_page").parents(".submenu_wrapper").prev().children().toggleClass("open");
+
    .menu tr td{
+
      text-align: middle;
}
+
      vertical-align: middle;
  
 +
      font-weight: 500;
 +
      font-size:25px;
 +
      color:#fff;
 +
      width:7%;
 +
    }
 +
    .menu tr td.menu-item:hover{
 +
      background-color:#FFFFFF;
 +
      cursor: pointer;
 +
    }
 +
    .subselected{
 +
      background-color: #FFFFFF;
 +
    }
  
 +
    /* CONTAINERS STYLING */
 +
    .container{
 +
      position:relative;
 +
      width:100%;
 +
      top:60px;
 +
    }
 +
    .container .subcontainer{
 +
      position:absolute;
 +
      width:95%;
 +
      height:90%;
 +
      top:5%;
 +
      left:2.5%;
 +
    }
 +
    #top{
 +
      background-size: cover;
 +
   
 +
      overflow:hidden;
 +
    }
  
// allow button on the black menu bar to show/hide the side menu
 
function hide_show_menu() {
 
 
// in case you preview mode is selected, the menu is hidden for better visibility
 
if (window.location.href.indexOf("submit") >= 0) {
 
$(".igem_2017_menu_wrapper").hide();
 
}
 
  
// if the black menu bar has been loaded
+
body {  
  if (document.getElementById('bars_item')) {
+
    padding-top: 100px;
 +
}
  
// when the "bars_item" has been clicked
+
.center-block {
$("#bars_item").click(function() {
+
  display: block;
$("#sideMenu").hide();
+
  margin-left: auto;
 +
  margin-right: auto;
 +
}
  
// show/hide the menu wrapper
 
$(".igem_2017_menu_wrapper").fadeToggle("100");
 
});
 
  }
 
  
// because the black menu bars loads at a different time than the rest of the page, this function is set on a time out so it can run again in case it has not been loaded yet
+
.navbar-fixed-top {
else {
+
background: #fff;
    setTimeout(hide_show_menu, 15);
+
filter: none !important;
}
+
}
+
  
 +
}
  
});
+
.navbar-nav a{
 +
  color: black !important;
 +
}
  
 +
.navbar-default {
 +
  background-color: #ffffff;
 +
  border-color: #ffffff;
 +
}
  
</script>
 
  
 +
  .navbar-default {
 +
    background-color: #ffffff;
 +
    border-color: #000000;
 +
}
  
 +
  .dropdown-menu > li > a:hover,
 +
  .dropdown-menu > li > a:focus {
 +
    color: #000000;
 +
  text-decoration: none;
 +
  background-color: #CEF6F5;  /*change color of links in drop down here*/
 +
  }
  
 +
.nav > li > a:hover,
 +
.nav > li > a:focus {
 +
    text-decoration: none;
 +
    background-color: #E0F2F7; /*Change rollover cell color here*/
 +
  }
  
  
<style>
+
  .navbar-default .navbar-nav > li > a {
 +
  color: white; /*Change active text color here*/
 +
    }
  
 
/**************************************************************** MENU ***************************************************************/
 
/* Wrapper for the menu */
 
.igem_2017_menu_wrapper {
 
width: 0%;
 
height:100vh;
 
position:fixed;
 
right:100%;
 
padding:0px;
 
float:right;
 
border-left: 1px solid #d3d3d3;
 
background-color:#dddddd;
 
text-align:left;
 
font-family:Tahoma, Geneva, sans-serif;
 
overflow-y: auto;
 
overflow-x: hidden;
 
}
 
  
/* this hides the scrollbar to keep view consistency */
+
.dropdown-menu li:hover .sub-menu {
.igem_2017_menu_wrappe::-webkit-scrollbar {
+
  visibility: visible;
display: none;
+
}
}
+
+
+
/* styling for links in the menu, removes the line under text */
+
.igem_2017_menu_wrapper a {
+
text-decoration: none;  
+
}
+
  
 +
.dropdown:hover .dropdown-menu {
 +
  display: block;
 +
}
  
/* styling for the images in the menu */
+
.navbar-nav .dropdown-menu,
.igem_2017_menu_wrapper img {  
+
.navbar .dropdown-menu {
width: 100%;
+
  margin-top: 0;
}
+
}
  
/* styling for the menu buttons */
 
.igem_2017_menu_wrapper .menu_button {
 
width: 100%;
 
padding: 10px 0px 10px 15px;
 
float:left;
 
border-bottom: 1px solid #d3d3d3;
 
font-size: 12px;
 
font-weight: bold;
 
color: #5e5f5f;
 
cursor: pointer;
 
}
 
  
 +
.dropdown-submenu {
 +
    position: relative;
 +
}
  
.igem_2017_menu_wrapper .menu_bottom_padding {  
+
.dropdown-submenu>.dropdown-menu {
width: 100%;  
+
    top: 0;
height: 30px;
+
    left: 100%;
float:left;
+
    margin-top: -6px;
}
+
    margin-left: 0px;
 +
    -webkit-border-radius: 0 6px 6px 6px;
 +
    -moz-border-radius: 0 6px 6px;
 +
    border-radius: 0 6px 6px 6px;
 +
}
  
.menu_button.direct_to_page {  
+
.dropdown-submenu:hover>.dropdown-menu {
padding-left: 36px;
+
    display: block;
}
+
}
  
 +
.dropdown-submenu>a:after {
 +
    display: block;
 +
    content: " ";
 +
    float: centre;
 +
    width: 0;
 +
    height: 0;
 +
    border-color: transparent;
 +
    border-style: solid;
 +
    border-width: 5px 0 5px 5px;
 +
    border-left-color: #ccc;
 +
    margin-top: 5px;
 +
    margin-right: 0px;
 +
}
  
.igem_2017_menu_wrapper .menu_button .expand_collapse_icon {
+
.dropdown-submenu:hover>a:after {
width:10%;
+
    border-left-color: #fff;
float:left;
+
}
}
+
  
.igem_2017_menu_wrapper .menu_button .expand_collapse_icon::before {
+
.dropdown-submenu.pull-left {
content: "+"; 
+
    float: none;
}
+
}
+
.open::before {
+
content: "-" !important; 
+
}
+
+
+
+
/* styling for the menu buttons on hover */
+
.igem_2017_menu_wrapper .menu_button:hover, .igem_2017_menu_wrapper .submenu_button:hover ,  .submenu_button.current_page:hover {  
+
background-color: #3399ff;
+
text-decoration: none;
+
color:#ffffff;
+
}
+
  
/* styling for the menu button when it is the current page */
+
.dropdown-submenu.pull-left>.dropdown-menu {
.current_page {  
+
    left: -100%;
background-color:#7fc1f7  !important;
+
    margin-left: 10px;
color:#5e5f5f !important;
+
    -webkit-border-radius: 6px 0 6px 6px;
}
+
    -moz-border-radius: 6px 0 6px 6px;
 +
    border-radius: 6px 0 6px 6px;
  
  
/* styling for the submenu buttons */
 
.igem_2017_menu_wrapper .submenu_button {
 
width: 100%;
 
padding: 10px 0px 10px 34px;
 
float:left;
 
background-color:#f2f2f2;
 
border-bottom: 1px solid #d3d3d3;
 
font-size: 12px;
 
color: #5e5f5f;
 
cursor: pointer;
 
}
 
  
/* wrapper for the submenu items, they are hidden by default*/
+
.faceBot{
.igem_2017_menu_wrapper .submenu_wrapper {  
+
  background: #000000;
display:none;
+
}
}
+
  
/* when the page size is bigger than 800px, this show/hide control is hidden by default */
+
@font-face {
.igem_2017_menu_wrapper #display_menu_control {
+
  font-family: 'Roboto', sans-serif;
display:none;
+
}
text-align:center;
+
}
+
  
/***************************************************** DEFAULT WIKI SETTINGS  ****************************************************/
+
body
+
{
/* Clear the default wiki settings */
+
  font-family: 'Roboto', sans-serif;
+
}
#home_logo, #sideMenu { display:none; }
+
#sideMenu, #top_title, .patrollink  {display:none;}
+
#content { width:100%; padding:0px;  margin-top:-7px; margin-left:0px;}
+
body {background-color:white; }
+
#bodyContent h1, #bodyContent h2, #bodyContent h3, #bodyContent h4, #bodyContent h5 { margin-bottom: 0px; }
+
  
+
ul.nav a{
/***************************************************** CONTENT OF THE PAGE ****************************************************/
+
  color: black;
 +
  background-color: transparent;
 +
  height: 100%;
 +
  position: relative;
 +
}
  
/* Wrapper for the content */
+
ul.nav a:hover{
.igem_2017_content_wrapper {
+
  color: black;
width: 81%;
+
  background-color: transparent;
margin: 2%;
+
  height: 100%;
display:block;
+
  position: relative;
float:left;  
+
}
background-color:white;
+
font-family:Tahoma, Geneva, sans-serif;
+
}
+
+
  
 +
h2 {
 +
  color:black;
 +
}
  
 +
h4 {
 +
    font-weight: bold;
 +
}
 +
h1 {
 +
    text-align: center;
 +
}
  
 +
.menu-item{
 +
  height: 100px;
 +
}
  
 +
li.menu-item{
 +
  background: transparent !important;
 +
}
  
/********************************* HTML STYLING  *********************************/
 
  
/* styling for the titles h1 h2 */
+
.logo {
.igem_2017_content_wrapper h1, .igem_2017_content_wrapper h2 {
+
margin-top: 10px;
padding:5px 15px;
+
border-bottom: 0px;  
+
color: #3399ff;
+
}
+
  
 +
}
  
/* styling for the titles  h3 h4 h5 h6*/
+
}
.igem_2017_content_wrapper h3, .igem_2017_content_wrapper h4, .igem_2017_content_wrapper h5, .igem_2017_content_wrapper h6 {
+
padding:5px 15px;
+
border-bottom:0px;
+
color: #000000; 
+
}
+
  
  
/* font and text */
+
}
.igem_2017_content_wrapper p {
+
padding: 0px 15px;
+
font-size: 13px;
+
}
+
  
/* Links */
+
dropdown-toggle {
.igem_2017_content_wrapper a {  
+
width: 10%;
font-weight: bold;  
+
text-decoration: underline;
+
text-decoration-color: #3399ff;
+
color:  #3399ff;
+
-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 */
 
.igem_2017_content_wrapper a:hover {
 
text-decoration:none;
 
color:#000000;
 
}
 
  
/* non numbered lists */
+
 
.igem_2017_content_wrapper ul {
+
}
padding:0px 20px;
+
font-size: 13px;
+
font-family:Tahoma, Geneva, sans-serif;
+
}
+
  
/* numbered lists */
 
.igem_2017_content_wrapper ol {
 
padding:0px;
 
font-size: 13px;
 
font-family:Tahoma, Geneva, sans-serif;
 
}
 
  
/* Table */
+
</style>
.igem_2017_content_wrapper table {
+
width: 97%;
+
margin:15px 10px;
+
border: 1px solid #d3d3d3;
+
border-collapse: collapse;
+
}
+
  
/* table cells */
 
.igem_2017_content_wrapper  td {
 
padding: 10px;
 
vertical-align: text-top;
 
border: 1px solid #d3d3d3;
 
border-collapse: collapse;
 
}
 
  
/* table headers */
+
</head>
.igem_2017_content_wrapper th {
+
padding: 10px;
+
vertical-align: text-top;
+
border: 1px solid #d3d3d3;
+
border-collapse: collapse;
+
background-color:#f2f2f2;
+
}
+
  
 +
<body>
  
/**********************************LAYOUT CLASSES **********************************/
 
  
/* general class for column divs */
+
<div class="navbar navbar-fixed-top" style="margin-top:0px; margin-left: -30px">
.igem_2017_content_wrapper .column  {
+
  <nav class="navbar-inner">
padding: 10px 0px;
+
 
float:left;  
+
  <div class="row-sm-height">
}
+
 
 +
  <div class="col-sm-2"style="margin-top:20px; margin-bottom:5px"><img class="logo" src="https://static.igem.org/mediawiki/2017/b/ba/Final_logo.png" height="100"  width="auto" ></a></div>
  
/* class for a full width column */
 
.column .full_size {
 
width:100%;
 
}
 
  
/* styling for images in a full width column*/
+
.column.full_size img {
+
width:97%;
+
padding: 10px 15px;
+
}
+
  
/* class for a half width column */
+
  <div class="col-md-10" >
.column.half_size {
+
  <div id="navbar" class="navbar-collapse collapse">
width: 50%;  
+
      <ul class="nav navbar-nav navbar-right" " style="margin-top:40px ; margin-right:80px;">
}
+
/* styling for images in a half width column*/
+
.column.half_size img {
+
width: 94.5%;
+
padding: 10px 15px;
+
}
+
  
 +
        <li class="menu-item">
 +
<a href="https://2017.igem.org/Team:Hong_Kong-CUHK">
 +
            <span>Home</span>
 +
            <span class="green-effect"></span>
 +
          </a>
 +
</li>
  
  
  
/********************************* SUPPORT CLASSES ********************************/
+
<li><div id="navbar" class="navbar-collapse collapse">
 +
          <li class="dropdown">
 +
    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
 +
Project <b class="caret"></b>           
 +
</a>
 +
                    <ul class="dropdown-menu multi-level">
 +
      <li><a href="https://2017.igem.org/Team:Hong_Kong-CUHK/Description">Description</a></li>
 +
      <li><a href="https://2017.igem.org/Team:Hong_Kong-CUHK/Experiments">Experiments</a></li>
 +
      <li><a href="https://2017.igem.org/Team:Hong_Kong-CUHK/Results">Results</a></li>
 +
      <li><a href="https://2017.igem.org/Team:Hong_Kong-CUHK/Parts">Parts</a></li>
 +
      <li><a href="https://2017.igem.org/Team:Hong_Kong-CUHK/InterLab">InterLab</a></li>
  
/* class that clears content below*/
+
                    </ul>
.igem_2017_content_wrapper .clear {
+
                </li>
clear:both;
+
}
+
+
+
/* adds extra spacing when clearing content */
+
.igem_2017_content_wrapper  .clear.extra_space {
+
height: 30px;
+
}
+
  
  
/* highlight class, makes content slightly smaller */
+
        <li class="menu-item">
.igem_2017_content_wrapper .highlight {
+
          <a href="https://2017.igem.org/Team:Hong_Kong-CUHK/Model">
margin: 0px 15px;
+
            <span>Modelling</span>
padding: 15px 0px;
+
            <span class="green-effect"></span>
}
+
          </a>
 +
</li>
  
  
/* highlight class, adds a gray background */
+
        <li class="menu-item">
.igem_2017_content_wrapper .highlight.gray {
+
          <a href="https://2017.igem.org/Team:Hong_Kong-CUHK/Software">
background-color: #f2f2f2;
+
            <span>Software</span>
}
+
            <span class="green-effect"></span>
 +
          </a>
 +
</li>
  
/* highlight with decoration blue line on top */
 
.igem_2017_content_wrapper .highlight.blue_top {
 
    border-top: 4px solid #3399ff;
 
}
 
  
/* highlight with a full blue border decoration */
+
<li><div id="navbar" class="navbar-collapse collapse">
.igem_2017_content_wrapper .highlight.blue_border {
+
          <li class="dropdown">
    border: 4px solid  #3399ff;
+
    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
}
+
Notebook <b class="caret"></b>           
 +
</a>
 +
                    <ul class="dropdown-menu multi-level">
  
 +
      <li><a href="https://2017.igem.org/Team:Hong_Kong-CUHK/Notebook">Notebook</a></li>
 +
      <li><a href="https://2017.igem.org/Team:Hong_Kong-CUHK/Protocol">Protocols</a></li>
 +
      </ul>
 +
                </li>
  
/* button class */
+
        <li><div id="navbar" class="navbar-collapse collapse">
.igem_2017_content_wrapper .button{
+
          <li class="dropdown">
max-width: 35%;
+
    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
margin: 30px auto;
+
padding: 12px 10px;
+
    background-color: #3399ff;
+
    text-align: center;
+
  color: #ffffff;
+
-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; 
+
}
+
  
/* styling for button on hover */
+
                Human Practices<b class="caret"></b>           
.igem_2017_content_wrapper .button:hover{
+
</a>
background-color: #3399ff;
+
                    <ul class="dropdown-menu multi-level">
    color: #000000;
+
                        <li><a href="https://2017.igem.org/Team:Hong_Kong-CUHK/HP/Gold_Integrated">Integrated Human Practices</a></li>
}
+
    <li> <a href="https://2017.igem.org/Team:Hong_Kong-CUHK/HP/Silver">Engagement and Education</a> </li>
 +
                        <li><a href="https://2017.igem.org/Team:Hong_Kong-CUHK/Prototype">Prototype</a></li>
 +
    <li> <a href="https://2017.igem.org/Team:Hong_Kong-CUHK/Collaborations">Collaboration</a></li>
 +
                     
 +
                    </ul>
 +
                </li>
  
 +
<li><div id="navbar" class="navbar-collapse collapse">
 +
          <li class="dropdown">
 +
    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
  
 +
                Team<b class="caret"></b>           
 +
</a>
 +
                    <ul class="dropdown-menu multi-level">
 +
                        <li><a href="https://2017.igem.org/Team:Hong_Kong-CUHK/Team">About Us </a></li>
 +
                        <li><a href="https://2017.igem.org/Team:Hong_Kong-CUHK/Attributions">Attributions </a></li>
 +
                   
 +
                    </ul>
 +
                </li>
  
  
/***************************************************** RESPONSIVE STYLING ****************************************************/
 
  
/* IF THE SCREEN IS LESS THAN 1200PX */
 
@media only screen and (max-width: 1200px) {
 
  
#content {width:100%; }
+
      </ul>
.igem_2017_menu_wrapper {width:15%; right:0;}
+
</div>
.highlight {padding:10px 0px;}
+
  </nav>
.igem_2017_menu_wrapper #display_menu_control { display:none; }
+
</div>
#menu_content { display:block;}
+
.menu_button.direct_to_page {padding-left: 17px;}
+
+
}
+
  
/* IF THE SCREEN IS LESS THAN 800PX */
 
@media only screen and (max-width: 800px) {
 
  
.igem_2017_menu_wrapper { width:100%; height: 15%; position:relative; left:0%;}
+
<html>
.igem_2017_content_wrapper {width:100%; margin-left:0px;}
+
.column.half_size  {width:100%; }
+
.column.full_size img, .column.half_size img {  width: 100%; padding: 10px 0px;}
+
.highlight {padding:15px 5px;}
+
.igem_2017_menu_wrapper #display_menu_control { display:block; }
+
#menu_content { display:none;}
+
.igem_2017_menu_wrapper .menu_button .expand_collapse_icon { width: 5%; }
+
.menu_bottom_padding {display:none;}
+
.menu_button.direct_to_page { padding-left: 36px; }
+
}
+
 
+
 
+
+
+
/* special class that the system uses to make sure the team wants a page to be evaluated */
+
.judges-will-not-evaluate {
+
    width: 96.6%;
+
  margin: 5px 15px;
+
  display: block;
+
border: 4px solid #3399ff;
+
    font-weight: bold;
+
}
+
+
</style>
+
 
+
 
+
<!--- THIS IS WHERE THE HTML BEGINS --->
+
 
+
 
+
 
+
<head>
+
 
+
<!-- This tells the browser that your page is responsive -->
+
<meta name="viewport" content="width=device-width, initial-scale=1">
+
 
+
</head>
+
 
+
 
+
 
+
 
+
 
+
 
+
<!-- start of content -->
+
<div class="igem_2017_content_wrapper">
+

Latest revision as of 16:21, 24 October 2017