Difference between revisions of "Team:NUDT CHINA"

Line 1: Line 1:
{{NUDT_CHINA}}
+
<!doctype html>
<html>
+
<html lang="en">
 +
<head>
 +
    <meta charset="utf-8">
 +
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
 +
    <meta name="description" content="A layout example with a side menu that hides on mobile, just like the Pure website.">
 +
    <title>Responsive Side Menu &ndash; Layout Examples &ndash; Pure</title>
 +
   
 +
   
 +
   
 +
   
 +
        <!--[if lte IE 8]>
 +
            <link rel="stylesheet" href="/combo/1.18.13?/css/layouts/side-menu-old-ie.css">
 +
        <![endif]-->
 +
        <!--[if gt IE 8]><!-->
 +
<style type="text/css">
 +
.pure-button:focus,a:active,a:hover{outline:0}.pure-table,table{border-collapse:collapse;border-spacing:0}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}abbr[title]{border-bottom:1px dotted}b,optgroup,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre,textarea{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}.pure-button,input{line-height:normal}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}.pure-button,.pure-form input:not([type]),.pure-menu{box-sizing:border-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend,td,th{padding:0}legend{border:0}.hidden,[hidden]{display:none!important}.pure-img{max-width:100%;height:auto;display:block}.pure-g{letter-spacing:-.31em;text-rendering:optimizespeed;font-family:FreeSans,Arimo,"Droid Sans",Helvetica,Arial,sans-serif;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-align-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){table .pure-g{display:block}}.opera-only :-o-prefocus,.pure-g{word-spacing:-.43em}.pure-u,.pure-u-1,.pure-u-1-1,.pure-u-1-12,.pure-u-1-2,.pure-u-1-24,.pure-u-1-3,.pure-u-1-4,.pure-u-1-5,.pure-u-1-6,.pure-u-1-8,.pure-u-10-24,.pure-u-11-12,.pure-u-11-24,.pure-u-12-24,.pure-u-13-24,.pure-u-14-24,.pure-u-15-24,.pure-u-16-24,.pure-u-17-24,.pure-u-18-24,.pure-u-19-24,.pure-u-2-24,.pure-u-2-3,.pure-u-2-5,.pure-u-20-24,.pure-u-21-24,.pure-u-22-24,.pure-u-23-24,.pure-u-24-24,.pure-u-3-24,.pure-u-3-4,.pure-u-3-5,.pure-u-3-8,.pure-u-4-24,.pure-u-4-5,.pure-u-5-12,.pure-u-5-24,.pure-u-5-5,.pure-u-5-6,.pure-u-5-8,.pure-u-6-24,.pure-u-7-12,.pure-u-7-24,.pure-u-7-8,.pure-u-8-24,.pure-u-9-24{letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto;display:inline-block;zoom:1}.pure-g [class*=pure-u]{font-family:sans-serif}.pure-u-1-24{width:4.1667%}.pure-u-1-12,.pure-u-2-24{width:8.3333%}.pure-u-1-8,.pure-u-3-24{width:12.5%}.pure-u-1-6,.pure-u-4-24{width:16.6667%}.pure-u-1-5{width:20%}.pure-u-5-24{width:20.8333%}.pure-u-1-4,.pure-u-6-24{width:25%}.pure-u-7-24{width:29.1667%}.pure-u-1-3,.pure-u-8-24{width:33.3333%}.pure-u-3-8,.pure-u-9-24{width:37.5%}.pure-u-2-5{width:40%}.pure-u-10-24,.pure-u-5-12{width:41.6667%}.pure-u-11-24{width:45.8333%}.pure-u-1-2,.pure-u-12-24{width:50%}.pure-u-13-24{width:54.1667%}.pure-u-14-24,.pure-u-7-12{width:58.3333%}.pure-u-3-5{width:60%}.pure-u-15-24,.pure-u-5-8{width:62.5%}.pure-u-16-24,.pure-u-2-3{width:66.6667%}.pure-u-17-24{width:70.8333%}.pure-u-18-24,.pure-u-3-4{width:75%}.pure-u-19-24{width:79.1667%}.pure-u-4-5{width:80%}.pure-u-20-24,.pure-u-5-6{width:83.3333%}.pure-u-21-24,.pure-u-7-8{width:87.5%}.pure-u-11-12,.pure-u-22-24{width:91.6667%}.pure-u-23-24{width:95.8333%}.pure-u-1,.pure-u-1-1,.pure-u-24-24,.pure-u-5-5{width:100%}.pure-button{display:inline-block;zoom:1;white-space:nowrap;vertical-align:middle;text-align:center;cursor:pointer;-webkit-user-drag:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.pure-button::-moz-focus-inner{padding:0;border:0}.pure-button-group{letter-spacing:-.31em;text-rendering:optimizespeed}.opera-only :-o-prefocus,.pure-button-group{word-spacing:-.43em}.pure-button{font-family:inherit;font-size:100%;padding:.5em 1em;color:#444;color:rgba(0,0,0,.8);border:1px solid #999;border:transparent;background-color:#E6E6E6;text-decoration:none;border-radius:2px}.pure-button-hover,.pure-button:focus,.pure-button:hover{filter:alpha(opacity=90);background-image:-webkit-linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1));background-image:linear-gradient(transparent,rgba(0,0,0,.05) 40%,rgba(0,0,0,.1))}.pure-button-active,.pure-button:active{box-shadow:0 0 0 1px rgba(0,0,0,.15) inset,0 0 6px rgba(0,0,0,.2) inset;border-color:#000\9}.pure-button-disabled,.pure-button-disabled:active,.pure-button-disabled:focus,.pure-button-disabled:hover,.pure-button[disabled]{border:none;background-image:none;filter:alpha(opacity=40);opacity:.4;cursor:not-allowed;box-shadow:none;pointer-events:none}.pure-button-hidden{display:none}.pure-button-primary,.pure-button-selected,a.pure-button-primary,a.pure-button-selected{background-color:#0078e7;color:#fff}.pure-button-group .pure-button{letter-spacing:normal;word-spacing:normal;vertical-align:top;text-rendering:auto;margin:0;border-radius:0;border-right:1px solid #111;border-right:1px solid rgba(0,0,0,.2)}.pure-button-group .pure-button:first-child{border-top-left-radius:2px;border-bottom-left-radius:2px}.pure-button-group .pure-button:last-child{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:none}.pure-form input[type=password],.pure-form input[type=email],.pure-form input[type=url],.pure-form input[type=date],.pure-form input[type=month],.pure-form input[type=time],.pure-form input[type=datetime],.pure-form input[type=datetime-local],.pure-form input[type=week],.pure-form input[type=tel],.pure-form input[type=color],.pure-form input[type=number],.pure-form input[type=search],.pure-form input[type=text],.pure-form select,.pure-form textarea{padding:.5em .6em;display:inline-block;border:1px solid #ccc;box-shadow:inset 0 1px 3px #ddd;border-radius:4px;vertical-align:middle;box-sizing:border-box}.pure-form input:not([type]){padding:.5em .6em;display:inline-block;border:1px solid #ccc;box-shadow:inset 0 1px 3px #ddd;border-radius:4px}.pure-form input[type=color]{padding:.2em .5em}.pure-form input:not([type]):focus,.pure-form input[type=password]:focus,.pure-form input[type=email]:focus,.pure-form input[type=url]:focus,.pure-form input[type=date]:focus,.pure-form input[type=month]:focus,.pure-form input[type=time]:focus,.pure-form input[type=datetime]:focus,.pure-form input[type=datetime-local]:focus,.pure-form input[type=week]:focus,.pure-form input[type=tel]:focus,.pure-form input[type=color]:focus,.pure-form input[type=number]:focus,.pure-form input[type=search]:focus,.pure-form input[type=text]:focus,.pure-form select:focus,.pure-form textarea:focus{outline:0;border-color:#129FEA}.pure-form input[type=file]:focus,.pure-form input[type=checkbox]:focus,.pure-form input[type=radio]:focus{outline:#129FEA auto 1px}.pure-form .pure-checkbox,.pure-form .pure-radio{margin:.5em 0;display:block}.pure-form input:not([type])[disabled],.pure-form input[type=password][disabled],.pure-form input[type=email][disabled],.pure-form input[type=url][disabled],.pure-form input[type=date][disabled],.pure-form input[type=month][disabled],.pure-form input[type=time][disabled],.pure-form input[type=datetime][disabled],.pure-form input[type=datetime-local][disabled],.pure-form input[type=week][disabled],.pure-form input[type=tel][disabled],.pure-form input[type=color][disabled],.pure-form input[type=number][disabled],.pure-form input[type=search][disabled],.pure-form input[type=text][disabled],.pure-form select[disabled],.pure-form textarea[disabled]{cursor:not-allowed;background-color:#eaeded;color:#cad2d3}.pure-form input[readonly],.pure-form select[readonly],.pure-form textarea[readonly]{background-color:#eee;color:#777;border-color:#ccc}.pure-form input:focus:invalid,.pure-form select:focus:invalid,.pure-form textarea:focus:invalid{color:#b94a48;border-color:#e9322d}.pure-form input[type=file]:focus:invalid:focus,.pure-form input[type=checkbox]:focus:invalid:focus,.pure-form input[type=radio]:focus:invalid:focus{outline-color:#e9322d}.pure-form select{height:2.25em;border:1px solid #ccc;background-color:#fff}.pure-form select[multiple]{height:auto}.pure-form label{margin:.5em 0 .2em}.pure-form fieldset{margin:0;padding:.35em 0 .75em;border:0}.pure-form legend{display:block;width:100%;padding:.3em 0;margin-bottom:.3em;color:#333;border-bottom:1px solid #e5e5e5}.pure-form-stacked input:not([type]),.pure-form-stacked input[type=password],.pure-form-stacked input[type=email],.pure-form-stacked input[type=url],.pure-form-stacked input[type=date],.pure-form-stacked input[type=month],.pure-form-stacked input[type=time],.pure-form-stacked input[type=datetime],.pure-form-stacked input[type=datetime-local],.pure-form-stacked input[type=week],.pure-form-stacked input[type=tel],.pure-form-stacked input[type=color],.pure-form-stacked input[type=file],.pure-form-stacked input[type=number],.pure-form-stacked input[type=search],.pure-form-stacked input[type=text],.pure-form-stacked label,.pure-form-stacked select,.pure-form-stacked textarea{display:block;margin:.25em 0}.pure-form-aligned .pure-help-inline,.pure-form-aligned input,.pure-form-aligned select,.pure-form-aligned textarea,.pure-form-message-inline{display:inline-block;vertical-align:middle}.pure-form-aligned textarea{vertical-align:top}.pure-form-aligned .pure-control-group{margin-bottom:.5em}.pure-form-aligned .pure-control-group label{text-align:right;display:inline-block;vertical-align:middle;width:10em;margin:0 1em 0 0}.pure-form-aligned .pure-controls{margin:1.5em 0 0 11em}.pure-form .pure-input-rounded,.pure-form input.pure-input-rounded{border-radius:2em;padding:.5em 1em}.pure-form .pure-group fieldset{margin-bottom:10px}.pure-form .pure-group input,.pure-form .pure-group textarea{display:block;padding:10px;margin:0 0 -1px;border-radius:0;position:relative;top:-1px}.pure-form .pure-group input:focus,.pure-form .pure-group textarea:focus{z-index:3}.pure-form .pure-group input:first-child,.pure-form .pure-group textarea:first-child{top:1px;border-radius:4px 4px 0 0;margin:0}.pure-form .pure-group input:first-child:last-child,.pure-form .pure-group textarea:first-child:last-child{top:1px;border-radius:4px;margin:0}.pure-form .pure-group input:last-child,.pure-form .pure-group textarea:last-child{top:-2px;border-radius:0 0 4px 4px;margin:0}.pure-form .pure-group button{margin:.35em 0}.pure-form .pure-input-1{width:100%}.pure-form .pure-input-3-4{width:75%}.pure-form .pure-input-2-3{width:66%}.pure-form .pure-input-1-2{width:50%}.pure-form .pure-input-1-3{width:33%}.pure-form .pure-input-1-4{width:25%}.pure-form .pure-help-inline,.pure-form-message-inline{display:inline-block;padding-left:.3em;color:#666;vertical-align:middle;font-size:.875em}.pure-form-message{display:block;color:#666;font-size:.875em}@media only screen and (max-width :480px){.pure-form button[type=submit]{margin:.7em 0 0}.pure-form input:not([type]),.pure-form input[type=password],.pure-form input[type=email],.pure-form input[type=url],.pure-form input[type=date],.pure-form input[type=month],.pure-form input[type=time],.pure-form input[type=datetime],.pure-form input[type=datetime-local],.pure-form input[type=week],.pure-form input[type=tel],.pure-form input[type=color],.pure-form input[type=number],.pure-form input[type=search],.pure-form input[type=text],.pure-form label{margin-bottom:.3em;display:block}.pure-group input:not([type]),.pure-group input[type=password],.pure-group input[type=email],.pure-group input[type=url],.pure-group input[type=date],.pure-group input[type=month],.pure-group input[type=time],.pure-group input[type=datetime],.pure-group input[type=datetime-local],.pure-group input[type=week],.pure-group input[type=tel],.pure-group input[type=color],.pure-group input[type=number],.pure-group input[type=search],.pure-group input[type=text]{margin-bottom:0}.pure-form-aligned .pure-control-group label{margin-bottom:.3em;text-align:left;display:block;width:100%}.pure-form-aligned .pure-controls{margin:1.5em 0 0}.pure-form .pure-help-inline,.pure-form-message,.pure-form-message-inline{display:block;font-size:.75em;padding:.2em 0 .8em}}.pure-menu-fixed{position:fixed;left:0;top:0;z-index:3}.pure-menu-item,.pure-menu-list{position:relative}.pure-menu-list{list-style:none;margin:0;padding:0}.pure-menu-item{padding:0;margin:0;height:100%}.pure-menu-heading,.pure-menu-link{display:block;text-decoration:none;white-space:nowrap}.pure-menu-horizontal{width:100%;white-space:nowrap}.pure-menu-horizontal .pure-menu-list{display:inline-block}.pure-menu-horizontal .pure-menu-heading,.pure-menu-horizontal .pure-menu-item,.pure-menu-horizontal .pure-menu-separator{display:inline-block;zoom:1;vertical-align:middle}.pure-menu-item .pure-menu-item{display:block}.pure-menu-children{display:none;position:absolute;left:100%;top:0;margin:0;padding:0;z-index:3}.pure-menu-horizontal .pure-menu-children{left:0;top:auto;width:inherit}.pure-menu-active>.pure-menu-children,.pure-menu-allow-hover:hover>.pure-menu-children{display:block;position:absolute}.pure-menu-has-children>.pure-menu-link:after{padding-left:.5em;content:"\25B8";font-size:small}.pure-menu-horizontal .pure-menu-has-children>.pure-menu-link:after{content:"\25BE"}.pure-menu-scrollable{overflow-y:scroll;overflow-x:hidden}.pure-menu-scrollable .pure-menu-list{display:block}.pure-menu-horizontal.pure-menu-scrollable .pure-menu-list{display:inline-block}.pure-menu-horizontal.pure-menu-scrollable{white-space:nowrap;overflow-y:hidden;overflow-x:auto;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;padding:.5em 0}.pure-menu-horizontal.pure-menu-scrollable::-webkit-scrollbar{display:none}.pure-menu-horizontal .pure-menu-children .pure-menu-separator,.pure-menu-separator{background-color:#ccc;height:1px;margin:.3em 0}.pure-menu-horizontal .pure-menu-separator{width:1px;height:1.3em;margin:0 .3em}.pure-menu-horizontal .pure-menu-children .pure-menu-separator{display:block;width:auto}.pure-menu-heading{text-transform:uppercase;color:#565d64}.pure-menu-link{color:#777}.pure-menu-children{background-color:#fff}.pure-menu-disabled,.pure-menu-heading,.pure-menu-link{padding:.5em 1em}.pure-menu-disabled{opacity:.5}.pure-menu-disabled .pure-menu-link:hover{background-color:transparent}.pure-menu-active>.pure-menu-link,.pure-menu-link:focus,.pure-menu-link:hover{background-color:#eee}.pure-menu-selected .pure-menu-link,.pure-menu-selected .pure-menu-link:visited{color:#000}.pure-table{empty-cells:show;border:1px solid #cbcbcb}.pure-table caption{color:#000;font:italic 85%/1 arial,sans-serif;padding:1em 0;text-align:center}.pure-table td,.pure-table th{border-left:1px solid #cbcbcb;border-width:0 0 0 1px;font-size:inherit;margin:0;overflow:visible;padding:.5em 1em}.pure-table td:first-child,.pure-table th:first-child{border-left-width:0}.pure-table thead{background-color:#e0e0e0;color:#000;text-align:left;vertical-align:bottom}.pure-table td{background-color:transparent}.pure-table-odd td,.pure-table-striped tr:nth-child(2n-1) td{background-color:#f2f2f2}.pure-table-bordered td{border-bottom:1px solid #cbcbcb}.pure-table-bordered tbody>tr:last-child>td{border-bottom-width:0}.pure-table-horizontal td,.pure-table-horizontal th{border-width:0 0 1px;border-bottom:1px solid #cbcbcb}.pure-table-horizontal tbody>tr:last-child>td{border-bottom-width:0}
 +
</style>
 +
            <style type="text/css">
 +
<!--
 +
.pure-menu-item .pure-menu-item {
 +
    display: block;
 +
}
  
 +
.pure-menu-children {
 +
    display: none;
 +
    position: absolute;
 +
    left: 100%;
 +
    top: 0;
 +
    margin: 0;
 +
    padding: 0;
 +
    z-index: 3;
 +
}
  
<div class="column full_size" >
+
.pure-menu-horizontal .pure-menu-children {
<img src="http://placehold.it/2000x300/d3d3d3/f2f2f2">
+
    left: 0;
</div>
+
    top: auto;
 +
    width: inherit;
 +
}
  
 +
.pure-menu-allow-hover:hover > .pure-menu-children,
 +
.pure-menu-active > .pure-menu-children {
 +
    display: block;
 +
    position: absolute;
 +
}
  
 +
/* Vertical Menus - show the dropdown arrow */
 +
.pure-menu-has-children > .pure-menu-link:after {
 +
    padding-left: 0.5em;
 +
    content: "\25B8";
 +
    font-size: small;
 +
}
  
<div class="column full_size" >
+
/* Horizontal Menus - show the dropdown arrow */
<h1> Welcome to iGEM 2017! </h1>
+
.pure-menu-horizontal .pure-menu-has-children > .pure-menu-link:after {
<p>Your team has been approved and you are ready to start the iGEM season! </p>
+
    content: "\25BE";
</div>
+
}
  
<div class="clear"></div>
+
body {
 +
    color: #777;
 +
}
  
<div class="column half_size" >
+
.pure-img-responsive {
<h5>Before you start: </h5>
+
    max-width: 100%;
<p> Please read the following pages:</p>
+
    height: auto;
<ul>
+
}
<li>  <a href="https://2017.igem.org/Competition">Competition Hub</a> </li>
+
<li> <a href="https://2017.igem.org/Competition/Deliverables/Wiki">Wiki Requirements page</a></li>
+
<li> <a href="https://2017.igem.org/Resources/Template_Documentation">Template documentation</a></li>
+
</ul>
+
</div>
+
  
<div class="column half_size" >
+
/*
<div class="highlight">
+
Add transition to containers so they can push in and out.
<h5> Project description </h5>
+
*/
<p>MicroRNAs (miRNAs) have been proven to play important roles on post-transcriptional regulation of the gene expression by direct base pairing to target sites within untranslated regions of messenger RNAs. However, the functions of most microRNAs remain to be discovered. Our project attempts to develop a novel sponge for miRNAs, which would knock down the abundance of target miRNA in the cells. Thus the sponge will be a miRNA inhibitor to be used to induce miRNA loss-of-function phenotypes or other further applications like small non-coding RNA-based diagnostic and therapeutic applications.</p>
+
#layout,
</div>
+
#menu,
</div>
+
.menu-link {
 +
    -webkit-transition: all 0.2s ease-out;
 +
    -moz-transition: all 0.2s ease-out;
 +
    -ms-transition: all 0.2s ease-out;
 +
    -o-transition: all 0.2s ease-out;
 +
    transition: all 0.2s ease-out;
 +
}
  
<div class="column full_size" >
+
/*
<h5> Wiki template information </h5>
+
This is the parent `<div>` that contains the menu and the content area.
<p>We have created these wiki template pages to help you get started and to help you think about how your team will be evaluated. You can find a list of all the pages tied to awards here at the <a href="https://2017.igem.org/Judging/Pages_for_Awards">Pages for awards</a> link. You must edit these pages to be evaluated for medals and awards, but ultimately the design, layout, style and all other elements of your team wiki is up to you!</p>
+
*/
 +
#layout {
 +
    position: relative;
 +
    left: 0;
 +
    padding-left: 0;
 +
}
 +
    #layout.active #menu {
 +
        left: 150px;
 +
        width: 150px;
 +
    }
  
</div>  
+
    #layout.active .menu-link {
 +
        left: 150px;
 +
    }
 +
