From 1bbb625255cd1541c6ccf08fab260d185c838974 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sun, 3 Jan 2016 17:51:14 +0000 Subject: [PATCH] React-ify the navbar --- static/src/js/app.js | 5 + static/src/js/components/navbar/navbar.js | 65 +++++++++++++ static/src/less/navbar.less | 8 ++ templates/about/index.html | 112 ---------------------- templates/about/me.html | 1 + 5 files changed, 79 insertions(+), 112 deletions(-) create mode 100644 static/src/js/components/navbar/navbar.js diff --git a/static/src/js/app.js b/static/src/js/app.js index a552595..fbe8b45 100644 --- a/static/src/js/app.js +++ b/static/src/js/app.js @@ -6,8 +6,13 @@ import React from 'react'; import ProjectImagesTypes from './components/index/project-images-types'; import ProjectImagesMain from './components/index/project-images-main'; +import NavBar from './components/navbar/navbar'; if ($('body').hasClass('index')) { // Render components on index React.render(, document.getElementById('project-images-types')); React.render(, document.getElementById('project-images-main')); } + +if ($('#navbar-test')) { + React.render(, document.getElementById('navbar-test')); +} diff --git a/static/src/js/components/navbar/navbar.js b/static/src/js/components/navbar/navbar.js new file mode 100644 index 0000000..7c677c4 --- /dev/null +++ b/static/src/js/components/navbar/navbar.js @@ -0,0 +1,65 @@ +import React from 'react'; +var ReactBootstrap = require('react-bootstrap'); +var { + Navbar, + Nav, + MenuItem, + NavItem, + NavDropdown +} = ReactBootstrap; + +export default class NavBar extends React.Component { + render() { + return ( + + - - -

































































































{% endblock %} diff --git a/templates/about/me.html b/templates/about/me.html index eebf223..9577aa0 100644 --- a/templates/about/me.html +++ b/templates/about/me.html @@ -23,5 +23,6 @@ + {% endblock %}