Difference between revisions of "Template:NYMU-Taipei/newtemplate1"

 
(152 intermediate revisions by the same user not shown)
Line 43: Line 43:
 
position:relative;
 
position:relative;
 
top:100px;
 
top:100px;
 +
width:1040px;
 +
left:200px;
 +
margin:0px;
 
}
 
}
 +
 +
.coverimage{
 +
width:1200px; z-index:2; opacity:0.9;
 +
}
 +
 +
.column{
 +
background-color:white; width:1180px; margin-left:0px; padding:10px;
 +
box-shadow: 0px 2px 10px #B1C4C9;
 +
 +
}
 +
 +
.story{
 +
border-style:solid;
 +
border-width:10px 0px 10px 0px;
 +
border-color:#638695;
 +
padding:20px;
 +
margin:20px;
 +
width:1000px;
 +
}
 +
 +
.story img{
 +
width: 90%;
 +
z-index:10;
 +
margin:40px;
 +
}
 +
 
.paragraphs{
 
.paragraphs{
  
 
position:relative;
 
position:relative;
width:70%;
+
width:90%;
left:15%;
+
left:10%;
 
}
 
}
  
Line 55: Line 84:
 
}
 
}
  
#page-content .paragraphs h1{
+
#page-content h1{
 
font-size:90px;
 
font-size:90px;
 
text-align:left;
 
text-align:left;
Line 63: Line 92:
 
}
 
}
  
#page-content .paragraphs h2{
+
#page-content .column h1{
 +
color:#638695; font-size:70px; line-height:1em;
 +
}
 +
 
 +
#page-content  h2{
 
font-size:50px;
 
font-size:50px;
 
line-height:2em;
 
line-height:2em;
 
}
 
}
#page-content .paragraphs h3{
+
#page-content h3{
 
font-size:40px;
 
font-size:40px;
 
}
 
}
Line 79: Line 112:
 
a:hover{
 
a:hover{
 
text-decoration:none;
 
text-decoration:none;
 +
color:#638695;
 +
 
}
 
}
  
Line 87: Line 122:
 
a{
 
a{
 
text-decoration: none;
 
text-decoration: none;
 +
color:#B1C4C9;;
 
}
 
}
 +
 +
a:visited{
 +
text-decoration: none;
 +
color:#B1C4C9;;
 +
}
 +
  
 
#title{
 
#title{
Line 99: Line 141:
 
top:18px;
 
top:18px;
 
left:0px;
 
left:0px;
z-index: 1;
+
z-index: 3;
 
height: 90px;
 
height: 90px;
 
background-color:white;
 
background-color:white;
Line 128: Line 170:
 
text-align:center;
 
text-align:center;
 
color:#4B727B;
 
color:#4B727B;
font-size: 15px;
+
font-size: 17px;
 
}
 
}
  
Line 147: Line 189:
 
}
 
}
  
 +
a {
 +
color:#B1C4C9;
 +
}
  
 +
a:hover{
 +
color:#638695;
 +
}
  
 
.dropdown .dropdown-content a div{
 
.dropdown .dropdown-content a div{
Line 157: Line 205:
 
.dropdown .dropdown-content a :hover{
 
.dropdown .dropdown-content a :hover{
 
background-color:#f1f1f1;
 
background-color:#f1f1f1;
color:#B1C4C9;
+
color:#638695;
 
text-decoration:none;
 
text-decoration:none;
 
}
 
}
Line 183: Line 231:
  
  
 
 
/* cover of other pages*/
 
 
.covertopic{
 
position:absolute;
 
top:100px
 
}
 
 
.coversentence{
 
position:absolute;
 
top:150px;
 
font-size:70px;
 
}
 
 
/*description*/
 
 
#page-content #reference p, #page-content #reference h2{
 
font-size:20px;
 
}
 
 
#description-1{
 
background-color:#4B727B;
 
width:1000px;
 
padding:30px;
 
}
 
#description-2{
 
background-color:#094857;
 
width:1000px;
 
float:right;
 
padding:30px;
 
}
 
#description-3{
 
background-color:#013946;
 
width:1000px;
 
clear:right;
 
padding:30px;
 
}
 
  
 
</style>
 
</style>
Line 233: Line 243:
 
<div class="menu-part">
 
<div class="menu-part">
 
<a href="https://2018.igem.org/Team:NYMU-Taipei">
 
<a href="https://2018.igem.org/Team:NYMU-Taipei">
<img src="https://static.igem.org/mediawiki/2018/c/cd/T--NYMU-Taipei--gear-logo-2.jpg">
+
<img src="https://static.igem.org/mediawiki/2018/c/cd/T--NYMU-Taipei--gear-logo-2.jpg" style="width:130px;">
 
</a>
 
</a>
 
</div>
 
</div>
Line 241: Line 251:
 
<!-- Team -->
 
<!-- Team -->
 
<div class="dropdown">
 
<div class="dropdown">
<div>
+
<div id="1r" onclick="closeintro(event),openintro(event)">
 
TEAM
 
TEAM
 
</div>  
 
</div>  
<div class="dropdown-content">
+
<div class="dropdown-content" id="1c">
 
 
 
<a href="https://2018.igem.org/Team:NYMU-Taipei/Team">
 
<a href="https://2018.igem.org/Team:NYMU-Taipei/Team">
Line 263: Line 273:
 
<div class="dropdown">
 
<div class="dropdown">
 
<!-- Project -->
 
<!-- Project -->
<div>
+
<div id="2r" onclick="closeintro(event),openintro(event)">
<div class="submenu_control_icon"> </div>
+
 
PROJECT
 
PROJECT
 
</div>  
 
</div>  
<div class="dropdown-content">
+
<div class="dropdown-content" id="2c">
 
 
 
<a href="https://2018.igem.org/Team:NYMU-Taipei/Description">
 
<a href="https://2018.igem.org/Team:NYMU-Taipei/Description">
Line 281: Line 290:
 
</a>
 
</a>
  
<a href="https://2018.igem.org/Team:NYMU-Taipei/Experiments">
+
<a href="https://2018.igem.org/Team:NYMU-Taipei/experimentsandresults">
 
<div >
 
<div >
Experiments
+
Experiments & Results
 
</div>
 
</div>
 
</a>
 
</a>
Line 304: Line 313:
 
<div >
 
<div >
 
Model
 
Model
</div>
 
</a>
 
 
<a href="https://2018.igem.org/Team:NYMU-Taipei/Results">
 
<div >
 
Results
 
 
</div>
 
</div>
 
</a>
 
</a>
Line 336: Line 339:
  
 
<div class="dropdown">
 
<div class="dropdown">
<div >
+
<div id="3r" onclick="closeintro(event),openintro(event)">
<div class="submenu_control_icon"> </div>
+
 
PARTS
 
PARTS
 
</div>
 
</div>
<div class="dropdown-content">
+
<div class="dropdown-content" id="3c">
 
 
 
<a href="https://2018.igem.org/Team:NYMU-Taipei/Parts">
 
<a href="https://2018.igem.org/Team:NYMU-Taipei/Parts">
Line 383: Line 385:
  
 
<div class="dropdown">
 
<div class="dropdown">
<div >
+
<div id="4r" onclick="closeintro(event),openintro(event)">
<div class="submenu_control_icon"> </div>  
+
 
HUMAN PRACTICES  
 
HUMAN PRACTICES  
 
</div>  
 
</div>  
  
<div class="dropdown-content">
+
<div class="dropdown-content"id="4c">
  
 
<a href="https://2018.igem.org/Team:NYMU-Taipei/Human_Practices">
 
<a href="https://2018.igem.org/Team:NYMU-Taipei/Human_Practices">
Line 409: Line 410:
  
 
<div class="dropdown">
 
<div class="dropdown">
<div >
+
<div id="5r" onclick="closeintro(event),openintro(event)">
<div class="submenu_control_icon"> </div>  
+
 
AWARDS
 
AWARDS
 
</div>  
 
</div>  
  
<div class="dropdown-content">
+
<div class="dropdown-content" id="5c">
  
 
<a href="https://2018.igem.org/Team:NYMU-Taipei/Applied_Design">
 
<a href="https://2018.igem.org/Team:NYMU-Taipei/Applied_Design">
Line 425: Line 425:
 
<div >
 
<div >
 
Entrepreneurship
 
Entrepreneurship
</div>
 
</a>
 
 
<a href="https://2018.igem.org/Team:NYMU-Taipei/Hardware">
 
<div >
 
Hardware
 
</div>
 
</a>
 
 
<a href="https://2018.igem.org/Team:NYMU-Taipei/Measurement">
 
<div>
 
Measurement
 
 
</div>
 
</div>
 
</a>
 
</a>
Line 443: Line 431:
 
<div >
 
<div >
 
Model
 
Model
</div>
 
</a>
 
 
<a href="https://2018.igem.org/Team:NYMU-Taipei/Plant">
 
<div >
 
Plant
 
</div>
 
</a>
 
 
 
<a href="https://2018.igem.org/Team:NYMU-Taipei/Software">
 
<div >
 
Software
 
 
</div>
 
</div>
 
</a>
 
</a>
Line 474: Line 449:
  
 
<div id="dot-side-bar"></div>
 
<div id="dot-side-bar"></div>
 +
  
 
<script type="text/javascript">
 
<script type="text/javascript">
 
