Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Commit

Permalink
Merge pull request #842 from cfpb/cfpb-content
Browse files Browse the repository at this point in the history
Bring in CFPB-specific eRegs assets
  • Loading branch information
chosak authored Dec 8, 2017
2 parents 8281ec8 + 0bbb83e commit 64ceeb4
Show file tree
Hide file tree
Showing 45 changed files with 1,043 additions and 14 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ oldphantomjs/
# Custom #
##########
*.py[co]
eregsip/
*.swp
local_settings.py
dev_local_settings.py
Expand All @@ -82,7 +81,6 @@ regulations.egg-info
build/
dist/
.snyk
eregsip/

# docs output
docs/_build
Expand Down
2 changes: 1 addition & 1 deletion regulations/static/regulations/css/less/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ img {
height: 400px;
position: fixed;
z-index: 9999;
background: #f1f2f2 url('../../eregsip/kbg.png');
background: #f1f2f2 url('../../regulations/img/kbg.png');
border: 4px solid @gray-80;
padding: 20px 40px;

Expand Down
Binary file added regulations/static/regulations/img/favicon.ico
Binary file not shown.
Binary file added regulations/static/regulations/img/kbg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added regulations/static/regulations/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
86 changes: 86 additions & 0 deletions regulations/static/regulations/js/landing.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
// Load recent notices from the Federal Register
var notices = {
init: function() {
notices.loading();
notices.call();
},

call: function() {
$.ajax({
type: 'GET',
url: notices.config.apiUrl,
data: {
'per_page': notices.config.totalNotices,
'order': notices.config.order,
'conditions[agencies]': notices.config.agency
},
contentType: 'application/json',
dataType: 'jsonp',
cache: 'true',
success: function(data) {
notices.stopLoading();
notices.successLoad(data);
},
error: function() {
notices.stopLoading();
notices.errorMessage();
}
});
},

loading: function(){
notices.config.$container.addClass('loading-spinner');
},

stopLoading: function(){
notices.config.$container.removeClass('loading-spinner');
},

successLoad: function(data) {
var results = data.results;
for(var i = 0; i < results.length; i++) {
var url = results[i].html_url,
title = results[i].title;
notices.config.$container.append(
'<li><a class="external" href="' + url + '" target="_blank">' + title + '</a></li>'
);
}

notices.config.$container.after(
'<p class="sub-text"><a class="go" href="'+ notices.config.agencyNoticeURL + '">' +
'<strong>More ' + notices.config.agencyAbbr + ' notices</strong></a></p>'
);
},

errorMessage: function() {
$('.recent-rules .sub-text').hide();
notices.config.$container.append('<li>See all of ' + notices.config.agencyAbbr + '\'s recently issued rules at' +
' <a class="external" href="' + notices.config.agencyNoticeUR + '">'+ notices.config.agencyURL +'</a></li>'
);
}

};

// Toggle the mobile navigation
var navToggle = {
init: function() {
$('.mobile-nav-trigger').on( 'click', function(e) {
e.preventDefault();
$('.app-nav-list, .mobile-nav-trigger').toggleClass('open');
});
}
};

notices.config = {
$container: $('.notices'),
apiUrl: 'https://www.federalregister.gov/api/v1/articles.json',
totalNotices: '10',
order: 'newest',
agency: 'consumer-financial-protection-bureau',
agencyAbbr: 'CFPB',
agencyNoticeURL: 'http://www.consumerfinance.gov/regulations/#finalrules',
agencyURL: 'consumerfinance.gov/regulations'
};

$(document).ready(navToggle.init);
$(document).ready(notices.init);
2 changes: 1 addition & 1 deletion regulations/templates/regulations/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{{meta.cfr_title_number}} CFR Part {{reg_part}} | eRegulations
{% endblock %}
</title>
<link rel="shortcut icon" type="image/x-icon" href="{%static "eregsip/favicon.ico" %}"/>
<link rel="shortcut icon" type="image/x-icon" href="{%static "regulations/img/favicon.ico" %}"/>
{% block app_js %}
<script>
window.APP_PREFIX = "{{ APP_PREFIX }}";
Expand Down
36 changes: 36 additions & 0 deletions regulations/templates/regulations/custom-about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{% extends "regulations/about.html" %}
{% load static from staticfiles %}

{% block headscripts %}
<script src="{%static "regulations/js/built/otherlibs/jquery.min.js" %}"></script>
{% endblock %}

{% block about-timeline %}
<section class="about-section group" id="timeline">
<div class="inner-wrap">
<h3>Regulation timeline</h3>

<div class="content-secondary column-l">
<img src="{%static "regulations/img/regtimeline-01.png" %}" class="s-bump" alt="eRegulations timeline navigation screenshot">
</div>

<div class="content-primary column-r">
<p class="about-timeline">The <strong>regulation timeline</strong> shows recent revisions of the regulation organized by latest effective date.
Revisions are available from the CFPB’s restatement of the regulations forward.</p>

<ol class="about-ol bump">
<li>The <strong>date picker</strong> allows users to find what revision was effective on a specific date.</li>
<li><strong>Federal Register notice(s)</strong> associated with a revision are presented and organized by publication date. These links will
take you to the notice on the Office of the Federal Register’s website.</li>
<li><strong>Compare</strong> any two revisions of the regulation, word for word, by selecting a date in the menu.</li>
</ol>

<img src="{%static "regulations/img/regtimeline-02.png" %}" alt="eRegulations revision comparison screenshot">
</div>
</div>
</section>
{% endblock %}

{% block endscripts %}
<script src="{%static "regulations/js/landing.js" %}"></script>
{% endblock %}
11 changes: 11 additions & 0 deletions regulations/templates/regulations/custom-sidebar.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% extends "regulations/sidebar.html" %}
{% comment %}
Need some more changes to -site before custom rhs stuff can be used
<section id="survey" class="regs-meta passive">
<div class="chunk">
We got the beats.
</div>
</section>
{% endcomment %}

