Content-Length: 927926 | pFad | http://github.com/postgresml/postgresml/commit/07c66acb31724ccf092a1f28e16750546f2f8d44

F3 Dan marketing nav rebuild (#1138) · postgresml/postgresml@07c66ac · GitHub
Skip to content

Commit 07c66ac

Browse files
Dan marketing nav rebuild (#1138)
1 parent a393d57 commit 07c66ac

File tree

13 files changed

+438
-98
lines changed

13 files changed

+438
-98
lines changed

pgml-dashboard/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
.btn-github {
2+
background-color: #{$gray-700};
3+
border-radius: $border-radius;
4+
padding: 10px 20px;
5+
6+
}
7+
8+
.github-badge {
9+
$color: $neon-shade-100;
10+
padding: 4px;
11+
12+
p {
13+
margin: 0px;
14+
background: #{$color};
15+
border-radius: calc($border-radius / 2);
16+
padding: 4px;
17+
font-size: 0.8rem;
18+
font-weight: 500;
19+
}
20+
21+
// Add right pointing arrow
22+
&::after {
23+
content: "";
24+
width: 0;
25+
height: 0;
26+
border-top: 5px solid transparent;
27+
border-bottom: 5px solid transparent;
28+
29+
border-left: 5px solid #{$color};
30+
}
31+
}
Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
<a class="d-flex align-items-center nav-link p-0 border-bottom-0" href="https://github.com/postgresml/postgresml">
2-
<% if show_stars {%>
3-
<% if let Ok(stars) = crate::utils::config::github_stars() { %>
4-
<span class="badge github-badge"><p>Stars | <%= stars %></p></span>
5-
<% } %>
6-
<% } %>
7-
<svg width="25" height="25" viewBox="0 0 40 39" fill="none" xmlns="http://www.w3.org/2000/svg">
8-
<path d="M20 0.25C17.3736 0.25 14.7728 0.763591 12.3463 1.76145C9.91982 2.75931 7.71504 4.22189 5.85786 6.06569C2.10714 9.78942 0 14.8399 0 20.106C0 28.8824 5.74 36.3284 13.68 38.9692C14.68 39.1281 15 38.5126 15 37.9764V34.6208C9.46 35.8121 8.28 31.9601 8.28 31.9601C7.36 29.6568 6.06 29.0412 6.06 29.0412C4.24 27.8102 6.2 27.8499 6.2 27.8499C8.2 27.9889 9.26 29.895 9.26 29.895C11 32.9132 13.94 32.0196 15.08 31.5431C15.26 30.2525 15.78 29.3788 16.34 28.8824C11.9 28.386 7.24 26.6784 7.24 19.1132C7.24 16.9092 8 15.142 9.3 13.7322C9.1 13.2358 8.4 11.1708 9.5 8.49025C9.5 8.49025 11.18 7.95414 15 10.5156C16.58 10.0787 18.3 9.86032 20 9.86032C21.7 9.86032 23.42 10.0787 25 10.5156C28.82 7.95414 30.5 8.49025 30.5 8.49025C31.6 11.1708 30.9 13.2358 30.7 13.7322C32 15.142 32.76 16.9092 32.76 19.1132C32.76 26.6982 28.08 28.3661 23.62 28.8625C24.34 29.4781 25 30.6893 25 32.5359V37.9764C25 38.5126 25.32 39.1479 26.34 38.9692C34.28 36.3085 40 28.8824 40 20.106C40 17.4985 39.4827 14.9165 38.4776 12.5075C37.4725 10.0984 35.9993 7.9095 34.1421 6.06569C32.285 4.22189 30.0802 2.75931 27.6537 1.76145C25.2272 0.763591 22.6264 0.25 20 0.25Z" fill="#FAFAFA"/>
9-
</svg>
10-
</a>
1+
2+
3+
<% if show_stars { %>
4+
<a class="d-flex align-items-center btn-github nav-link gap-2 border-0" href="https://github.com/postgresml/postgresml">
5+
<svg width="25" height="25" viewBox="0 0 40 39" fill="none" xmlns="http://www.w3.org/2000/svg">
6+
<path d="M20 0.25C17.3736 0.25 14.7728 0.763591 12.3463 1.76145C9.91982 2.75931 7.71504 4.22189 5.85786 6.06569C2.10714 9.78942 0 14.8399 0 20.106C0 28.8824 5.74 36.3284 13.68 38.9692C14.68 39.1281 15 38.5126 15 37.9764V34.6208C9.46 35.8121 8.28 31.9601 8.28 31.9601C7.36 29.6568 6.06 29.0412 6.06 29.0412C4.24 27.8102 6.2 27.8499 6.2 27.8499C8.2 27.9889 9.26 29.895 9.26 29.895C11 32.9132 13.94 32.0196 15.08 31.5431C15.26 30.2525 15.78 29.3788 16.34 28.8824C11.9 28.386 7.24 26.6784 7.24 19.1132C7.24 16.9092 8 15.142 9.3 13.7322C9.1 13.2358 8.4 11.1708 9.5 8.49025C9.5 8.49025 11.18 7.95414 15 10.5156C16.58 10.0787 18.3 9.86032 20 9.86032C21.7 9.86032 23.42 10.0787 25 10.5156C28.82 7.95414 30.5 8.49025 30.5 8.49025C31.6 11.1708 30.9 13.2358 30.7 13.7322C32 15.142 32.76 16.9092 32.76 19.1132C32.76 26.6982 28.08 28.3661 23.62 28.8625C24.34 29.4781 25 30.6893 25 32.5359V37.9764C25 38.5126 25.32 39.1479 26.34 38.9692C34.28 36.3085 40 28.8824 40 20.106C40 17.4985 39.4827 14.9165 38.4776 12.5075C37.4725 10.0984 35.9993 7.9095 34.1421 6.06569C32.285 4.22189 30.0802 2.75931 27.6537 1.76145C25.2272 0.763591 22.6264 0.25 20 0.25Z" fill="#FAFAFA"/>
7+
</svg>
8+
<% if let Ok(stars) = crate::utils::config::github_stars() { %>
9+
<span class=""><%= stars %></span>
10+
<% } %>
11+
</a>
12+
<% } else { %>
13+
<a class="d-flex align-items-center nav-link p-0 border-bottom-0" href="https://github.com/postgresml/postgresml">
14+
<svg width="25" height="25" viewBox="0 0 40 39" fill="none" xmlns="http://www.w3.org/2000/svg">
15+
<path d="M20 0.25C17.3736 0.25 14.7728 0.763591 12.3463 1.76145C9.91982 2.75931 7.71504 4.22189 5.85786 6.06569C2.10714 9.78942 0 14.8399 0 20.106C0 28.8824 5.74 36.3284 13.68 38.9692C14.68 39.1281 15 38.5126 15 37.9764V34.6208C9.46 35.8121 8.28 31.9601 8.28 31.9601C7.36 29.6568 6.06 29.0412 6.06 29.0412C4.24 27.8102 6.2 27.8499 6.2 27.8499C8.2 27.9889 9.26 29.895 9.26 29.895C11 32.9132 13.94 32.0196 15.08 31.5431C15.26 30.2525 15.78 29.3788 16.34 28.8824C11.9 28.386 7.24 26.6784 7.24 19.1132C7.24 16.9092 8 15.142 9.3 13.7322C9.1 13.2358 8.4 11.1708 9.5 8.49025C9.5 8.49025 11.18 7.95414 15 10.5156C16.58 10.0787 18.3 9.86032 20 9.86032C21.7 9.86032 23.42 10.0787 25 10.5156C28.82 7.95414 30.5 8.49025 30.5 8.49025C31.6 11.1708 30.9 13.2358 30.7 13.7322C32 15.142 32.76 16.9092 32.76 19.1132C32.76 26.6982 28.08 28.3661 23.62 28.8625C24.34 29.4781 25 30.6893 25 32.5359V37.9764C25 38.5126 25.32 39.1479 26.34 38.9692C34.28 36.3085 40 28.8824 40 20.106C40 17.4985 39.4827 14.9165 38.4776 12.5075C37.4725 10.0984 35.9993 7.9095 34.1421 6.06569C32.285 4.22189 30.0802 2.75931 27.6537 1.76145C25.2272 0.763591 22.6264 0.25 20 0.25Z" fill="#FAFAFA"/>
16+
</svg>
17+
</a>
18+
<% } %>
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,64 @@
11
.navbar-marketing-site {
22
@extend .navbar;
3+
4+
@include media-breakpoint-up(xl) {
5+
height: $navbar-height;
6+
--bs-navbar-padding-y: 24px;
7+
--bs-navbar-padding-x: 1.25rem;
8+
}
9+
10+
.controls {
11+
display: flex;
12+
align-items: center;
13+
justify-content: space-between;
14+
min-height: $navbar-height;
15+
16+
@include media-breakpoint-down(xl) {
17+
width: 100%;
18+
}
19+
}
20+
21+
.navbar-collapse {
22+
@include media-breakpoint-up(xl) {
23+
width: 100%;
24+
}
25+
}
26+
327
&.horizontal {
428
background: linear-gradient(180deg, rgba(0, 0, 0, 0.64) -55.68%, rgba(0, 0, 0, 0) 100%);
529
}
30+
31+
.underline {
32+
position: absolute;
33+
width: 100%;
34+
height: 1px;
35+
background-color: #{$gray-600};
36+
left: 0px;
37+
top: 88px;
38+
39+
&.collapsing {
40+
height: 1px !important;
41+
}
42+
43+
&.show {
44+
height: 1px;
45+
}
46+
}
47+
48+
.btn-primary {
49+
@include media-breakpoint-up(xl) {
50+
padding: 10px 20px;
51+
}
52+
}
53+
54+
.btn-secondary {
55+
@include media-breakpoint-up(xl) {
56+
padding: 8px 20px; // compensate for 1px boarder
57+
}
58+
}
59+
60+
.icon-back-btn {
61+
width: 15px;
62+
font-size: 1.5rem;
63+
}
664
}

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

Lines changed: 114 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,127 @@
1-
<% use crate::templates::components::GithubIcon; %>
2-
<% use crate::templates::components::PostgresLogo; %>
1+
<%
2+
use crate::templates::components::GithubIcon;
3+
use crate::templates::components::PostgresLogo;
4+
use crate::components::navigation::navbar::marketing_link::MarketingLink;
5+
use crate::components::static_nav_link::StaticNavLink;
6+
7+
let solutions_links = vec![
8+
StaticNavLink::new("ChatBot".to_string(), "/chatbot".to_string()).icon("smart_toy"),
9+
StaticNavLink::new("Site Search".to_string(), "/test2".to_string()).icon("manage_search").disabled(true),
10+
StaticNavLink::new("Forcasting".to_string(), "/test2".to_string()).icon("avg_pace").disabled(true),
11+
StaticNavLink::new("Frad Detection".to_string(), "/test2".to_string()).icon("e911_emergency").disabled(true),
12+
];
13+
%>
314

415
<div class="sticky-top-nav" data-controller="navigation-navbar-marketing">
5-
<nav class="navbar-marketing-site horizontal navbar-expand-lg" data-controller="search topnav-styling">
6-
<div class="container gap-4">
16+
<nav class="navbar-marketing-site horizontal navbar-expand-xl" data-controller="search topnav-styling">
17+
<div class="container column-gap-4">
718
<div class="controls">
819
<%+ PostgresLogo::new("/") %>
9-
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
10-
<span class="navbar-toggler-icon"></span>
11-
</button>
12-
</div>
1320

14-
<div class="collapse navbar-collapse" id="navbarSupportedContent">
15-
<ul class="navbar-nav flex-grow-1 gap-4 me-auto mb-4 mb-lg-0">
16-
<% if !standalone_dashboard { %>
17-
<li class="nav-item d-flex align-items-center">
18-
<a class="nav-link p-0" href="/pricing">Pricing</a>
19-
</li>
20-
<% } %>
21-
<li class="nav-item d-flex align-items-center">
22-
<a class="nav-link p-0" href="/docs/guides/">Docs</a>
23-
</li>
24-
<li class="nav-item d-flex align-items-center">
25-
<a class="nav-link p-0" href="/blog/speeding-up-vector-recall-by-5x-with-hnsw">Blog</a>
26-
</li>
27-
</ul>
28-
29-
<ul class="navbar-nav gap-4 gap-lg-3 mb-2 mb-lg-0">
30-
<li class="align-items-center d-none d-lg-flex">
31-
<%+ GithubIcon {show_stars: true} %>
32-
</li>
33-
<li class="d-flex align-items-center d-block d-lg-none">
34-
<a class="nav-link p-0" href="https://github.com/postgresml/postgresml">Open Source</a>
35-
</li>
36-
<li class="nav-item d-flex align-items-center">
37-
<button type="text" class="btn nav-link btn-search-alt p-0" name="search" data-bs-toggle="modal" data-bs-target="#search" autocomplete="off" data-search-target="searchTrigger" data-action="search#openSearch">
38-
Search
21+
<div class="d-flex flex-row gap-1">
22+
<li class="nav-item d-flex align-items-center d-block d-xl-none">
23+
<button type="text" class="btn nav-link btn-search-alt border-0 p-0" name="search" data-bs-toggle="modal" data-bs-target="#search" autocomplete="off" data-search-target="searchTrigger" data-action="search#openSearch">
24+
<span class="material-symbols-outlined">search</span>
3925
</button>
4026
</li>
41-
<% if !standalone_dashboard { %>
42-
<div class="vr my-2 opacity-100 d-lg-block d-none" style="width: 2px"></div>
43-
<% if current_user.as_ref().is_none() || current_user.as_ref().unwrap().id == -1 { %>
44-
<li class="nav-item d-flex align-items-center">
45-
<a class="nav-link p-0" href="/login">Sign In</a>
46-
</li>
47-
<li class="d-flex align-items-center">
48-
<a class="btn btn-primary py-2 px-3" href="/signup">Sign Up</a>
49-
</li>
50-
<% } else { %>
51-
<li class="nav-item d-flex align-items-center">
52-
<a class="nav-link p-0" href="/logout">Sign Out</a>
53-
</li>
54-
<li class="d-flex align-items-center">
55-
<a class="btn btn-primary py-2 px-3" href="/clusters">Console</a>
56-
</li>
27+
28+
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target=".navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
29+
<span class="navbar-toggler-icon"></span>
30+
</button>
31+
</div>
32+
</div>
33+
34+
<div class="navbarSupportedContent underline collapse"></div>
35+
36+
<div class="collapse navbar-collapse drawer-submenu-container navbarSupportedContent" id="navbarSupportedContent">
37+
<!-- Main Menu -->
38+
<div class="nav-item w-100 d-xl-flex flex-column flex-xl-row align-items-xl-center collapse collapse-horizontal solutions-collapse show drawer-submenu">
39+
<ul class="navbar-nav flex-grow-1 gap-4 me-auto my-4 my-xl-0">
40+
41+
<% if !standalone_dashboard { %>
42+
<div class="d-none d-xl-flex">
43+
<%+ MarketingLink::new()
44+
.name("Solutions")
45+
.links(solutions_links.clone()) %>
46+
</div>
47+
<li class="nav-item d-flex align-items-center d-flex d-xl-none">
48+
<a class="nav-link p-0 fw-semibold" href="#" data-bs-toggle="collapse" data-bs-target=".solutions-collapse">Solutions</a>
49+
</li>
50+
51+
<%+ MarketingLink::new().link(StaticNavLink::new("Pricing".to_string(), "/pricing".to_string())) %>
5752
<% } %>
58-
<% } %>
5953

60-
<% if standalone_dashboard { %>
61-
<li class="nav-item d-flex align-items-center">
62-
<a class="btn btn-primary py-2 px-3" href="/dashboard">Dashboard</a>
63-
</li>
64-
<% } %>
65-
</ul>
54+
<%+ MarketingLink::new().link(StaticNavLink::new("docs".to_string(), "/docs/guides/".to_string())) %>
55+
<%+ MarketingLink::new().link(StaticNavLink::new("Blog".to_string(), "/blog/speeding-up-vector-recall-by-5x-with-hnsw".to_string())) %>
56+
57+
<li class="nav-item d-none d-xl-flex align-items-center">
58+
<button type="text" class="btn nav-link btn-search-alt border-0 p-0" name="search" data-bs-toggle="modal" data-bs-target="#search" autocomplete="off" data-search-target="searchTrigger" data-action="search#openSearch">
59+
<span class="material-symbols-outlined">search</span>
60+
</button>
61+
</li>
62+
</ul>
63+
64+
<ul class="navbar-nav gap-4 mb-2 mb-xl-0">
65+
<li class="align-items-center d-none d-xl-flex">
66+
<%+ GithubIcon {show_stars: true} %>
67+
</li>
68+
69+
<div class="d-block d-xl-none">
70+
<%+ MarketingLink::new().link(StaticNavLink::new("GitHub".to_string(), "https://github.com/postgresml/postgresml".to_string())) %>
71+
</div>
72+
73+
74+
<div class="mb-5 mt-4 my-xl-0 d-flex flex-column flex-xl-row gap-4">
75+
<% if !standalone_dashboard { %>
76+
<% if current_user.as_ref().is_none() || current_user.as_ref().unwrap().id == -1 { %>
77+
<li class="nav-item d-flex align-items-center">
78+
<a class="btn btn-secondary w-100" data-controller="btn-secondary" data-btn-secondary-target="btnSecondary" href="/login">Sign In</a>
79+
</li>
80+
<li class="d-flex align-items-center">
81+
<a class="btn btn-primary w-100" href="/signup">Start Your Project</a>
82+
</li>
83+
<% } else { %>
84+
<li class="nav-item d-flex align-items-center">
85+
<a class="btn btn-secondary w-100" data-controller="btn-secondary" data-btn-secondary-target="btnSecondary" href="/logout">Sign Out</a>
86+
</li>
87+
<li class="d-flex align-items-center">
88+
<a class="btn btn-primary w-100" href="/clusters">Console</a>
89+
</li>
90+
<% } %>
91+
<% } %>
92+
93+
<% if standalone_dashboard { %>
94+
<li class="nav-item d-flex align-items-center ">
95+
<a class="btn btn-primary w-100" href="/dashboard">Dashboard</a>
96+
</li>
97+
<% } %>
98+
99+
</div>
100+
</ul>
101+
</div>
102+
103+
104+
<!-- Solutions nav for less than large screens -->
105+
<div class="nav-item collapse-horizontal solutions-collapse collapse drawer-submenu">
106+
<ul class="sub-menu-dropdown mb-5 d-flex flex-column gap-3">
107+
<a class="btn btn-tertiary-web-app" data-bs-toggle="collapse" data-bs-target=".solutions-collapse">
108+
<span class="material-symbols-outlined icon-back-btn">
109+
arrow_back
110+
</span>
111+
Back
112+
</a>
113+
<% for link in solutions_links { %>
114+
<%+ MarketingLink::new().link(
115+
StaticNavLink::new(link.name.to_string(), link.href.to_string())
116+
.disabled(link.disabled)
117+
) %>
118+
<% } %>
119+
</ul>
120+
</div>
121+
122+
66123
</div>
124+
67125
</div>
68126
</nav>
69127
</div>

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgresml/postgresml/commit/07c66acb31724ccf092a1f28e16750546f2f8d44

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy