Skip to content

Commit a429657

Browse files
committed
Navbar: center nav items, move Fundable/Contact to left group
1 parent 6f3ed89 commit a429657

3 files changed

Lines changed: 56 additions & 43 deletions

File tree

docusaurus.config.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,15 +139,15 @@ const config: Config = {
139139
},
140140
{
141141
to: "/fundable/",
142+
className: "custom_navbar_item",
142143
label: "Fundable projects",
143-
position: "right",
144-
className: "fundable_projects"
144+
position: "left",
145145
},
146146
{
147147
to: "/contact/",
148+
className: "custom_navbar_item",
148149
label: "Contact us",
149-
position: "right",
150-
className: "contact",
150+
position: "left",
151151
},
152152
{
153153
to: "https://github.com/QuantStack",

src/components/blog/index.tsx

Lines changed: 28 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -22,46 +22,36 @@ export default function BlogsComponent() {
2222
};
2323

2424
return (
25-
<div className="main-container-with-margins">
26-
<div className="container upper-container-with-margin-top">
27-
<div className={"row row-with-margin-bottom"}>
28-
<div
29-
className={"col col--8 col--offset-2"}
30-
>
31-
<div className="flex-full-centered">
32-
<h1 className="padding-none margin-none">
33-
Featured Posts by QuantStack Contributors
34-
</h1>
35-
<div style={{padding:"0 10px"}}>
36-
<a href={"/atom.xml"}>
37-
<AtomOrange width={"42px"} height={"42px"} />
38-
</a>
39-
</div>
40-
</div>
41-
<div>
42-
<input
43-
className={styles.search_input}
44-
type="search"
45-
placeholder="Search for blog posts"
46-
onChange={handleChange}
47-
/>
48-
</div>
49-
</div>
25+
<div className="page-content upper-container-with-margin-top">
26+
<div className="flex-full-centered" style={{ marginBottom: "var(--ifm-spacing-lg)" }}>
27+
<h1 className="padding-none margin-none">
28+
Featured Posts by QuantStack Contributors
29+
</h1>
30+
<div style={{ padding: "0 10px" }}>
31+
<a href={"/atom.xml"}>
32+
<AtomOrange width={"42px"} height={"42px"} />
33+
</a>
5034
</div>
51-
52-
<ul className={"row" + " " + "flex-full-centered"}>
53-
{filteredBlogPosts.map((blogpost, index) => (
54-
<li className="cards-list" key={index}>
55-
<div className="col">
56-
<BlogpostCard
57-
blogpost={blogpost}
58-
timeIndex={numberOfBlogs - index}
59-
></BlogpostCard>
60-
</div>
61-
</li>
62-
))}
63-
</ul>
6435
</div>
36+
<div>
37+
<input
38+
className={styles.search_input}
39+
type="search"
40+
placeholder="Search for blog posts"
41+
onChange={handleChange}
42+
/>
43+
</div>
44+
45+
<ul className="cards-row">
46+
{filteredBlogPosts.map((blogpost, index) => (
47+
<li key={index}>
48+
<BlogpostCard
49+
blogpost={blogpost}
50+
timeIndex={numberOfBlogs - index}
51+
/>
52+
</li>
53+
))}
54+
</ul>
6555
</div>
6656
);
6757
}

src/css/custom.css

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,12 +552,35 @@ a.menu__link:active {
552552
}
553553

554554

555+
.navbar__inner {
556+
position: relative;
557+
}
558+
559+
.navbar__brand {
560+
position: absolute;
561+
left: 0;
562+
top: 50%;
563+
transform: translateY(-50%);
564+
}
565+
566+
.theme-layout-navbar-left {
567+
flex: 1;
568+
justify-content: center;
569+
}
570+
571+
.theme-layout-navbar-right {
572+
position: absolute;
573+
right: 0;
574+
top: 50%;
575+
transform: translateY(-50%);
576+
}
577+
555578
.custom_navbar_item {
556579
font-family: var(--ifm-font-family-roboto);
557-
width: 117px;
558580
height: 36px;
559581
padding: 6px 14px;
560582
text-align: center;
583+
white-space: nowrap;
561584
}
562585

563586
.custom_navbar_item:hover {

0 commit comments

Comments
 (0)