Skip to content

Commit 0538d8d

Browse files
authored
Merge pull request #43 from mongodb/DOP-1098
DOP-1098: Add MongoDB.live banner
2 parents 0da8950 + ee7a09f commit 0538d8d

File tree

10 files changed

+38
-31
lines changed

10 files changed

+38
-31
lines changed

src/html/cloud.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<div id="navbar" data-navprops='{"links": [{"url": "https://docs.mongodb.com/manual/","text": "Server"},{"url": "https://docs.mongodb.com/ecosystem/drivers/","text": "Drivers"},{"url": "https://docs.mongodb.com/cloud/","text": "Cloud","active": true},{"url": "https://docs.mongodb.com/tools/","text": "Tools"},{"url": "https://docs.mongodb.com/guides/","text": "Guides"}]}'></div>
2-
31
<div class="main" data-pagename="Cloud">
42
<div class="main__sidebar">
53
<div class="main__sidebar__header">Overview:</div>
@@ -217,3 +215,5 @@ <h4 class="block__title">
217215
</div>
218216
</div>
219217
</div>
218+
219+
<div id="navbar" data-navprops='{"links": [{"url": "https://docs.mongodb.com/manual/","text": "Server"},{"url": "https://docs.mongodb.com/ecosystem/drivers/","text": "Drivers"},{"url": "https://docs.mongodb.com/cloud/","text": "Cloud","active": true},{"url": "https://docs.mongodb.com/tools/","text": "Tools"},{"url": "https://docs.mongodb.com/guides/","text": "Guides"}]}'></div>

src/html/home.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<div id="navbar" data-navprops='{"links": [{"url": "https://docs.mongodb.com/manual/","text": "Server"},{"url": "https://docs.mongodb.com/ecosystem/drivers/","text": "Drivers"},{"url": "https://docs.mongodb.com/cloud/","text": "Cloud"},{"url": "https://docs.mongodb.com/tools/","text": "Tools"},{"url": "https://docs.mongodb.com/guides/","text": "Guides"}]}'></div>
2-
31
<div class="main" data-pagename="Home">
42
<div class="main__sidebar">
53
<div class="main__sidebar__header">Overview:</div>
@@ -333,3 +331,5 @@ <h4 class="block__title">
333331
</div>
334332
</div>
335333
</div>
334+
335+
<div id="navbar" data-navprops='{"links": [{"url": "https://docs.mongodb.com/manual/","text": "Server"},{"url": "https://docs.mongodb.com/ecosystem/drivers/","text": "Drivers"},{"url": "https://docs.mongodb.com/cloud/","text": "Cloud"},{"url": "https://docs.mongodb.com/tools/","text": "Tools"},{"url": "https://docs.mongodb.com/guides/","text": "Guides"}]}'></div>

src/html/tools.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<div id="navbar" data-navprops='{"links": [{"url": "https://docs.mongodb.com/manual/","text": "Server"},{"url": "https://docs.mongodb.com/ecosystem/drivers/","text": "Drivers"},{"url": "https://docs.mongodb.com/cloud/","text": "Cloud"},{"url": "https://docs.mongodb.com/tools/","text": "Tools","active": true},{"url": "https://docs.mongodb.com/guides/","text": "Guides"}]}'></div>
2-
31
<div class="main" data-pagename="Tools">
42
<div class="main__sidebar">
53
<div class="main__sidebar__header">Overview:</div>
@@ -345,3 +343,5 @@ <h4 class="block__title">
345343
</div>
346344
</div>
347345
</div>
346+
347+
<div id="navbar" data-navprops='{"links": [{"url": "https://docs.mongodb.com/manual/","text": "Server"},{"url": "https://docs.mongodb.com/ecosystem/drivers/","text": "Drivers"},{"url": "https://docs.mongodb.com/cloud/","text": "Cloud"},{"url": "https://docs.mongodb.com/tools/","text": "Tools","active": true},{"url": "https://docs.mongodb.com/guides/","text": "Guides"}]}'></div>

src/sass/bem-components/main.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@import '../colors';
22

3-
$navbar-height: 45px;
3+
$navbar-height: 85px;
44
$sidebar-width: 330px;
55

