File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -362,3 +362,21 @@ button > svg {
362362 margin-right : 30px ;
363363 font-size : 0.9em ;
364364}
365+
366+ .ms-navbar-left ,
367+ .ms-navbar-right {
368+ flex : 1 0 0% ;
369+ }
370+
371+ .ms-navbar-right {
372+ flex : 1 1 0% ;
373+ }
374+
375+ .ms-navbar-center {
376+ flex-grow : 0 ;
377+
378+ li {
379+ /* Prevent menu items from having their text wrapped if the screen is too small */
380+ flex-shrink : 0 ;
381+ }
382+ }
Original file line number Diff line number Diff line change @@ -201,8 +201,8 @@ const App = () => {
201201 < Route path = "*" >
202202 { isLoggedIn && (
203203 < div style = { { marginBottom : "2em" } } >
204+ < Nav nav = { nav } className = "uk-margin-top" />
204205 < div className = "uk-container uk-margin-top" >
205- < Nav nav = { nav } className = "uk-margin-top" />
206206 < div className = "uk-grid" >
207207 < div className = "uk-width-1-4@m" >
208208 < SideNav nav = { nav } />
Original file line number Diff line number Diff line change @@ -26,21 +26,20 @@ export const NavItem = (props) => {
2626export const Nav = ( { nav : { brand, items } } ) => (
2727 < nav className = "uk-navbar-container" >
2828 < div data-uk-navbar >
29- < div className = "uk-navbar-left" >
29+ < div className = "ms-navbar-left uk-margin-left uk-margin-right uk-navbar-left" >
3030 < Link to = "/" className = "uk-navbar-item uk-logo" >
3131 { brand }
3232 </ Link >
33-
34- { /* Using a <ul> each with a _single_ <li> sounds insane,
35- but that's apparently the way UI-kit is built */ }
33+ </ div >
34+ < ul className = "ms-navbar-center uk-navbar-nav" >
3635 { items . map ( ( item , i ) => (
37- < ul className = "uk-navbar-nav" key = { i } >
38- < NavItem to = { item . target } icon = { item . icon } >
39- { item . text }
40- </ NavItem >
41- </ ul >
36+ < NavItem key = { i } to = { item . target } icon = { item . icon } >
37+ { item . text }
38+ </ NavItem >
4239 ) ) }
43- </ div >
40+ </ ul >
41+ { /* Used to compensate for the left side, to make the center truly centered */ }
42+ < div className = "ms-navbar-right" > </ div >
4443 </ div >
4544 </ nav >
4645) ;
You can’t perform that action at this time.
0 commit comments