{% block additional-rhs %}{% endblock %}
9 changes: 5 additions & 4 deletions regulations/templates/regulations/footer.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{% comment %}
Placeholder template for the footer. To add content to the footer, create a
templates dir in your django root, then create a footer.html file inside that.
{% endcomment %}
<footer id="primary-footer" class="application-footer">
<div class="title-logo">
{% include "regulations/logo.html" %}
</div><!--/.title-logo-->
</footer>
31 changes: 29 additions & 2 deletions regulations/templates/regulations/full_footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@
full_footer contains the larger footer used on the universal landing and about pages
{% endcomment %}

<footer>
Footer template
<footer class="landing-footer group">
<div class="inner-wrap">
<div class="logo-wrap">
{% include "regulations/logo.html" %}
</div><!-- /.logo -->
<div class="footer-links">
<ul class="primary-footer-list">
<li><a href="http://www.consumerfinance.gov/" class="standard">consumerfinance.gov</a></li>
<li><a href="http://www.consumerfinance.gov/contact-us/" class="standard">Contact us</a></li>
<li><a href="http://www.consumerfinance.gov/newsroom/" class="standard">Newsroom</a></li>
<li><a href="http://www.consumerfinance.gov/jobs/" class="standard">Jobs</a></li>
<li><a href="http://www.consumerfinance.gov/open/" class="standard">Open Government</a></li>
</ul>

<ul class="secondary-footer-list">
<li><a href="http://www.consumerfinance.gov/privacy-policy/" class="standard">Privacy policy and legal notices</a></li>
<li><a href="http://www.consumerfinance.gov/accessibility/" class="standard">Accessibility</a></li>
<li><a href="http://www.consumerfinance.gov/plain-writing/" class="standard">Plain writing</a></li>
<li><a href="http://www.consumerfinance.gov/no-fear-act/" class="standard">No FEAR Act</a></li>
</ul>