/*
 +
The content `<div>` is where all your content goes.
 +
*/
 +
.content {
 +
    margin: 0 auto;
 +
    padding: 0 2em;
 +
    max-width: 800px;
 +
    margin-bottom: 50px;
 +
    line-height: 1.6em;
 +
}
  
 +
.header {
 +
    margin: 0;
 +
    color: #333;
 +
    text-align: center;
 +
    padding: 2.5em 2em 0;
 +
    border-bottom: 1px solid #eee;
 +
}
 +
    .header h1 {
 +
        margin: 0.2em 0;
 +
        font-size: 3em;
 +
        font-weight: 300;
 +
    }
 +
    .header h2 {
 +
        font-weight: 300;
 +
        color: #ccc;
 +
        padding: 0;
 +
        margin-top: 0;
 +
    }
  
 +
.content-subhead {
 +
    margin: 50px 0 20px 0;
 +
    font-weight: 300;
 +
    color: #888;
 +
}
  
  
<div class="column half_size" >
 
<h5> Editing your wiki </h5>
 
<p>On this page you can document your project, introduce your team members, document your progress and share your iGEM experience with the rest of the world! </p>
 
<p> <a href="https://2017.igem.org/wiki/index.php?title=Team:Example&action=edit"> </a>Use WikiTools - Edit in the black menu bar to edit this page</p>
 
  
</div>
+
/*
 +
The `#menu` `<div>` is the parent `<div>` that contains the `.pure-menu` that
 +
appears on the left side of the page.
 +
*/
  
 +
