Skip to content

Commit

Permalink
Updated navbar and redirect main page to map
Browse files Browse the repository at this point in the history
  • Loading branch information
JusticeV452 committed Apr 18, 2024
1 parent e54fcc4 commit ab371a6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
4 changes: 2 additions & 2 deletions backend/app/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
'component_name': 'ExampleId'
}
"""
from django.shortcuts import render
from django.shortcuts import render, redirect


def index(request):
Expand All @@ -38,7 +38,7 @@ def index(request):
'component_name': 'Home'
}

return render(request, 'index.html', context)
return redirect("/competitiveness")


def competitiveness(request):
Expand Down
19 changes: 17 additions & 2 deletions frontend/components/global/Nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,30 @@ import DH_LOGO from "../../images/dh_logo.svg";

const Nav = () => {
return (
<nav className="navbar navbar-light bg-light navbar-expand-sm">
<nav className="navbar navbar-light bg-light">
<a className="navbar-brand link-home" href="/">
Data Driven Democracy app
Data Driven Democracy
</a>
<ul className="navbar-nav mr-auto">
<li className="nav-item">
<a href="/competitiveness/">Competitiveness Map</a>
</li>
</ul>
<ul className="navbar-nav mr-auto">
<li className="nav-item">
<a href="/campaign-finance/top-10-donors-piechart/">Donors Pie Chart</a>
</li>
</ul>
<ul className="navbar-nav mr-auto">
<li className="nav-item">
<a href="/campaign-finance/top-10-donors-barchart/">Donors Bar Chart</a>
</li>
</ul>
<ul className="navbar-nav mr-auto">
<li className="nav-item">
<a href="/campaign-finance/donor-party-sankey/">Donor Party Sankey</a>
</li>
</ul>
<a
className="lab-link"
href="https://digitalhumanities.mit.edu/"
Expand Down
2 changes: 1 addition & 1 deletion frontend/scss/index.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import "~normalize.css";
@import "~bootstrap/scss/bootstrap";
@import "./global.scss";
@import "./nav.scss";
@import "./competitivenessMap.scss";
@import "~bootstrap/scss/bootstrap";

0 comments on commit ab371a6

Please sign in to comment.