$(document).ready(function(){
 
$(document).ready(function(){
var dots = [];
+
var dots = [];
 
var contents = document.getElementsByClassName("subtitle");
 
var contents = document.getElementsByClassName("subtitle");
console.log(contents);
 
console.log(Array.isArray(contents));
 
console.log(contents.length);
 
console.log(typeof contents);
 
console.log(contents[0]);
 
 
for (var i = 0; i <= contents.length - 1; i++) {
 
for (var i = 0; i <= contents.length - 1; i++) {
console.log("one");
+
dots.push('<div class="sidebar-item"><span class="sidebar-stuff sidebar-switch dot"></span><div class="sidebar-content sidebar-stuff"><a href=#'+(i+1)+">"+contents[i].innerHTML+'</a></div></div>');
dots.push('<div class="sidebar-item"><span class="sidebar-stuff sidebar-switch dot"></span><div class="sidebar-content sidebar-stuff"><a href=#'+(i+1)+">"+contents[i].innerHTML+'</a></div></div>');
+
 
}
 
}
console.log('two');
 
 
$("#dot-side-bar").html(dots.join().replace(/,/g,''));
 
$("#dot-side-bar").html(dots.join().replace(/,/g,''));
 
});
 
});
  
  
$(document).ready(function(){
+
 
var dotslist = document.getElementsByClassName("sidebar-switch");
+
function closeintro(x){
var sidebar = document.getElementsByClassName("sidebar-content");
+
var intros = $('.intro');
var subtitles = document.getElementsByClassName("subtitle");
+
var targetintro = x.target.id.replace('d','c');
var items = document.getElementsByClassName("sidebar-item");
+
for (var i = intros.length - 1; i >= 0; i--) {
    $(window).scroll(function(){
+
if (intros[i].id != targetintro) {
    var borders = [0];
+
intros[i].hide();
    for (var i = 0; i <= subtitles.length - 1; i++) {
+
}
    borders.push(subtitles[i].scrollHeight+borders[i]-100);
+
}
    }
+
}
        for (var i = 0; i < subtitles.length; i++) {
+
 
        if (window.pageYOffset >=borders[i]){
+
function openintro(x){
        if(window.pageYOffset <=borders[i+1]) {
+
var targetintro = x.target.id.replace('r','c');
        sidebar[i].style.display = "inline-block";
+
document.getElementById(targetintro).show();;
        }
+
}
        }
+
 
        else{
+
        sidebar[i].style.display = "none";
+
        console.log(sidebar[i]);
+
        }
+
      $(".sidebar-item").mouseenter(function(){
+
      console.log(this.lastChild);
+
        this.lastChild.style.display = "inline-block";
+
});
+
$(".sidebar-item").mouseleave(function(){
+
      console.log(this.lastChild);
+
        this.lastChild.style.display = "none";
+
});
+
        }
+
    });
+
});
+
  
 
</script>
 
</script>
Line 530: Line 484:
 
#dot-side-bar{
 
#dot-side-bar{
 
position: fixed;
 
position: fixed;
left:2%;
+
padding-top:200px;
top:200px;
+
 
font-size: 20px;
 
font-size: 20px;
z-index:1;
+
z-index:0px;
 +
background-color:#f0f0f0;
 +
height:100%;
 +
padding-right:0px;
 
}
 
}
.sidebar-item{
+
.sidebar-content{
height: 50px;
+
}
+
.sidebar-item:hover .sidebar-switch{
+
color:orange;
+
}
+
.sidebar-item:hover .sidebar-content{
+
 
display: inline-block;
 
display: inline-block;
 
position:absolute;
 
position:absolute;
float: left;
 
 
height:40px;
 
height:40px;
 
width: 180px;
 
width: 180px;
Line 551: Line 500:
 
display: inline-block;
 
display: inline-block;
 
}
 
}
.sidebar-content{
+
.sidebar-item{
display: none;
+
border-radius: 0px 20px 20px 0px;
position:absolute;
+
text-align:left;
+
padding-left: 30px;
+
 
background-color:white;
 
background-color:white;
 
box-shadow: 0px 2px 10px #B1C4C9;
 
box-shadow: 0px 2px 10px #B1C4C9;
 +
height: 40px;
 +
display: block;
 +
min-width: 180px;
 +
margin:10px;
 +
margin-left:2px;
 +
margin-right:10px;
 +
padding-left:10px;
 +
color:gray;
 
}
 
}
.dot {
+
.dot {
 
   height: 15px;
 
   height: 15px;
 
   width: 15px;
 
   width: 15px;
 
   background-color: #bbb;
 
   background-color: #bbb;
 
   border-radius: 50%;
 
   border-radius: 50%;
   display: inline-block;
+
   display: none;
 
}
 
}
 
.sidebar-item:hover .dot{
 
.sidebar-item:hover .dot{
Line 570: Line 524:
 
}
 
}
  
 +
#dot-side-bar {
 +
color:#bbb;
 +
}
 +
 +
#dot-side-bar .sidebar-item a{
 +
display:inline;
 +
}
 +
 +
#dot-side-bar .sidebar-item:hover a{
 +
color: #638695;
 +
}
 
body{
 
body{
 
background-color: #F1F1F1;  
 
background-color: #F1F1F1;  
 
}
 
}
#dot-side-bar a{
+
 
color:#638695;
+
}
+
 
</style>
 
</style>
  
 
<!--the_above_is_to_be_copied----------------------------------------------------------------------------------------------------------------------------------------------------->
 
<!--the_above_is_to_be_copied----------------------------------------------------------------------------------------------------------------------------------------------------->

Latest revision as of 19:37, 17 October 2018