Skip to content

Commit

Permalink
Merge pull request #698 from jessmc/engage-jessica
Browse files Browse the repository at this point in the history
Merged #698
  • Loading branch information
hdoupe committed Oct 27, 2017
2 parents f566282 + 72ce0fc commit e50e319
Show file tree
Hide file tree
Showing 11 changed files with 267 additions and 26 deletions.
1 change: 1 addition & 0 deletions flatblocks_heroku.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
49 changes: 48 additions & 1 deletion static/css/site.css

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions static/less/structure/navbar.less
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,48 @@
}
}
}
.nav-dropdown {
position: relative;
display: inline-block;
&:hover ul {
display: block;
}
@media (max-width: @screen-sm) {
display: block;
}

ul {
display: none;
position: absolute;
z-index: 1;
padding-left: 10px;
background-color: white;
border: 2px solid #eff4f4;
@media (max-width: @screen-sm) {
position: relative;
width: 60%;
margin: 0 auto;
padding: 0px;
}
@media (max-width: @screen-xs) {
width: 90%;
}

li {
margin: 0px;
text-align: left;
width: 250px;
@media (max-width: @screen-sm) {
text-align: center;
width: auto;
}
a {
border-bottom: 0px;
}
}
}

}
}
.navbar-toggle {
margin-top: 0;
Expand Down
49 changes: 48 additions & 1 deletion staticfiles/css/site.css

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions staticfiles/import_export/action_formats.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
(function($) {
$(document).on('ready', function() {
$('select[name="action"]', '#changelist-form').on('change', function() {
if ($(this).val() == 'export_admin_action') {
$('select[name="file_format"]', '#changelist-form').parent().show();
} else {
$('select[name="file_format"]', '#changelist-form').parent().hide();
}
});
$('select[name="action"]', '#changelist-form').change();
});
})(django.jQuery);
42 changes: 42 additions & 0 deletions staticfiles/less/structure/navbar.less
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,48 @@
}
}
}
.nav-dropdown {
position: relative;
display: inline-block;
&:hover ul {
display: block;
}
@media (max-width: @screen-sm) {
display: block;
}

ul {
display: none;
position: absolute;
z-index: 1;
padding-left: 10px;
background-color: white;
border: 2px solid #eff4f4;
@media (max-width: @screen-sm) {
position: relative;
width: 60%;
margin: 0 auto;
padding: 0px;
}
@media (max-width: @screen-xs) {
width: 90%;
}

li {
margin: 0px;
text-align: left;
width: 250px;
@media (max-width: @screen-sm) {
text-align: center;
width: auto;
}
a {
border-bottom: 0px;
}
}
}

}
}
.navbar-toggle {
margin-top: 0;
Expand Down
3 changes: 3 additions & 0 deletions templates/pages/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ <h1 class="text-center">What is the Open Source Policy Center?</h1>
<div class="about-mission">
<h2>Our Mission</h2>
<p class="bump">The Open Source Policy Center is making policy analysis more transparent, trustworthy, and collaborative by supporting open-source projects that build cutting-edge economic models.</p>
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" width="420" height="315" src="https://www.youtube.com/embed/jN1Qog11sRo" frameborder="0" allowfullscreen></iframe>
</div>
</div>
<div class="about-break"></div>
<div class="about-history">
Expand Down
36 changes: 36 additions & 0 deletions templates/pages/gettingstarted.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{% extends 'pages/home.html' %}

{% load staticfiles %}

{% load flatblocks %}

{% block content %}
<div class="text-center">
<h1 class="docs-header">Getting Started</h1>
</div>
<br /><br />
<div class="row">
<div class="col-xs-3">
<div class="inputs-sidebar docs-links">
<ul class="nav sidebar-nav">
<li><a href="#TaxBrain">TaxBrain</a></li>
<li><a href="#Disclaimer">Disclaimer</a></li>
</ul>
</div> <!-- sidebar -->
</div>
<div class="col-xs-9">
<div id="TaxBrain" class="docs-section">
<h1>TaxBrain</h1>
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" width="420" height="315" src="https://www.youtube.com/embed/b6udoQb3aNo" frameborder="0" allowfullscreen></iframe>
</div>

</div>
<div id="Disclaimer" class="docs-section">
<h1>Disclaimer</h1>
<p>Proper use of ospc.org tools and description of that use is ultimately your responsibility. If you plan on publishing your results, it is recommended that you confirm with the community that you are using the tools properly and interpreting the results correctly before you publish them.</p>
<p>Results will change as the underlying models improve. A fundamental reason for adopting open source methods in this project is to let people from all backgrounds contribute to the models that our society uses to assess economic policy; when community-contributed improvements are incorporated, the models will produce different results.</p>
<p>Neither the Open Source Policy Center nor the American Enterprise Institute maintain institutional positions, and the results from models accessible via the ospc.org interfaces should not be attributed to OSPC or AEI.</p>
</div>

{% endblock %}
47 changes: 25 additions & 22 deletions templates/pages/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,34 +42,37 @@
</div>
<div class="collapse navbar-collapse" id="main-nav">
<ul class="nav navbar-nav navbar-right">
<li class="{% if section.active_nav == 'home' %}current{% endif %}">
<a href="/">Home</a>
</li>
<li class="{% if section.active_nav == 'apps' %}current{% endif %}">
<a href="/taxbrain">Apps</a>
<li class="nav-dropdown {% if section.active_nav == 'gallery' %}current{% endif %}">
<a href="#">PolicyBrain</a>
<ul>
<li>
<a href="/taxbrain/">TaxBrain</a>
</li>
<li>
<a href="/ccc/">Cost of Capital Calculator</a>
</li>
<li>
<a href="/gallery">Gallery</a>
</li>
</ul>
</li>
<li class="{% if section.active_nav == 'about' %}current{% endif %}">
<a href="/about">About</a>
<li class="nav-dropdown {% if section.active_nav == 'docs' %}current{% endif %}">
<a href="#">Documentation</a>
<ul>
<li>
<a href="/getting-started" target="_blank">Getting Started</a>
</li>
<li>
<a href="/docs" target="_blank">Modeling Docs</a>
</li>
</ul>
</li>
<li class="{% if section.active_nav == 'news' %}current{% endif %}">
<a href="//news.ospc.org">News</a>
</li>
<li class="{% if section.active_nav == 'gallery' %}current{% endif %}">
<a href="/gallery">Gallery</a>
<li class="{% if section.active_nav == 'about' %}current{% endif %}">
<a href="/about">About OSPC</a>
</li>
{% if user.is_authenticated %}
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
{{username}}
<span class="caret"></span>
</a>
<ul class="dropdown-menu">
<li><a href="/logout">Logout</a></li>
</ul>
</li>
{% else %}
<li><a href="/accounts/login">Login</a></li>
{% endif %}
</ul>
</div>
</div>
Expand Down
3 changes: 2 additions & 1 deletion webapp/apps/pages/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

from views import (homepage, aboutpage, newspage, gallerypage, hellopage,
embedpage, widgetpage, newsdetailpage,
apps_landing_page, border_adjustment_plot, docspage)
apps_landing_page, border_adjustment_plot, docspage, gettingstartedpage)

urlpatterns = patterns('',
url(r'^$', homepage, name='home'), # url(r'^apps/$', apps_landing_page, name='apps'),
url(r'^about/$', aboutpage, name='about'),
url(r'^getting-started/$', gettingstartedpage, name='gettingstartedpage'),
url(r'^hello/$', hellopage, name='hello'),
url(r'^gallery/$', gallerypage, name='gallery'),
url(r'^news/$', newspage, name='news'),
Expand Down
9 changes: 8 additions & 1 deletion webapp/apps/pages/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,14 @@ def docspage(request):
'title': 'Open Source Policy Center Documentation',
},
})


def gettingstartedpage(request):
return render(request, 'pages/gettingstarted.html', {
'section': {
'active_nav': 'getting-started',
'title': 'Getting Started',
},
})

def _discover_widgets():
'''stubbed out data I wish to recieve from some widget discovery mechanism'''
Expand Down

0 comments on commit e50e319

Please sign in to comment.