#menu {
 +
    margin-left: -150px; /* "#menu" width */
 +
    width: 150px;
 +
    position: fixed;
 +
    top: 0;
 +
    left: 0;
 +
    bottom: 0;
 +
    z-index: 1000; /* so the menu or its navicon stays above all content */
 +
    background: #191818;
 +
    overflow-y: auto;
 +
    -webkit-overflow-scrolling: touch;
 +
}
 +
    /*
 +
    All anchors inside the menu should be styled like this.
 +
    */
 +
    #menu a {
 +
        color: #999;
 +
        border: none;
 +
        padding: 0.6em 0 0.6em 0.6em;
 +
    }
  
<div class="column half_size" >
+
    /*
<h5>Tips</h5>
+
    Remove all background/borders, since we are applying them to #menu.
<p>This wiki will be your team’s first interaction with the rest of the world, so here are a few tips to help you get started: </p>
+
    */
<ul>
+
    #menu .pure-menu,
<li>State your accomplishments! Tell people what you have achieved from the start. </li>
+
    #menu .pure-menu ul {
<li>Be clear about what you are doing and how you plan to do this.</li>
+
        border: none;
<li>You have a global audience! Consider the different backgrounds that your users come from.</li>
+
        background: transparent;
<li>Make sure information is easy to find; nothing should be more than 3 clicks away. </li>
+
    }
