Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit07c66ac

Browse files
Dan marketing nav rebuild (#1138)
1 parenta393d57 commit07c66ac

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 aboutcustomizing 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:10px20px;
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:5pxsolidtransparent;
27+
border-bottom:5pxsolidtransparent;
28+
29+
border-left:5pxsolid#{$color};
30+
}
31+
}
Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
1-
<aclass="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-
<spanclass="badge github-badge"><p>Stars |<%= stars %></p></span>
5-
<% } %>
6-
<% } %>
7-
<svgwidth="25"height="25"viewBox="0 0 40 39"fill="none"xmlns="http://www.w3.org/2000/svg">
8-
<pathd="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+
<aclass="d-flex align-items-center btn-github nav-link gap-2 border-0"href="https://github.com/postgresml/postgresml">
5+
<svgwidth="25"height="25"viewBox="0 0 40 39"fill="none"xmlns="http://www.w3.org/2000/svg">
6+
<pathd="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+
<spanclass=""><%= stars %></span>
10+
<% } %>
11+
</a>
12+
<% } else { %>
13+
<aclass="d-flex align-items-center nav-link p-0 border-bottom-0"href="https://github.com/postgresml/postgresml">
14+
<svgwidth="25"height="25"viewBox="0 0 40 39"fill="none"xmlns="http://www.w3.org/2000/svg">
15+
<pathd="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+
@includemedia-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+
@includemedia-breakpoint-down(xl) {
17+
width:100%;
18+
}
19+
}
20+
21+
.navbar-collapse {
22+
@includemedia-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+
@includemedia-breakpoint-up(xl) {
50+
padding:10px20px;
51+
}
52+
}
53+
54+
.btn-secondary {
55+
@includemedia-breakpoint-up(xl) {
56+
padding:8px20px;// 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
<divclass="sticky-top-nav"data-controller="navigation-navbar-marketing">
5-
<navclass="navbar-marketing-site horizontal navbar-expand-lg"data-controller="search topnav-styling">
6-
<divclass="container gap-4">
16+
<navclass="navbar-marketing-site horizontal navbar-expand-xl"data-controller="search topnav-styling">
17+
<divclass="containercolumn-gap-4">
718
<divclass="controls">
819
<%+ PostgresLogo::new("/") %>
9-
<buttonclass="navbar-toggler"type="button"data-bs-toggle="collapse"data-bs-target="#navbarSupportedContent"aria-controls="navbarSupportedContent"aria-expanded="false"aria-label="Toggle navigation">
10-
<spanclass="navbar-toggler-icon"></span>
11-
</button>
12-
</div>
1320

14-
<divclass="collapse navbar-collapse"id="navbarSupportedContent">
15-
<ulclass="navbar-nav flex-grow-1 gap-4 me-auto mb-4 mb-lg-0">
16-
<% if !standalone_dashboard { %>
17-
<liclass="nav-item d-flex align-items-center">
18-
<aclass="nav-link p-0"href="/pricing">Pricing</a>
19-
</li>
20-
<% } %>
21-
<liclass="nav-item d-flex align-items-center">
22-
<aclass="nav-link p-0"href="/docs/guides/">Docs</a>
23-
</li>
24-
<liclass="nav-item d-flex align-items-center">
25-
<aclass="nav-link p-0"href="/blog/speeding-up-vector-recall-by-5x-with-hnsw">Blog</a>
26-
</li>
27-
</ul>
28-
29-
<ulclass="navbar-nav gap-4 gap-lg-3 mb-2 mb-lg-0">
30-
<liclass="align-items-center d-none d-lg-flex">
31-
<%+ GithubIcon {show_stars: true} %>
32-
</li>
33-
<liclass="d-flex align-items-center d-block d-lg-none">
34-
<aclass="nav-link p-0"href="https://github.com/postgresml/postgresml">Open Source</a>
35-
</li>
36-
<liclass="nav-item d-flex align-items-center">
37-
<buttontype="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+
<divclass="d-flex flex-row gap-1">
22+
<liclass="nav-item d-flex align-items-center d-block d-xl-none">
23+
<buttontype="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+
<spanclass="material-symbols-outlined">search</span>
3925
</button>
4026
</li>
41-
<% if !standalone_dashboard { %>
42-
<divclass="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-
<liclass="nav-item d-flex align-items-center">
45-
<aclass="nav-link p-0"href="/login">Sign In</a>
46-
</li>
47-
<liclass="d-flex align-items-center">
48-
<aclass="btn btn-primary py-2 px-3"href="/signup">Sign Up</a>
49-
</li>
50-
<% } else { %>
51-
<liclass="nav-item d-flex align-items-center">
52-
<aclass="nav-link p-0"href="/logout">Sign Out</a>
53-
</li>
54-
<liclass="d-flex align-items-center">
55-
<aclass="btn btn-primary py-2 px-3"href="/clusters">Console</a>
56-
</li>
27+
28+
<buttonclass="navbar-toggler"type="button"data-bs-toggle="collapse"data-bs-target=".navbarSupportedContent"aria-controls="navbarSupportedContent"aria-expanded="false"aria-label="Toggle navigation">
29+
<spanclass="navbar-toggler-icon"></span>
30+
</button>
31+
</div>
32+
</div>
33+
34+
<divclass="navbarSupportedContent underline collapse"></div>
35+
36+
<divclass="collapse navbar-collapse drawer-submenu-container navbarSupportedContent"id="navbarSupportedContent">
37+
<!-- Main Menu -->
38+
<divclass="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+
<ulclass="navbar-nav flex-grow-1 gap-4 me-auto my-4 my-xl-0">
40+
41+
<% if !standalone_dashboard { %>
42+
<divclass="d-none d-xl-flex">
43+
<%+ MarketingLink::new()
44+
.name("Solutions")
45+
.links(solutions_links.clone()) %>
46+
</div>
47+
<liclass="nav-item d-flex align-items-center d-flex d-xl-none">
48+
<aclass="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-
<liclass="nav-item d-flex align-items-center">
62-
<aclass="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+
<liclass="nav-item d-none d-xl-flex align-items-center">
58+
<buttontype="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+
<spanclass="material-symbols-outlined">search</span>
60+
</button>
61+
</li>
62+
</ul>
63+
64+
<ulclass="navbar-nav gap-4 mb-2 mb-xl-0">
65+
<liclass="align-items-center d-none d-xl-flex">
66+
<%+ GithubIcon {show_stars: true} %>
67+
</li>
68+
69+
<divclass="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+
<divclass="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+
<liclass="nav-item d-flex align-items-center">
78+
<aclass="btn btn-secondary w-100"data-controller="btn-secondary"data-btn-secondary-target="btnSecondary"href="/login">Sign In</a>
79+
</li>
80+
<liclass="d-flex align-items-center">
81+
<aclass="btn btn-primary w-100"href="/signup">Start Your Project</a>
82+
</li>
83+
<% } else { %>
84+
<liclass="nav-item d-flex align-items-center">
85+
<aclass="btn btn-secondary w-100"data-controller="btn-secondary"data-btn-secondary-target="btnSecondary"href="/logout">Sign Out</a>
86+
</li>
87+
<liclass="d-flex align-items-center">
88+
<aclass="btn btn-primary w-100"href="/clusters">Console</a>
89+
</li>
90+
<% } %>
91+
<% } %>
92+
93+
<% if standalone_dashboard { %>
94+
<liclass="nav-item d-flex align-items-center">
95+
<aclass="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+
<divclass="nav-item collapse-horizontal solutions-collapse collapse drawer-submenu">
106+
<ulclass="sub-menu-dropdown mb-5 d-flex flex-column gap-3">
107+
<aclass="btn btn-tertiary-web-app"data-bs-toggle="collapse"data-bs-target=".solutions-collapse">
108+
<spanclass="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)

[8]ページ先頭

©2009-2025 Movatter.jp