File tree Expand file tree Collapse file tree 3 files changed +19
-44
lines changed
Expand file tree Collapse file tree 3 files changed +19
-44
lines changed Original file line number Diff line number Diff line change @@ -16,27 +16,6 @@ webview {
1616 flex : 1 ;
1717}
1818
19- # title-bar {
20- -webkit-app-region : drag;
21- padding : 0.3em 0.7em ;
22- display : flex;
23- flex-direction : row;
24- justify-content : space-between;
25- background-color : # f8f8f8 ;
26- color : # 484848 ;
27- transition : color 0.5s , background-color 0.5s ;
28- }
29-
30- # title-bar .dark {
31- background-color : # 333333 ;
32- color : white;
33- }
34-
35- # title-bar .window-control {
36- float : right;
37- -webkit-app-region : no-drag;
38- }
39-
4019navbar {
4120 height : 23px ;
4221 align-items : center;
@@ -56,6 +35,7 @@ navbar {
5635 justify-content : space-between;
5736 -webkit-user-select : none;
5837 user-select : none;
38+ padding : 0 2px ;
5939}
6040
6141navbar .dark {
@@ -68,10 +48,18 @@ navbar.dark .control-buttons>*:hover {
6848}
6949
7050# navbar-container .control-buttons {
71- flex : 1 ;
7251 display : flex;
7352}
7453
54+ # navbar-container .control-buttons : nth-child (2 ) {
55+ padding-left : 2em ;
56+ flex : 1 ;
57+ }
58+
59+ # navbar-container .control-buttons : nth-child (3 ) {
60+ font-size : 1.3em ;
61+ }
62+
7563# navbar-container .control-buttons > * {
7664 margin : 0 .3em ;
7765 cursor : pointer;
Original file line number Diff line number Diff line change 88 < link rel ="stylesheet " type ="text/css " href ="./app.css ">
99 </ head >
1010 < body >
11- < div id ="title-bar ">
12- < div class ="window-control ">
13- < button id ="menu-btn ">
14- < i class ="fa fa-bars " aria-hidden ="true "> </ i >
15- </ button >
16- </ div >
17- < div class ="window-control ">
18- < button >
19- < i class ="fa fa-minus " aria-hidden ="true "> </ i >
20- </ button >
21- < button >
22- < i class ="fa fa-square-o " aria-hidden ="true "> </ i >
23- </ button >
24- < button >
25- < i class ="fa fa-times " aria-hidden ="true "> </ i >
26- </ button >
27- </ div >
28- </ div >
2911 < navbar >
3012 < div id ="navbar-container ">
3113 < div class ="control-buttons ">
3214 < div class ="home "> HOME</ div >
3315 < div class ="refresh "> REFRESH</ div >
3416 < div class ="navigate-back " style ="margin: 0 1em; "> <</ div >
3517 < div class ="navigate-foward "> ></ div >
18+ < div class ="more-menu "> ...</ div >
3619 </ div >
37- < div class ="control-buttons " style =" flex: 2 " >
20+ < div class ="control-buttons ">
3821 < div class ="title "> </ div >
3922 </ div >
23+ < div class ="control-buttons ">
24+ < div class ="minimize-window "> -</ div >
25+ < div class ="toggle-window "> +</ div >
26+ < div class ="close-window "> x</ div >
27+ </ div >
4028 </ div >
4129 </ navbar >
4230 < script src ="renderer.js "> </ script >
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ onload = () => {
1717 /* inject mac specific styles */
1818 if ( isMac ) {
1919 document . querySelector ( 'navbar' ) . style . paddingLeft = '75px' ;
20+ document . querySelector ( '#navbar-container .control-buttons:nth-child(3)' ) . style . display = 'none' ;
2021 }
2122
2223 if ( window . location . search !== '' ) {
@@ -36,10 +37,8 @@ onload = () => {
3637
3738 // set dark theme if in home page
3839 if ( webview . getURL ( ) . split ( '?' ) [ 0 ] . split ( '#' ) [ 0 ] . match ( / h t t p s : \/ \/ h a c k m d .i o \/ $ / ) ) {
39- document . querySelector ( '#title-bar' ) . className = 'dark' ;
4040 document . querySelector ( 'navbar' ) . className = 'dark' ;
4141 } else {
42- document . querySelector ( '#title-bar' ) . className = '' ;
4342 document . querySelector ( 'navbar' ) . className = '' ;
4443 }
4544
@@ -69,7 +68,7 @@ onload = () => {
6968 new Notification ( 'URL copied' , { title : 'URL copied' , body : webview . getURL ( ) } ) ;
7069 }
7170
72- document . querySelector ( 'button#menu-btn ' ) . onclick = ( ) => {
71+ document . querySelector ( '#navbar-container .more-menu ' ) . onclick = ( ) => {
7372 menu . popup ( require ( 'electron' ) . remote . getCurrentWindow ( ) ) ;
7473 }
7574 // webview.openDevTools();
You can’t perform that action at this time.
0 commit comments