<li>Avoid using very small fonts and low contrast colors; information should be easy to read.  </li>
+
<li>Start documenting your project as early as possible; don’t leave anything to the last minute before the Wiki Freeze. For a complete list of deadlines visit the <a href="https://2017.igem.org/Calendar">iGEM 2017 calendar</a> </li>
+
<li>Have lots of fun! </li>
+
</ul>
+
</div>
+
  
 +
    /*
 +
    Add that light border to separate items into groups.
 +
    */
 +
    #menu .pure-menu ul,
 +
    #menu .pure-menu .menu-item-divided {
 +
        border-top: 1px solid #333;
 +
    }
 +
        /*
 +
        Change color of the anchor links on hover/focus.
 +
        */
 +
        #menu .pure-menu li a:hover,
 +
        #menu .pure-menu li a:focus {
 +
            background: #333;
 +
        }
  
<div class="column half_size" >
+
    /*
<h5>Inspiration</h5>
+
    This styles the selected menu item `<li>`.
<p> You can also view other team wikis for inspiration! Here are some examples:</p>
+
    */
<ul>
+
    #menu .pure-menu-selected,
<li> <a href="https://2014.igem.org/Team:SDU-Denmark/"> 2014 SDU Denmark </a> </li>
+
    #menu .pure-menu-heading {
