-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #478 from 18F/feature/latest_updates
Latest Updates landing page
- Loading branch information
Showing
23 changed files
with
541 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
'use strict'; | ||
|
||
/* FormNav | ||
* Submits the form on select change and clears out unnecessary params | ||
*/ | ||
|
||
function FormNav(form) { | ||
this.form = form; | ||
this.form.addEventListener('change', this.handleChange.bind(this)); | ||
} | ||
|
||
FormNav.prototype.handleChange = function() { | ||
var allSelects = this.form.querySelectorAll('select,input'); | ||
// Remove names from all selects with no values | ||
for(var i = 0; i < allSelects.length; i++) { | ||
var select = allSelects[i]; | ||
if(select.getAttribute('name') && !select.value) { | ||
select.setAttribute('name', ''); | ||
} | ||
} | ||
|
||
this.form.submit(); | ||
}; | ||
|
||
module.exports = {FormNav: FormNav}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<header class="page-header page-header--{{ style }}"> | ||
<ul class="breadcrumbs"> | ||
<li class="breadcrumbs__item"><a href="/" class="breadcrumbs__link" rel="Home">Home</a></li> | ||
{% for link in links %} | ||
<li class="breadcrumbs__item breadcrumbs__item--current"> | ||
<span class="breadcrumbs__separator">›</span> | ||
<span>Latest updates</span> | ||
</li> | ||
{% endfor %} | ||
<li class="breadcrumbs__item breadcrumbs__item--current"> | ||
<span class="breadcrumbs__separator">›</span> | ||
<span>{{ page.title }}</span> | ||
</li> | ||
</ul> | ||
</header> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<div class="slab slab--neutral footer-disclaimer"> | ||
<div class="container"> | ||
<p class="usa-width-one-half">This site is in beta, which means we're testing content that better adheres to legal plain language requirements. This content is not finalized, is not legal advice and is subject to change.</p> | ||
<p class="usa-width-one-half">Everything on this site should be read in conjunction with FEC.gov. Please let us know what you think of our new content; use the feedback tool on this page.</p> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{% load wagtailimages_tags %} | ||
|
||
<article class="post"> | ||
<div class="post__pre"> | ||
<span class="u-float-left">{{ update.date|date:'F j, Y' }}</span> | ||
<span class="u-float-right">From: {% if update.get_update_type == 'FEC Record' %}Information Division{% else %}Press Office{% endif %}</span> | ||
</div> | ||
<h3><a href="{{ update.url }}">{{ update.title }}</a></h3> | ||
{% if update.get_update_type != 'Weekly Digest' %} | ||
{{ update.body | truncatewords_html:30 }} | ||
{% endif %} | ||
<div class="post__meta"> | ||
<a class="tag tag--secondary" href="/updates?update_type={{update.get_update_type|slugify}}">{{update.get_update_type}}</a> | ||
{% if update.category %} | ||
in: <a href="/updates?update_type={{update.get_update_type|slugify}}&category={{update.category|slugify}}">{{ update.category }}</a> | ||
{% endif %} | ||
</div> | ||
</article> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.9.9 on 2016-09-07 21:52 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
import wagtail.contrib.table_block.blocks | ||
import wagtail.wagtailcore.blocks | ||
import wagtail.wagtailcore.fields | ||
import wagtail.wagtailimages.blocks | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('wagtailcore', '0028_merge'), | ||
('home', '0018_record_digest_press_release'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='PressLandingPage', | ||
fields=[ | ||
('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.Page')), | ||
('hero', wagtail.wagtailcore.fields.StreamField((('heading', wagtail.wagtailcore.blocks.CharBlock(classname='full title')), ('paragraph', wagtail.wagtailcore.blocks.RichTextBlock()), ('html', wagtail.wagtailcore.blocks.RawHTMLBlock()), ('image', wagtail.wagtailimages.blocks.ImageChooserBlock()), ('table', wagtail.contrib.table_block.blocks.TableBlock())), blank=True, null=True)), | ||
('option_blocks', wagtail.wagtailcore.fields.StreamField((('option_blocks', wagtail.wagtailcore.blocks.StructBlock((('title', wagtail.wagtailcore.blocks.CharBlock(required=True)), ('intro', wagtail.wagtailcore.blocks.RichTextBlock(blank=False, null=False, required=False)), ('button_text', wagtail.wagtailcore.blocks.CharBlock(blank=False, null=False, required=True)), ('related_page', wagtail.wagtailcore.blocks.PageChooserBlock())))),))), | ||
('feed_intro', wagtail.wagtailcore.fields.StreamField((('heading', wagtail.wagtailcore.blocks.CharBlock(classname='full title')), ('paragraph', wagtail.wagtailcore.blocks.RichTextBlock()), ('html', wagtail.wagtailcore.blocks.RawHTMLBlock()), ('image', wagtail.wagtailimages.blocks.ImageChooserBlock()), ('table', wagtail.contrib.table_block.blocks.TableBlock())), blank=True, null=True)), | ||
('contact_intro', wagtail.wagtailcore.fields.StreamField((('heading', wagtail.wagtailcore.blocks.CharBlock(classname='full title')), ('paragraph', wagtail.wagtailcore.blocks.RichTextBlock()), ('html', wagtail.wagtailcore.blocks.RawHTMLBlock()), ('image', wagtail.wagtailimages.blocks.ImageChooserBlock()), ('table', wagtail.contrib.table_block.blocks.TableBlock())), blank=True, null=True)), | ||
], | ||
options={ | ||
'abstract': False, | ||
}, | ||
bases=('wagtailcore.page',), | ||
), | ||
migrations.AlterField( | ||
model_name='digestpage', | ||
name='body', | ||
field=wagtail.wagtailcore.fields.StreamField((('heading', wagtail.wagtailcore.blocks.CharBlock(classname='full title')), ('paragraph', wagtail.wagtailcore.blocks.RichTextBlock()), ('html', wagtail.wagtailcore.blocks.RawHTMLBlock()), ('image', wagtail.wagtailimages.blocks.ImageChooserBlock()), ('table', wagtail.contrib.table_block.blocks.TableBlock())), blank=True, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name='digestpageauthors', | ||
name='role', | ||
field=models.CharField(choices=[('author', 'Author'), ('writer', 'Written by'), ('graphics', 'Graphics by'), ('contact', 'Contact')], default='author', max_length=255), | ||
), | ||
migrations.AlterField( | ||
model_name='pressreleasepage', | ||
name='body', | ||
field=wagtail.wagtailcore.fields.StreamField((('heading', wagtail.wagtailcore.blocks.CharBlock(classname='full title')), ('paragraph', wagtail.wagtailcore.blocks.RichTextBlock()), ('html', wagtail.wagtailcore.blocks.RawHTMLBlock()), ('image', wagtail.wagtailimages.blocks.ImageChooserBlock()), ('table', wagtail.contrib.table_block.blocks.TableBlock())), blank=True, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name='pressreleasepage', | ||
name='category', | ||
field=models.CharField(choices=[('audit reports', 'Audit reports'), ('campaign finance data summaries', 'Campaign finance data summaries'), ('commission appointments', 'Commission appointments'), ('disclosure initiatives', 'Disclosure initiatives'), ('enforcement matters', 'Enforcement matters'), ('hearings', 'Hearings'), ('litigation', 'Litigation'), ('non-filer publications', 'Non-filer publications'), ('open meetings and related matters', 'Open meetings and related matters'), ('presidential public funds', 'Presidential public funds'), ('rulemakings', 'Rulemakings'), ('other agency actions', 'Other agency actions')], max_length=255), | ||
), | ||
migrations.AlterField( | ||
model_name='pressreleasepageauthors', | ||
name='role', | ||
field=models.CharField(choices=[('author', 'Author'), ('writer', 'Written by'), ('graphics', 'Graphics by'), ('contact', 'Contact')], default='author', max_length=255), | ||
), | ||
migrations.AlterField( | ||
model_name='recordpage', | ||
name='body', | ||
field=wagtail.wagtailcore.fields.StreamField((('heading', wagtail.wagtailcore.blocks.CharBlock(classname='full title')), ('paragraph', wagtail.wagtailcore.blocks.RichTextBlock()), ('html', wagtail.wagtailcore.blocks.RawHTMLBlock()), ('image', wagtail.wagtailimages.blocks.ImageChooserBlock()), ('table', wagtail.contrib.table_block.blocks.TableBlock())), blank=True, null=True), | ||
), | ||
migrations.AlterField( | ||
model_name='recordpage', | ||
name='category', | ||
field=models.CharField(choices=[('advisory opinions', 'Advisory opinions'), ('commission', 'Commission'), ('compliance', 'Compliance'), ('litigation', 'Litigation'), ('outreach', 'Outreach'), ('public funding', 'Public funding'), ('regulations', 'Regulations'), ('reporting', 'Reporting'), ('statistics', 'Statistics')], max_length=255), | ||
), | ||
migrations.AlterField( | ||
model_name='recordpage', | ||
name='related_section_title', | ||
field=models.CharField(blank=True, default='Explore campaign finance data', max_length=255), | ||
), | ||
migrations.AlterField( | ||
model_name='recordpage', | ||
name='related_section_url', | ||
field=models.CharField(blank=True, default='/data/', max_length=255), | ||
), | ||
migrations.AlterField( | ||
model_name='recordpageauthors', | ||
name='role', | ||
field=models.CharField(choices=[('author', 'Author'), ('writer', 'Written by'), ('graphics', 'Graphics by'), ('contact', 'Contact')], default='author', max_length=255), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# -*- coding: utf-8 -*- | ||
# Generated by Django 1.9.9 on 2016-09-09 23:23 | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('home', '0019_auto_20160907_2152'), | ||
('home', '0020_auto_20160909_0139'), | ||
] | ||
|
||
operations = [ | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.