diff --git a/.gitignore b/.gitignore index 16028ddc..88e52e78 100644 --- a/.gitignore +++ b/.gitignore @@ -57,7 +57,6 @@ oldphantomjs/ # Custom # ########## *.py[co] -eregsip/ *.swp local_settings.py dev_local_settings.py @@ -82,7 +81,6 @@ regulations.egg-info build/ dist/ .snyk -eregsip/ # docs output docs/_build diff --git a/regulations/static/regulations/css/less/main.less b/regulations/static/regulations/css/less/main.less index 8ef05df7..547a9925 100644 --- a/regulations/static/regulations/css/less/main.less +++ b/regulations/static/regulations/css/less/main.less @@ -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; diff --git a/regulations/static/regulations/img/favicon.ico b/regulations/static/regulations/img/favicon.ico new file mode 100755 index 00000000..a8f6c2d8 Binary files /dev/null and b/regulations/static/regulations/img/favicon.ico differ diff --git a/regulations/static/regulations/img/kbg.png b/regulations/static/regulations/img/kbg.png new file mode 100644 index 00000000..ef64fe5f Binary files /dev/null and b/regulations/static/regulations/img/kbg.png differ diff --git a/regulations/static/regulations/img/logo.png b/regulations/static/regulations/img/logo.png new file mode 100644 index 00000000..8e12df07 Binary files /dev/null and b/regulations/static/regulations/img/logo.png differ diff --git a/regulations/static/regulations/js/landing.js b/regulations/static/regulations/js/landing.js new file mode 100644 index 00000000..4e37bf91 --- /dev/null +++ b/regulations/static/regulations/js/landing.js @@ -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( + '
  • ' + title + '
  • ' + ); + } + + notices.config.$container.after( + '

    ' + + 'More ' + notices.config.agencyAbbr + ' notices

    ' + ); + }, + + errorMessage: function() { + $('.recent-rules .sub-text').hide(); + notices.config.$container.append('
  • See all of ' + notices.config.agencyAbbr + '\'s recently issued rules at' + + ' '+ notices.config.agencyURL +'
  • ' + ); + } + +}; + +// 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); diff --git a/regulations/templates/regulations/base.html b/regulations/templates/regulations/base.html index fc937e65..69de8de7 100644 --- a/regulations/templates/regulations/base.html +++ b/regulations/templates/regulations/base.html @@ -15,7 +15,7 @@ {{meta.cfr_title_number}} CFR Part {{reg_part}} | eRegulations {% endblock %} - + {% block app_js %} +{% endblock %} + + {% block about-timeline %} +
    +
    +

    Regulation timeline

    + +
    + eRegulations timeline navigation screenshot +
    + +
    +

    The regulation timeline shows recent revisions of the regulation organized by latest effective date. + Revisions are available from the CFPB’s restatement of the regulations forward.

    + +
      +
    1. The date picker allows users to find what revision was effective on a specific date.
    2. +
    3. Federal Register notice(s) 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.
    4. +
    5. Compare any two revisions of the regulation, word for word, by selecting a date in the menu.
    6. +
    + + eRegulations revision comparison screenshot +
    +
    +
    + {% endblock %} + + {% block endscripts %} + + {% endblock %} diff --git a/regulations/templates/regulations/custom-sidebar.html b/regulations/templates/regulations/custom-sidebar.html new file mode 100644 index 00000000..e83c16f4 --- /dev/null +++ b/regulations/templates/regulations/custom-sidebar.html @@ -0,0 +1,11 @@ +{% extends "regulations/sidebar.html" %} +{% comment %} +Need some more changes to -site before custom rhs stuff can be used +
    +
    + We got the beats. +
    +
    +{% endcomment %} + +{% block additional-rhs %}{% endblock %} diff --git a/regulations/templates/regulations/footer.html b/regulations/templates/regulations/footer.html index 6af06d53..c9f392f2 100644 --- a/regulations/templates/regulations/footer.html +++ b/regulations/templates/regulations/footer.html @@ -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 %} + diff --git a/regulations/templates/regulations/full_footer.html b/regulations/templates/regulations/full_footer.html index 68bf9e5a..9adedb87 100644 --- a/regulations/templates/regulations/full_footer.html +++ b/regulations/templates/regulations/full_footer.html @@ -2,6 +2,33 @@ full_footer contains the larger footer used on the universal landing and about pages {% endcomment %} -