1
- < nav class ="navbar navbar-expand-lg navbar-dark ">
1
+ <!-- <nav class="navbar navbar-expand-lg navbar-dark"> -->
2
+ < section id ="header ">
3
+ < div class ="header container ">
4
+ < div class ="nav-bar ">
2
5
< div class ="d-flex d-none d-sm-block d-md-block d-lg-none ">
3
- < div class ="navbar-header ">
4
- < a class ="navbar-brand " href ="/ "> < img src ="/assets/img/logo/logo.png " style ="height: 70px; width: 70px; background-color: white; " class ="mr-3 "> Py Contributors</ a >
6
+ < div class ="brand ">
7
+ < a class ="" href ="/ "> < img src ="/assets/img/logo/logo.png " style ="height: 70px; width: 70px; background-color: white; " class ="mr-3 "> Py Contributors</ a >
5
8
</ div >
6
9
</ div >
7
- < button class ="navbar-toggler " type ="button " data-toggle ="collapse " data-target ="#navbarColor03 " aria-controls ="navbarColor03 " aria-expanded ="false " aria-label ="Toggle navigation ">
8
- < span class ="navbar-toggler-icon "> </ span >
9
- </ button >
10
+ <!-- < button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarColor03" aria-controls="navbarColor03" aria-expanded="false" aria-label="Toggle navigation"> -- >
11
+ <!-- < span class="navbar-toggler-icon"></span> -- >
12
+ <!-- < /button> -- >
10
13
11
- < div class ="collapse navbar-collapse " id ="navbarColor03 ">
12
- < div class ="container ">
13
- < div class ="ml-auto mr-4 ">
14
- < ul class ="navbar-nav ">
14
+ <!-- <div class="collapse navbar-collapse" id="navbarColor03"> -->
15
+ <!-- <div class="container"> -->
16
+ <!-- <div class="ml-auto mr-4"> -->
17
+ < div class ="nav-list ">
18
+ < div class ="hamburger "> < div class ="bar "> </ div > </ div >
19
+ < ul >
15
20
{% if page.active == "home" %}
16
- < li class ="nav-item active "> < a class ="nav-link " href ="/ "> Home</ a > </ li >
21
+ < li class =" active "> < a class ="" href ="/ " data-after =" Home "> Home</ a > </ li >
17
22
{% else %}
18
- < li class ="nav-item "> < a class ="nav-link " href ="/ "> Home</ a > </ li >
23
+ < li class =""> < a class ="" href ="/ " data-after =" Home "> Home</ a > </ li >
19
24
{% endif %}
20
25
21
26
{% if page.active == "join-us" %}
22
- < li class ="nav-item active "> < a class ="nav-link " href ="/join-us/index.html "> Join Us</ a > </ li >
27
+ < li class =" active "> < a class ="" href ="/join-us/index.html " data-after =" Join Us "> Join Us</ a > </ li >
23
28
{% else %}
24
- < li class ="nav-item "> < a class ="nav-link " href ="/join-us/index.html "> Join Us</ a > </ li >
29
+ < li class =""> < a class ="" href ="/join-us/index.html " data-after =" Join Us "> Join Us</ a > </ li >
25
30
{% endif %}
26
- </ ul >
27
- </ div >
28
- < div class ="navbar-header brandShow ">
31
+ <!-- < /ul>
32
+ </div> -->
33
+ <!-- < div class="navbar-header brandShow">
29
34
<a class="navbar-brand" href="/"><img src="/assets/img/logo/logo.png" style="height: 70px; width: 70px; background-color: white;" class="mr-3">Py Contributors</a>
30
- </ div >
35
+ </div> -->
31
36
32
- < ul class ="navbar-nav mr-auto ml-4 ">
37
+ <!-- < ul class="navbar-nav mr-auto ml-4"> -- >
33
38
34
39
{% if page.active == "updates" %}
35
- < li class ="nav-item active "> < a class ="nav-link " href ="/updates/index.html "> Updates</ a > </ li >
40
+ < li class =" active "> < a class ="" href ="/updates/index.html " data-after =" Updates "> Updates</ a > </ li >
36
41
{% else %}
37
- < li class ="nav-item "> < a class ="nav-link " href ="/updates/index.html "> Updates</ a > </ li >
42
+ < li class =""> < a class ="" href ="/updates/index.html " data-after =" Updates "> Updates</ a > </ li >
38
43
{% endif %}
39
44
40
45
{% if page.active == "developers" %}
41
- < li class ="nav-item active "> < a class ="nav-link " href ="/developers/index.html "> Developers</ a > </ li >
46
+ < li class =" active "> < a class ="" href ="/developers/index.html " data-after =" Developers "> Developers</ a > </ li >
42
47
{% else %}
43
- < li class ="nav-item "> < a class ="nav-link " href ="/developers/index.html "> Developers</ a > </ li >
48
+ < li class =""> < a class ="" href ="/developers/index.html " data-after =" Developers "> Developers</ a > </ li >
44
49
{% endif %}
45
50
</ ul >
46
51
</ div >
47
- </ div >
48
- </ nav >
52
+ <!-- </div> -->
53
+ </ div >
54
+ </ div >
55
+ </ section >
56
+ <!-- </nav> -->
57
+
58
+ < script >
59
+ const hamburger = document . querySelector ( '.header .nav-bar .nav-list .hamburger' ) ;
60
+ const mobile_menu = document . querySelector ( '.header .nav-bar .nav-list ul' ) ;
61
+ const menu_item = document . querySelectorAll ( '.header .nav-bar .nav-list ul li a' ) ;
62
+ const header = document . querySelector ( '.header.container' ) ;
63
+
64
+ hamburger . addEventListener ( 'click' , ( ) => {
65
+ hamburger . classList . toggle ( 'active' ) ;
66
+ mobile_menu . classList . toggle ( 'active' ) ;
67
+ } ) ;
68
+
69
+ menu_item . forEach ( ( item ) => {
70
+ item . addEventListener ( 'click' , ( ) => {
71
+ hamburger . classList . toggle ( 'active' ) ;
72
+ mobile_menu . classList . toggle ( 'active' ) ;
73
+ } ) ;
74
+ } ) ;
75
+
76
+
77
+ </ script >
0 commit comments