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

Line 56: Line 56:
  
 
<style>
 
<style>
#globalWrapper {
+
#nav {
padding:0;
+
  position: fixed;
margin:0;
+
  top: 0px;
}
+
  left: 0px;
 +
 
 +
  box-sizing: border-box;
 +
  width: 10.5em;
 +
  height: 100%;
 +
  padding-top: 20px;
 +
 
 +
  box-shadow: 2px 0 1px grey;
 +
 
 +
  background-color: white;
  
#nav-trigger {
+
   transition: left 0.2s;
   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;
   margin-top: 1em;
+
   z-index: 1;
 
}
 
}
#nav nav a {
 
  color: #8AA28E;
 
  font-weight: 100;
 
  text-transform: uppercase;
 
  text-decoration: none;
 
  
  display: block;
+
#nav #nav-trigger {
  box-sizing: border-box;
+
   z-index: 2;
  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;
 +
}
 +
 +
#nav #nav-trigger svg {
 +
  position: absolute;
 +
  top: 50%;
 +
  fill: white;
 
}
 
}
  
 
#nav nav ul {
 
#nav nav ul {
 +
  margin: 0px;
 +
  padding: 0px;
 
   list-style: none;
 
   list-style: none;
 +
  font-size: 0.8em;
 
}
 
}
#nav nav > ul {
+
#nav nav li {
  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: 15em;
+
   left: 100%;
 
   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;
}
 
  
#nav nav ul li:hover ul {
+
  background-color: white;
   transition: opacity 0.5s;
+
  box-shadow: 2px 0 1px grey;
 +
}
 +
#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: 13em;
+
   width: 15em;
 +
}
 +
 
 +
#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: -1em;
+
    left: 0em;
 +
}
 +
 
 +
#content.nav-toggle #nav #nav-trigger {
 +
  width: 0.9em;
 +
}
 +
#content.nav-toggle #nav #nav-trigger svg {
 +
  transform: matrix(-1,0,0,1,3,0)
 
}
 
}
#nav embed {
+
#content.nav-toggle #nav {
    width: 100%;
+
  left: -11em;
    min-width: 10em;
+
    height: 20%;
+
 
}
 
}
 
</style>
 
</style>

Revision as of 07:21, 17 September 2015