File tree Expand file tree Collapse file tree 7 files changed +18
-16
lines changed Expand file tree Collapse file tree 7 files changed +18
-16
lines changed Original file line number Diff line number Diff line change 15
15
< ol class ="breadcrumb ">
16
16
< % if !dropdown_1.links.is_empty() {%>
17
17
< %+ Dropdown::new()
18
- .set_nav_items(dropdown_1) %>
18
+ .set_nav_items(dropdown_1.clone() ) %>
19
19
< % } %>
20
20
21
21
< % if !dropdown_2.links.is_empty() {%>
22
- < div class ="vr my-1 mx-2 "> </ div >
22
+ < div class ="vr my-1 mx-2 "> </ div >
23
23
< %+ Dropdown::new()
24
24
.set_nav_items(dropdown_2) %>
25
25
< % } %>
26
26
27
+ < % if !dropdown_1.links.is_empty() && !links.is_empty() {%>
28
+ < div class ="vr my-1 mx-2 "> </ div >
29
+ < % } %>
30
+
27
31
< % for link in links {
28
32
let active = if link.active {
29
33
"active"
Original file line number Diff line number Diff line change @@ -11,10 +11,13 @@ pub struct WebApp {
11
11
pub upper_nav : LeftNavMenu ,
12
12
pub lower_nav : LeftNavMenu ,
13
13
pub id : Option < String > ,
14
+ pub home_link : String ,
14
15
}
15
16
16
17
impl 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
+
18
21
let mut upper_nav_items = vec ! [ ] ;
19
22
for item in upper_nav. links {
20
23
upper_nav_items. push ( LeftNavItem :: from_static_nav ( & item) . into ( ) ) ;
@@ -37,6 +40,7 @@ impl WebApp {
37
40
upper_nav,
38
41
lower_nav,
39
42
id : None ,
43
+ home_link,
40
44
}
41
45
}
42
46
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; %>
7
2
< 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"))%> '>
8
3
< nav
9
4
class ="leftnav nav-pills h-100 "
14
9
< div class ="d-flex flex-column h-100 ">
15
10
< span class ="leftnav-collapse collapse " data-extend-bs-collapse-target ="stateReference " data-navigation-left-nav-web-app-target ="stateReference "> </ span >
16
11
< div class ="leftnav-collapse-affect collapsed overflow-hidden " style ="height: 3rem; ">
17
- < %+ PostgresLogo::new(home_link).collapsable() %>
12
+ < %+ PostgresLogo::new(& home_link).collapsable() %>
18
13
</ div >
19
14
< div class ="d-flex flex-column justify-content-between h-100 ">
20
15
< %+ upper_nav %>
Original file line number Diff line number Diff line change 1
1
.leftnav-container {
2
- position : fixed ;
3
- top : $navbar-height ;
4
- height : calc ( 100vh - $navbar-height );
2
+ position : fixed ;
3
+ height : 100vh ;
5
4
background-color : var (--webapp-nav-bg );
6
5
max-width : $left-nav-w ;
7
6
padding-top : 0px ;
Original file line number Diff line number Diff line change 8
8
let home_link = if standalone_dashboard {"/"} else {"/deployments"};
9
9
%>
10
10
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 ">
12
12
< nav class ="navbar-web-app horizontal navbar-expand-lg " data-controller ="search topnav-web-app ">
13
13
14
14
< div class ="controls ">
Original file line number Diff line number Diff line change 150
150
.webapp-content-max-width-container {
151
151
max-width : $webapp-content-max-width ;
152
152
margin : 0px 20px ;
153
- min-height : calc (100vh - $navbar-height - $ breadcrumb-height - 1px );
153
+ min-height : calc (100vh - $breadcrumb-height - 1px );
154
154
155
155
@include media-breakpoint-up (md) {
156
156
margin : 0px auto ;
Original file line number Diff line number Diff line change 19
19
< %+ WebAppLeftNav::new(product_left_nav.clone())
20
20
.id(&product_left_nav.unique_id()) %>
21
21
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 ">
23
23
< div class ="px-4 px-sm-5 py-3 d-none d-lg-flex " style ="position: absolute ">
24
24
< %- Breadcrumbs::render(org_dropdown, deployment_dropdown, breadcrumbs) %>
25
25
</ div >
You can’t perform that action at this time.
0 commit comments