Commit 2cb2a11 1 parent 587ce76 commit 2cb2a11 Copy full SHA for 2cb2a11
File tree 3 files changed +25
-12
lines changed
3 files changed +25
-12
lines changed Original file line number Diff line number Diff line change
1
+ document . addEventListener ( 'DOMContentLoaded' , ( ) => {
2
+ document . querySelector ( '.nav_right_btn .more' ) ?. addEventListener ( 'click' , ( e ) => {
3
+ e . preventDefault ( ) ;
4
+ e . stopPropagation ( ) ;
5
+ const nav = document . querySelector ( '.nav_right_btn' ) ;
6
+ if ( ! nav ) return ;
7
+ nav . classList . add ( 'expanded' ) ;
8
+ } ) ;
9
+ document . addEventListener ( 'click' , ( e ) => {
10
+ document . querySelector ( '.nav_right_btn' ) ?. classList . remove ( 'expanded' ) ;
11
+ } ) ;
12
+ } ) ;
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import './scss/style.scss';
6
6
import { Anatolo } from './anatolo/anatolo' ;
7
7
import * as Utils from './utils/main' ;
8
8
import FloatBtn from './components/float-btn' ;
9
+ import './components/rightbtn' ;
9
10
10
11
( window as any ) . Anatolo = Anatolo ;
11
12
( window as any ) . Utils = Utils ;
Original file line number Diff line number Diff line change 84
84
@media screen and (max-width : $bp-small-width-view ) {
85
85
.information {
86
86
background-color : var (--secondary );
87
- .nav_right_btn li {
88
- display : none ;
89
- & .more {
90
- display : block ;
91
- }
92
- }
93
- & :hover {
94
- right : 0 ;
95
- position : absolute ;
96
- .nav_right_btn li {
97
- display : initial ;
98
- & .more {
87
+ .nav_right_btn {
88
+ & .expanded {
89
+ li {
90
+ display : initial ;
91
+ }
92
+ li .more {
99
93
display : none ;
100
94
}
101
95
}
96
+ li {
97
+ display : none ;
98
+ }
99
+ li .more {
100
+ display : initial ;
101
+ }
102
102
}
103
103
}
104
104
}
You can’t perform that action at this time.
0 commit comments