<ul class="secondary-footer-list">
<li><a href="http://www.consumerfinance.gov/foia/" class="standard">FOIA</a></li>
<li><a href="http://usa.gov/" class="standard">USA.gov</a></li>
<li><a href="http://www.federalreserve.gov/oig/default.htm" class="standard">Office of Inspector General</a></li>
<li><a href="http://www.consumerfinance.gov/ombudsman/" class="standard">Ombudsman</a></li>
</ul>
</div> <!-- /.footer-links -->
</div> <!-- /.inner-content -->
</footer>
2 changes: 1 addition & 1 deletion regulations/templates/regulations/generic_404.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<div class="main-head">
{% load static from staticfiles %}
<img src="{%static "eregsip/logo.png" %}" class="logo" alt="Consumer Financial Protection Bureau" width="151px">
<img src="{%static "regulations/img/logo.png" %}" class="logo" alt="Consumer Financial Protection Bureau" width="151px">
</div>

<div class="sub-head">
Expand Down
50 changes: 50 additions & 0 deletions regulations/templates/regulations/landing_base.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{% extends "regulations/generic_landing.html" %}

{% block reg_title %}
<h2 class="banner-text"> Regulation {{meta.reg_letter}} - {{meta.statutory_name|title}} </h2>
{% endblock %}

{% block reg_main_content %}
{% endblock %}

{% block reg_addtl_content %}

<div>
<p class="landing-curent-link"><a href="{% url 'chrome_section_view' reg_first_section current_version.version %}" class="go">View the currently effective Regulation {{meta.reg_letter}}</a></p>
</div>

<div class="well landing-contact-info contact">
<h4 class="sentence-header">We want to hear from you!</h4>
<p>Please take our <a class="external" href="https://www.surveymonkey.com/s/CFPB_eRegulations_survey" target="_blank">survey</a> to help the Bureau decide whether to expand and maintain eRegulations.</p>
<p>For questions or comments about the platform:</p>
<ul>
<li><address><a href="mailto:[email protected]" class="mail">[email protected]</a></address></li>
</ul>
</div>

<div class="contact">
<h4>Regulation inquiries</h4>
<p>Before submitting a question about a Bureau regulation, please review the implementation and guidance materials available on our <a class="standard" href="https://www.consumerfinance.gov/policy-compliance/guidance/implementation-guidance/">website</a>, as well as the regulations and official commentary.</p>
<ul>
<li><a class="standard" href="https://reginquiries.consumerfinance.gov/">Submit a question</a></li>
</ul>
</div>
{% endblock %}

{% block legal_disclaimer %}

<div class="disclaimer">
<h4 tabindex="0" class="important">Trust, but verify</h4>

<p>The CFPB’s eRegulations tool is an editorial compilation of material and not an official legal edition of the Code of Federal Regulations or the Federal Register. We have made every effort to ensure the material presented in this tool is accurate, but if you are relying on it for legal research you should consult the official editions of those sources to confirm your findings. Nothing in this tool binds the Bureau or creates any rights, benefits, or defenses, substantive or procedural, that are enforceable by any party in any manner.</p>
</div> <!-- /.disclaimer -->
{% endblock %}

{% block reg_sidebar %}
<div class="content-wrap">
<h3>Additional Resources</h3>

{% block additional_resources %}
{% endblock %}
</div> <!-- /sidebar-wrap -->
{% endblock %}
15 changes: 15 additions & 0 deletions regulations/templates/regulations/landing_internal_disclaimer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{% extends "regulations/landing_base.html" %}

{% block reg_main_content %}
<h3>Warning</h3>
<p>This content has only been vetted by a single developer. While it is
usable, it may contain errors.</p>

{% block known_issues %}
<h4>Known Issues</h4>
<ul>
<li>Indentation in appendix C may not be correct</li>
</ul>
{% endblock %}
{% endblock %}

