File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 < ol class ="breadcrumb ">
1616 < % if !dropdown_1.links.is_empty() {%>
1717 < %+ Dropdown::new()
18- .set_nav_items(dropdown_1) %>
18+ .set_nav_items(dropdown_1.clone() ) %>
1919 < % } %>
2020
2121 < % if !dropdown_2.links.is_empty() {%>
22- < div class ="vr my-1 mx-2 "> </ div >
22+ < div class ="vr my-1 mx-2 "> </ div >
2323 < %+ Dropdown::new()
2424 .set_nav_items(dropdown_2) %>
2525 < % } %>
2626
27+ < % if !dropdown_1.links.is_empty() && !links.is_empty() {%>
28+ < div class ="vr my-1 mx-2 "> </ div >
29+ < % } %>
30+
2731 < % for link in links {
2832 let active = if link.active {
2933 "active"
Original file line number Diff line number Diff line change @@ -11,10 +11,13 @@ pub struct WebApp {
1111 pub upper_nav : LeftNavMenu ,
1212 pub lower_nav : LeftNavMenu ,
1313 pub id : Option < String > ,
14+ pub home_link : String ,
1415}
1516
1617impl WebApp {
17- pub fn new ( upper_nav : StaticNav ) -> WebApp {
18+ pub fn new ( mut upper_nav : StaticNav ) -> WebApp {
19+ let home_link = upper_nav. links . remove ( 0 ) . href ;
20+
1821 let mut upper_nav_items = vec ! [ ] ;
1922 for item in upper_nav. links {
2023 upper_nav_items. push ( LeftNavItem :: from_static_nav ( & item) . into ( ) ) ;
@@ -37,6 +40,7 @@ impl WebApp {
3740 upper_nav,
3841 lower_nav,
3942 id : None ,
43+ home_link,
4044 }
4145 }
4246
Original file line number Diff line number Diff line change 1- < %
2- use crate::utils::config;
3- use crate::templates::components::PostgresLogo;
4- let standalone_dashboard = config::standalone_dashboard();
5- let home_link = if standalone_dashboard {"/"} else {"/deployments"};
6- %>
1+ < % use crate::templates::components::PostgresLogo; %>
72< div class ="leftnav-container py-3 font-family-primary " data-controller ="navigation-left-nav-web-app " data-turbo-permanent id ='<%- id.unwrap_or_else(|| String::from("defaultId"))%> '>
83 < nav
94 class ="leftnav nav-pills h-100 "
149 < div class ="d-flex flex-column h-100 ">
1510 < span class ="leftnav-collapse collapse " data-extend-bs-collapse-target ="stateReference " data-navigation-left-nav-web-app-target ="stateReference "> </ span >
1611 < div class ="leftnav-collapse-affect collapsed overflow-hidden " style ="height: 3rem; ">
17- < %+ PostgresLogo::new(home_link).collapsable() %>
12+ < %+ PostgresLogo::new(& home_link).collapsable() %>
1813 </ div >
1914 < div class ="d-flex flex-column justify-content-between h-100 ">
2015 < %+ upper_nav %>
Original file line number Diff line number Diff line change 11.leftnav-container {
2- position : fixed ;
3- top : $navbar-height ;
4- height : calc ( 100vh - $navbar-height );
2+ position : fixed ;
3+ height : 100vh ;
54 background-color : var (--webapp-nav-bg );
65 max-width : $left-nav-w ;
76 padding-top : 0px ;
Original file line number Diff line number Diff line change 88 let home_link = if standalone_dashboard {"/"} else {"/deployments"};
99%>
1010
11- < div class ="fixed-top-nav font-family-primary " data-controller ="navigation-navbar-web-app ">
11+ < div class ="fixed-top-nav font-family-primary d-block d-lg-none " data-controller ="navigation-navbar-web-app ">
1212 < nav class ="navbar-web-app horizontal navbar-expand-lg " data-controller ="search topnav-web-app ">
1313
1414 < div class ="controls ">
Original file line number Diff line number Diff line change 150150.webapp-content-max-width-container {
151151 max-width : $webapp-content-max-width ;
152152 margin : 0px 20px ;
153- min-height : calc (100vh - $navbar-height - $ breadcrumb-height - 1px );
153+ min-height : calc (100vh - $breadcrumb-height - 1px );
154154
155155 @include media-breakpoint-up (md) {
156156 margin : 0px auto ;
Original file line number Diff line number Diff line change 1919 < %+ WebAppLeftNav::new(product_left_nav.clone())
2020 .id(&product_left_nav.unique_id()) %>
2121
22- < div class ="clear-from-under-navbar flex-grow-1 min-vw-0 web-app-content-area ">
22+ < div class ="flex-grow-1 min-vw-0 web-app-content-area ">
2323 < div class ="px-4 px-sm-5 py-3 d-none d-lg-flex " style ="position: absolute ">
2424 < %- Breadcrumbs::render(org_dropdown, deployment_dropdown, breadcrumbs) %>
2525 </ div >
You can’t perform that action at this time.
0 commit comments