Difference between revisions of "Template:CCU Taiwan"

Line 6: Line 6:
  
 
$("#HQ_page").attr('id','');
 
$("#HQ_page").attr('id','');
 +
  
 
//highlight current page on the menu
 
//highlight current page on the menu
 
highlight_current_page_menu();
 
highlight_current_page_menu();
 +
 
//accessing submenus
 
//accessing submenus
 
$(".menu_item").click(function(){
 
$(".menu_item").click(function(){
Line 14: Line 16:
 
$(this).next(".submenu").fadeToggle(400);
 
$(this).next(".submenu").fadeToggle(400);
 
});
 
});
 +
 
//mobile menu access  
 
//mobile menu access  
 
$(".igem_2018_team_mobile_bar").click(function(){
 
$(".igem_2018_team_mobile_bar").click(function(){
 
$(this).next().toggleClass("displaying_menu");
 
$(this).next().toggleClass("displaying_menu");
 
});
 
});
 +
 
});
 
});
  
  
 
function highlight_current_page_menu() {
 
function highlight_current_page_menu() {
 +
 
var page_url="https://2018.igem.org/";
 
var page_url="https://2018.igem.org/";
 
page_url = page_url + wgPageName;
 
page_url = page_url + wgPageName;
 
$("a[href$='"+ page_url +"']").children().addClass("current_page");
 
$("a[href$='"+ page_url +"']").children().addClass("current_page");
 +
 
//if the page is in a submenu, open the submenu and make the appropiate changes
 
//if the page is in a submenu, open the submenu and make the appropiate changes
 
if( $( ".current_page" ).hasClass( "submenu_item" )){
 
if( $( ".current_page" ).hasClass( "submenu_item" )){
 +
 
$(".current_page").parent().parent().fadeToggle(400);
 
$(".current_page").parent().parent().fadeToggle(400);
 
$(".current_page").parent().parent().prev().addClass("current_page");
 
$(".current_page").parent().parent().prev().addClass("current_page");
 
$(".menu_item.current_page > .submenu_control_icon").toggleClass("open");
 
$(".menu_item.current_page > .submenu_control_icon").toggleClass("open");
 +
 
}
 
}
 
}
 
}
 
$(window).on('scroll',function() {
 
$(window).on('scroll',function() {
   if($(window).scrollTop())
+
   if($(window).scrollTop())  
 
{
 
{
 
     $('.container').css('background', '#808080');
 
     $('.container').css('background', '#808080');
Line 39: Line 47:
 
$('nav').css('opacity','1');
 
$('nav').css('opacity','1');
 
     }
 
     }
     else
+
     else  
 
{
 
{
 
$('.container').css('background', '#000000');
 
$('.container').css('background', '#000000');
Line 46: Line 54:
 
     }
 
     }
 
   });
 
   });
// When the user scrolls the page, execute myFunction
+
// When the user scrolls the page, execute myFunction  
 
window.onscroll = function() {myFunction()};
 
window.onscroll = function() {myFunction()};
  
Line 73: Line 81:
 
         scrollTop: $(hash).offset().top
 
         scrollTop: $(hash).offset().top
 
       }, 800, function(){
 
       }, 800, function(){
 +
 
 
         // Add hash (#) to URL when done scrolling (default click behavior)
 
         // Add hash (#) to URL when done scrolling (default click behavior)
 
         window.location.hash = hash;
 
         window.location.hash = hash;
Line 81: Line 90:
  
 
$(window).on('scroll',function() {
 
$(window).on('scroll',function() {
   if($(window).scrollTop())
+
   if($(window).scrollTop())  
 
{
 
{
 
     $('.container').css('background', '#808080');
 
     $('.container').css('background', '#808080');
Line 87: Line 96:
 
$('nav').css('opacity','1');
 
$('nav').css('opacity','1');
 
     }
 
     }
     else
+
     else  
 
{
 
{
 
$('.container').css('background', '#000000');
 
$('.container').css('background', '#000000');
Line 126: Line 135:
 
@media only screen and (max-width: 1800px) {
 
@media only screen and (max-width: 1800px) {
 
.igem_2018_team_content { width: 85%;}
 
.igem_2018_team_content { width: 85%;}
.igem_2018_team_menu {display:block;}
+
.igem_2018_team_menu {display:block;}
 
}
 
}
  
Line 228: Line 237:
 
display: block;
 
display: block;
 
}
 
}
 
+
.under {
 +
    position: relative;
 +
    background-color: #000000;
 +
    z-index: -2;
 +
}
 
.progress-container {
 
.progress-container {
 
   position: fixed;
 
   position: fixed;
Line 243: Line 256:
 
   background: white;
 
   background: white;
 
   width: 100%;
 
   width: 100%;
   margin-left: 0px;
+
   margin-left: 28px;
 
   z-index: -1;
 
   z-index: -1;
 
}
 
}
Line 259: Line 272:
 
.parallax {
 
.parallax {
 
     background-image: url("https://orig00.deviantart.net/04e3/f/2012/041/b/1/little_leo_walking_21_frames_by_luigil-d4oqka5.gif");
 
     background-image: url("https://orig00.deviantart.net/04e3/f/2012/041/b/1/little_leo_walking_21_frames_by_luigil-d4oqka5.gif");
     height: 200px;
+
     height: 200px;  
 
     background-attachment: fixed;
 
     background-attachment: fixed;
 
     background-position: center;
 
     background-position: center;

Revision as of 08:14, 11 July 2018