Difference between revisions of "Template:MIT"

Line 1: Line 1:
 
<!DOCTYPE html>
 
<!DOCTYPE html>
  
 +
<!DOCTYPE html>
 
<html>
 
<html>
 +
<head>
 +
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 +
<meta http-equiv="Pragma" content="no-cache">
 +
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
  
<script>
+
<style>html {
 +
overflow: hidden;
 +
}
  
// This is the jquery part of your template. 
+
a {
// Try not modify any of this code too much since it makes your menu work.
+
color: inherit !important;
 +
}
  
$(document).ready(function() {
+
a:hover {
 +
color: inherit !important;
 +
}
  
$("#HQ_page").attr('id','');
+
.main.view {
 +
position: fixed;
 +
top: 0; left: 0;
 +
width: 100%; height: 100%;
  
// call the functions that control the menu
+
font-size: 1rem;
menu_functionality();
+
hide_show_menu();
+
  
 +
font-family: Brandon;
  
 +
background: rgba(24, 24, 24, 1);
  
//this function controls the expand and collapse buttons of the menu and changes the +/- symbols
+
-webkit-perspective: 1000px;
function menu_functionality() {
+
perspective: 1000px;
 +
}
  
//when clicking on a "menu_button", it will change the "+/-" accordingly and it will show/hide the corresponding submenu
+
.main.menu {
$(".menu_button").click(function(){
+
position: fixed;
 +
background: none;
  
// add or remove the class "open" , this class holds the "-"
+
left: 0; top: 0;
$(this).children().toggleClass("open");
+
height: 100%;
// show or hide the submenu
+
width: 10em;
$(this).next('.submenu_wrapper').fadeToggle(400);
+
});
+
  
// when the screen size is smaller than 800px, the display_menu_control button appears and will show/hide the whole menu
+
opacity: 0;
$("#display_menu_control").click(function(){
+
$('#menu_content').fadeToggle(400);
+
});
+
  
// call the current page highlight function
+
text-align: center;
highlight_current_page();
+
}
+
  
 +
user-select: none;
 +
-moz-user-select: none;
  
// call the highlight current page function to show it on the menu with a different background color
+
transition: opacity 0.3s;
function highlight_current_page() {
+
}
  
// 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
+
.main.menu .items {
$("#"+  wgPageName.substring(wgPageName.lastIndexOf("/")+1, wgPageName.length ) + "_page").addClass("current_page");
+
margin-top: 6rem;
 +
}
  
// now that the current_page class has been added to a menu item, make the submenu fade in
+
.main.menu .logo {
$(".current_page").parents(".submenu_wrapper").fadeIn(400);
+
display: inline-block;
// change the +/- symbol of the corresponding menu button
+
$(".current_page").parents(".submenu_wrapper").prev().children().toggleClass("open");
+
+
}
+
 
+
 
+
 
+
// 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
+
width: 7em;
if (window.location.href.indexOf("submit") >= 0) {
+
height: 7em;
$(".igem_2017_menu_wrapper").hide();
+
line-height: 7em;
}
+
text-align: center;
  
// if the black menu bar has been loaded
+
margin-bottom: 2rem;
  if (document.getElementById('bars_item')) {
+
  
// when the "bars_item" has been clicked
+
border-radius: 50%;
$("#bars_item").click(function() {
+
$("#sideMenu").hide();
+
  
// show/hide the menu wrapper
+
background: white;
$(".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
+
.main.menu .logo i {
else {
+
line-height: 2em;
    setTimeout(hide_show_menu, 15);
+
font-size: 3.5em;
}
+
}
}
+
  
 +
.main.menu .item {
 +
display: inline-block;
  
});
+
width: auto;
  
 +
padding: 0 0.5rem;
  
</script>
+
font-weight: bold;
 +
font-size: 1em;
  
 +
color: rgba(240, 240, 240, 1);
  
 +
margin-top: 2em;
 +
-webkit-user-select: none;
 +
user-select: none;
  
 +
cursor: pointer;
  
 +
border-left: 3px solid transparent;
 +
border-right: 3px solid transparent;
  
<style>
+
transition: border 0.2s;
 +
}
  
 +
.main.menu .item a:visited {
 +
text-decoration: none;
 +
}
  
 +
.main.menu .item.selected,
 +
.main.menu .item:hover {
 +
border-left-color: #2980B9;
 +
}
  
/***************************************************** DEFAULT WIKI SETTINGS  ****************************************************/
+
.main.menu .sub-items {
+
display: inline-block;
/* Clear the default wiki settings */
+
+
#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; }
+
  
 +
margin-top: 0.3rem;
 
 
+
height: 0;
+
overflow: hidden;
/**************************************************************** MENU ***************************************************************/
+
/* Wrapper for the menu */
+
.igem_2017_menu_wrapper {
+
width: 15%;
+
height:100vh;
+
position:fixed;
+
right:0%;
+
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 */
+
transition: height 0.3s;
.igem_2017_menu_wrappe::-webkit-scrollbar {
+
}
display: none;
+
}
+
+
+
/* styling for links in the menu, removes the line under text */
+
.igem_2017_menu_wrapper a { 
+
text-decoration: none;  
+
}
+
  
 +
.main.menu .item:hover .sub-items {
 +
height: auto;
 +
}
  
/* styling for the images in the menu */
+
.main.menu .sub-item {
.igem_2017_menu_wrapper img {  
+
display: inline-block;
width: 100%;
+
}
+
  
/* styling for the menu buttons */
+
margin-top: 0.7rem;
.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;
+
}
+
  
 +
font-weight: bold;
 +
font-size: 0.9rem;
  
.igem_2017_menu_wrapper .menu_bottom_padding {
+
padding: 0 0.5rem;
width: 100%;
+
height: 30px;
+
float:left;
+
}
+
  
.menu_button.direct_to_page {
+
color: rgba(240, 240, 240, 1);
padding-left: 36px;
+
}
+
  
 +
border-right: 3px solid transparent;
 +
border-left: 3px solid transparent;
  
.igem_2017_menu_wrapper .menu_button .expand_collapse_icon {
+
transition: border 0.2s;
width:10%;
+
}
float:left;
+
}
+
  
.igem_2017_menu_wrapper .menu_button .expand_collapse_icon::before {
+
.main.menu .sub-item:hover {
content: "+"; 
+
}
}
+
+
.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 */
+
.main.view.open-menu .main.menu {
.current_page {  
+
opacity: 1;
background-color:#7fc1f7  !important;
+
transition: opacity 0.3s 0.3s;
color:#5e5f5f !important;
+
}
}
+
  
 +
.main.cont-wrap {
 +
position: absolute;
 +
top: 0; left: 0;
 +
width: 100%; height: 100%;
 +
background: rgba(253, 253, 253, 1);
  
/* styling for the submenu buttons */
+
overflow: auto;
.igem_2017_menu_wrapper .submenu_button {
+
box-shadow: 0 0 20px rgba(0, 0, 0, 1);
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*/
+
transition: 0.3s cubic-bezier(0.2, 1, 0.2, 1);
.igem_2017_menu_wrapper .submenu_wrapper {
+
}
display:none;
+
}
+
  
/* when the page size is bigger than 800px, this show/hide control is hidden by default */
+
.main.view.open-menu .main.cont-wrap {
.igem_2017_menu_wrapper #display_menu_control {
+
overflow: hidden;
display:none;
+
}
text-align:center;
+
}
+
+
  
/***************************************************** CONTENT OF THE PAGE ****************************************************/
+
.main.view.open-menu .main.cont-wrap {
 +
left: 18em;
 +
}
  
/* Wrapper for the content */
+
.main.top-btn-set {
.igem_2017_content_wrapper {
+
position: fixed;
width: 81%;
+
margin: 2%;
+
display:block;
+
float:left;
+
background-color:white;
+
font-family:Tahoma, Geneva, sans-serif;
+
}
+
  
 +
z-index: 10;
  
/********************************* HTML STYLING  *********************************/
+
left: 0.2rem;
 +
top: 1.2rem;
  
/* styling for the titles h1 h2 */
+
font-size: 1.5rem;
.igem_2017_content_wrapper h1, .igem_2017_content_wrapper h2 {
+
padding:5px 15px;
+
border-bottom: 0px;
+
color: #3399ff;
+
}
+
  
 +
color: black;
  
/* styling for the titles  h3 h4 h5 h6*/
+
opacity: 0.8;
.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;
+
}
+
  
 +
user-select: none;
 +
-moz-user-select: none;
  
/* font and text */
+
transition: opacity 0.2s;
.igem_2017_content_wrapper p {
+
}
padding: 0px 15px;
+
font-size: 13px;
+
}
+
  
/* Links */
+
.main.top-btn-set .btn {
.igem_2017_content_wrapper a {
+
display: inline-block;
font-weight: bold;
+
margin-left: 1rem;
text-decoration: underline;
+
cursor: pointer;
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 */
+
transition: opacity 0.2s;
.igem_2017_content_wrapper a:hover {
+
}
text-decoration:none;
+
color:#000000;
+
}
+
  
/* non numbered lists */
+
.main.top-btn-set .show-on-menu.btn {
.igem_2017_content_wrapper ul {
+
opacity: 0;
padding:0px 20px;
+
pointer-events: none;
font-size: 13px;
+
}
font-family:Tahoma, Geneva, sans-serif;
+
}
+
  
/* numbered lists */
+
/* menu open! */
.igem_2017_content_wrapper ol {
+
.main.open-menu .main.top-btn-set {
padding:0px;  
+
color: white;
font-size: 13px;
+
opacity: 1;
font-family:Tahoma, Geneva, sans-serif;
+
}
}
+
  
/* Table */
+
.main.open-menu .main.top-btn-set .show-on-menu.btn {
.igem_2017_content_wrapper table {  
+
opacity: 1;
width: 97%;  
+
pointer-events: auto;
margin:15px 10px;
+
}
border: 1px solid #d3d3d3;
+
border-collapse: collapse;  
+
}
+
  
/* table cells */
+
.main.open-menu .menu-btn .fa:before {
.igem_2017_content_wrapper  td {
+
content: "\f00d";
padding: 10px;
+
}
vertical-align: text-top;
+
border: 1px solid #d3d3d3;
+
border-collapse: collapse;  
+
}
+
  
/* table headers */
+
/*
.igem_2017_content_wrapper th {  
+
.csstransforms3d .main.view.open-menu .main.cont-wrap {
padding: 10px;
+
-webkit-transform: translate3d(10em, 0, -200px);
vertical-align: text-top;  
+
transform: translate3d(10em, 0, -200px);
border: 1px solid #d3d3d3;
+
border-collapse: collapse;  
+
background-color:#f2f2f2;
+
}
+
  
 +
border-radius: 3px;
 +
}
 +
*/
 +
</style>
 +
<style>.fullscr {
 +
height: 100vh;
 +
width: 100%;
 +
}
  
/**********************************LAYOUT CLASSES **********************************/
+
.img {
 +
background-repeat: no-repeat;
 +
background-size: cover;
 +
background-position: 50% 50%;
 +
}
  
/* general class for column divs */
+
.center {
.igem_2017_content_wrapper .column  {  
+
width: auto !important;
padding: 10px 0px;
+
}
float:left;  
+
</style>
}
+
<style>@charset "UTF-8";
  
/* class for a full width column */
+
@font-face {
.column .full_size {
+
font-family: Brandon;
width:100%;  
+
src: url("https://static.igem.org/mediawiki/2017/b/b8/T--HFLS_H2Z_Hangzhou--font_brandon_regular_woff.woff") format("woff"),
}
+
url("https://static.igem.org/mediawiki/2017/0/0e/T--HFLS_H2Z_Hangzhou--font_brandon_regular_ttf.ttf") format("truetype"),
 +
url("https://static.igem.org/mediawiki/2017/f/ff/T--HFLS_H2Z_Hangzhou--font_brandon_regular_eot.eot") format("embedded-opentype"),
 +
url("https://static.igem.org/mediawiki/2017/1/17/T--HFLS_H2Z_Hangzhou--font_brandon_regular_svg.svg") format("svg"),
 +
url("fallback.ttf") format("truetype");
 +
font-weight: normal;
 +
font-style: normal;
 +
}
 +
</style>
 +
<style>@charset "UTF-8";
  
/* styling for images in a full width column*/
+
@font-face {
.column.full_size img {
+
font-family: Veneer;
width:97%;  
+
src: url("https://static.igem.org/mediawiki/2017/d/d7/T--HFLS_H2Z_Hangzhou--font_veneer_regular_woff.woff") format("woff"),
padding: 10px 15px;
+
url("https://static.igem.org/mediawiki/2017/f/f1/T--HFLS_H2Z_Hangzhou--font_veneer_regular_ttf.ttf") format("truetype"),
}
+
url("https://static.igem.org/mediawiki/2017/6/60/T--HFLS_H2Z_Hangzhou--font_veneer_regular_eot.eot") format("embedded-opentype"),
 +
url("https://static.igem.org/mediawiki/2017/b/bd/T--HFLS_H2Z_Hangzhou--font_veneer_regular_svg.svg") format("svg"),
 +
url("https://static.igem.org/mediawiki/2017/0/0e/T--HFLS_H2Z_Hangzhou--font_veneer_regular_otf.otf") format("opentype"),
 +
url("fallback.ttf") format("truetype");
 +
font-weight: normal;
 +
font-style: normal;
 +
}
 +
</style>
  
/* class for a half width column */
+
<script src='/Template:HFLS_H2Z_Hangzhou/src/main/js?action=raw&ctype=text/javascript'></script>
.column.half_size {
+
width: 50%;
+
}
+
/* styling for images in a half width column*/
+
.column.half_size img {
+
width: 94.5%;
+
padding: 10px 15px;
+
}
+
  
 +
<!-- porbably need to change these to static files -->
 +
<link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.css">
 +
<link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/semantic-ui/2.2.10/semantic.min.css">
 +
<script src="https://cdn.bootcss.com/semantic-ui/2.2.10/semantic.min.js"></script>
 +
</head>
  
 +
<style>
 +
#top_menu_14:hover {
 +
top: 0 !important;
 +
}
 +
</style>
  
 +
<script>
 +
window.ADEBUG = true;
  
/********************************* SUPPORT CLASSES ********************************/
+
$(document).ready(function () {
 +
// alert(Modernizr.csstransforms3d);
 +
// if (Modernizr.csstransforms3d) {
 +
// }
  
/* class that clears content below*/
+
var glob = window;
.igem_2017_content_wrapper .clear {
+
clear:both;
+
}
+
+
+
/* adds extra spacing when clearing content */
+
.igem_2017_content_wrapper  .clear.extra_space {
+
height: 30px;
+
}
+
  
 +
// remove some weird components
 +
(function () {
 +
$("#sideMenu").remove();
  
/* highlight class, makes content slightly smaller */
+
$("#top_menu_14").css({
.igem_2017_content_wrapper .highlight {  
+
top: "-20px",
margin: 0px 15px;
+
"padding-bottom": "1rem",
padding: 15px 0px;
+
transition: "top 0.3s"
}
+
});
  
 +
var menu_trig = $("<div></div>");
 +
menu_trig.css({
 +
position: "fixed",
 +
"z-index": "10",
 +
height: "15px",
 +
width: "100%",
 +
top: "0",
 +
left: "0"
 +
}).mouseenter(function () {
 +
$("#top_menu_14").css("top", "0");
 +
}).mouseleave(function () {
 +
$("#top_menu_14").css("top", "-20px");
 +
});
 +
 +
$("body").append(menu_trig);
 +
})(); // hide the top bar
  
/* highlight class, adds a gray background */
+
// menu
.igem_2017_content_wrapper .highlight.gray {
+
(function () {
background-color: #f2f2f2;  
+
function setMenuPos() {
}
+
setTimeout(function () {
 +
$(".main.menu").width($(".main.cont-wrap").position().left);
 +
}, 300);
 +
}
  
/* highlight with decoration blue line on top */
+
var open = false;
.igem_2017_content_wrapper .highlight.blue_top {
+
    border-top: 4px solid #3399ff;
+
}
+
  
/* highlight with a full blue border decoration */
+
function toggleMenu() {
.igem_2017_content_wrapper .highlight.blue_border {
+
$(".main.view").toggleClass("open-menu");
    border: 4px solid  #3399ff;
+
setMenuPos();
}
+
  
 +
if ($(".main.view").hasClass("open-menu"))
 +
setTimeout(function () {
 +
$(".main.cont-wrap").click(closeMenu);
 +
});
 +
}
  
/* button class */
+
function closeMenu() {
.igem_2017_content_wrapper .button{
+
$(".main.view").removeClass("open-menu");
max-width: 35%;
+
$(".main.cont-wrap").off("click", closeMenu);
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 */
+
$(".main.menu-btn")
.igem_2017_content_wrapper .button:hover{
+
.click(toggleMenu)
background-color: #3399ff;
+
.popup({
    color: #000000;
+
content: "Menu",
}
+
position: "right center",
 +
on: "manual"
 +
}).popup("show");
  
 +
setTimeout(function () {
 +
$(".main.menu-btn").popup("hide");
 +
}, 3000);
  
 +
glob.Aquamade = {};
 +
glob.Aquamade.menu = {
 +
setBtnColor: function (color) {
 +
$(".main.menu-btn").css("color", color);
 +
},
  
 +
selectItem: function (name) {
 +
$(".main.menu .selected").removeClass("selected");
 +
$(".main.menu .item.item-" + name).addClass("selected");
 +
},
  
/***************************************************** RESPONSIVE STYLING ****************************************************/
+
toggle: function () {
 +
toggleMenu();
 +
}
 +
};
 +
})();
 +
});
 +
</script>
  
/* IF THE SCREEN IS LESS THAN 1200PX */
+
<script>
@media only screen and (max-width: 1200px) {
+
/* just for debug */
 +
if (ADEBUG) {
 +
$(document).ready(function () {
 +
$.ajax({
 +
url: "sub/home.html",
 +
success: function (dat) {
 +
$(".main.cont-wrap").append(dat);
 +
}
 +
});
 +
});
 +
}
 +
</script>
  
#content {width:100%; }
+
<div class="main view">
.igem_2017_menu_wrapper {width:15%; right:0;}
+
<div class="main menu">
.highlight {padding:10px 0px;}
+
<div class="items">
.igem_2017_menu_wrapper #display_menu_control { display:none; }
+
<div class="logo"><i class="fa fa-bath"></i></div><br>
#menu_content { display:block;}
+
<div style="text-align: center; display: inline-block; width: auto;">
.menu_button.direct_to_page {padding-left: 17px;}
+
<div class="item item-home">
+
<a href="/Team:HFLS_H2Z_Hangzhou">HOME</a>
}
+
</div><br>
 +
 +
<div class="item item-project">
 +
<a href="/Team:HFLS_H2Z_Hangzhou/project">PROJECT</a><!-- <br>
 +
<div class="sub-items">
 +
<div class="sub-item">OVERVIEW</div><br>
 +
<div class="sub-item">RESULTS</div><br>
 +
<div class="sub-item">PROFF</div>
 +
</div> -->
 +
</div><br>
 +
 +
<div class="item item-parts">
 +
<a href="/Team:HFLS_H2Z_Hangzhou/parts">PARTS</a>
 +
</div><br>
 +
 +
<div class="item item-model">
 +
<a href="/Team:HFLS_H2Z_Hangzhou/model">MODELLING</a>
 +
</div><br>
 +
 +
<div class="item item-hprac">
 +
<a href="/Team:HFLS_H2Z_Hangzhou/hp">HUMAN PRACTICES</a>
 +
</div><br>
  
/* IF THE SCREEN IS LESS THAN 800PX */
+
<div class="item item-note">
@media only screen and (max-width: 800px) {
+
<a target="_blank" href="http://note.aquamade.wiki">NOTEBOOK</a>
 +
</div><br>
 +
 +
<div class="item item-team">
 +
<a href="/Team:HFLS_H2Z_Hangzhou/team">TEAM</a>
 +
</div><br>
 +
</div>
 +
</div>
 +
</div>
  
.igem_2017_menu_wrapper { width:100%; height: 15%; position:relative; left:0%;}
+
<div class="main top-btn-set">
.igem_2017_content_wrapper {width:100%; margin-left:0px;}
+
<div class="main btn menu-btn"><i class="fa fa-bars"></i></div
.column.half_size  {width:100%; }
+
><div class="main btn info-btn show-on-menu"><i class="fa fa-question-circle"></i></div>
.column.full_size img, .column.half_size img {  width: 100%; padding: 10px 0px;}
+
</div>
.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; }
+
}
+
  
 +
<div class="main cont-wrap">
  
+
<!-- Concat with content -->
+
/* 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 --->
+
</html>

Revision as of 17:30, 31 July 2017

<!DOCTYPE html>

<!DOCTYPE html>