66
.main {

static/css/landing.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/css/navbar.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/js/navbar.js

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import preact from 'preact';
77

88
// PM has asked that we not use the download arrow anymore, so commenting this out.
99
// function DownloadArrowIcon() {
10-
// return (<svg height="11" width="9" xmlns="http://www.w3.org/2000/svg"><path d="m8.8 6.8-1.2-1.2-2.1 2v-7.6h-1.7v7.6l-2.1-2-1.2 1.2 4.2 4.2z" fill="#69b241"/></svg>);
10+
// return (<svg height="11" width="9" xmlns="http://www.w3.org/2000/svg"><path d="m8.8 6.8-1.2-1.2-2.1 2v-7.6h-1.7v7.6l-2.1-2-1.2 1.2 4.2 4.2z" fill="#13aa52"/></svg>);
1111
// }
1212

1313
function RocketDownloadIcon() {
14-
return (<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g id="Icons" fill="#69b241"><path class="cls-1" d="M15.67.32a.79.79,0,0,0-.76-.2,18.67,18.67,0,0,0-3.77,1.22l3.51,3.51a18.64,18.64,0,0,0,1.22-3.77A.79.79,0,0,0,15.67.32Z"/><path class="cls-1" d="M8,3.5,2.31,9.22l4.45,4.45L12.49,8a11,11,0,0,0,1.35-1.68L9.72,2.15A11,11,0,0,0,8,3.5Z"/><path class="cls-1" d="M1.2,11.45C.28,12.37.09,15.91.09,15.91s3.53-.19,4.45-1.11a2.34,2.34,0,0,0,.68-1.55L2.75,10.77A2.34,2.34,0,0,0,1.2,11.45Z"/><polygon class="cls-1" points="4.83 5.88 1.2 5.88 0.09 7 1.9 8.81 4.83 5.88"/><polygon class="cls-1" points="8.99 15.91 10.11 14.79 10.11 11.18 7.19 14.1 8.99 15.91"/></g></svg>);
14+
return (<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><g id="Icons" fill="#13aa52"><path class="cls-1" d="M15.67.32a.79.79,0,0,0-.76-.2,18.67,18.67,0,0,0-3.77,1.22l3.51,3.51a18.64,18.64,0,0,0,1.22-3.77A.79.79,0,0,0,15.67.32Z"/><path class="cls-1" d="M8,3.5,2.31,9.22l4.45,4.45L12.49,8a11,11,0,0,0,1.35-1.68L9.72,2.15A11,11,0,0,0,8,3.5Z"/><path class="cls-1" d="M1.2,11.45C.28,12.37.09,15.91.09,15.91s3.53-.19,4.45-1.11a2.34,2.34,0,0,0,.68-1.55L2.75,10.77A2.34,2.34,0,0,0,1.2,11.45Z"/><polygon class="cls-1" points="4.83 5.88 1.2 5.88 0.09 7 1.9 8.81 4.83 5.88"/><polygon class="cls-1" points="8.99 15.91 10.11 14.79 10.11 11.18 7.19 14.1 8.99 15.91"/></g></svg>);
1515
}
1616

1717
class Navbar extends preact.Component {
@@ -178,27 +178,34 @@ class Navbar extends preact.Component {
178178
return <a href={ link.url } key={i} className={ linkClass }>{ link.text }</a>;
179179
});
180180

181-
return (
182-
<nav className="navbar">
183-
<div className="navbar__left">
184-
<a href="https://www.mongodb.com/">
185-
<img src="https://docs.mongodb.com/images/mongodb-logo.png" className="navbar-brand" alt="MongoDB Logo" />
186-
</a>
181+
const bannerUrl = document.body.clientWidth > 1200 ? 'https://docs.mongodb.com/images/mongodb-live-banner.png' : 'https://docs.mongodb.com/images/mongodb-live-banner-mobile.png';
187182

188-
<span className="navbar-seperator"></span>
183+
return (
184+
<div style="position: fixed; top: 0;">
185+
<a href="https://www.mongodb.com/world">
186+
<img src={bannerUrl} alt="MongoDB.live Banner" />
187+
</a>
188+
<nav className="navbar">
189+
<div className="navbar__left">
190+
<a href="https://www.mongodb.com/">
191+
<img src="https://docs.mongodb.com/images/mongodb-logo.png" className="navbar-brand" alt="MongoDB Logo" />
192+
</a>
193+
194+
<span className="navbar-seperator"></span>
195+
196+
<NavbarDropdown links={this.state.dropdown} />
197+
</div>
189198

190-
<NavbarDropdown links={this.state.dropdown} />
191-
</div>
199+
<div className="navbar__right">
200+
<div className="navbar-links">
201+
{ linkElements }
202+
</div>
192203

193-
<div className="navbar__right">
194-
<div className="navbar-links">
195-
{ linkElements }
204+
<NavbarDownloadButton />
205+
{ searchBar }
196206
</div>
197-
198-
<NavbarDownloadButton />
199-
{ searchBar }
200-
</div>
201-
</nav>
207+
</nav>
208+
</div>
202209
);
203210
}
204211
}

static/js/navbar.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/js/navbar.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/js/navbar.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)