<li> <a href="https://2014.igem.org/Team:Aalto-Helsinki">2014 Aalto-Helsinki</a> </li>
+
        background: #1f8dd6;
<li> <a href="https://2014.igem.org/Team:LMU-Munich">2014 LMU-Munich</a> </li>
+
    }
<li> <a href="https://2014.igem.org/Team:Michigan"> 2014 Michigan</a></li>
+
        /*
<li> <a href="https://2014.igem.org/Team:ITESM-Guadalajara">2014 ITESM-Guadalajara </a></li>
+
        This styles a link within a selected menu item `<li>`.
<li> <a href="https://2014.igem.org/Team:SCU-China"> 2014 SCU-China </a></li>
+
        */
</ul>
+
        #menu .pure-menu-selected a {
</div>
+
            color: #fff;
 +
        }
  
<div class="column half_size" >
+
    /*
<h5> Uploading pictures and files </h5>
+
    This styles the menu heading.
<p> You can upload your pictures and files to the iGEM 2017 server. Remember to keep all your pictures and files within your team's namespace or at least include your team's name in the file name. <br />
+
    */
When you upload, set the "Destination Filename" to <br><code>T--YourOfficialTeamName--NameOfFile.jpg</code>. (If you don't do this, someone else might upload a different file with the same "Destination Filename", and your file would be erased!)<br><br>
+
    #menu .pure-menu-heading {
 +
        font-size: 110%;
 +
        color: #fff;
 +
        margin: 0;
 +
    }
  
<a href="https://2017.igem.org/Special:Upload">
+
/* -- Dynamic Button For Responsive Menu -------------------------------------*/
UPLOAD FILES
+
 
</a>
+
/*
</p>
+
The button to open/close the Menu is custom-made and not part of Pure. Here's
 +
how it works:
 +
*/
 +
 
 +