5 changes: 4 additions & 1 deletion regulations/templates/regulations/logo.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@
Logo image/text. Expected to be overwritten.
{% endcomment %}

<a href="#">organization logo</a>
{% load static from staticfiles %}
<a href="http://consumerfinance.gov">
<img src="{%static "regulations/img/logo.png" %}" class="logo" alt="Consumer Financial Protection Bureau" width="151">
</a>
3 changes: 2 additions & 1 deletion regulations/templates/regulations/org-title.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
Organization title/text. Expected to be overwritten.
{% endcomment %}

<a href="#">organization title</a>
{% load static from staticfiles %}
<a href="http://consumerfinance.gov">consumerfinance.gov</a>
59 changes: 59 additions & 0 deletions regulations/templates/regulations/specific/landing_1002.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{% extends "regulations/landing_base.html" %}


{% block reg_title %}
<h2 class="banner-text">Regulation B protects applicants from discrimination in any aspect of a credit transaction.</h2>
{% endblock %}

{% block reg_main_content %}
<div class="group">
<div class="reg-tags">
<h3 class="list-header">Credit transactions and aspects of credit transactions include: </h3>
<ul class="tag-list">
<li>Consumer credit</li>
<li>Business credit</li>
<li>Mortgage loans</li>
<li>Refinancing</li>
<li>Open-end credit</li>
<li>Credit applications</li>
<li>Standards of creditworthiness</li>
<li>Adverse action</li>
</ul>
</div>

<div class="reg-tags">
<h3 class="list-header">The regulation covers topics such as: </h3>
<ul class="tag-list">
<li>Discrimination</li>
<li>Discouragement</li>
<li>Notification of action taken</li>
<li>Requests for information</li>
<li>Evaluation of applications</li>
<li>Signature requirements</li>
<li>Monitoring information</li>
<li>Appraisal and other written valuations</li>
</ul>
</div>
</div>
{% endblock %}



{% block additional_resources %}
<h4>Ask CFPB </h4>
<ul>
<li><a href="http://www.consumerfinance.gov/askcfpb/search/?q=discrimination&selected_facets=tag_exact%3Acredit+discrimination" class="external" target="_blank">Credit discrimination</a></li>
</ul>

<h4>Other resources</h4>

<ul>
<li><a href="http://www.consumerfinance.gov/regulations/disclosure-and-delivery-requirements-for-copies-of-appraisals-and-other-written-valuations-under-the-equal-credit-opportunity-act-regulation-b/" class="external" target="_blank">Information about the appraisals and valuations rule</a></li>
<li><a href="http://files.consumerfinance.gov/f/201411_cfpb_bulletin_disability-income.pdf" class="external" target="_blank">Bulletin on social security disability income verification</a></li>
<li><a href="http://files.consumerfinance.gov/f/201303_cfpb_march_-Auto-Finance-Bulletin.pdf" class="external" target="_blank">Bulletin about indirect auto lending and compliance with the Equal Credit Opportunity Act</a></li>
<li><a href="http://files.consumerfinance.gov/f/201505_cfpb_bulletin-section-8-housing-choice-voucher-homeownership-program.pdf" class="external" target="_blank">Bulletin about Section 8 Housing Choice Voucher homeownership program</a></li>
<li><a href="http://files.consumerfinance.gov/f/201404_cfpb_bulletin_lending_discrimination.pdf" class="external" target="_blank">Bulletin regarding lending discrimination</a></li>
<li><a href="http://files.consumerfinance.gov/f/201307_cfpb_ecoa_baseline-review-module-fair-lending.pdf" class="external" target="_blank">ECOA baseline review modules</a></li>
<li><a href="http://files.consumerfinance.gov/f/201306_cfpb_laws-and-regulations_ecoa-combined-june-2013.pdf" class="external" target="_blank">ECOA examination procedures</a></li>
</ul>
{% endblock %}
Loading

0 comments on commit 64ceeb4

Please sign in to comment.