Difference between revisions of "Template:SJTU-BioX-Shanghai/Navigator"

Line 14: Line 14:
 
   <nav>
 
   <nav>
 
<ul>
 
<ul>
   <li><a href="https://2015.igem.org/Team:SJTU-BioX-Shanghai">home</a></li>
+
   <li><a href="https://2015.igem.org/Team:SJTU-BioX-Shanghai/Gamma">home</a></li>
 
   <li>
 
   <li>
 
     <a href="#">project</a>
 
     <a href="#">project</a>
Line 56: Line 56:
  
 
<style>
 
<style>
#nav {
+
#globalWrapper {
  position: fixed;
+
padding:0;
  top: 0px;
+
margin:0;
  left: 0px;
+
}
 
+
  box-sizing: border-box;
+
  width: 10.5em;
+
  height: 100%;
+
  padding-top: 20px;
+
 
+
  box-shadow: 2px 0 1px grey;
+
 
+
  background-color: white;
+
  
   transition: left 0.2s;
+
#nav-trigger {
 +
   position: relative;
 +
}
 +
#nav-trigger svg {
 +
  position: absolute;
 +
  top: 50%;
 +
  margin-top: -12px;
 
}
 
}
  
 
#nav nav {
 
#nav nav {
 +
  font-size: 0.8em;
 
   margin-left: 1em;
 
   margin-left: 1em;
   z-index: 1;
+
   margin-top: 1em;
 
}
 
}
 +
#nav nav a {
 +
  color: #8AA28E;
 +
  font-weight: 100;
 +
  text-transform: uppercase;
 +
  text-decoration: none;
  
#nav #nav-trigger {
+
  display: block;
   z-index: 2;
+
  box-sizing: border-box;
 +
  height: 2em;
 +
}
 +
#nav nav ul ul {
 +
  font-size: 0.8em;
 +
}
 +
#nav nav a:hover {
 +
   text-decoration: none;
 +
  transition: font-size: 0.2s;
 +
  font-weight: 600;
 +
}
 +
 
 +
#nav{
 
   position: fixed;
 
   position: fixed;
  top: 0px;
 
 
   left: 0px;
 
   left: 0px;
 +
  top:0px;
 +
  padding-top: calc(20px + 1em);
 +
  box-shadow: 5px 0px 3px grey;
 +
  padding-left: 0px;
 +
  width:10.5em;
 
   height: 100%;
 
   height: 100%;
  width: 0.5em;
 
 
  transition: width 0.2s;
 
 
 
  background-color: #55A463;
 
 
  cursor: pointer;
 
}
 
 
#nav #nav-trigger svg {
 
  position: absolute;
 
  top: 50%;
 
  width: 50%;
 
  left: 25%;
 
  pointer-events: none;
 
 
  fill: white;
 
 
}
 
}
  
 
#nav nav ul {
 
#nav nav ul {
  margin: 0px;
 
  padding: 0px;
 
 
   list-style: none;
 
   list-style: none;
  font-size: 0.8em;
 
 
}
 
}
#nav nav li {
+
#nav nav > ul {
 +
  padding: 0px;
 +
  width: 12em;
 +
}
 +
 
 +
#nav nav > ul > li {
 
   position: relative;
 
   position: relative;
 
}
 
}
 +
#nav nav ul ul {
 +
  background-color: rgba(255, 255, 255, 0.8);
 +
 +
  margin: 0px;
  
#nav ul ul {
 
 
   position: absolute;
 
   position: absolute;
   left: 100%;
+
   left: 15em;
 
   top: 0px;
 
   top: 0px;
   width: 0em;
+
    
 
+
  margin: 0px;
+
 
+
 
   transition: opacity 0.3s ease-out 0.2s, width 0s linear 0.5s;
 
   transition: opacity 0.3s ease-out 0.2s, width 0s linear 0.5s;
 
   opacity: 0;
 
   opacity: 0;
 +
  width: 0em;
 
   overflow: hidden;
 
   overflow: hidden;
 +
}
  
  background-color: white;
+
#nav nav ul li:hover ul {
  box-shadow: 2px 0 1px grey;
+
   transition: opacity 0.5s;
}
+
#nav nav li:hover ul, #nav nav li ul:hover {
+
   transition: opacity 0.3s ease-out 0s, width 0s linear 0s;
+
 
   opacity: 1;
 
   opacity: 1;
   width: 15em;
+
   width: 13em;
}
+
 
+
#nav nav a {
+
  color: #8AA28E;
+
  font-weight: 500;
+
  text-transform: uppercase;
+
  text-decoration: none;
+
  display: block;
+
  box-sizing: border-box;
+
  height: 2em;
+
}
+
#nav nav > ul > li > a {
+
  padding-left: 1.2em;
+
 
}
 
}
 
#nav nav > ul > li > a:not(:last-child)::before {
 
#nav nav > ul > li > a:not(:last-child)::before {
    content: "+";
+
  content: "+";
    position: absolute;
+
  position: absolute;
    left: 0em;
+
  left: -1em;
}
+
 
+
#content.nav-toggle #nav #nav-trigger {
+
  width: 0.9em;
+
}
+
#content.nav-toggle #nav #nav-trigger svg {
+
  transform: matrix(-1,0,0,1,0,0)
+
 
}
 
}
#content.nav-toggle #nav {
+
#nav embed {
  left: -11em;
+
    width: 100%;
 +
    min-width: 10em;
 +
    height: 20%;
 
}
 
}
 
</style>
 
</style>

Revision as of 10:57, 17 September 2015