Skip to content

Commit e2e5e9d

Browse files
committed
update breadcrumb, left nav
1 parent 1e372af commit e2e5e9d

File tree

7 files changed

+18
-16
lines changed

7 files changed

+18
-16
lines changed

pgml-dashboard/src/components/breadcrumbs/template.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,19 @@
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"

pgml-dashboard/src/components/navigation/left_nav/web_app/mod.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff 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

1617
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+
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

pgml-dashboard/src/components/navigation/left_nav/web_app/template.html

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
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"
@@ -14,7 +9,7 @@
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 %>

pgml-dashboard/src/components/navigation/left_nav/web_app/web_app.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
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;

pgml-dashboard/src/components/navigation/navbar/web_app/template.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
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">

pgml-dashboard/static/css/scss/layout/_containers.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
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;

pgml-dashboard/templates/layout/web_app_base.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
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>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy