Difference between revisions of "Team:Melbourne/Project"

 
(58 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{Melbourne}}
 
{{Melbourne}}
 +
<html>
 
<html>
 
<html>
 +
  
 
<script>
 
<script>
function openCity(evt, cityName) {
+
function openCity(cityName, elmnt, color) {
  var i, x, tablinks;
+
    // Hide all elements with class="tabcontent" by default */
  x = document.getElementsByClassName("city");
+
    var i, tabcontent, tablinks;
  for (i = 0; i < x.length; i++) {
+
    tabcontent = document.getElementsByClassName("tabcontent");
    x[i].style.display = "none";
+
    for (i = 0; i < tabcontent.length; i++) {
  }
+
        tabcontent[i].style.display = "none";
  tablinks = document.getElementsByClassName("tablink");
+
    }
  for (i = 0; i < x.length; i++) {
+
 
    tablinks[i].className = tablinks[i].className.replace(" w3-border-red", "");
+
    // Remove the background color of all tablinks/buttons
  }
+
    tablinks = document.getElementsByClassName("tablink");
  document.getElementById(cityName).style.display = "block";
+
    for (i = 0; i < tablinks.length; i++) {
  evt.currentTarget.firstElementChild.className += " w3-border-red";
+
        tablinks[i].style.backgroundColor = "";
 +
    }
 +
 
 +
    // Show the specific tab content
 +
    document.getElementById(cityName).style.display = "block";
 +
 
 +
    // Add the specific color to the button used to open the tab content
 +
    elmnt.style.backgroundColor = color;
 
}
 
}
 +
 +
// Get the element with id="defaultOpen" and click on it
 +
document.getElementById("defaultOpen").click();
 +
 +
 +
 +
 +
 +
 +
 
</script>
 
</script>
  
  
<head>
 
    <title>
 
        Melbourne Team Site Wiki
 
    </title>
 
  
 
+
 
</head>
+
 
 +
<style>
 +
/* Style the tab buttons */
 +
.tablink {
 +
    background-color: #555;
 +
    color: white;
 +
    float: left;
 +
    border: none;
 +
    outline: none;
 +
    cursor: pointer;
 +
    padding: 14px 16px;
 +
    font-size: 17px;
 +
    width: 25%;
 +
}
 +
 
 +
/* Change background color of buttons on hover */
 +
.tablink:hover {
 +
    background-color: #777;
 +
}
 +
 
 +
/* Set default styles for tab content */
 +
.tabcontent {
 +
    color: white;
 +
    display: none;
 +
    padding: 50px;
 +
padding-top:20px;
 +
    text-align: center;
 +
margin: auto
 +
}
 +
 
 +
/* Style each tab content individually */
 +
#overview {
 +
background-color:#426487;
 +
}
 +
 
 +
#notebook {
 +
background-image:url(https://media.giphy.com/media/gH2bKIakvLuW4/giphy.gif);
 +
background-color:black;
 +
}
 +
 
 +
#attributions {
 +
background-image:url(https://media.giphy.com/media/3NeSk2IVEd2FYUQEcM/giphy.gif);
 +
background-color:black}
 +
 
 +
#Design {
 +
background-image:url(https://media.giphy.com/media/xUA7bfDro97ipc4fu0/giphy.gif);
 +
background-color:black}
 +
 
 +
 
 +
.main {
 +
padding-top:100px;
 +
}
 +
</style>
 +
 
 +
 
  
  
 
<body>
 
<body>
  
 +
<img class="mosaic_img" src="https://static.igem.org/mediawiki/2018/2/2e/T--Melbourne--igem_mosaic.png" style="margin-top:35px; width:100%">
  
<br><br><br><br><br><br>
+
<button class="tablink" onclick="openCity('overview', this, '#0D306A')" id="defaultOpen">Project Overview</button>
<br><br><br><br><br><br>
+
<button class="tablink" onclick="openCity('notebook', this, '#0D306A')">Notebook</button>
 +
<button class="tablink" onclick="openCity('attributions', this, '#0D306A')">Attribution</button>
 +
<button class="tablink" onclick="openCity('Design', this, '#0D306A')">Design</button>
  
<h2>Tabs in a Grid</h2>
 
  
  <div class="w3-row">
+
<div id="overview" class="tabcontent">
    <a href="javascript:void(0)" onclick="openCity(event, 'London');">
+
<img class="overview_img" src="https://static.igem.org/mediawiki/2018/5/53/T--Melbourne--project_overview.png" style="width:40%; margin-top:35px;">
      <div class="w3-third tablink w3-bottombar w3-hover-light-grey w3-padding">London</div>
+
</div>
    </a>
+
    <a href="javascript:void(0)" onclick="openCity(event, 'Paris');">
+
      <div class="w3-third tablink w3-bottombar w3-hover-light-grey w3-padding">Paris</div>
+
    </a>
+
    <a href="javascript:void(0)" onclick="openCity(event, 'Tokyo');">
+
      <div class="w3-third tablink w3-bottombar w3-hover-light-grey w3-padding">Tokyo</div>
+
    </a>
+
  </div>
+
  
  <div id="London" class="w3-container city" style="display:none">
+
<div id="notebook" class="tabcontent">
    <h2>London</h2>
+
<img class="overview_img" src="https://static.igem.org/mediawiki/2018/b/bd/T--Melbourne--notebook_pt1.png" style="width:40%; margin-top:35px;"><br>
    <p>London is the capital city of England.</p>
+
<img class="overview_img" src="https://static.igem.org/mediawiki/2018/5/5d/T--Melbourne--notebook_pt2.png" style="width:40%;">
  </div>
+
</div>
  
  <div id="Paris" class="w3-container city" style="display:none">
+
<div id="attributions" class="tabcontent">
    <h2>Paris</h2>
+
<img class="overview_img" src="https://static.igem.org/mediawiki/2018/d/d0/T--Melbourne--attributions.png" style="width:40%; margin-top:35px;">
    <p>Paris is the capital of France.</p>  
+
</div>
  </div>
+
  
  <div id="Tokyo" class="w3-container city" style="display:none">
+
<div id="Design" class="tabcontent">
    <h2>Tokyo</h2>
+
<img class="overview_img" src="https://static.igem.org/mediawiki/2018/4/4b/T--Melbourne--project_design.png" style="width:40%; margin-top:35px;">
    <p>Tokyo is the capital of Japan.</p>
+
  </div>
+
 
</div>
 
</div>
  
  
 +
<div id="footer">
 +
Property of Team Melbourne
 +
</div>
  
 
</body>
 
</body>
  
 
</html>
 
</html>

Latest revision as of 02:08, 18 October 2018