Skip to content

Commit f46c38b

Browse files
committed
Another navbar
1 parent 81a4cef commit f46c38b

File tree

5 files changed

+22388
-1
lines changed

5 files changed

+22388
-1
lines changed

themes/mongodb-tutorials/Gulpfile.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,29 @@ gulp.task('js:build-navbar', function() {
110110
.pipe(gulp.dest('./static/js/'))
111111
})
112112

113+
gulp.task('js:build-navbar-landing', function() {
114+
gulp.src('./src/navbar-landing.js')
115+
.pipe(webpack({
116+
output: {
117+
filename: 'navbar-landing.js'
118+
},
119+
devtool: 'source-maps',
120+
module: {
121+
loaders: [
122+
{
123+
test: /\.js$/,
124+
loader: 'babel-loader',
125+
query: {
126+
presets: ['es2015', 'react'],
127+
plugins: ['transform-class-properties']
128+
}
129+
}
130+
]
131+
}
132+
}))
133+
.pipe(gulp.dest('./static/js/'))
134+
})
135+
113136
gulp.task('js', ['js:build-home', 'js:build-single'])
114137

115138
gulp.task('watch', function() {
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import React from 'react'
2+
import ReactDOM from 'react-dom'
3+
4+
import Navbar from './navbar.js'
5+
6+
const baseURL = 'http://localhost:8000'
7+
8+
class NavbarDocs extends React.Component {
9+
constructor (props) {
10+
super(props)
11+
}
12+
13+
render () {
14+
return (
15+
<Navbar baseURL={baseURL}>
16+
<input type="search" className="navbar-search" placeholder="Search" />
17+
</Navbar>
18+
)
19+
}
20+
}
21+
22+
ReactDOM.render(<NavbarDocs />, document.getElementById('navbar-landing'))

themes/mongodb-tutorials/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.

0 commit comments

Comments
 (0)