Difference between revisions of "Template:XJTU-China/header"

Line 1: Line 1:
 
<html>
 
<html>
 
<section class="d-flex flex-column">
 
<section class="d-flex flex-column">
 +
    <a href="/Team:XJTU-China" class="logo"></a>
 
     <header class="header_area" id="topHeader">
 
     <header class="header_area" id="topHeader">
        <!-- <embed class="logo" src="https://static.igem.org/mediawiki/2021/4/43/T--XJTU-China--logo-svg.svg"
 
            type="image/svg+xml" /> -->
 
        <a href="/Team:XJTU-China" class="logo"></a>
 
 
         <nav class="navbar navbar-expand-lg navbar-light">
 
         <nav class="navbar navbar-expand-lg navbar-light">
 
             <div class="container">
 
             <div class="container">
Line 100: Line 98:
 
         let header = document.querySelector('header');
 
         let header = document.querySelector('header');
 
         let logo = document.querySelector('.logo');
 
         let logo = document.querySelector('.logo');
 +
        let menuBtn = document.querySelector('.navbar-toggler')
 
         header.classList.toggle('sticky', window.scrollY > height);
 
         header.classList.toggle('sticky', window.scrollY > height);
 
         logo.classList.toggle('sticky', window.scrollY > height);
 
         logo.classList.toggle('sticky', window.scrollY > height);
 +
        menuBtn.classList.toggle('sticky', window.scrollY > height);
 
     });
 
     });
  

Revision as of 08:18, 29 July 2021