/*
 +
`.menu-link` represents the responsive menu toggle that shows/hides on
 +
small screens.
 +
*/
 +
.menu-link {
 +
    position: fixed;
 +
    display: block; /* show this only on small screens */
 +
    top: 0;
 +
    left: 0; /* "#menu width" */
 +
    background: #000;
 +
    background: rgba(0,0,0,0.7);
 +
    font-size: 10px; /* change this value to increase/decrease button size */
 +
    z-index: 10;
 +
    width: 2em;
 +
    height: auto;
 +
    padding: 2.1em 1.6em;
 +
}
 +
 
 +
    .menu-link:hover,
 +
    .menu-link:focus {
 +
        background: #000;
 +
    }
 +
 
 +
    .menu-link span {
 +
        position: relative;
 +
        display: block;
 +
    }
 +
 
 +
    .menu-link span,
 +
    .menu-link span:before,
 +
    .menu-link span:after {
 +
        background-color: #fff;
 +
        width: 100%;
 +
        height: 0.2em;
 +
    }
 +
 
 +
        .menu-link span:before,
 +
        .menu-link span:after {
 +
            position: absolute;
 +
            margin-top: -0.6em;
 +
            content: " ";
 +
        }
 +
 
 +
        .menu-link span:after {
 +
            margin-top: 0.6em;
 +
        }
 +
 
 +
 
 +
/* -- Responsive Styles (Media Queries) ------------------------------------- */
 +
 
 +
/*
 +
Hides the menu at `48em`, but modify this based on your app's needs.
 +
*/
 +
@media (min-width: 48em) {
 +
 
 +
    .header,
 +
    .content {
 +
        padding-left: 2em;
 +
        padding-right: 2em;
 +
    }
 +
 
 +
    #layout {
 +
        padding-left: 150px; /* left col width "#menu" */
 +
        left: 0;
 +
    }
 +
    #menu {
 +
        left: 150px;
 +
    }
 +
 
 +
    .menu-link {
 +
        position: fixed;
 +
        left: 150px;
 +
        display: none;
 +
    }
 +
 
 +
    #layout.active .menu-link {
 +
        left: 150px;
 +
    }
 +
}
 +
 
 +
@media (max-width: 48em) {
 +
    /* Only apply this when the window is small. Otherwise, the following
 +
    case results in extra padding on the left:
 +
        * Make the window small.
 +
        * Tap the menu to trigger the active state.
 +
        * Make the window large again.
 +
    */
 +
    #layout.active {
 +
        position: relative;
 +
        left: 150px;
 +
    }
 +
}
 +
-->
 +
            </style>
 +
        <!--<![endif]-->
 +
    <!--[if lt IE 9]>
 +
        <script src="http://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7/html5shiv.js"></script>
 +
    <![endif]-->
 +
    <script>
 +
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
 +
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
 +
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
 +
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
 +
   
 +
    ga('create', 'UA-41480445-1', 'purecss.io');
 +
    ga('send', 'pageview');
 +
    </script>
 +
</head>
 +
<body>
 +
 
 +
 
 +
 
 +
 
 +
 
 +
 
 +
<div id="layout">
 +
    <!-- Menu toggle -->
 +
    <a href="#menu" id="menuLink" class="menu-link">
 +
        <!-- Hamburger icon -->
 +
        <span></span>
 +
    </a>
 +
 
 +
    <div id="menu">
 +
        <div class="pure-menu">
 +
            <img class="pure-img-responsive" src="http://farm8.staticflickr.com/7357/9086701425_fda3024927.jpg" alt="Mountain">
 +
            <!--<a class="pure-menu-heading" href="#">Company</a>-->
 +
            <div class="custom-restricted-width">
 +
            <ul class="pure-menu-list">
 +
                <li class="pure-menu-item pure-menu-selected"><a href="#" class="pure-menu-link">Home</a></li>
 +
                <li class="pure-menu-item"><a href="#" class="pure-menu-link">About</a></li>
 +
 
 +
                <li class="pure-menu-item" class="menu-item-divided pure-menu-selected">
 +
                    <a href="#" class="pure-menu-link">Services</a>
 +
                </li>
 +
 
 +
                <li class="pure-menu-item"><a href="#" class="pure-menu-link">Contact</a></li>
 +
                <li class="pure-menu-item pure-menu-has-children pure-menu-allow-hover">
 +
                  <a href="#" id="menuLink1" class="pure-menu-link">More</a>
 +
                  <ul class="pure-menu-children">
 +
                      <li class="pure-menu-item"><a href="#" class="pure-menu-link">Autos</a></li>
 +
                      <li class="pure-menu-item"><a href="#" class="pure-menu-link">Flickr</a></li>
 +
                      <li class="pure-menu-item pure-menu-has-children pure-menu-allow-hover">
 +
                          <a href="#" id="menuLink1" class="pure-menu-link">Even More</a>
 +
                          <ul class="pure-menu-children">
 +
                            <li class="pure-menu-item"><a href="#" class="pure-menu-link">Foo</a></li>
 +
                            <li class="pure-menu-item"><a href="#" class="pure-menu-link">Bar</a></li>
 +
                            <li class="pure-menu-item"><a href="#" class="pure-menu-link">Baz</a></li>
 +
                          </ul>
 +
                      </li>
 +
                  </ul>
 +
                </li>
 +
            </ul>
 +
        </div>
 +
        </div>
 +
    </div>
 +
 
 +
    <div id="main">
 +
        <div class="header">
 +
            <h1>Page Title</h1>
 +
            <h2>A subtitle for your page goes here</h2>
 +
        </div>
 +
 
 +
        <div class="content">
 +
            <h2 class="content-subhead">How to use this layout</h2>
 +
            <p>
 +
                To use this layout, you can just copy paste the HTML, along with the CSS in <a href="/css/layouts/side-menu.css" alt="Side Menu CSS">side-menu.css</a>, and the JavaScript in <a href="/js/ui.js">ui.js</a>. The JS file uses vanilla JavaScript to simply toggle an <code>active</code> class that makes the menu responsive.
 +
            </p>
 +
 
 +
            <h2 class="content-subhead">Now Let's Speak Some Latin</h2>
 +
            <p>
 +
                Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
 +
            </p>
 +
 
 +
            <div class="pure-g">
 +
                <div class="pure-u-1-4">
 +
                    <img class="pure-img-responsive" src="http://farm3.staticflickr.com/2875/9069037713_1752f5daeb.jpg" alt="Peyto Lake">
 +
                </div>
 +
                <div class="pure-u-1-4">
 +
                    <img class="pure-img-responsive" src="http://farm3.staticflickr.com/2813/9069585985_80da8db54f.jpg" alt="Train">
 +
                </div>
 +
                <div class="pure-u-1-4">
 +
                    <img class="pure-img-responsive" src="http://farm6.staticflickr.com/5456/9121446012_c1640e42d0.jpg" alt="T-Shirt Store">
 +
                </div>
 +
                <div class="pure-u-1-4">
 +
                    <img class="pure-img-responsive" src="http://farm8.staticflickr.com/7357/9086701425_fda3024927.jpg" alt="Mountain">
 +
                </div>
 +
            </div>
 +
 
 +
            <h2 class="content-subhead">Try Resizing your Browser</h2>
 +
            <p>
 +
                Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
 +
            </p>
 +
        </div>
 +
    </div>
 
