Template:CSS/UT-Tokyo/Counter/Contents

From 2014.igem.org

(Difference between revisions)
Line 1: Line 1:
-
<html>
+
<html><head>
-
<head>
+
<style type="text/css">
<style type="text/css">
#contentSub, #footer-box, #catlinks, #search-controls, #p-logo, .printfooter, .visualClear, .firstHeading{
#contentSub, #footer-box, #catlinks, #search-controls, #p-logo, .printfooter, .visualClear, .firstHeading{
Line 300: Line 299:
overflow:hidden;
overflow:hidden;
height:1550px;
height:1550px;
 +
}
 +
#pageContents p{
 +
font-size:16px;
 +
}
 +
 +
#pageContents h3{
 +
color:#000;
 +
padding-left:40px;
 +
font-size:30px;
 +
margin-bottom:-10px;
}
}
#contentsBody #pageContents p{
#contentsBody #pageContents p{
Line 440: Line 449:
}
}
-
function loadContent(cont){
+
function loadContent(cont,link,height){
document.title = "σ-Re Counter | UT-Tokyo 2014";
document.title = "σ-Re Counter | UT-Tokyo 2014";
 +
 +
var op = cont.replace("-block","");
 +
var opNode = document.getElementById(op);
 +
 +
if(opNode.childNodes[0].childNodes[0].src.indexOf("open") == -1){
 +
open(op);
 +
}
var node = document.getElementById("pageContents");
var node = document.getElementById("pageContents");
for(var i = 0;i < node.childNodes.length; i++){
for(var i = 0;i < node.childNodes.length; i++){
Line 455: Line 471:
var str = window.location.search.substring(1,window.location.search.length);
var str = window.location.search.substring(1,window.location.search.length);
}else{
}else{
-
var str = "Project-top";
+
var str = "Project-block";
}
}
}
}
 +
 +
if(str == "Project-block"){
 +
var box = document.getElementsByClassName("pageContentsBox");
 +
var pc = document.getElementById("pageContents");
 +
box[0].style.height = "3000px";
 +
pc.style.height = "2950px";
 +
}
 +
var node = document.getElementById(str);
var node = document.getElementById(str);
node.style.display = "block";
node.style.display = "block";
 +
if(link){
 +
var href = "#" + link;
 +
var target = $(href);
 +
$("#contentsBody").mCustomScrollbar("scrollTo",target);
 +
}else{
 +
$("#contentsBody").mCustomScrollbar("scrollTo","top");
 +
}
 +
var team = document.getElementById("Team-top");
 +
if(team.style.display != "none"){
-
+
$('#isotope').isotope({
-
$('#isotope').isotope({
+
itemSelector: '.element-item',
-
itemSelector: '.element-item',
+
layoutMode:'packery'
-
layoutMode:'packery'
+
});
-
});
+
-
var node = document.getElementById("isotope");
+
var node = document.getElementById("isotope");
-
var divs = new Array();
+
var divs = new Array();
-
var count = 0;
+
var count = 0;
-
+
-
for(var i = 0;i<node.childNodes.length;i++){
+
for(var i = 0;i<node.childNodes.length;i++){
-
if(node.childNodes[i].nodeType == 1){
+
if(node.childNodes[i].nodeType == 1){
-
divs[count] = node.childNodes[i];
+
divs[count] = node.childNodes[i];
-
count++;
+
count++;
 +
}
}
}
-
}
+
-
+
for(var i = 0;i<divs.length;i++){
-
for(var i = 0;i<divs.length;i++){
+
divs[i].onclick = function(){
-
divs[i].onclick = function(){
+
var det = this.getElementsByClassName("detail");
-
var det = this.getElementsByClassName("detail");
+
if(det[0]){
-
if(det[0]){
+
if(det[0].style.display != "block"){
-
if(det[0].style.display != "block"){
+
var check = this.getElementsByClassName("thumbnail");
-
var check = this.getElementsByClassName("thumbnail");
+
if(check[0]){
-
if(check[0]){
+
var flag = false;
-
var flag = false;
+
if(check[0].style.display != "none"){
-
if(check[0].style.display != "none"){
+
flag = true;
-
flag = true;
+
}
}
}
-
}
 
-
 
-
var nodes = document.getElementsByClassName("detail")
 
-
for(var j = 0;j<nodes.length;j++){
+
var nodes = document.getElementsByClassName("detail")
-
nodes[j].style.display = "none";
+
-
}
+
for(var j = 0;j<nodes.length;j++){
-
var nodes = document.getElementsByClassName("thumbnail")
+
nodes[j].style.display = "none";
-
+
}
-
for(var j = 0;j<nodes.length;j++){
+
var nodes = document.getElementsByClassName("thumbnail")
-
nodes[j].style.display = "block";
+
-
}
+
for(var j = 0;j<nodes.length;j++){
-
+
nodes[j].style.display = "block";
-
var thumb = this.getElementsByClassName("thumbnail");
+
}
-
if(det[0]){
+
var thumb = this.getElementsByClassName("thumbnail");
-
if(flag){
+
-
det[0].style.display = "block";
+
if(det[0]){
-
thumb[0].style.display = "none";
+
if(flag){
 +
det[0].style.display = "block";
 +
thumb[0].style.display = "none";
 +
}
}
}
}
}
}
}
 +
 +
$('#isotope').isotope({
 +
itemSelector: '.element-item',
 +
layoutMode:'packery'
 +
});
}
}
-
 
-
$('#isotope').isotope({
 
-
itemSelector: '.element-item',
 
-
layoutMode:'packery'
 
-
});
 
}
}
-
}
+
var node = document.getElementsByClassName("closebutton");
-
 
+
for(var i = 0;i<node.length;i++){
-
var node = document.getElementsByClassName("closebutton");
+
node[i].onclick = function(e){
-
for(var i = 0;i<node.length;i++){
+
var par = this.parentNode.parentNode.parentNode;
-
node[i].onclick = function(e){
+
var det = par.getElementsByClassName("detail");
-
var par = this.parentNode.parentNode.parentNode;
+
var thumb = par.getElementsByClassName("thumbnail");
-
var det = par.getElementsByClassName("detail");
+
if(det[0]){
-
var thumb = par.getElementsByClassName("thumbnail");
+
det[0].style.display = "none";
-
if(det[0]){
+
}
-
det[0].style.display = "none";
+
if(thumb[0]){
 +
thumb[0].style.display = "block";
 +
}
 +
$('#isotope').isotope({
 +
itemSelector: '.element-item',
 +
layoutMode:'packery'
 +
});
 +
e.stopPropagation();
 +
e.cancelBubble = true;
}
}
-
if(thumb[0]){
 
-
thumb[0].style.display = "block";
 
-
}
 
-
$('#isotope').isotope({
 
-
itemSelector: '.element-item',
 
-
layoutMode:'packery'
 
-
});
 
-
e.stopPropagation();
 
-
e.cancelBubble = true;
 
}
}
}
}
-
 
}
}
</script>
</script>
Line 554: Line 585:
<script>
<script>
$(window).load(function() {
$(window).load(function() {
-
$("#contentsBody").mCustomScrollbar();
+
$("#contentsBody").mCustomScrollbar({
 +
mouseWheelPixels: 250
 +
});
});
});
$(window).load( function() {
$(window).load( function() {

Revision as of 17:02, 8 October 2014