</div>
 
</div>
  
Line 92: Line 412:
  
  
 +
<script type="text/javascript" >
 +
(function (window, document) {
 +
 +
    var layout  = document.getElementById('layout'),
 +
        menu    = document.getElementById('menu'),
 +
        menuLink = document.getElementById('menuLink'),
 +
        content  = document.getElementById('main');
 +
 +
    function toggleClass(element, className) {
 +
        var classes = element.className.split(/\s+/),
 +
            length = classes.length,
 +
            i = 0;
 +
 +
        for(; i < length; i++) {
 +
          if (classes[i] === className) {
 +
            classes.splice(i, 1);
 +
            break;
 +
          }
 +
        }
 +
        // The className is not found
 +
        if (length === classes.length) {
 +
            classes.push(className);
 +
        }
 +
 +
        element.className = classes.join(' ');
 +
    }
 +
 +
    function toggleAll(e) {
 +
        var active = 'active';
 +
 +
        e.preventDefault();
 +
        toggleClass(layout, active);
 +
        toggleClass(menu, active);
 +
        toggleClass(menuLink, active);
 +
    }
 +
 +
    menuLink.onclick = function (e) {
 +
        toggleAll(e);
 +
    };
 +
 +
    content.onclick = function(e) {
 +
        if (menu.className.indexOf('active') !== -1) {
 +
            toggleAll(e);
 +
        }
 +
    };
 +
 +
}(this, this.document));
 +
(function (window, document) {
 +
    'use strict';
 +
 +
    // Enable drop-down menus in Pure
 +
    // Inspired by YUI3 gallery-simple-menu by Julien LeComte
 +
    // [https://github.com/yui/yui3-gallery/blob/master/src/gallery-simple-menu/js/simple-menu.js]
 +
 +
    function PureDropdown(dropdownParent) {
 +
 +
        var PREFIX = 'pure-',
 +
            ACTIVE_CLASS_NAME = PREFIX + 'menu-active',
 +
            ARIA_ROLE = 'role',
 +
            ARIA_HIDDEN = 'aria-hidden',
 +
            MENU_OPEN = 0,
 +
            MENU_CLOSED = 1,
 +
            MENU_PARENT_CLASS_NAME = 'pure-menu-has-children',
 +
            MENU_ACTIVE_SELECTOR = '.pure-menu-active',
 +
            MENU_LINK_SELECTOR = '.pure-menu-link',
 +
            MENU_SELECTOR = '.pure-menu-children',
 +
            DISMISS_EVENT = (window.hasOwnProperty &&
 +
                window.hasOwnProperty('ontouchstart')) ?
 +
                    'touchstart' : 'mousedown',
 +
 +
            ARROW_KEYS_ENABLED = true,
 +
 +
            ddm = this; // drop down menu
 +
 +
            this._state = MENU_CLOSED;
 +
 +
            this.show = function () {
 +
                if (this._state !== MENU_OPEN) {
 +
                    this._dropdownParent.classList.add(ACTIVE_CLASS_NAME);
 +
                    this._menu.setAttribute(ARIA_HIDDEN, false);
 +
                    this._state = MENU_OPEN;
 +
                }
 +
            };
 +
 +
            this.hide = function () {
 +
                if (this._state !== MENU_CLOSED) {
 +
                    this._dropdownParent.classList.remove(ACTIVE_CLASS_NAME);
 +
                    this._menu.setAttribute(ARIA_HIDDEN, true);
 +
                    this._link.focus();
 +
                    this._state = MENU_CLOSED;
 +
                }
 +
            };
 +
 +
            this.toggle = function () {
 +
                this[this._state === MENU_CLOSED ? 'show' : 'hide']();
 +
            };
 +
 +
            this.halt = function (e) {
 +
                e.stopPropagation();
 +
                e.preventDefault();
 +
            };
 +
 +
            this._dropdownParent = dropdownParent;
 +
            this._link = this._dropdownParent.querySelector(MENU_LINK_SELECTOR);
 +
            this._menu = this._dropdownParent.querySelector(MENU_SELECTOR);
 +
            this._firstMenuLink = this._menu.querySelector(MENU_LINK_SELECTOR);
 +
 +
            // Set ARIA attributes
 +
            this._link.setAttribute('aria-haspopup', 'true');
 +
            this._menu.setAttribute(ARIA_ROLE, 'menu');
 +
            this._menu.setAttribute('aria-labelledby', this._link.getAttribute('id'));
 +
            this._menu.setAttribute('aria-hidden', 'true');
 +
            [].forEach.call(
 +
                this._menu.querySelectorAll('li'),
 +
                function(el){
 +
                    el.setAttribute(ARIA_ROLE, 'presentation');
 +
                }
 +
            );
 +
            [].forEach.call(
 +
                this._menu.querySelectorAll('a'),
 +
                function(el){
 +
                    el.setAttribute(ARIA_ROLE, 'menuitem');
 +
                }
 +
            );
 +
 +
            // Toggle on click
 +
            this._link.addEventListener('click', function (e) {
 +
                e.stopPropagation();
 +
                e.preventDefault();
 +
                ddm.toggle();
 +
            });
 +
 +
            // Keyboard navigation
 +
            document.addEventListener('keydown', function (e) {
 +
                var currentLink,
 +
                    previousSibling,
 +
                    nextSibling,
 +
                    previousLink,
 +
                    nextLink;
 +
 +
                // if the menu isn't active, ignore
 +
                if (ddm._state !== MENU_OPEN) {
 +
                    return;
 +
                }
 +
 +
                // if the menu is the parent of an open, active submenu, ignore
 +
                if (ddm._menu.querySelector(MENU_ACTIVE_SELECTOR)) {
 +
                    return;
 +
                }
 +
 +
                currentLink = ddm._menu.querySelector(':focus');
 +
 +
                // Dismiss an open menu on ESC
 +
                if (e.keyCode === 27) {
 +
                    /* Esc */
 +
                    ddm.halt(e);
 +
                    ddm.hide();
 +
                }
 +
                // Go to the next link on down arrow
 +
                else if (ARROW_KEYS_ENABLED && e.keyCode === 40) {
 +
                    /* Down arrow */
 +
                    ddm.halt(e);
 +
                    // get the nextSibling (an LI) of the current link's LI
 +
                    nextSibling = (currentLink) ? currentLink.parentNode.nextSibling : null;
 +
                    // if the nextSibling is a text node (not an element), go to the next one
 +
                    while (nextSibling && nextSibling.nodeType !== 1) {
 +
                        nextSibling = nextSibling.nextSibling;
 +
                    }
 +
                    nextLink = (nextSibling) ? nextSibling.querySelector('.pure-menu-link') : null;
 +
                    // if there is no currently focused link, focus the first one
 +
                    if (!currentLink) {
 +
                        ddm._menu.querySelector('.pure-menu-link').focus();
 +
                    }
 +
                    else if (nextLink) {
 +
                        nextLink.focus();
 +
                    }
 +
                }
 +
                // Go to the previous link on up arrow
 +
                else if (ARROW_KEYS_ENABLED && e.keyCode === 38) {
 +
                    /* Up arrow */
 +
                    ddm.halt(e);
 +
                    // get the currently focused link
 +
                    previousSibling = (currentLink) ? currentLink.parentNode.previousSibling : null;
 +
                    while (previousSibling && previousSibling.nodeType !== 1) {
 +
                        previousSibling = previousSibling.previousSibling;
 +
                    }
 +
                    previousLink = (previousSibling) ? previousSibling.querySelector('.pure-menu-link') : null;
 +
                    // if there is no currently focused link, focus the last link
 +
                    if (!currentLink) {
 +
                        ddm._menu.querySelector('.pure-menu-item:last-child .pure-menu-link').focus();
 +
                    }
 +
                    // else if there is a previous item, go to the previous item
 +
                    else if (previousLink) {
 +
                        previousLink.focus();
 +
                    }
 +
                }
 +
            });
 +
 +
            // Dismiss an open menu on outside event
 +
            document.addEventListener(DISMISS_EVENT, function (e) {
 +
                var target = e.target;
 +
                if (target !== ddm._link && !ddm._menu.contains(target)) {
 +
                    ddm.hide();
 +
                    ddm._link.blur();
 +
                }
 +
            });
 +
 +
    }
 +
 +
    function initDropdowns() {
 +
        var dropdownParents = document.querySelectorAll('.pure-menu-has-children');
 +
        for (var i = 0; i < dropdownParents.length; i++) {
 +
            var ddm = new PureDropdown(dropdownParents[i]);
 +
        }
 +
    }
 +
 +
    initDropdowns();
  
 +
}(this, this.document));
  
 +
</script>
  
 +
</body>
 
</html>
 
</html>

Revision as of 12:29, 7 September 2017

<!doctype html> Responsive Side Menu – Layout Examples – Pure

Page Title

A subtitle for your page goes here

How to use this layout

To use this layout, you can just copy paste the HTML, along with the CSS in side-menu.css, and the JavaScript in ui.js. The JS file uses vanilla JavaScript to simply toggle an active class that makes the menu responsive.

Now Let's Speak Some Latin

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Peyto Lake
Train
T-Shirt Store
Mountain

Try Resizing your Browser

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.