s, they shouldn't have bottom margin.
43 | // Only targetting the last-child in case there's a situation with multiple
44 | // in which case every one but the last should have margin-bottom.
45 | li p:last-child {
46 | margin-bottom: 0;
47 | }
48 |
49 | p + ul,
50 | p + ol {
51 | margin-top: u(-2rem);
52 | }
53 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/helpers/_linear-side-corner-parser.scss:
--------------------------------------------------------------------------------
1 | // Private function for linear-gradient-parser
2 | @function _linear-side-corner-parser($image, $first-val, $prefix, $suffix, $has-multiple-vals) {
3 | $val-1: str-slice($first-val, 0, $has-multiple-vals - 1 );
4 | $val-2: str-slice($first-val, $has-multiple-vals + 1, str-length($first-val));
5 | $val-3: null;
6 | $has-val-3: str-index($val-2, " ");
7 |
8 | @if $has-val-3 {
9 | $val-3: str-slice($val-2, $has-val-3 + 1, str-length($val-2));
10 | $val-2: str-slice($val-2, 0, $has-val-3 - 1);
11 | }
12 |
13 | $pos: _position-flipper($val-1) _position-flipper($val-2) _position-flipper($val-3);
14 | $pos: unquote($pos + "");
15 |
16 | // Use old spec for webkit
17 | @if $val-1 == "to" {
18 | @return (
19 | webkit-image: -webkit- + $prefix + $pos + $suffix,
20 | spec-image: $image
21 | );
22 | }
23 |
24 | // Bring the code up to spec
25 | @else {
26 | @return (
27 | webkit-image: -webkit- + $image,
28 | spec-image: $prefix + "to " + $pos + $suffix
29 | );
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/fec_eregs/templates/regulations/regulation-content.html:
--------------------------------------------------------------------------------
1 |
2 | {% if tree.children %}
3 | {% for c in tree.children %}
4 | {%include "regulations/subpart.html" %}
5 | {%include "regulations/appendix.html" %}
6 | {%include "regulations/interpretations.html" %}
7 | {%include "regulations/navigation.html"%}
8 | {% endfor %}
9 | {% endif %}
15 |
16 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/neat/grid/_outer-container.scss:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | /// Makes an element a outer container by centring it in the viewport, clearing its floats, and setting its `max-width`.
4 | /// Although optional, using `outer-container` is recommended. The mixin can be called on more than one element per page, as long as they are not nested.
5 | ///
6 | /// @param {Number [unit]} $local-max-width [$max-width]
7 | /// Max width to be applied to the element. Can be a percentage or a measure.
8 | ///
9 | /// @example scss - Usage
10 | /// .element {
11 | /// @include outer-container(100%);
12 | /// }
13 | ///
14 | /// @example css - CSS Output
15 | /// .element {
16 | /// *zoom: 1;
17 | /// max-width: 100%;
18 | /// margin-left: auto;
19 | /// margin-right: auto;
20 | /// }
21 | ///
22 | /// .element:before, .element:after {
23 | /// content: " ";
24 | /// display: table;
25 | /// }
26 | ///
27 | /// .element:after {
28 | /// clear: both;
29 | /// }
30 |
31 | @mixin outer-container($local-max-width: $max-width) {
32 | @include clearfix;
33 | max-width: $local-max-width;
34 | margin: {
35 | left: auto;
36 | right: auto;
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Byte-compiled / optimized / DLL files
2 | __pycache__/
3 | *.py[cod]
4 |
5 | # C extensions
6 | *.so
7 |
8 | # Distribution / packaging
9 | .Python
10 | env/
11 | build/
12 | develop-eggs/
13 | dist/
14 | downloads/
15 | eggs/
16 | .eggs/
17 | lib/
18 | lib64/
19 | parts/
20 | sdist/
21 | var/
22 | *.egg-info/
23 | .installed.cfg
24 | *.egg
25 |
26 | # PyInstaller
27 | # Usually these files are written by a python script from a template
28 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
29 | *.manifest
30 | *.spec
31 |
32 | # Installer logs
33 | pip-log.txt
34 | pip-delete-this-directory.txt
35 |
36 | # Unit test / coverage reports
37 | htmlcov/
38 | .tox/
39 | .coverage
40 | .coverage.*
41 | .cache
42 | nosetests.xml
43 | coverage.xml
44 | *,cover
45 |
46 | # Translations
47 | *.mo
48 | *.pot
49 |
50 | # Django stuff:
51 | *.log
52 |
53 | # Sphinx documentation
54 | docs/_build/
55 |
56 | # PyBuilder
57 | target/
58 |
59 | # App
60 | eregs.db
61 | local_settings.py
62 |
63 | # Local frontend build
64 | frontend_build/
65 | compiled/
66 | node_modules/
67 | */static/**/*.css
68 | fec_eregs/static/fec_eregs/js/*.bundle.js
69 | fec_eregs/static/fec_eregs/fonts/
70 | .eregs_index
71 | .DS_Store
72 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/helpers/_font-source-declaration.scss:
--------------------------------------------------------------------------------
1 | // Used for creating the source string for fonts using @font-face
2 | // Reference: http://goo.gl/Ru1bKP
3 |
4 | @function font-url-prefixer($asset-pipeline) {
5 | @if $asset-pipeline == true {
6 | @return font-url;
7 | } @else {
8 | @return url;
9 | }
10 | }
11 |
12 | @function font-source-declaration(
13 | $font-family,
14 | $file-path,
15 | $asset-pipeline,
16 | $file-formats,
17 | $font-url) {
18 |
19 | $src: ();
20 |
21 | $formats-map: (
22 | eot: "#{$file-path}.eot?#iefix" format("embedded-opentype"),
23 | woff2: "#{$file-path}.woff2" format("woff2"),
24 | woff: "#{$file-path}.woff" format("woff"),
25 | ttf: "#{$file-path}.ttf" format("truetype"),
26 | svg: "#{$file-path}.svg##{$font-family}" format("svg")
27 | );
28 |
29 | @each $key, $values in $formats-map {
30 | @if contains($file-formats, $key) {
31 | $file-path: nth($values, 1);
32 | $font-format: nth($values, 2);
33 |
34 | @if $asset-pipeline == true {
35 | $src: append($src, font-url($file-path) $font-format, comma);
36 | } @else {
37 | $src: append($src, url($file-path) $font-format, comma);
38 | }
39 | }
40 | }
41 |
42 | @return $src;
43 | }
44 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/neat/grid/_visual-grid.scss:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | @mixin grid-column-gradient($values...) {
4 | background-image: -webkit-linear-gradient(left, $values);
5 | background-image: -moz-linear-gradient(left, $values);
6 | background-image: -ms-linear-gradient(left, $values);
7 | background-image: -o-linear-gradient(left, $values);
8 | background-image: unquote("linear-gradient(to left, #{$values})");
9 | }
10 |
11 | @if $visual-grid == true or $visual-grid == yes {
12 | body:before {
13 | @include grid-column-gradient(gradient-stops($grid-columns));
14 | content: "";
15 | display: inline-block;
16 | height: 100%;
17 | left: 0;
18 | margin: 0 auto;
19 | max-width: $max-width;
20 | opacity: $visual-grid-opacity;
21 | pointer-events: none;
22 | position: fixed;
23 | right: 0;
24 | width: 100%;
25 |
26 | @if $visual-grid-index == back {
27 | z-index: -1;
28 | }
29 |
30 | @else if $visual-grid-index == front {
31 | z-index: 9999;
32 | }
33 |
34 | @each $breakpoint in $visual-grid-breakpoints {
35 | @if $breakpoint {
36 | @include media($breakpoint) {
37 | @include grid-column-gradient(gradient-stops($grid-columns));
38 | }
39 | }
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/helpers/_linear-gradient-parser.scss:
--------------------------------------------------------------------------------
1 | @function _linear-gradient-parser($image) {
2 | $image: unquote($image);
3 | $gradients: ();
4 | $start: str-index($image, "(");
5 | $end: str-index($image, ",");
6 | $first-val: str-slice($image, $start + 1, $end - 1);
7 |
8 | $prefix: str-slice($image, 0, $start);
9 | $suffix: str-slice($image, $end, str-length($image));
10 |
11 | $has-multiple-vals: str-index($first-val, " ");
12 | $has-single-position: unquote(_position-flipper($first-val) + "");
13 | $has-angle: is-number(str-slice($first-val, 0, 0));
14 |
15 | @if $has-multiple-vals {
16 | $gradients: _linear-side-corner-parser($image, $first-val, $prefix, $suffix, $has-multiple-vals);
17 | }
18 |
19 | @else if $has-single-position != "" {
20 | $pos: unquote($has-single-position + "");
21 |
22 | $gradients: (
23 | webkit-image: -webkit- + $image,
24 | spec-image: $prefix + "to " + $pos + $suffix
25 | );
26 | }
27 |
28 | @else if $has-angle {
29 | // Rotate degree for webkit
30 | $gradients: _linear-angle-parser($image, $first-val, $prefix, $suffix);
31 | }
32 |
33 | @else {
34 | $gradients: (
35 | webkit-image: -webkit- + $image,
36 | spec-image: $image
37 | );
38 | }
39 |
40 | @return $gradients;
41 | }
42 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/addons/_border-radius.scss:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | /// Provides a quick method for targeting `border-radius` on both corners on the side of a box.
4 | ///
5 | /// @param {Number} $radii
6 | /// List of arguments
7 | ///
8 | /// @example scss - Usage
9 | /// .element-one {
10 | /// @include border-top-radius(5px);
11 | /// }
12 | ///
13 | /// .element-two {
14 | /// @include border-left-radius(3px);
15 | /// }
16 | ///
17 | /// @example css - CSS Output
18 | /// .element-one {
19 | /// border-top-left-radius: 5px;
20 | /// border-top-right-radius: 5px;
21 | /// }
22 | ///
23 | /// .element-two {
24 | /// border-bottom-left-radius: 3px;
25 | /// border-top-left-radius: 3px;
26 | /// }
27 | ///
28 | /// @output `border-radius`
29 |
30 | @mixin border-top-radius($radii) {
31 | border-top-left-radius: $radii;
32 | border-top-right-radius: $radii;
33 | }
34 |
35 | @mixin border-right-radius($radii) {
36 | border-bottom-right-radius: $radii;
37 | border-top-right-radius: $radii;
38 | }
39 |
40 | @mixin border-bottom-radius($radii) {
41 | border-bottom-left-radius: $radii;
42 | border-bottom-right-radius: $radii;
43 | }
44 |
45 | @mixin border-left-radius($radii) {
46 | border-bottom-left-radius: $radii;
47 | border-top-left-radius: $radii;
48 | }
49 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/neat/grid/_private.scss:
--------------------------------------------------------------------------------
1 | $parent-columns: $grid-columns !default;
2 | $fg-column: $column;
3 | $fg-gutter: $gutter;
4 | $fg-max-columns: $grid-columns;
5 | $container-display-table: false !default;
6 | $layout-direction: LTR !default;
7 | @use 'sass:math';
8 |
9 | @function flex-grid($columns, $container-columns: $fg-max-columns) {
10 | $width: $columns * $fg-column + ($columns - 1) * $fg-gutter;
11 | $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter;
12 | @return percentage(math.div($width, $container-width));
13 | }
14 |
15 | @function flex-gutter($container-columns: $fg-max-columns, $gutter: $fg-gutter) {
16 | $container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter;
17 | @return percentage(math.div($gutter, $container-width));
18 | }
19 |
20 | @function grid-width($n) {
21 | @return $n * $gw-column + ($n - 1) * $gw-gutter;
22 | }
23 |
24 | @function get-parent-columns($columns) {
25 | @if $columns != $grid-columns {
26 | $parent-columns: $columns !global;
27 | } @else {
28 | $parent-columns: $grid-columns !global;
29 | }
30 |
31 | @return $parent-columns;
32 | }
33 |
34 | @function is-display-table($container-is-display-table, $display) {
35 | @return $container-is-display-table == true or $display == table;
36 | }
37 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/css3/_keyframes.scss:
--------------------------------------------------------------------------------
1 | // Adds keyframes blocks for supported prefixes, removing redundant prefixes in the block's content
2 | @mixin keyframes($name) {
3 | $original-prefix-for-webkit: $prefix-for-webkit;
4 | $original-prefix-for-mozilla: $prefix-for-mozilla;
5 | $original-prefix-for-microsoft: $prefix-for-microsoft;
6 | $original-prefix-for-opera: $prefix-for-opera;
7 | $original-prefix-for-spec: $prefix-for-spec;
8 |
9 | @if $original-prefix-for-webkit {
10 | @include disable-prefix-for-all();
11 | $prefix-for-webkit: true !global;
12 | @-webkit-keyframes #{$name} {
13 | @content;
14 | }
15 | }
16 |
17 | @if $original-prefix-for-mozilla {
18 | @include disable-prefix-for-all();
19 | $prefix-for-mozilla: true !global;
20 | @-moz-keyframes #{$name} {
21 | @content;
22 | }
23 | }
24 |
25 | $prefix-for-webkit: $original-prefix-for-webkit !global;
26 | $prefix-for-mozilla: $original-prefix-for-mozilla !global;
27 | $prefix-for-microsoft: $original-prefix-for-microsoft !global;
28 | $prefix-for-opera: $original-prefix-for-opera !global;
29 | $prefix-for-spec: $original-prefix-for-spec !global;
30 |
31 | @if $original-prefix-for-spec {
32 | @keyframes #{$name} {
33 | @content;
34 | }
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/fec_eregs/templates/regulations/chrome.html:
--------------------------------------------------------------------------------
1 | {% extends "regulations/chrome.html" %}
2 | {% load static %}
3 |
4 |
5 | {% comment %}
6 | Empty the sub-head, we use the breadcrumbs in main-header.html
7 | {% endcomment %}
8 | {% block sub-head-skip-nav %}{% endblock %}
9 | {% block sub-head-drawer-icons %}{% endblock %}
10 | {% block sub-head-content %}{% endblock %}
11 |
12 | {% block drawer-toc %}
13 |
21 |
22 | {{ block.super }}
23 | {% endblock %}
24 |
25 | {% block sidebar-toc-link %}
26 | {% endblock %}
27 |
28 | {% block sidebar-history-link %}
29 | {% endblock %}
30 |
31 | {% block sidebar-search-link %}
32 | {% endblock %}
33 |
34 | {% block drawer-search %}
35 | {% endblock %}
36 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/addons/_size.scss:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | /// Sets the `width` and `height` of the element.
4 | ///
5 | /// @param {List} $size
6 | /// A list of at most 2 size values.
7 | ///
8 | /// If there is only a single value in `$size` it is used for both width and height. All units are supported.
9 | ///
10 | /// @example scss - Usage
11 | /// .first-element {
12 | /// @include size(2em);
13 | /// }
14 | ///
15 | /// .second-element {
16 | /// @include size(auto 10em);
17 | /// }
18 | ///
19 | /// @example css - CSS Output
20 | /// .first-element {
21 | /// width: 2em;
22 | /// height: 2em;
23 | /// }
24 | ///
25 | /// .second-element {
26 | /// width: auto;
27 | /// height: 10em;
28 | /// }
29 | ///
30 | /// @todo Refactor in 5.0.0 to use a comma-separated argument
31 |
32 | @mixin size($value) {
33 | $width: nth($value, 1);
34 | $height: $width;
35 |
36 | @if length($value) > 1 {
37 | $height: nth($value, 2);
38 | }
39 |
40 | @if is-size($height) {
41 | height: $height;
42 | } @else {
43 | @warn "`#{$height}` is not a valid length for the `$height` parameter in the `size` mixin.";
44 | }
45 |
46 | @if is-size($width) {
47 | width: $width;
48 | } @else {
49 | @warn "`#{$width}` is not a valid length for the `$width` parameter in the `size` mixin.";
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/addons/_position.scss:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | /// Provides a quick method for setting an element’s position. Use a `null` value to “skip” a side.
4 | ///
5 | /// @param {Position} $position [relative]
6 | /// A CSS position value
7 | ///
8 | /// @param {Arglist} $coordinates [null null null null]
9 | /// List of values that correspond to the 4-value syntax for the edges of a box
10 | ///
11 | /// @example scss - Usage
12 | /// .element {
13 | /// @include position(absolute, 0 null null 10em);
14 | /// }
15 | ///
16 | /// @example css - CSS Output
17 | /// .element {
18 | /// left: 10em;
19 | /// position: absolute;
20 | /// top: 0;
21 | /// }
22 | ///
23 | /// @require {function} is-length
24 | /// @require {function} unpack
25 |
26 | @mixin position($position: relative, $coordinates: null null null null) {
27 | @if type-of($position) == list {
28 | $coordinates: $position;
29 | $position: relative;
30 | }
31 |
32 | $coordinates: unpack($coordinates);
33 |
34 | $offsets: (
35 | top: nth($coordinates, 1),
36 | right: nth($coordinates, 2),
37 | bottom: nth($coordinates, 3),
38 | left: nth($coordinates, 4)
39 | );
40 |
41 | position: $position;
42 |
43 | @each $offset, $value in $offsets {
44 | @if is-length($value) {
45 | #{$offset}: $value;
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ## Summary (required)
2 |
3 | - Resolves #issue_number
4 |
5 | (Include a summary of proposed changes and connect issue below)
6 |
7 | ### Required reviewers
8 |
9 | (Include who is required to review prior to merge. For example: One designer and two front end developer reviews are required prior to merge)
10 |
11 | ## Impacted areas of the application
12 |
13 | General components of the application that this PR will affect:
14 |
15 | -
16 |
17 | ## Screenshots
18 |
19 | (Include a screenshot of the new/updated features in context (“in the wild”). If it is an interface change, include both before and after screenshots)
20 |
21 | ## Related PRs
22 |
23 | Related PRs against other branches:
24 |
25 | branch | PR
26 | ------ | ------
27 | fix/other_pr | [link]()
28 | feature/other_pr | [link]()
29 |
30 | ## How to test
31 |
32 | (Include any information that may be helpful to the reviewer(s). This might include links to sample pages to test or any local environmental setup that is unusual such as environment variable (never credentials), API version to point to, etc)
33 |
34 | -
35 |
36 | ## System architecture updates (if applicable)
37 |
38 | (If this pull request changes our [current system diagram](https://github.com/fecgov/FEC/wiki/2.-FEC-system-diagram), include a description of those changes here and create a new ticket to update the system diagram)
39 |
--------------------------------------------------------------------------------
/eregs_extensions/fec_regparser/preprocs/__init__.py:
--------------------------------------------------------------------------------
1 | # vim: set encoding=utf-8
2 | """Set of transforms we run on notice XML to account for common inaccuracies
3 | in the XML"""
4 | from lxml import etree
5 | from regparser.tree.xml_parser.preprocessors import PreProcessorBase
6 |
7 |
8 | class RepeatedEmphasis(PreProcessorBase):
9 | """
10 | CFR 11 100 contains a number of defined terms that should be marked up as:
11 |
12 | (d) [Term] . [Term] [text]
13 |
14 | but are in fact marked up as:
15 |
16 | (d) [Term]. [Term] [text]
17 |
18 | This preprocessor tries to correct them appropriately.
19 | """
20 |
21 | def transform(self, xml):
22 | for el in xml.xpath("//P//E[contains(., '.')]"):
23 | pair = [_.strip() for _ in el.text.split(".")]
24 |
25 | if len(pair) == 2 and pair[0] == pair[1]:
26 | el_parent = el.getparent()
27 | el_index = el_parent.index(el)
28 | first = etree.Element("E", attrib=el.attrib)
29 | first.text = "%s." % pair[0]
30 | first.tail = " "
31 | second = etree.Element("E", attrib=el.attrib)
32 | second.text = pair[0]
33 | second.tail = el.tail
34 |
35 | el_parent.remove(el)
36 | el_parent.insert(el_index, second)
37 | el_parent.insert(el_index, first)
38 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/js/templates/nav-about.hbs:
--------------------------------------------------------------------------------
1 |
28 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/_fonts.scss:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'gandhi';
3 | src: url('../fonts/gandhiserif-bold.woff2') format('woff2'),
4 | url('../fonts/gandhiserif-bold.woff') format('woff');
5 | font-weight: bold;
6 | font-style: normal;
7 | }
8 |
9 | @font-face {
10 | font-family: 'gandhi';
11 | src: url('../fonts/gandhiserif-bolditalic.woff2') format('woff2'),
12 | url('../fonts/gandhiserif-bolditalic.woff') format('woff');
13 | font-weight: bold;
14 | font-style: italic;
15 | }
16 |
17 | @font-face {
18 | font-family: 'gandhi';
19 | src: url('../fonts/gandhiserif-italic.woff2') format('woff2'),
20 | url('../fonts/gandhiserif-italic.woff') format('woff');
21 | font-weight: normal;
22 | font-style: italic;
23 | }
24 |
25 | @font-face {
26 | font-family: 'gandhi';
27 | src: url('../fonts/gandhiserif-regular.woff2') format('woff2'),
28 | url('../fonts/gandhiserif-regular.woff') format('woff');
29 | font-weight: normal;
30 | font-style: normal;
31 | }
32 |
33 | @font-face {
34 | font-family: 'karla';
35 | src: url('../fonts/karla-bold.woff2') format('woff2'),
36 | url('../fonts/karla-bold.woff') format('woff');
37 | font-weight: bold;
38 | font-style: normal;
39 | }
40 |
41 | @font-face {
42 | font-family: 'karla';
43 | src: url('../fonts/karla-regular.woff2') format('woff2'),
44 | url('../fonts/karla-regular.woff') format('woff');
45 | font-weight: normal;
46 | font-style: normal;
47 | }
48 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/css3/_columns.scss:
--------------------------------------------------------------------------------
1 | @mixin columns($arg: auto) {
2 | // ||
3 | @include prefixer(columns, $arg, webkit moz spec);
4 | }
5 |
6 | @mixin column-count($int: auto) {
7 | // auto || integer
8 | @include prefixer(column-count, $int, webkit moz spec);
9 | }
10 |
11 | @mixin column-gap($length: normal) {
12 | // normal || length
13 | @include prefixer(column-gap, $length, webkit moz spec);
14 | }
15 |
16 | @mixin column-fill($arg: auto) {
17 | // auto || length
18 | @include prefixer(column-fill, $arg, webkit moz spec);
19 | }
20 |
21 | @mixin column-rule($arg) {
22 | // || ||
23 | @include prefixer(column-rule, $arg, webkit moz spec);
24 | }
25 |
26 | @mixin column-rule-color($color) {
27 | @include prefixer(column-rule-color, $color, webkit moz spec);
28 | }
29 |
30 | @mixin column-rule-style($style: none) {
31 | // none | hidden | dashed | dotted | double | groove | inset | inset | outset | ridge | solid
32 | @include prefixer(column-rule-style, $style, webkit moz spec);
33 | }
34 |
35 | @mixin column-rule-width ($width: none) {
36 | @include prefixer(column-rule-width, $width, webkit moz spec);
37 | }
38 |
39 | @mixin column-span($arg: none) {
40 | // none || all
41 | @include prefixer(column-span, $arg, webkit moz spec);
42 | }
43 |
44 | @mixin column-width($length: auto) {
45 | // auto || length
46 | @include prefixer(column-width, $length, webkit moz spec);
47 | }
48 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/_custom-headings.scss:
--------------------------------------------------------------------------------
1 | /*
2 | * FEC Headings
3 | *
4 | * The fec-style headings don't translate well without the bourbon neat media
5 | * break points. They also include some custom margins which doesn't work well
6 | * with the regulations-site laouts. Therefore, we're including a version of
7 | * them here.
8 | */
9 |
10 | @import 'variables';
11 |
12 | h1,h2,h3,h4,h5,h6 {
13 | color: $base;
14 | }
15 |
16 | h1 {
17 | border-bottom: 1px solid $primary;
18 | font-family: $serif;
19 | font-size: 24px;
20 | font-weight: bold;
21 | line-height: 1.15;
22 | }
23 |
24 | h2 {
25 | font-family: $serif;
26 | font-size: 20px;
27 | font-weight: bold;
28 | line-height: 1.2;
29 | }
30 |
31 | h3 {
32 | font-family: $serif;
33 | font-size: 18px;
34 | font-weight: bold;
35 | line-height: 1.14;
36 | }
37 |
38 | h4 {
39 | font-family: $sans-serif;
40 | font-size: 18px;
41 | font-weight: normal;
42 | line-height: 1.14;
43 | margin: 20px 0 5px 0;
44 | line-height: 1.14;
45 | }
46 |
47 | h5 {
48 | font-family: $serif;
49 | font-size: 16px;
50 | font-weight: bold;
51 | line-height: 1.33;
52 | }
53 |
54 | h6 {
55 | border-bottom: 1px solid $primary;
56 | font-family: $sans-serif;
57 | font-size: 13px;
58 | font-weight: normal;
59 | line-height: 1.63;
60 | text-transform: uppercase;
61 | }
62 |
63 | p {
64 | color: inherit;
65 | font-size: u(1.6rem);
66 | margin: u(0 0 2.4rem 0);
67 | max-width: u(80rem);
68 | width: 100%;
69 | }
70 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/helpers/_str-to-num.scss:
--------------------------------------------------------------------------------
1 | //************************************************************************//
2 | // Helper function for linear/radial-gradient-parsers.
3 | // Source: http://sassmeister.com/gist/9647408
4 | //************************************************************************//
5 | @function _str-to-num($string) {
6 | // Matrices
7 | $strings: "0" "1" "2" "3" "4" "5" "6" "7" "8" "9";
8 | $numbers: 0 1 2 3 4 5 6 7 8 9;
9 |
10 | // Result
11 | $result: 0;
12 | $divider: 0;
13 | $minus: false;
14 |
15 | // Looping through all characters
16 | @for $i from 1 through str-length($string) {
17 | $character: str-slice($string, $i, $i);
18 | $index: index($strings, $character);
19 |
20 | @if $character == "-" {
21 | $minus: true;
22 | }
23 |
24 | @else if $character == "." {
25 | $divider: 1;
26 | }
27 |
28 | @else {
29 | @if not $index {
30 | $result: if($minus, $result * -1, $result);
31 | @return _convert-units($result, str-slice($string, $i));
32 | }
33 |
34 | $number: nth($numbers, $index);
35 |
36 | @if $divider == 0 {
37 | $result: $result * 10;
38 | }
39 |
40 | @else {
41 | // Move the decimal dot to the left
42 | $divider: $divider * 10;
43 | $number: $number / $divider;
44 | }
45 |
46 | $result: $result + $number;
47 | }
48 | }
49 | @return if($minus, $result * -1, $result);
50 | }
51 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/css3/_linear-gradient.scss:
--------------------------------------------------------------------------------
1 | @mixin linear-gradient($pos, $g1, $g2: null,
2 | $g3: null, $g4: null,
3 | $g5: null, $g6: null,
4 | $g7: null, $g8: null,
5 | $g9: null, $g10: null,
6 | $fallback: null) {
7 | // Detect what type of value exists in $pos
8 | $pos-type: type-of(nth($pos, 1));
9 | $pos-spec: null;
10 | $pos-degree: null;
11 |
12 | // If $pos is missing from mixin, reassign vars and add default position
13 | @if ($pos-type == color) or (nth($pos, 1) == "transparent") {
14 | $g10: $g9; $g9: $g8; $g8: $g7; $g7: $g6; $g6: $g5;
15 | $g5: $g4; $g4: $g3; $g3: $g2; $g2: $g1; $g1: $pos;
16 | $pos: null;
17 | }
18 |
19 | @if $pos {
20 | $positions: _linear-positions-parser($pos);
21 | $pos-degree: nth($positions, 1);
22 | $pos-spec: nth($positions, 2);
23 | }
24 |
25 | $full: $g1, $g2, $g3, $g4, $g5, $g6, $g7, $g8, $g9, $g10;
26 |
27 | // Set $g1 as the default fallback color
28 | $fallback-color: nth($g1, 1);
29 |
30 | // If $fallback is a color use that color as the fallback color
31 | @if (type-of($fallback) == color) or ($fallback == "transparent") {
32 | $fallback-color: $fallback;
33 | }
34 |
35 | background-color: $fallback-color;
36 | background-image: -webkit-linear-gradient($pos-degree $full); // Safari 5.1+, Chrome
37 | background-image: unquote("linear-gradient(#{$pos-spec}#{$full})");
38 | }
39 |
--------------------------------------------------------------------------------
/fec_eregs/settings/prod.py:
--------------------------------------------------------------------------------
1 | import json
2 | import logging
3 | import os
4 | import sys
5 |
6 | import dj_database_url
7 | from cfenv import AppEnv
8 |
9 | from .base import *
10 |
11 | logging.basicConfig(level=logging.INFO, stream=sys.stdout)
12 |
13 | env = AppEnv()
14 |
15 | DEBUG = False
16 | TEMPLATE_DEBUG = False
17 |
18 | SESSION_COOKIE_SECURE = True
19 | CSRF_COOKIE_SECURE = True
20 | X_FRAME_OPTIONS = 'DENY'
21 |
22 | ANALYTICS = {
23 | 'GOOGLE': {
24 | 'GA_SITE_ID': 'UA-48605964-22',
25 | },
26 | 'DAP': {
27 | 'AGENCY': 'FEC',
28 | },
29 | }
30 |
31 | DATABASES = {
32 | 'default': dj_database_url.config()
33 | }
34 |
35 |
36 | vcap_app = json.loads(os.environ.get('VCAP_APPLICATION', '{}'))
37 | ALLOWED_HOSTS = ['localhost'] + vcap_app.get('application_uris', [])
38 |
39 | vcap_services = json.loads(os.environ.get('VCAP_SERVICES', '{}'))
40 | es_config = vcap_services.get('elasticsearch24')
41 | if es_config:
42 | HAYSTACK_CONNECTIONS['default'] = {
43 | 'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
44 | 'URL': es_config[0]['credentials']['uri'],
45 | 'INDEX_NAME': 'eregs',
46 | }
47 |
48 | HTTP_AUTH_USER = env.get_credential('HTTP_AUTH_USER')
49 | HTTP_AUTH_PASSWORD = env.get_credential('HTTP_AUTH_PASSWORD')
50 |
51 | STATIC_URL = '/regulations/static/'
52 | API_BASE = 'http://localhost:{}/regulations/api/'.format(
53 | os.environ.get('PORT', '8000'))
54 |
55 | CACHES['eregs_longterm_cache']['TIMEOUT'] = 60 * 60
56 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/layout/_slabs.scss:
--------------------------------------------------------------------------------
1 | // Slabs
2 | //
3 | // Slabs are full-width blocks of color. Slabs should contain containers to center content.
4 | //
5 | //
6 | //
7 | //
Heading in a slab
8 | // This is a slab
with a link
9 | //
10 | //
11 | //
12 |
13 | .slab {
14 | @include clearfix();
15 | padding: u(2rem 0);
16 | }
17 |
18 | // Neutral gray background with base accents and type (default)
19 | .slab--neutral {
20 | @include u-bg--neutral();
21 | }
22 |
23 | // Primary background with primary-contrast accents and type
24 | .slab--primary {
25 | @include u-bg--primary();
26 | }
27 |
28 | // Secondary background with secondary-contrast accents and type
29 | .slab--secondary {
30 | @include u-bg--secondary();
31 | }
32 |
33 | // Dark gray background with gray-lightest accents and type
34 | .slab--dark {
35 | @include u-bg--dark();
36 | }
37 |
38 | .slab--spacious {
39 | padding: u(4rem 0);
40 | }
41 |
42 | .slab--inline {
43 | border-radius: 4px;
44 | margin: u(2rem 0);
45 | }
46 |
47 | @include media($lg) {
48 | .slab h3 {
49 | line-height: 1.5;
50 | }
51 |
52 | .slab--inline .container {
53 | @include span-columns(10);
54 | padding-left: u(2rem);
55 | }
56 | }
57 |
58 | // Reset all slab colors on print
59 | @media print {
60 | .slab,
61 | .slab--neutral,
62 | .slab--primary,
63 | .slab--secondary {
64 | background: $inverse;
65 | color: $base;
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/css3/_background-image.scss:
--------------------------------------------------------------------------------
1 | //************************************************************************//
2 | // Background-image property for adding multiple background images with
3 | // gradients, or for stringing multiple gradients together.
4 | //************************************************************************//
5 |
6 | @mixin background-image($images...) {
7 | $webkit-images: ();
8 | $spec-images: ();
9 |
10 | @each $image in $images {
11 | $webkit-image: ();
12 | $spec-image: ();
13 |
14 | @if (type-of($image) == string) {
15 | $url-str: str-slice($image, 0, 3);
16 | $gradient-type: str-slice($image, 0, 6);
17 |
18 | @if $url-str == "url" {
19 | $webkit-image: $image;
20 | $spec-image: $image;
21 | }
22 |
23 | @else if $gradient-type == "linear" {
24 | $gradients: _linear-gradient-parser($image);
25 | $webkit-image: map-get($gradients, webkit-image);
26 | $spec-image: map-get($gradients, spec-image);
27 | }
28 |
29 | @else if $gradient-type == "radial" {
30 | $gradients: _radial-gradient-parser($image);
31 | $webkit-image: map-get($gradients, webkit-image);
32 | $spec-image: map-get($gradients, spec-image);
33 | }
34 | }
35 |
36 | $webkit-images: append($webkit-images, $webkit-image, comma);
37 | $spec-images: append($spec-images, $spec-image, comma);
38 | }
39 |
40 | background-image: $webkit-images;
41 | background-image: $spec-images;
42 | }
43 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/helpers/_radial-gradient-parser.scss:
--------------------------------------------------------------------------------
1 | @function _radial-gradient-parser($image) {
2 | $image: unquote($image);
3 | $gradients: ();
4 | $start: str-index($image, "(");
5 | $end: str-index($image, ",");
6 | $first-val: str-slice($image, $start + 1, $end - 1);
7 |
8 | $prefix: str-slice($image, 0, $start);
9 | $suffix: str-slice($image, $end, str-length($image));
10 |
11 | $is-spec-syntax: str-index($first-val, "at");
12 |
13 | @if $is-spec-syntax and $is-spec-syntax > 1 {
14 | $keyword: str-slice($first-val, 1, $is-spec-syntax - 2);
15 | $pos: str-slice($first-val, $is-spec-syntax + 3, str-length($first-val));
16 | $pos: append($pos, $keyword, comma);
17 |
18 | $gradients: (
19 | webkit-image: -webkit- + $prefix + $pos + $suffix,
20 | spec-image: $image
21 | );
22 | }
23 |
24 | @else if $is-spec-syntax == 1 {
25 | $pos: str-slice($first-val, $is-spec-syntax + 3, str-length($first-val));
26 |
27 | $gradients: (
28 | webkit-image: -webkit- + $prefix + $pos + $suffix,
29 | spec-image: $image
30 | );
31 | }
32 |
33 | @else if str-index($image, "cover") or str-index($image, "contain") {
34 | @warn "Radial-gradient needs to be updated to conform to latest spec.";
35 |
36 | $gradients: (
37 | webkit-image: null,
38 | spec-image: $image
39 | );
40 | }
41 |
42 | @else {
43 | $gradients: (
44 | webkit-image: -webkit- + $image,
45 | spec-image: $image
46 | );
47 | }
48 |
49 | @return $gradients;
50 | }
51 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/_grid.scss:
--------------------------------------------------------------------------------
1 | // Grid
2 |
3 | // Neat Breakpoints
4 | $medium-screen: em(640) !default;
5 | $large-screen: em(860) !default;
6 | $x-large-screen: em(1088) !default;
7 |
8 | $med: new-breakpoint(min-width $medium-screen 12);
9 | $lg: new-breakpoint(min-width $large-screen 12);
10 | $xl: new-breakpoint(min-width $x-large-screen 12);
11 |
12 | // Grid columns
13 | //
14 | // Classes from the US Web Design Standards library
15 |
16 | @include media($med) {
17 | .usa-width-one-whole {
18 | @include span-columns(12);
19 | }
20 |
21 | .usa-width-one-half {
22 | @include span-columns(6);
23 | }
24 |
25 | .usa-width-one-third {
26 | @include span-columns(4);
27 | }
28 |
29 | .usa-width-two-thirds {
30 | @include span-columns(8);
31 | }
32 |
33 | .usa-width-one-fourth {
34 | @include span-columns(3);
35 | }
36 |
37 | .usa-width-three-fourths {
38 | @include span-columns(9);
39 | }
40 |
41 | .usa-width-one-sixth {
42 | @include span-columns(2);
43 | }
44 |
45 | .usa-width-five-sixths {
46 | @include span-columns(10);
47 | }
48 |
49 | .usa-width-one-twelfth {
50 | @include span-columns(1);
51 | }
52 |
53 | .usa-end-row {
54 | @include omega();
55 | }
56 | }
57 |
58 | // Utilities for hiding things at certain breakpoints
59 | //
60 | // Use sparingly
61 |
62 | .u-under-lg-only {
63 | @include media($lg) {
64 | display: none !important;
65 | }
66 | }
67 |
68 | .u-lg-only {
69 | display: none !important;
70 |
71 | @include media($lg) {
72 | display: inherit !important;
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/_custom-components.scss:
--------------------------------------------------------------------------------
1 | /*
2 | * FEC Components
3 | *
4 | **/
5 |
6 | .t-sans {
7 | font-family: $sans-serif;
8 | letter-spacing: -.3px;
9 | }
10 |
11 | .t-serif {
12 | font-family: $serif;
13 | }
14 |
15 | // Override `ul`s in `.reg-header` styles
16 | // TODO remove element specific styles in regulations-site, replace
17 | // with class-based rules, e.g. `ul.eregs-list`.
18 | .reg-header .utility-nav {
19 | @extend .utility-nav;
20 | }
21 |
22 | .reg-header .site-nav__panel {
23 | @extend .site-nav__panel;
24 | }
25 |
26 | .site-nav {
27 | position: relative;
28 |
29 | .site-title {
30 | width: calc(100% - 150px);
31 | }
32 | }
33 |
34 | .site-nav__container {
35 | @include media(max-width ($large-screen - 1)) {
36 | bottom: initial;
37 | top: 40px;
38 | z-index: initial;
39 | }
40 | }
41 |
42 | .site-nav__panel {
43 | position: static;
44 | top: initial;
45 | bottom: initial;
46 | }
47 |
48 | .utility-nav__item {
49 | margin-top: 0;
50 | padding: 0 20px;
51 | }
52 |
53 | .fec-disclaimer {
54 | @extend .disclaimer;
55 | // We need to keep the header height fixed, don't wrap on small screens
56 | @include u-truncate();
57 |
58 | @include media($med) {
59 | width: calc(100% - 90px);
60 | }
61 | }
62 |
63 | .breadcrumbs {
64 | // Font-size from body
65 | font-size: 14px;
66 | }
67 |
68 | input[type="text"].combo__input {
69 | border: 2px solid $gray;
70 | text-align: left;
71 | }
72 |
73 | .search-panel {
74 | height: 200px;
75 |
76 | @include media($med) {
77 | height: 100%;
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/js/templates/nav-legal.hbs:
--------------------------------------------------------------------------------
1 |
28 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/css3/_radial-gradient.scss:
--------------------------------------------------------------------------------
1 | // Requires Sass 3.1+
2 | @mixin radial-gradient($g1, $g2,
3 | $g3: null, $g4: null,
4 | $g5: null, $g6: null,
5 | $g7: null, $g8: null,
6 | $g9: null, $g10: null,
7 | $pos: null,
8 | $shape-size: null,
9 | $fallback: null) {
10 |
11 | $data: _radial-arg-parser($g1, $g2, $pos, $shape-size);
12 | $g1: nth($data, 1);
13 | $g2: nth($data, 2);
14 | $pos: nth($data, 3);
15 | $shape-size: nth($data, 4);
16 |
17 | $full: $g1, $g2, $g3, $g4, $g5, $g6, $g7, $g8, $g9, $g10;
18 |
19 | // Strip deprecated cover/contain for spec
20 | $shape-size-spec: _shape-size-stripper($shape-size);
21 |
22 | // Set $g1 as the default fallback color
23 | $first-color: nth($full, 1);
24 | $fallback-color: nth($first-color, 1);
25 |
26 | @if (type-of($fallback) == color) or ($fallback == "transparent") {
27 | $fallback-color: $fallback;
28 | }
29 |
30 | // Add Commas and spaces
31 | $shape-size: if($shape-size, "#{$shape-size}, ", null);
32 | $pos: if($pos, "#{$pos}, ", null);
33 | $pos-spec: if($pos, "at #{$pos}", null);
34 | $shape-size-spec: if(($shape-size-spec != " ") and ($pos == null), "#{$shape-size-spec}, ", "#{$shape-size-spec} ");
35 |
36 | background-color: $fallback-color;
37 | background-image: -webkit-radial-gradient(unquote(#{$pos}#{$shape-size}#{$full}));
38 | background-image: unquote("radial-gradient(#{$shape-size-spec}#{$pos-spec}#{$full})");
39 | }
40 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "fec-eregs",
3 | "version": "1.0.0",
4 | "description": "eRegulations viewer for the Federal Election Commission's public legal resources",
5 | "main": "Gruntfile.js",
6 | "dependencies": {
7 | "accessible-mega-menu": "git+https://github.com/noahmanger/Accessible-Mega-Menu.git",
8 | "jquery": "^3.5.1"
9 | },
10 | "devDependencies": {
11 | "browserify": "^13.0.0",
12 | "elliptic": "^6.5.3",
13 | "glossary-panel": "1.0.0",
14 | "grunt": "^1.1.0",
15 | "grunt-cli": "^1.2.0",
16 | "grunt-contrib-copy": "^1.0.0",
17 | "grunt-dart-sass": "^2.0.1",
18 | "handlebars": "^4.3.0",
19 | "hbsfy": "^2.8.1",
20 | "jsdom": "^16.2.1",
21 | "load-grunt-tasks": "^3.4.1",
22 | "lodash": "4.17.21"
23 | },
24 | "scripts": {
25 | "build": "grunt build:css && npm run build-js",
26 | "build-js": "browserify -g hbsfy --debug -o fec_eregs/static/fec_eregs/js/fec.bundle.js fec_eregs/static/fec_eregs/js/fec.js",
27 | "test": "echo \"Error: no test specified, use `python manage.py test` instead\" && exit 1"
28 | },
29 | "repository": {
30 | "type": "git",
31 | "url": "git+https://github.com/fecgov/fec-eregs.git"
32 | },
33 | "keywords": [
34 | "eregs",
35 | "fec",
36 | "regulations",
37 | "viewer"
38 | ],
39 | "author": {
40 | "name": "FEC",
41 | "url": "https://www.fec.gov/"
42 | },
43 | "license": "CC0-1.0",
44 | "bugs": {
45 | "url": "https://github.com/fecgov/fec-eregs/issues"
46 | },
47 | "engines": {
48 | "node": "18.17.1",
49 | "npm": "9.6.7"
50 | },
51 | "homepage": "https://github.com/fecgov/fec-eregs#readme"
52 | }
53 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/main.scss:
--------------------------------------------------------------------------------
1 |
2 | // Libraries
3 | @import 'vendor/bourbon/bourbon';
4 | @import 'vendor/neat/neat';
5 | @import 'fonts';
6 |
7 | @import 'variables';
8 | @import 'icon-variables';
9 |
10 | // Scale fec-style components appropriately
11 | $base-size-px: 10;
12 | $px-only: true;
13 | $em-base: 10;
14 |
15 | // Align FEC grid with eRegs
16 | // eRegs uses breakpoints 480, 600, 780, 1100
17 | // TODO The FEC header changes size based on breakpoints. We need to
18 | // adjust the fixed offsets for the eregs sidebars before enabling the
19 | // medium breakpoint. Effectively disable it for now.
20 | $medium-screen: 720px;
21 | $large-screen: 720px;
22 | $x-large-screen: 1100px;
23 |
24 |
25 | @import 'functions';
26 | @import 'grid';
27 |
28 | @import 'mixins/utilities';
29 | @import 'mixins/icon-mixins';
30 |
31 | @import 'layout/layout';
32 | @import 'layout/slabs';
33 |
34 | // Base styling for html elements
35 | @import 'elements/links';
36 | @import 'elements/lists';
37 | @import 'elements/forms';
38 | @import 'elements/tables';
39 | @import 'elements/images';
40 |
41 | @import 'components/accordions';
42 | @import 'components/breadcrumbs';
43 | @import 'components/buttons';
44 | @import 'components/cards';
45 | @import 'components/form-styles';
46 | @import 'components/glossary';
47 | @import 'components/icon-headings';
48 | @import 'components/list-styles';
49 | @import 'components/nav';
50 | @import 'components/page-headers';
51 | @import 'components/search-bar';
52 | @import 'components/site-header';
53 | @import 'components/type-styles';
54 |
55 | @import 'custom-headings';
56 | @import 'custom-mega-menu';
57 | @import 'custom-components';
58 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/components/_breadcrumbs.scss:
--------------------------------------------------------------------------------
1 | // Breadcrumbs
2 | //
3 | // .breadcrumbs - Base class, used on blue and crimson backgrounds
4 | //
5 | //
6 | // Home
7 | //
8 | // ›
9 | // Campaign finance data
10 | //
11 | //
12 | // ›
13 | // Advanced data
14 | //
15 | //
16 | // ›
17 | // Candidates
18 | //
19 | //
20 | //
21 |
22 | .breadcrumbs {
23 | display: none;
24 | color: $gray;
25 | float: left;
26 | font-family: $sans-serif;
27 | letter-spacing: -.3px;
28 | }
29 |
30 | .breadcrumbs__item {
31 | @include u-truncate();
32 | float: left;
33 | max-width: u(20rem);
34 | padding: u(.8rem 0);
35 | }
36 |
37 | .breadcrumbs__item--current {
38 | color: $inverse;
39 | }
40 |
41 | .breadcrumbs__link {
42 | color: $inverse;
43 | }
44 |
45 | .breadcrumbs__separator {
46 | padding: u(.5rem .8rem);
47 | }
48 |
49 | @include media($lg) {
50 | .breadcrumbs {
51 | display: block;
52 | }
53 | }
54 |
55 | @media print {
56 | .breadcrumbs {
57 | display: block;
58 | float: none;
59 |
60 | .breadcrumbs__link,
61 | .breadcrumbs__item {
62 | color: $gray-dark;
63 | border-bottom: none;
64 | max-width: 100%;
65 | }
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/js/templates/nav-help.hbs:
--------------------------------------------------------------------------------
1 |
28 |
29 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/css3/_animation.scss:
--------------------------------------------------------------------------------
1 | // http://www.w3.org/TR/css3-animations/#the-animation-name-property-
2 | // Each of these mixins support comma separated lists of values, which allows different transitions for individual properties to be described in a single style rule. Each value in the list corresponds to the value at that same position in the other properties.
3 |
4 | @mixin animation($animations...) {
5 | @include prefixer(animation, $animations, webkit moz spec);
6 | }
7 |
8 | @mixin animation-name($names...) {
9 | @include prefixer(animation-name, $names, webkit moz spec);
10 | }
11 |
12 | @mixin animation-duration($times...) {
13 | @include prefixer(animation-duration, $times, webkit moz spec);
14 | }
15 |
16 | @mixin animation-timing-function($motions...) {
17 | // ease | linear | ease-in | ease-out | ease-in-out
18 | @include prefixer(animation-timing-function, $motions, webkit moz spec);
19 | }
20 |
21 | @mixin animation-iteration-count($values...) {
22 | // infinite |
23 | @include prefixer(animation-iteration-count, $values, webkit moz spec);
24 | }
25 |
26 | @mixin animation-direction($directions...) {
27 | // normal | alternate
28 | @include prefixer(animation-direction, $directions, webkit moz spec);
29 | }
30 |
31 | @mixin animation-play-state($states...) {
32 | // running | paused
33 | @include prefixer(animation-play-state, $states, webkit moz spec);
34 | }
35 |
36 | @mixin animation-delay($times...) {
37 | @include prefixer(animation-delay, $times, webkit moz spec);
38 | }
39 |
40 | @mixin animation-fill-mode($modes...) {
41 | // none | forwards | backwards | both
42 | @include prefixer(animation-fill-mode, $modes, webkit moz spec);
43 | }
44 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/components/_page-headers.scss:
--------------------------------------------------------------------------------
1 | // Page Header
2 | //
3 | // The band of color at the top of a page that contains the parent category.
4 | // Consists of an h1 within a container within a slab. h1 may have an icon.
5 | //
6 | //
11 | //
12 |
13 | .page-header {
14 | display: none;
15 | }
16 |
17 | .page-header__icon {
18 | float: left;
19 | margin-right: 0;
20 | width: u(4rem);
21 | }
22 |
23 | .page-header--primary {
24 | background: $primary;
25 | }
26 |
27 | .page-header--secondary {
28 | background: $secondary;
29 | }
30 |
31 | .page-header__title {
32 | border-bottom: none;
33 | font-family: $sans-serif;
34 | font-size: u(1.6rem);
35 | text-transform: uppercase;
36 | margin-bottom: 0;
37 | line-height: 1;
38 | }
39 |
40 |
41 | @include media($med) {
42 | // Add padding, show the search bar in line with the page title
43 | .page-header {
44 | @include clearfix();
45 | display: block;
46 | padding: u(1rem 2rem);
47 |
48 | a,
49 | a:hover {
50 | border-color: $inverse;
51 | }
52 |
53 | .search__container {
54 | display: block;
55 | float: right;
56 | width: u(40rem);
57 | }
58 | }
59 |
60 | .page-header__title {
61 | float: left;
62 | line-height: u(4rem);
63 | }
64 | }
65 |
66 | @include media($lg) {
67 | // wider search bar
68 | .page-header {
69 | .search__container {
70 | width: u(50rem);
71 | }
72 | }
73 | }
74 |
75 | @media print {
76 | .page-header {
77 | @include clearfix();
78 | display: block;
79 | background: $inverse;
80 | border-bottom: 1px solid $gray;
81 | color: $gray-dark;
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/elements/_typography.scss:
--------------------------------------------------------------------------------
1 | // Typography
2 | //
3 | // Introduction (h1)
4 | // Heading 2 (h2)
5 | // Heading 3 (h3)
6 | // Heading 4 (h4)
7 | // Heading 5 (h5)
8 | // Heading 6 (h6)
9 | // Maecenas faucibus mollis interdum. Nulla vitae elit libero, a pharetra augue. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Etiam porta sem malesuada magna mollis euismod. Vestibulum id ligula porta felis euismod semper.
10 | //
11 |
12 | html {
13 | font-size: 62.5%;
14 | }
15 |
16 | body {
17 | @include font-feature-settings("kern", "liga", "pnum");
18 | // -webkit-font-smoothing: antialiased;
19 | color: $base;
20 | font-family: $base-font-family;
21 | font-size: u(1.4rem);
22 | line-height: 1.8;
23 | }
24 |
25 | h1 {
26 | @include heading(h1);
27 | }
28 |
29 | h2 {
30 | @include heading(h2);
31 | }
32 |
33 | h3 {
34 | @include heading(h3);
35 | }
36 |
37 | h4 {
38 | @include heading(h4);
39 | }
40 |
41 | h5 {
42 | @include heading(h5);
43 | }
44 |
45 | h6 {
46 | @include heading(h6);
47 | }
48 |
49 | p {
50 | color: inherit;
51 | font-size: u(1.6rem);
52 | margin: u(0 0 2.4rem 0);
53 | max-width: u(80rem);
54 | width: 100%;
55 |
56 | & + h1 {
57 | margin-top: u(3rem);
58 | }
59 |
60 | & + h2 {
61 | margin-top: u(3rem);
62 | }
63 |
64 | & + h3 {
65 | margin-top: u(2rem);
66 | }
67 |
68 | & + h4 {
69 | margin-top: u(2rem);
70 | }
71 | }
72 |
73 | hr {
74 | border-bottom: $base;
75 | border-left: none;
76 | border-right: none;
77 | border-top: none;
78 | margin: u(1rem 0);
79 | }
80 |
81 | blockquote {
82 | border-left: 10px solid $gray-lightest;
83 | padding-left: 30px;
84 | font-style: italic;
85 | margin-left: 0;
86 | }
87 |
88 |
89 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/neat/grid/_shift.scss:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | /// Translates an element horizontally by a number of columns. Positive arguments shift the element to the active layout direction, while negative ones shift it to the opposite direction.
4 | ///
5 | /// @param {Number (unitless)} $n-columns [1]
6 | /// Number of columns by which the element shifts.
7 | ///
8 | /// @example scss - Usage
9 | /// .element {
10 | /// @include shift(-3);
11 | /// }
12 | ///
13 | /// @example css - CSS output
14 | /// .element {
15 | /// margin-left: -25.58941%;
16 | /// }
17 |
18 | @mixin shift($n-columns: 1) {
19 | @include shift-in-context($n-columns);
20 | }
21 |
22 | /// Translates an element horizontally by a number of columns, in a specific nesting context.
23 | ///
24 | /// @param {List} $shift
25 | /// A list containing the number of columns to shift (`$columns`) and the number of columns of the parent element (`$container-columns`).
26 | ///
27 | /// The two values can be separated with any string such as `of`, `/`, etc.
28 | ///
29 | /// @example scss - Usage
30 | /// .element {
31 | /// @include shift(-3 of 6);
32 | /// }
33 | ///
34 | /// @example css - CSS output
35 | /// .element {
36 | /// margin-left: -52.41458%;
37 | /// }
38 |
39 | @mixin shift-in-context($shift: $columns of $container-columns) {
40 | $n-columns: nth($shift, 1);
41 | $parent-columns: container-shift($shift) !global;
42 |
43 | $direction: get-direction($layout-direction, $default-layout-direction);
44 | $opposite-direction: get-opposite-direction($direction);
45 |
46 | margin-#{$opposite-direction}: $n-columns * flex-grid(1, $parent-columns) + $n-columns * flex-gutter($parent-columns);
47 |
48 | // Reset nesting context
49 | $parent-columns: $grid-columns !global;
50 | }
51 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/mixins/_type-mixins.scss:
--------------------------------------------------------------------------------
1 | // Typography Mixins
2 | //
3 |
4 | @mixin heading($level) {
5 | margin: 0 0 1em 0;
6 |
7 | @if $level == display {
8 | font-family: $serif;
9 | font-size: u(3.6rem);
10 | font-weight: bold;
11 | line-height: 1;
12 | margin: u(0 0 1rem 0);
13 | padding: u(1.2rem 0);
14 |
15 | @include media($med) {
16 | font-size: u(4rem);
17 | }
18 | }
19 |
20 | @if $level == h1 {
21 | font-family: $serif;
22 | font-size: u(2.4rem);
23 | font-weight: bold;
24 | line-height: 1.2;
25 | margin: 0;
26 |
27 | @include media($med) {
28 | font-size: u(3.6rem);
29 | }
30 | }
31 |
32 | @if $level == h2 {
33 | font-family: $serif;
34 | font-size: u(2rem);
35 | font-weight: bold;
36 | line-height: 1.2;
37 |
38 | @include media($med) {
39 | font-size: u(2.4rem);
40 | }
41 | }
42 |
43 | @if $level == h3 {
44 | font-family: $serif;
45 | font-size: u(1.8rem);
46 | font-weight: bold;
47 | line-height: 1.6;
48 | }
49 |
50 | @if $level == h4 {
51 | font-family: $sans-serif;
52 | font-size: u(1.8rem);
53 | font-weight: bold;
54 | line-height: 1.2;
55 | letter-spacing: -.3px;
56 | margin: u(1.4rem 0 1rem 0);
57 | }
58 |
59 | @if $level == h5 {
60 | font-family: $serif;
61 | font-size: u(1.6rem);
62 | font-weight: bold;
63 | margin: u(1.5rem 0 .75rem 0);
64 | line-height: 1.33;
65 | }
66 |
67 | @if $level == h6 {
68 | border-bottom: 1px solid $base;
69 | font-family: $sans-serif;
70 | font-size: u(1.3rem);
71 | font-weight: bold;
72 | line-height: 1.63;
73 | text-transform: uppercase;
74 | }
75 | }
76 |
77 | @mixin t-highlight {
78 | background-color: rgba($aqua, .15);
79 | font-weight: bold;
80 | padding: 0 0.3em;
81 | }
82 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/neat/grid/_row.scss:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | /// Designates the element as a row of columns in the grid layout. It clears the floats on the element and sets its display property. Rows can't be nested, but there can be more than one row element—with different display properties—per layout.
4 | ///
5 | /// @param {String} $display [default]
6 | /// Sets the display property of the element and the display context that will be used by its children. Can be `block` or `table`.
7 | ///
8 | /// @param {String} $direction [$default-layout-direction]
9 | /// Sets the layout direction. Can be `LTR` (left-to-right) or `RTL` (right-to-left).
10 | ///
11 | /// @example scss - Usage
12 | /// .element {
13 | /// @include row();
14 | /// }
15 | ///
16 | /// @example css - CSS Output
17 | /// .element {
18 | /// *zoom: 1;
19 | /// display: block;
20 | /// }
21 | ///
22 | /// .element:before, .element:after {
23 | /// content: " ";
24 | /// display: table;
25 | /// }
26 | ///
27 | /// .element:after {
28 | /// clear: both;
29 | /// }
30 |
31 | @mixin row($display: default, $direction: $default-layout-direction) {
32 | @if $direction != $default-layout-direction {
33 | @include -neat-warn("The $direction argument will be deprecated in future versions in favor of the direction(){...} mixin.");
34 | }
35 |
36 | $layout-direction: $direction !global;
37 |
38 | @if $display != default {
39 | @include -neat-warn("The $display argument will be deprecated in future versions in favor of the display(){...} mixin.");
40 | }
41 |
42 | @if $display == table {
43 | display: table;
44 | @include fill-parent;
45 | table-layout: fixed;
46 | $container-display-table: true !global;
47 | } @else {
48 | @include clearfix;
49 | display: block;
50 | $container-display-table: false !global;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/fec_eregs/settings/base.py:
--------------------------------------------------------------------------------
1 | import json
2 | import os
3 |
4 | from cfenv import AppEnv
5 | env = AppEnv()
6 | from regcore.settings.base import *
7 | REGCORE_APPS = tuple(INSTALLED_APPS)
8 | REGCORE_DATABASES = dict(DATABASES)
9 |
10 | from regulations.settings.base import *
11 | REGSITE_APPS = tuple(INSTALLED_APPS)
12 |
13 | # dedupe apps:
14 | INSTALLED_APPS = ['fec_eregs']
15 | INSTALLED_APPS.extend(a for a in REGCORE_APPS if a not in INSTALLED_APPS)
16 | INSTALLED_APPS.extend(a for a in REGSITE_APPS if a not in INSTALLED_APPS)
17 |
18 | NOSE_ARGS = [
19 | '--with-coverage',
20 | '--cover-package=fec_eregs',
21 | '--tests=fec_eregs/tests/',
22 | '--verbosity=3'
23 | ]
24 |
25 |
26 | TEMPLATES[0]['OPTIONS']['context_processors'] += (
27 | 'fec_eregs.context_processors.app_urls',
28 | )
29 |
30 | TEST_RUNNER = 'django_nose.runner.NoseTestSuiteRunner'
31 |
32 | ROOT_URLCONF = 'fec_eregs.urls'
33 |
34 | DATABASES = REGCORE_DATABASES
35 |
36 | API_BASE = 'http://localhost:{}/api/'.format(
37 | os.environ.get('PORT', '8000'))
38 |
39 | STATICFILES_DIRS = ['compiled']
40 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
41 | STATIC_ROOT = os.path.join(os.path.dirname(BASE_DIR), 'frontend_build')
42 |
43 |
44 | DATA_LAYERS = DATA_LAYERS or []
45 |
46 | DATA_LAYERS = DATA_LAYERS + (
47 | 'regulations.generator.layers.external_citation.ExternalCitationLayer',)
48 |
49 | FEC_API_KEY = env.get_credential('FEC_API_KEY', '')
50 | FEC_API_VERSION = os.environ.get('FEC_API_VERSION', 'v1')
51 |
52 | FEC_API_URL = os.environ.get('FEC_API_URL', '')
53 | FEC_CMS_URL = os.environ.get('FEC_CMS_URL', '')
54 | FEC_WEB_URL = os.environ.get('FEC_WEB_URL', '')
55 |
56 | SIDEBARS = (
57 | 'regulations.generator.sidebar.help.Help',
58 | )
59 | # Satisfies Django3.2 auto-created primary keys, set to AutoField
60 | DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/addons/_timing-functions.scss:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | /// CSS cubic-bezier timing functions. Timing functions courtesy of jquery.easie (github.com/jaukia/easie)
4 | ///
5 | /// Timing functions are the same as demoed here: http://jqueryui.com/resources/demos/effect/easing.html
6 | ///
7 | /// @type cubic-bezier
8 |
9 | $ease-in-quad: cubic-bezier(0.550, 0.085, 0.680, 0.530);
10 | $ease-in-cubic: cubic-bezier(0.550, 0.055, 0.675, 0.190);
11 | $ease-in-quart: cubic-bezier(0.895, 0.030, 0.685, 0.220);
12 | $ease-in-quint: cubic-bezier(0.755, 0.050, 0.855, 0.060);
13 | $ease-in-sine: cubic-bezier(0.470, 0.000, 0.745, 0.715);
14 | $ease-in-expo: cubic-bezier(0.950, 0.050, 0.795, 0.035);
15 | $ease-in-circ: cubic-bezier(0.600, 0.040, 0.980, 0.335);
16 | $ease-in-back: cubic-bezier(0.600, -0.280, 0.735, 0.045);
17 |
18 | $ease-out-quad: cubic-bezier(0.250, 0.460, 0.450, 0.940);
19 | $ease-out-cubic: cubic-bezier(0.215, 0.610, 0.355, 1.000);
20 | $ease-out-quart: cubic-bezier(0.165, 0.840, 0.440, 1.000);
21 | $ease-out-quint: cubic-bezier(0.230, 1.000, 0.320, 1.000);
22 | $ease-out-sine: cubic-bezier(0.390, 0.575, 0.565, 1.000);
23 | $ease-out-expo: cubic-bezier(0.190, 1.000, 0.220, 1.000);
24 | $ease-out-circ: cubic-bezier(0.075, 0.820, 0.165, 1.000);
25 | $ease-out-back: cubic-bezier(0.175, 0.885, 0.320, 1.275);
26 |
27 | $ease-in-out-quad: cubic-bezier(0.455, 0.030, 0.515, 0.955);
28 | $ease-in-out-cubic: cubic-bezier(0.645, 0.045, 0.355, 1.000);
29 | $ease-in-out-quart: cubic-bezier(0.770, 0.000, 0.175, 1.000);
30 | $ease-in-out-quint: cubic-bezier(0.860, 0.000, 0.070, 1.000);
31 | $ease-in-out-sine: cubic-bezier(0.445, 0.050, 0.550, 0.950);
32 | $ease-in-out-expo: cubic-bezier(1.000, 0.000, 0.000, 1.000);
33 | $ease-in-out-circ: cubic-bezier(0.785, 0.135, 0.150, 0.860);
34 | $ease-in-out-back: cubic-bezier(0.680, -0.550, 0.265, 1.550);
35 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/functions/_modular-scale.scss:
--------------------------------------------------------------------------------
1 | // Scaling Variables
2 | $golden: 1.618;
3 | $minor-second: 1.067;
4 | $major-second: 1.125;
5 | $minor-third: 1.2;
6 | $major-third: 1.25;
7 | $perfect-fourth: 1.333;
8 | $augmented-fourth: 1.414;
9 | $perfect-fifth: 1.5;
10 | $minor-sixth: 1.6;
11 | $major-sixth: 1.667;
12 | $minor-seventh: 1.778;
13 | $major-seventh: 1.875;
14 | $octave: 2;
15 | $major-tenth: 2.5;
16 | $major-eleventh: 2.667;
17 | $major-twelfth: 3;
18 | $double-octave: 4;
19 |
20 | $modular-scale-ratio: $perfect-fourth !default;
21 | $modular-scale-base: em($em-base) !default;
22 |
23 | @function modular-scale($increment, $value: $modular-scale-base, $ratio: $modular-scale-ratio) {
24 | $v1: nth($value, 1);
25 | $v2: nth($value, length($value));
26 | $value: $v1;
27 |
28 | // scale $v2 to just above $v1
29 | @while $v2 > $v1 {
30 | $v2: ($v2 / $ratio); // will be off-by-1
31 | }
32 | @while $v2 < $v1 {
33 | $v2: ($v2 * $ratio); // will fix off-by-1
34 | }
35 |
36 | // check AFTER scaling $v2 to prevent double-counting corner-case
37 | $double-stranded: $v2 > $v1;
38 |
39 | @if $increment > 0 {
40 | @for $i from 1 through $increment {
41 | @if $double-stranded and ($v1 * $ratio) > $v2 {
42 | $value: $v2;
43 | $v2: ($v2 * $ratio);
44 | } @else {
45 | $v1: ($v1 * $ratio);
46 | $value: $v1;
47 | }
48 | }
49 | }
50 |
51 | @if $increment < 0 {
52 | // adjust $v2 to just below $v1
53 | @if $double-stranded {
54 | $v2: ($v2 / $ratio);
55 | }
56 |
57 | @for $i from $increment through -1 {
58 | @if $double-stranded and ($v1 / $ratio) < $v2 {
59 | $value: $v2;
60 | $v2: ($v2 / $ratio);
61 | } @else {
62 | $v1: ($v1 / $ratio);
63 | $value: $v1;
64 | }
65 | }
66 | }
67 |
68 | @return $value;
69 | }
70 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/js/templates/nav-data.hbs:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/addons/_prefixer.scss:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | /// A mixin for generating vendor prefixes on non-standardized properties.
4 | ///
5 | /// @param {String} $property
6 | /// Property to prefix
7 | ///
8 | /// @param {*} $value
9 | /// Value to use
10 | ///
11 | /// @param {List} $prefixes
12 | /// Prefixes to define
13 | ///
14 | /// @example scss - Usage
15 | /// .element {
16 | /// @include prefixer(border-radius, 10px, webkit ms spec);
17 | /// }
18 | ///
19 | /// @example css - CSS Output
20 | /// .element {
21 | /// -webkit-border-radius: 10px;
22 | /// -moz-border-radius: 10px;
23 | /// border-radius: 10px;
24 | /// }
25 | ///
26 | /// @require {variable} $prefix-for-webkit
27 | /// @require {variable} $prefix-for-mozilla
28 | /// @require {variable} $prefix-for-microsoft
29 | /// @require {variable} $prefix-for-opera
30 | /// @require {variable} $prefix-for-spec
31 |
32 | @mixin prefixer($property, $value, $prefixes) {
33 | @each $prefix in $prefixes {
34 | @if $prefix == webkit {
35 | @if $prefix-for-webkit {
36 | -webkit-#{$property}: $value;
37 | }
38 | } @else if $prefix == moz {
39 | @if $prefix-for-mozilla {
40 | -moz-#{$property}: $value;
41 | }
42 | } @else if $prefix == ms {
43 | @if $prefix-for-microsoft {
44 | -ms-#{$property}: $value;
45 | }
46 | } @else if $prefix == o {
47 | @if $prefix-for-opera {
48 | -o-#{$property}: $value;
49 | }
50 | } @else if $prefix == spec {
51 | @if $prefix-for-spec {
52 | #{$property}: $value;
53 | }
54 | } @else {
55 | @warn "Unrecognized prefix: #{$prefix}";
56 | }
57 | }
58 | }
59 |
60 | @mixin disable-prefix-for-all() {
61 | $prefix-for-webkit: false !global;
62 | $prefix-for-mozilla: false !global;
63 | $prefix-for-microsoft: false !global;
64 | $prefix-for-opera: false !global;
65 | $prefix-for-spec: false !global;
66 | }
67 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/addons/_buttons.scss:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | /// Generates variables for all buttons. Please note that you must use interpolation on the variable: `#{$all-buttons}`.
4 | ///
5 | /// @example scss - Usage
6 | /// #{$all-buttons} {
7 | /// background-color: #f00;
8 | /// }
9 | ///
10 | /// #{$all-buttons-focus},
11 | /// #{$all-buttons-hover} {
12 | /// background-color: #0f0;
13 | /// }
14 | ///
15 | /// #{$all-buttons-active} {
16 | /// background-color: #00f;
17 | /// }
18 | ///
19 | /// @example css - CSS Output
20 | /// button,
21 | /// input[type="button"],
22 | /// input[type="reset"],
23 | /// input[type="submit"] {
24 | /// background-color: #f00;
25 | /// }
26 | ///
27 | /// button:focus,
28 | /// input[type="button"]:focus,
29 | /// input[type="reset"]:focus,
30 | /// input[type="submit"]:focus,
31 | /// button:hover,
32 | /// input[type="button"]:hover,
33 | /// input[type="reset"]:hover,
34 | /// input[type="submit"]:hover {
35 | /// background-color: #0f0;
36 | /// }
37 | ///
38 | /// button:active,
39 | /// input[type="button"]:active,
40 | /// input[type="reset"]:active,
41 | /// input[type="submit"]:active {
42 | /// background-color: #00f;
43 | /// }
44 | ///
45 | /// @require assign-inputs
46 | ///
47 | /// @type List
48 | ///
49 | /// @todo Remove double assigned variables (Lines 59–62) in v5.0.0
50 |
51 | $buttons-list: 'button',
52 | 'input[type="button"]',
53 | 'input[type="reset"]',
54 | 'input[type="submit"]';
55 |
56 | $all-buttons: assign-inputs($buttons-list);
57 | $all-buttons-active: assign-inputs($buttons-list, active);
58 | $all-buttons-focus: assign-inputs($buttons-list, focus);
59 | $all-buttons-hover: assign-inputs($buttons-list, hover);
60 |
61 | $all-button-inputs: $all-buttons;
62 | $all-button-inputs-active: $all-buttons-active;
63 | $all-button-inputs-focus: $all-buttons-focus;
64 | $all-button-inputs-hover: $all-buttons-hover;
65 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/css3/_background.scss:
--------------------------------------------------------------------------------
1 | //************************************************************************//
2 | // Background property for adding multiple backgrounds using shorthand
3 | // notation.
4 | //************************************************************************//
5 |
6 | @mixin background($backgrounds...) {
7 | $webkit-backgrounds: ();
8 | $spec-backgrounds: ();
9 |
10 | @each $background in $backgrounds {
11 | $webkit-background: ();
12 | $spec-background: ();
13 | $background-type: type-of($background);
14 |
15 | @if $background-type == string or $background-type == list {
16 | $background-str: if($background-type == list, nth($background, 1), $background);
17 |
18 | $url-str: str-slice($background-str, 0, 3);
19 | $gradient-type: str-slice($background-str, 0, 6);
20 |
21 | @if $url-str == "url" {
22 | $webkit-background: $background;
23 | $spec-background: $background;
24 | }
25 |
26 | @else if $gradient-type == "linear" {
27 | $gradients: _linear-gradient-parser("#{$background}");
28 | $webkit-background: map-get($gradients, webkit-image);
29 | $spec-background: map-get($gradients, spec-image);
30 | }
31 |
32 | @else if $gradient-type == "radial" {
33 | $gradients: _radial-gradient-parser("#{$background}");
34 | $webkit-background: map-get($gradients, webkit-image);
35 | $spec-background: map-get($gradients, spec-image);
36 | }
37 |
38 | @else {
39 | $webkit-background: $background;
40 | $spec-background: $background;
41 | }
42 | }
43 |
44 | @else {
45 | $webkit-background: $background;
46 | $spec-background: $background;
47 | }
48 |
49 | $webkit-backgrounds: append($webkit-backgrounds, $webkit-background, comma);
50 | $spec-backgrounds: append($spec-backgrounds, $spec-background, comma);
51 | }
52 |
53 | background: $webkit-backgrounds;
54 | background: $spec-backgrounds;
55 | }
56 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/_variables.scss:
--------------------------------------------------------------------------------
1 | // Typography
2 | $serif: 'gandhi', serif;
3 | $sans-serif: 'karla', sans-serif;
4 | $base-font-family: $serif;
5 |
6 | // Primary colors
7 | $crimson: #631010;
8 | $orange: #f77b42;
9 |
10 | $federal-blue: #112e51; // U.S. Web Design Standards color (blue) $primary-darkest //
11 | $aqua: #36bdbb;
12 |
13 | $base: #212121; // U.S. Web Design Standards color $base //
14 | $inverse: #ffffff;
15 | $inverse-translucent: rgba(255, 255, 255, .7);
16 |
17 | // Accent colors
18 | $bright-red: #dc3b00;
19 | $deep-orange: #e36641;
20 | $deep-red: #961a16;
21 |
22 | $bright-blue: #0aacfa;
23 | $deep-aqua: #3e8a9a;
24 | $navy: #164f85;
25 |
26 | $gray-lightest: #f1f1f1; // U.S. Web Design Standards color $gray-lightest //
27 | $gray-light: #e8e8e8;
28 | $gray-medium: #d6d7d9; // U.S. Web Design Standards color $gray-lighter //
29 | $gray: #aeb0b5; // U.S. Web Design Standards color $gray-light //
30 | $gray-dark: #5b616b; // U.S. Web Design Standards color $gray //
31 |
32 |
33 | $disabled: #737373;
34 | $green-light: #4aa564; // U.S. Web Design Standards color $green-light //
35 | $green-dark: #287538;
36 |
37 | $error: #cd2026; // U.S. Web Design Standards color (red) $secondary-dark //
38 |
39 | // Chart colors
40 | $blue-data: #21adf7;
41 | $red-data: #da3c18;
42 |
43 | // Focus
44 | $focus: #5b9dd9; // Focus color in order to simulate focus ring on checkboxes
45 |
46 | // Color aliases
47 | $primary: $federal-blue;
48 | $primary-contrast: $aqua;
49 | $primary-focus: $deep-aqua;
50 |
51 | $secondary: $crimson;
52 | $secondary-contrast: $orange;
53 | $secondary-focus: $deep-red;
54 |
55 | $neutral: $gray-lightest;
56 | $neutral-contrast: $gray-dark;
57 | $neutral-focus: $primary;
58 |
59 | // Z-Indices
60 |
61 | $z1: 100;
62 | $z2: 200;
63 | $z3: 300;
64 | $z4: 400;
65 | $z5: 500;
66 | $z6: 600;
67 | $z7: 700;
68 | $z8: 800;
69 | $z-max: 90000000;
70 |
71 | $z-overlay: $z2;
72 | $z-tooltip: $z4;
73 | $z-downloads: $z4;
74 | $z-navigation: $z7;
75 | $z-header: $z6;
76 | $z-sticky: $z7;
77 | $z-glossary: $z8;
78 | $z-feedback: $z-max;
79 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/neat/functions/_new-breakpoint.scss:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | /// Returns a media context (media query / grid context) that can be stored in a variable and passed to `media()` as a single-keyword argument. Media contexts defined using `new-breakpoint` are used by the visual grid, as long as they are defined before importing Neat.
4 | ///
5 | /// @param {List} $query
6 | /// A list of media query features and values. Each `$feature` should have a corresponding `$value`.
7 | ///
8 | /// If there is only a single `$value` in `$query`, `$default-feature` is going to be used.
9 | ///
10 | /// The number of total columns in the grid can be set by passing `$columns` at the end of the list (overrides `$total-columns`). For a list of valid values for `$feature`, click [here](http://www.w3.org/TR/css3-mediaqueries/#media1).
11 | ///
12 | /// @param {Number (unitless)} $total-columns [$grid-columns]
13 | /// - Number of columns to use in the new grid context. Can be set as a shorthand in the first parameter.
14 | ///
15 | /// @example scss - Usage
16 | /// $mobile: new-breakpoint(max-width 480px 4);
17 | ///
18 | /// .element {
19 | /// @include media($mobile) {
20 | /// @include span-columns(4);
21 | /// }
22 | /// }
23 | ///
24 | /// @example css - CSS Output
25 | /// @media screen and (max-width: 480px) {
26 | /// .element {
27 | /// display: block;
28 | /// float: left;
29 | /// margin-right: 7.42297%;
30 | /// width: 100%;
31 | /// }
32 | /// .element:last-child {
33 | /// margin-right: 0;
34 | /// }
35 | /// }
36 |
37 | @function new-breakpoint($query: $feature $value $columns, $total-columns: $grid-columns) {
38 | @if length($query) == 1 {
39 | $query: $default-feature nth($query, 1) $total-columns;
40 | } @else if is-even(length($query)) {
41 | $query: append($query, $total-columns);
42 | }
43 |
44 | @if is-not(belongs-to($query, $visual-grid-breakpoints)) {
45 | $visual-grid-breakpoints: append($visual-grid-breakpoints, $query, comma) !global;
46 | }
47 |
48 | @return $query;
49 | }
50 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/_functions.scss:
--------------------------------------------------------------------------------
1 | // Utility Functions
2 | //
3 | // Various useful functions.
4 | //
5 |
6 | // Unit conversion
7 | //
8 | // When using the FEC styleguide with other frameworks, it might be useful to
9 | // scale and convert the FEC component sizes. Use these variables to adjust how
10 | // the styleguide is built.
11 | //
12 | // $px-only - (bool) convert `rem` units to `px`
13 | // $base-size-px - (integer) sets the base size for a `rem` unit (only take effect when `$px-only` is true)
14 | //
15 | @use 'sass:math';
16 | $base-size-px: 10 !default;
17 | $px-only: false !default;
18 |
19 | // u-parse-int($n)
20 | //
21 | // Parses the integer part from a value with unit.
22 | //
23 | // $n - the value to parse e.g. 2em
24 | //
25 | @function u-parse-int($n) {
26 | @return math.div($n, ($n * 0 + 1));
27 | }
28 |
29 | // u-scale-to-px($n)
30 | //
31 | // Scales the value according to `$base-size-px` and appends the `px` unit.
32 | //
33 | // $n - value to scale to `px`
34 | //
35 | @function u-scale-to-px($n) {
36 | @return $n * $base-size-px + px;
37 | }
38 |
39 | // u($values)
40 | //
41 | // Convert and/or scale `rem` units. This should be used on all
42 | // properties related to component size. This allows FEC styleguide
43 | // to scale component sizes properly.
44 | //
45 | // Inspired by https://github.com/saxinte/rem-to-px-revisited
46 | //
47 | // $values - single unit or list of units e.g. `1rem 1.2rem`
48 | //
49 | @function u($values) {
50 | $converted: ();
51 |
52 | @if not variable-exists('px-only') or not $px-only {
53 | // No conversion needed
54 | @return $values;
55 | }
56 |
57 | @each $value in $values {
58 | @if type-of($value) == 'number' and $value != 0 {
59 | $unit: unit($value);
60 | $scalar: u-parse-int($value);
61 |
62 | @if $unit == 'rem' {
63 | $converted: append($converted, u-scale-to-px($scalar));
64 | } @else {
65 | $converted: append($converted, $value);
66 | }
67 |
68 | } @else {
69 | $converted: append($converted, $value);
70 | }
71 | }
72 |
73 | @return $converted;
74 | }
75 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/css3/_border-image.scss:
--------------------------------------------------------------------------------
1 | @mixin border-image($borders...) {
2 | $webkit-borders: ();
3 | $spec-borders: ();
4 |
5 | @each $border in $borders {
6 | $webkit-border: ();
7 | $spec-border: ();
8 | $border-type: type-of($border);
9 |
10 | @if $border-type == string or list {
11 | $border-str: if($border-type == list, nth($border, 1), $border);
12 |
13 | $url-str: str-slice($border-str, 0, 3);
14 | $gradient-type: str-slice($border-str, 0, 6);
15 |
16 | @if $url-str == "url" {
17 | $webkit-border: $border;
18 | $spec-border: $border;
19 | }
20 |
21 | @else if $gradient-type == "linear" {
22 | $gradients: _linear-gradient-parser("#{$border}");
23 | $webkit-border: map-get($gradients, webkit-image);
24 | $spec-border: map-get($gradients, spec-image);
25 | }
26 |
27 | @else if $gradient-type == "radial" {
28 | $gradients: _radial-gradient-parser("#{$border}");
29 | $webkit-border: map-get($gradients, webkit-image);
30 | $spec-border: map-get($gradients, spec-image);
31 | }
32 |
33 | @else {
34 | $webkit-border: $border;
35 | $spec-border: $border;
36 | }
37 | }
38 |
39 | @else {
40 | $webkit-border: $border;
41 | $spec-border: $border;
42 | }
43 |
44 | $webkit-borders: append($webkit-borders, $webkit-border, comma);
45 | $spec-borders: append($spec-borders, $spec-border, comma);
46 | }
47 |
48 | -webkit-border-image: $webkit-borders;
49 | border-image: $spec-borders;
50 | border-style: solid;
51 | }
52 |
53 | //Examples:
54 | // @include border-image(url("image.png"));
55 | // @include border-image(url("image.png") 20 stretch);
56 | // @include border-image(linear-gradient(45deg, orange, yellow));
57 | // @include border-image(linear-gradient(45deg, orange, yellow) stretch);
58 | // @include border-image(linear-gradient(45deg, orange, yellow) 20 30 40 50 stretch round);
59 | // @include border-image(radial-gradient(top, cover, orange, yellow, orange));
60 |
--------------------------------------------------------------------------------
/requirements-parsing.txt:
--------------------------------------------------------------------------------
1 | amqp==5.0.9
2 | appnope==0.1.0
3 | asn1crypto==0.24.0
4 | attrs==18.2.0
5 | billiard==3.6.4.0
6 | boto3==1.7.84
7 | botocore==1.10.84
8 | cached-property==1.3.1
9 | celery==5.2.7
10 | certifi==2023.7.22
11 | cfenv==0.5.3
12 | cffi==1.15.0
13 | chardet==3.0.4
14 | click==8.0.3
15 | coloredlogs==9.0
16 | cryptography==42.0.5
17 | decorator==4.2.1
18 | dj-database-url==0.4.2
19 | django==4.2.11
20 | django-click==2.3.0
21 | django-haystack==3.1.1
22 | django-js-asset==1.0.0
23 | django-mptt==0.13.4
24 | django-rq==2.5.1
25 | djangorestframework==3.11.2
26 | docutils==0.14
27 | elasticsearch==1.9.0
28 | enum34==1.1.6
29 | furl==1.0.1
30 | futures==3.1.1
31 | gitdb2==2.0.3
32 | GitPython==3.1.41
33 | gevent==23.9.1
34 | gunicorn==19.10.0
35 | humanfriendly==4.9
36 | inflection==0.3.1
37 | invoke==0.22.0
38 | ipdb==0.13.2
39 | ipython==8.10.0
40 | ipython-genutils==0.2.0
41 | jedi==0.18.2
42 | jmespath==0.9.3
43 | json-delta==2.0
44 | jsonschema==2.5.1
45 | kombu==5.2.3
46 | lxml==4.9.1
47 | marshmallow==2.19.2
48 | networkx==2.6.3
49 | newrelic==2.100.0.84
50 | orderedmultidict==0.7.11
51 | parso==0.8.3
52 | pbr==4.0.0
53 | pexpect==4.4.0
54 | pickleshare==0.7.5
55 | prompt-toolkit==3.0.30
56 | psycopg2==2.9.1
57 | ptyprocess==0.5.2
58 | pycparser==2.18
59 | pyelasticsearch==1.4
60 | Pygments==2.15.1
61 | pyOpenSSL==17.5.0
62 | pyparsing==2.2.1
63 | python-constraint==1.3.1
64 | python-dateutil==2.7.3
65 | pytz==2021.3
66 | redis==4.5.4
67 | # regparser
68 | -e git+https://github.com/fecgov/regulations-parser.git@master#egg=regparser
69 |
70 | # regsite
71 | -e git+https://github.com/fecgov/regulations-site@master#egg=regulations
72 |
73 | # regcore
74 | -e git+https://github.com/fecgov/regulations-core@master#egg=regcore
75 | requests==2.31.0
76 | requests-cache==0.6.3
77 | requests-toolbelt==0.8.0
78 | roman==2.0.0
79 | rq==1.3.0
80 | setuptools==65.6.3
81 | s3transfer==0.1.13
82 | simplegeneric==0.8.1
83 | simplejson==3.13.2
84 | six==1.11.0
85 | smmap2==2.0.3
86 | sqlparse==0.4.4
87 | stevedore==1.28.0
88 | traitlets==5.7.0
89 | urllib3==1.26.18
90 | vine==5.0.0
91 | wcwidth==0.1.7
92 | webargs==5.5.3
93 | whitenoise==3.3.1
94 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/neat/settings/_grid.scss:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | /// Sets the relative width of a single grid column. The unit used should be the same one used to define `$gutter`. To learn more about modular-scale() see [Bourbon docs](http://bourbon.io/docs/#modular-scale). Set with a `!global` flag.
4 | ///
5 | /// @type Number (Unit)
6 |
7 | $column: modular-scale(3, 1em, $golden) !default;
8 |
9 | /// Sets the relative width of a single grid gutter. The unit used should be the same one used to define `$column`. To learn more about modular-scale() see [Bourbon docs](http://bourbon.io/docs/#modular-scale). Set with the `!global` flag.
10 | ///
11 | /// @type Number (Unit)
12 |
13 | $gutter: modular-scale(1, 1em, $golden) !default;
14 |
15 | /// Sets the total number of columns in the grid. Its value can be overridden inside a media query using the `media()` mixin. Set with the `!global` flag.
16 | ///
17 | /// @type Number (Unitless)
18 |
19 | $grid-columns: 12 !default;
20 |
21 | /// Sets the max-width property of the element that includes `outer-container()`. To learn more about `em()` see [Bourbon docs](http://bourbon.io/docs/#px-to-em). Set with the `!global` flag.
22 | ///
23 | /// @type Number (Unit)
24 | ///
25 | $max-width: em(1088) !default;
26 |
27 | /// When set to true, it sets the box-sizing property of all elements to `border-box`. Set with a `!global` flag.
28 | ///
29 | /// @type Bool
30 | ///
31 | /// @example css - CSS Output
32 | /// html {
33 | /// box-sizing: border-box; }
34 | ///
35 | /// *, *::after, *::before {
36 | /// box-sizing: inherit;
37 | /// }
38 |
39 | $border-box-sizing: true !default;
40 |
41 | /// Sets the default [media feature](http://www.w3.org/TR/css3-mediaqueries/#media) that `media()` and `new-breakpoint()` revert to when only a breakpoint value is passed. Set with a `!global` flag.
42 | ///
43 | /// @type String
44 |
45 | $default-feature: min-width; // Default @media feature for the breakpoint() mixin
46 |
47 | ///Sets the default layout direction of the grid. Can be `LTR` or `RTL`. Set with a `!global` flag.
48 | ///
49 | ///@type String
50 |
51 | $default-layout-direction: LTR !default;
52 |
--------------------------------------------------------------------------------
/fec_eregs/static/regulations/img/close-caret.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | image/svg+xml
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/helpers/_radial-arg-parser.scss:
--------------------------------------------------------------------------------
1 | @function _radial-arg-parser($g1, $g2, $pos, $shape-size) {
2 | @each $value in $g1, $g2 {
3 | $first-val: nth($value, 1);
4 | $pos-type: type-of($first-val);
5 | $spec-at-index: null;
6 |
7 | // Determine if spec was passed to mixin
8 | @if type-of($value) == list {
9 | $spec-at-index: if(index($value, at), index($value, at), false);
10 | }
11 | @if $spec-at-index {
12 | @if $spec-at-index > 1 {
13 | @for $i from 1 through ($spec-at-index - 1) {
14 | $shape-size: $shape-size nth($value, $i);
15 | }
16 | @for $i from ($spec-at-index + 1) through length($value) {
17 | $pos: $pos nth($value, $i);
18 | }
19 | }
20 | @else if $spec-at-index == 1 {
21 | @for $i from ($spec-at-index + 1) through length($value) {
22 | $pos: $pos nth($value, $i);
23 | }
24 | }
25 | $g1: null;
26 | }
27 |
28 | // If not spec calculate correct values
29 | @else {
30 | @if ($pos-type != color) or ($first-val != "transparent") {
31 | @if ($pos-type == number)
32 | or ($first-val == "center")
33 | or ($first-val == "top")
34 | or ($first-val == "right")
35 | or ($first-val == "bottom")
36 | or ($first-val == "left") {
37 |
38 | $pos: $value;
39 |
40 | @if $pos == $g1 {
41 | $g1: null;
42 | }
43 | }
44 |
45 | @else if
46 | ($first-val == "ellipse")
47 | or ($first-val == "circle")
48 | or ($first-val == "closest-side")
49 | or ($first-val == "closest-corner")
50 | or ($first-val == "farthest-side")
51 | or ($first-val == "farthest-corner")
52 | or ($first-val == "contain")
53 | or ($first-val == "cover") {
54 |
55 | $shape-size: $value;
56 |
57 | @if $value == $g1 {
58 | $g1: null;
59 | }
60 |
61 | @else if $value == $g2 {
62 | $g2: null;
63 | }
64 | }
65 | }
66 | }
67 | }
68 | @return $g1, $g2, $pos, $shape-size;
69 | }
70 |
--------------------------------------------------------------------------------
/fec_eregs/static/regulations/img/open-caret.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | image/svg+xml
--------------------------------------------------------------------------------
/fec_eregs/static/regulations/img/close-caret-blue.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | image/svg+xml
--------------------------------------------------------------------------------
/fec_eregs/static/regulations/img/open-caret-blue.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | image/svg+xml
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/helpers/_linear-positions-parser.scss:
--------------------------------------------------------------------------------
1 | @function _linear-positions-parser($pos) {
2 | $type: type-of(nth($pos, 1));
3 | $spec: null;
4 | $degree: null;
5 | $side: null;
6 | $corner: null;
7 | $length: length($pos);
8 | // Parse Side and corner positions
9 | @if ($length > 1) {
10 | @if nth($pos, 1) == "to" { // Newer syntax
11 | $side: nth($pos, 2);
12 |
13 | @if $length == 2 { // eg. to top
14 | // Swap for backwards compatability
15 | $degree: _position-flipper(nth($pos, 2));
16 | }
17 | @else if $length == 3 { // eg. to top left
18 | $corner: nth($pos, 3);
19 | }
20 | }
21 | @else if $length == 2 { // Older syntax ("top left")
22 | $side: _position-flipper(nth($pos, 1));
23 | $corner: _position-flipper(nth($pos, 2));
24 | }
25 |
26 | @if ("#{$side} #{$corner}" == "left top") or ("#{$side} #{$corner}" == "top left") {
27 | $degree: _position-flipper(#{$side}) _position-flipper(#{$corner});
28 | }
29 | @else if ("#{$side} #{$corner}" == "right top") or ("#{$side} #{$corner}" == "top right") {
30 | $degree: _position-flipper(#{$side}) _position-flipper(#{$corner});
31 | }
32 | @else if ("#{$side} #{$corner}" == "right bottom") or ("#{$side} #{$corner}" == "bottom right") {
33 | $degree: _position-flipper(#{$side}) _position-flipper(#{$corner});
34 | }
35 | @else if ("#{$side} #{$corner}" == "left bottom") or ("#{$side} #{$corner}" == "bottom left") {
36 | $degree: _position-flipper(#{$side}) _position-flipper(#{$corner});
37 | }
38 | $spec: to $side $corner;
39 | }
40 | @else if $length == 1 {
41 | // Swap for backwards compatability
42 | @if $type == string {
43 | $degree: $pos;
44 | $spec: to _position-flipper($pos);
45 | }
46 | @else {
47 | $degree: -270 - $pos; //rotate the gradient opposite from spec
48 | $spec: $pos;
49 | }
50 | }
51 | $degree: unquote($degree + ",");
52 | $spec: unquote($spec + ",");
53 | @return $degree $spec;
54 | }
55 |
56 | @function _position-flipper($pos) {
57 | @return if($pos == left, right, null)
58 | if($pos == right, left, null)
59 | if($pos == top, bottom, null)
60 | if($pos == bottom, top, null);
61 | }
62 |
--------------------------------------------------------------------------------
/fec_eregs/templates/regulations/partial-definition.html:
--------------------------------------------------------------------------------
1 | {% comment %}
2 | Partial for definitions to be displayed inline in the sidebar
3 | {% endcomment %}
4 |
5 |
11 |
12 | {% comment %}
13 | Used to display scope warnings
14 | {% endcomment %}
15 |
20 |
21 |
22 | {% if node.children %}
23 |
24 | {% if node.marked_up %}
25 |
The first piece of this definition is:
26 |
27 |
28 | {{node.marked_up|safe}}
29 |
30 | {% else %}
31 |
This definition is best viewed in its original location.
32 | {% endif %}
33 | {% elif node.marked_up %}
34 |
35 | {{node.marked_up|safe}}
36 |
37 | {% endif %}
38 | {% if node.children %}
39 |
See the full definition at:
40 | {% endif %}
41 |
42 |
{{formatted_label}}
45 |
46 | {% if not node.children %}
47 | {% if node.interp %}
48 | {% with interp=node.interp.interps.0 %}
49 |
Official Interpretation
53 | {% endwith %}
54 | {% endif %}
55 | {% endif %}
56 |
57 |
Close definition
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/.circleci/config.yml:
--------------------------------------------------------------------------------
1 | # Python CircleCI 2.0 configuration file
2 | # Check https://circleci.com/developer/images/image/cimg/python for more details
3 | version: 2.1
4 | jobs:
5 | build:
6 | docker:
7 | # CircleCI maintains a library of pre-built images documented at
8 | # https://circleci.com/developer/images
9 | # use `-browsers` prefix for selenium tests, e.g. `-browsers`
10 |
11 | - image: cimg/python:3.10
12 | environment:
13 | TZ: America/New_York
14 |
15 |
16 | steps:
17 | - checkout
18 |
19 | - run:
20 | name: Install node dependencies
21 | command: |
22 | curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
23 | echo ". ~/.nvm/nvm.sh" >> $BASH_ENV
24 | export NVM_DIR="$HOME/.nvm"
25 | [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
26 | [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
27 | nvm install v18.17.1
28 | nvm use 18.17.1
29 | nvm alias default 18.17.1
30 | npm install -g grunt-cli
31 | npm install
32 | npm run build
33 |
34 | - run:
35 | name: Install Python dependencies
36 | command: |
37 | python3 -m venv .env
38 | . .env/bin/activate
39 | pip install -r requirements.txt
40 |
41 | - run:
42 | name: Run tests
43 | command: |
44 | . .env/bin/activate
45 | npm run build
46 | mkdir compiled
47 | python manage.py compile_frontend
48 |
49 | - store_artifacts:
50 | path: test-reports
51 | destination: test-reports
52 |
53 | - run:
54 | name: Install cf cli
55 | command: |
56 | mkdir -p $HOME/bin
57 | export PATH=$HOME/bin:$PATH
58 | curl -L "https://cli.run.pivotal.io/stable?release=linux64-binary&version=7.1.0" | tar xzv -C $HOME/bin
59 |
60 | - run:
61 | name: Deploy eregs
62 | command: |
63 | export PATH=$HOME/bin:$PATH
64 | . .env/bin/activate
65 | npm run build
66 | python manage.py compile_frontend # builds the frontend
67 | invoke deploy --login True --yes
68 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/components/_accordions.scss:
--------------------------------------------------------------------------------
1 | // Accordions
2 | //
3 | // .accordion--neutral - No background, dark buttons
4 | // .accordion--inverse - Dark background, light buttons
5 | //
6 | //
7 | //
8 | //
9 | // First Item
10 | //
11 | //
12 | //
13 | // First Item Content
14 | //
15 | //
16 | //
17 | //
18 | //
19 | // Second Item
20 | //
21 | //
22 | //
23 | // Second Item Content
24 | //
25 | //
26 | //
27 | //
28 | //
29 |
30 | .accordion__button {
31 | @include u-icon-bg($plus-circle, $primary);
32 | background-size: u(2rem);
33 | background-position: 95% 50%;
34 | border-bottom: 1px solid $base;
35 | margin: 0 0 -1px 0;
36 | color: $base;
37 | font-size: u(1.4rem);
38 | font-weight: bold;
39 | letter-spacing: -.3px;
40 | padding: u(1rem 4rem 1rem 2rem);
41 | text-align: left;
42 | width: 100%;
43 |
44 | &[aria-expanded='true'] {
45 | @include u-icon-bg($minus-circle, $primary);
46 | border-bottom: none;
47 | }
48 | }
49 |
50 | .accordion__content {
51 | @include clearfix();
52 | border-bottom: 1px solid $base;
53 | padding: u(2rem);
54 | font-family: $sans-serif;
55 | }
56 |
57 | .accordion__button--spacious {
58 | padding: u(2rem 4rem 2rem 2rem);
59 | }
60 |
61 | .accordion--neutral {
62 | .accordion__button {
63 | background-color: $gray-lightest;
64 | border-top: 1px solid $primary;
65 |
66 | &[aria-expanded='true'] {
67 | background-color: $gray-light;
68 | border-top: 1px solid $base;
69 | border-bottom: 2px solid $gray;
70 | }
71 | }
72 |
73 | .accordion__content {
74 | background-color: $gray-light;
75 | border-bottom-color: $base;
76 | border-top-color: $gray;
77 | }
78 | }
79 |
80 | .accordion--inverse {
81 | .accordion__button {
82 | @include u-icon-bg($plus-circle, $inverse);
83 | background-position: 100% 50%;
84 | border-color: $inverse;
85 | color: $inverse;
86 |
87 | &[aria-expanded='true'] {
88 | @include u-icon-bg($minus-circle, $inverse);
89 | }
90 | }
91 |
92 | .accordion__content {
93 | @include u-font-color($inverse);
94 | border-color: $inverse;
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/fec_eregs/templates/regulations/generic_universal.html:
--------------------------------------------------------------------------------
1 | {% extends "regulations/generic_universal.html" %}
2 | {% load static %}
3 |
4 | {% block body %}
5 |
8 |
9 |
10 | {% block hero %} {% endblock %}
11 |
12 |
13 |
14 |
15 |
24 |
Examples: spending; 9003.6
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 | {% block regulations-title %}
34 |
35 |
Regulations
36 |
39 |
40 | {% endblock %}
41 |
42 | {% block reg-list %}
43 | {{ block.super }}
44 | {% endblock %}
45 |
46 | {% block moreregulations %}
47 | {% endblock %}
48 |
49 |
50 | {% block secondcolumn_notices %}
51 | {% endblock %}
52 |
53 |
54 | {% block about-eregs %}
55 | {{ block.super }}
56 | {% endblock %}
57 |
58 |
59 |
60 |
61 |
62 | {% include "regulations/full_footer.html" %}
63 |
64 | {% block endscripts %}
65 | {% endblock %}
66 |
67 | {% endblock %}
68 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/css3/_transition.scss:
--------------------------------------------------------------------------------
1 | // Shorthand mixin. Supports multiple parentheses-deliminated values for each variable.
2 | // Example: @include transition (all 2s ease-in-out);
3 | // @include transition (opacity 1s ease-in 2s, width 2s ease-out);
4 | // @include transition-property (transform, opacity);
5 |
6 | @mixin transition($properties...) {
7 | // Fix for vendor-prefix transform property
8 | $needs-prefixes: false;
9 | $webkit: ();
10 | $moz: ();
11 | $spec: ();
12 |
13 | // Create lists for vendor-prefixed transform
14 | @each $list in $properties {
15 | @if nth($list, 1) == "transform" {
16 | $needs-prefixes: true;
17 | $list1: -webkit-transform;
18 | $list2: -moz-transform;
19 | $list3: ();
20 |
21 | @each $var in $list {
22 | $list3: join($list3, $var);
23 |
24 | @if $var != "transform" {
25 | $list1: join($list1, $var);
26 | $list2: join($list2, $var);
27 | }
28 | }
29 |
30 | $webkit: append($webkit, $list1);
31 | $moz: append($moz, $list2);
32 | $spec: append($spec, $list3);
33 | } @else {
34 | $webkit: append($webkit, $list, comma);
35 | $moz: append($moz, $list, comma);
36 | $spec: append($spec, $list, comma);
37 | }
38 | }
39 |
40 | @if $needs-prefixes {
41 | -webkit-transition: $webkit;
42 | -moz-transition: $moz;
43 | transition: $spec;
44 | } @else {
45 | @if length($properties) >= 1 {
46 | @include prefixer(transition, $properties, webkit moz spec);
47 | } @else {
48 | $properties: all 0.15s ease-out 0s;
49 | @include prefixer(transition, $properties, webkit moz spec);
50 | }
51 | }
52 | }
53 |
54 | @mixin transition-property($properties...) {
55 | -webkit-transition-property: transition-property-names($properties, "webkit");
56 | -moz-transition-property: transition-property-names($properties, "moz");
57 | transition-property: transition-property-names($properties, false);
58 | }
59 |
60 | @mixin transition-duration($times...) {
61 | @include prefixer(transition-duration, $times, webkit moz spec);
62 | }
63 |
64 | @mixin transition-timing-function($motions...) {
65 | // ease | linear | ease-in | ease-out | ease-in-out | cubic-bezier()
66 | @include prefixer(transition-timing-function, $motions, webkit moz spec);
67 | }
68 |
69 | @mixin transition-delay($times...) {
70 | @include prefixer(transition-delay, $times, webkit moz spec);
71 | }
72 |
--------------------------------------------------------------------------------
/fec_eregs/tests/test_views_partial_definition.py:
--------------------------------------------------------------------------------
1 | from unittest import TestCase
2 | from django.template import loader, Context
3 |
4 |
5 | class PartialDefinitionTests(TestCase):
6 | urls = 'regulation.urls'
7 |
8 | def test_partial_definition_with_children(self):
9 | t = loader.get_template('regulations/partial-definition.html')
10 |
11 | node = {
12 | 'section_id': '100-5',
13 | 'label_id': '100-5',
14 | 'children': [{'label_id': '100-5-a'}],
15 | 'marked_up': 'Political committee means any group meeting one of the following conditions:',
16 | }
17 |
18 | context_dict = {'node': node, 'version': '2015-annual'}
19 | response = t.render(Context(context_dict))
20 |
21 | first_paragraph = 'The first piece of this definition is:'
22 | see_full_definition = 'See the full definition at:'
23 | self.assertTrue(first_paragraph in response)
24 | self.assertTrue(see_full_definition in response)
25 | self.assertTrue(node['marked_up'] in response)
26 |
27 | def test_partial_definition_no_children(self):
28 | t = loader.get_template('regulations/partial-definition.html')
29 |
30 | node = {
31 | 'section_id': '102-4',
32 | 'label_id': '202-2-a',
33 | 'marked_up': 'This term is defined carefully'
34 | }
35 |
36 | context_dict = {'node': node, 'version': '2012-1223'}
37 | response = t.render(Context(context_dict))
38 |
39 | self.assertTrue(node['marked_up'] in response)
40 | first_paragraph = 'The first piece of this definition is:'
41 | see_full_definition = 'See the full definition at:'
42 | self.assertFalse(first_paragraph in response)
43 | self.assertFalse(see_full_definition in response)
44 |
45 | def test_partial_definition_with_children_no_text(self):
46 | t = loader.get_template('regulations/partial-definition.html')
47 |
48 | node = {
49 | 'section_id': '100-5',
50 | 'label_id': '100-5',
51 | 'children': [{'label_id': '100-5-a'}],
52 | }
53 |
54 | context_dict = {'node': node, 'version': '2015-annual'}
55 | response = t.render(Context(context_dict))
56 |
57 | first_paragraph = 'The first piece of this definition is:'
58 | best_viewed = 'This definition is best viewed in its original location.'
59 | see_full_definition = 'See the full definition at:'
60 | self.assertFalse(first_paragraph in response)
61 | self.assertTrue(see_full_definition in response)
62 | self.assertTrue(best_viewed in response)
63 |
64 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/components/_glossary.scss:
--------------------------------------------------------------------------------
1 | // Glossary
2 | //
3 |
4 | .glossary {
5 | @include transition(right, .3s);
6 | background-color: $base;
7 | bottom: 0;
8 | color: $inverse;
9 | max-width: u(30rem);
10 | overflow-y: scroll;
11 | padding: u(8rem 3rem);
12 | position: fixed;
13 | top: 0;
14 | width: 75%;
15 | z-index: $z-glossary;
16 |
17 | &[aria-hidden='true'] {
18 | display: block !important;
19 | right: -100%;
20 | }
21 |
22 | &[aria-hidden='false'] {
23 | @include transition(right, .3s);
24 | right: 0;
25 | }
26 |
27 | .button--close--inverse {
28 | position: absolute;
29 | right: 0;
30 | top: 0;
31 | }
32 |
33 | h2 {
34 | color: $inverse;
35 | margin: 0 0 1em 0;
36 | font-size: 1.4rem;
37 | font-weight: 700;
38 | }
39 |
40 | .label {
41 | color: $inverse;
42 | }
43 |
44 | input{
45 | height: 29px;
46 | padding:1px;
47 | }
48 |
49 | .accordion__button{
50 | height:auto;
51 | }
52 | }
53 |
54 | .glossary__content {
55 | padding: u(4rem 0);
56 | }
57 |
58 | .glossary__definition {
59 | font-family: $sans-serif;
60 | letter-spacing: -.3px;
61 |
62 | ol {
63 | @extend .list--numbered;
64 | margin-left: 0;
65 |
66 | li {
67 | font-size: u(1.4rem);
68 | }
69 | }
70 |
71 | ul {
72 | @extend .list--bulleted;
73 | margin-left: 0;
74 |
75 | li {
76 | font-size: u(1.4rem);
77 | }
78 | }
79 |
80 | p {
81 | font-size: u(1.4rem);
82 | }
83 |
84 | }
85 |
86 | .glossary__toggle {
87 | @include u-icon-bg($book, $base);
88 | background-position: 0% 50%;
89 | background-size: 1em;
90 | padding-left: u(2.5rem);
91 | }
92 |
93 | // Term classes
94 | //
95 | // Wrap glossary terms with these classes
96 |
97 | // standard class, adds the book icon
98 | .term {
99 | @include u-icon-bg($book, $primary);
100 | @include transition(background-color, .2s, box-shadow, .2s, color, .2s);
101 | background-size: .6em;
102 | background-position: 100% 50%;
103 | background-color: transparent;
104 | box-shadow: 0 0 0 4px transparent;
105 | border-bottom: none;
106 | cursor: pointer;
107 | margin-right: 2px;
108 | padding-right: .9em;
109 |
110 |
111 | &:focus,
112 | &:hover {
113 | box-shadow: 0 0 0 4px rgba($gray, .7);
114 | background-color: rgba($gray, .7);
115 | color: $primary;
116 | }
117 | }
118 |
119 | // Used when the term is in a body paragaraph of text, reduces padding and adds margin
120 | .term--p {
121 | margin-right: u(.5rem);
122 | box-shadow: none;
123 | }
124 |
125 | @media print {
126 | .term {
127 | background-image: none;
128 | margin-right: 0;
129 | padding-right: 0;
130 | }
131 | }
132 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/addons/_triangle.scss:
--------------------------------------------------------------------------------
1 | @mixin triangle($size, $color, $direction) {
2 | $width: nth($size, 1);
3 | $height: nth($size, length($size));
4 | $foreground-color: nth($color, 1);
5 | $background-color: if(length($color) == 2, nth($color, 2), transparent);
6 | height: 0;
7 | width: 0;
8 |
9 | @if ($direction == up) or ($direction == down) or ($direction == right) or ($direction == left) {
10 | $width: $width / 2;
11 | $height: if(length($size) > 1, $height, $height/2);
12 |
13 | @if $direction == up {
14 | border-bottom: $height solid $foreground-color;
15 | border-left: $width solid $background-color;
16 | border-right: $width solid $background-color;
17 | } @else if $direction == right {
18 | border-bottom: $width solid $background-color;
19 | border-left: $height solid $foreground-color;
20 | border-top: $width solid $background-color;
21 | } @else if $direction == down {
22 | border-left: $width solid $background-color;
23 | border-right: $width solid $background-color;
24 | border-top: $height solid $foreground-color;
25 | } @else if $direction == left {
26 | border-bottom: $width solid $background-color;
27 | border-right: $height solid $foreground-color;
28 | border-top: $width solid $background-color;
29 | }
30 | } @else if ($direction == up-right) or ($direction == up-left) {
31 | border-top: $height solid $foreground-color;
32 |
33 | @if $direction == up-right {
34 | border-left: $width solid $background-color;
35 | } @else if $direction == up-left {
36 | border-right: $width solid $background-color;
37 | }
38 | } @else if ($direction == down-right) or ($direction == down-left) {
39 | border-bottom: $height solid $foreground-color;
40 |
41 | @if $direction == down-right {
42 | border-left: $width solid $background-color;
43 | } @else if $direction == down-left {
44 | border-right: $width solid $background-color;
45 | }
46 | } @else if ($direction == inset-up) {
47 | border-color: $background-color $background-color $foreground-color;
48 | border-style: solid;
49 | border-width: $height $width;
50 | } @else if ($direction == inset-down) {
51 | border-color: $foreground-color $background-color $background-color;
52 | border-style: solid;
53 | border-width: $height $width;
54 | } @else if ($direction == inset-right) {
55 | border-color: $background-color $background-color $background-color $foreground-color;
56 | border-style: solid;
57 | border-width: $width $height;
58 | } @else if ($direction == inset-left) {
59 | border-color: $background-color $foreground-color $background-color $background-color;
60 | border-style: solid;
61 | border-width: $width $height;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/_bourbon.scss:
--------------------------------------------------------------------------------
1 | // Bourbon 4.2.3
2 | // http://bourbon.io
3 | // Copyright 2011-2015 thoughtbot, inc.
4 | // MIT License
5 |
6 | @import "settings/prefixer";
7 | @import "settings/px-to-em";
8 | @import "settings/asset-pipeline";
9 |
10 | @import "functions/assign-inputs";
11 | @import "functions/contains";
12 | @import "functions/contains-falsy";
13 | @import "functions/is-length";
14 | @import "functions/is-light";
15 | @import "functions/is-number";
16 | @import "functions/is-size";
17 | @import "functions/px-to-em";
18 | @import "functions/px-to-rem";
19 | @import "functions/shade";
20 | @import "functions/strip-units";
21 | @import "functions/tint";
22 | @import "functions/transition-property-name";
23 | @import "functions/unpack";
24 | @import "functions/modular-scale";
25 |
26 | @import "helpers/convert-units";
27 | @import "helpers/directional-values";
28 | @import "helpers/font-source-declaration";
29 | @import "helpers/gradient-positions-parser";
30 | @import "helpers/linear-angle-parser";
31 | @import "helpers/linear-gradient-parser";
32 | @import "helpers/linear-positions-parser";
33 | @import "helpers/linear-side-corner-parser";
34 | @import "helpers/radial-arg-parser";
35 | @import "helpers/radial-positions-parser";
36 | @import "helpers/radial-gradient-parser";
37 | @import "helpers/render-gradients";
38 | @import "helpers/shape-size-stripper";
39 | @import "helpers/str-to-num";
40 |
41 | @import "css3/animation";
42 | @import "css3/appearance";
43 | @import "css3/backface-visibility";
44 | @import "css3/background";
45 | @import "css3/background-image";
46 | @import "css3/border-image";
47 | @import "css3/calc";
48 | @import "css3/columns";
49 | @import "css3/filter";
50 | @import "css3/flex-box";
51 | @import "css3/font-face";
52 | @import "css3/font-feature-settings";
53 | @import "css3/hidpi-media-query";
54 | @import "css3/hyphens";
55 | @import "css3/image-rendering";
56 | @import "css3/keyframes";
57 | @import "css3/linear-gradient";
58 | @import "css3/perspective";
59 | @import "css3/placeholder";
60 | @import "css3/radial-gradient";
61 | @import "css3/selection";
62 | @import "css3/text-decoration";
63 | @import "css3/transform";
64 | @import "css3/transition";
65 | @import "css3/user-select";
66 |
67 | @import "addons/border-color";
68 | @import "addons/border-radius";
69 | @import "addons/border-style";
70 | @import "addons/border-width";
71 | @import "addons/buttons";
72 | @import "addons/clearfix";
73 | @import "addons/ellipsis";
74 | @import "addons/font-stacks";
75 | @import "addons/hide-text";
76 | @import "addons/margin";
77 | @import "addons/padding";
78 | @import "addons/position";
79 | @import "addons/prefixer";
80 | @import "addons/retina-image";
81 | @import "addons/size";
82 | @import "addons/text-inputs";
83 | @import "addons/timing-functions";
84 | @import "addons/triangle";
85 | @import "addons/word-wrap";
86 |
87 | @import "bourbon-deprecated-upcoming";
88 |
--------------------------------------------------------------------------------
/fec_eregs/static/regulations/css/scss/_variables.scss:
--------------------------------------------------------------------------------
1 | /*
2 | ==========================================================================
3 | variables.scss contains all theme variable / variable overrides
4 | */
5 |
6 | /*
7 | FEC variables
8 | ----------------------
9 | */
10 |
11 | // Typography
12 | $serif: 'gandhi', serif;
13 | $sans-serif: 'karla', sans-serif;
14 | $base-font-family: $serif;
15 |
16 | // Primary colors
17 | $crimson: #631010;
18 | $orange: #f77b42;
19 | $federal-blue: #112e51;
20 | $aqua: #36bdbb;
21 |
22 | $base: #212121;
23 | $neutral: #f1f1f1;
24 | $inverse: #fff;
25 |
26 | // Accent colors
27 | $bright-red: #dc3b00;
28 | $deep-orange: #e36641;
29 | $deep-red: #961a16;
30 |
31 | $bright-blue: #0aacfa;
32 | $deep-aqua: #3e8a9a;
33 | $navy: #164f85;
34 |
35 | $gray-lightest: #f1f1f1; // U.S. Web Design Standards color gray-lightest //
36 | $gray-light: #e8e8e8;
37 | $gray-medium: #d6d7d9; // U.S. Web Design Standards color gray-mediumer //
38 | $gray: #aeb0b5; // U.S. Web Design Standards color gray-medium //
39 | $gray-dark: #5b616b; // U.S. Web Design Standards color gray //
40 |
41 | $disabled: #737373;
42 |
43 | // Color aliases
44 | $primary: $federal-blue;
45 | $primary-contrast: $aqua;
46 | $primary-focus: $deep-aqua;
47 |
48 | $secondary: $crimson;
49 | $secondary-contrast: $orange;
50 | $secondary-focus: $deep-red;
51 |
52 | $neutral: $gray-lightest;
53 | $neutral-contrast: $gray-dark;
54 | $neutral-focus: $primary;
55 |
56 |
57 | /*
58 | eRegs
59 | =============================
60 | */
61 |
62 | /*
63 | Color overrides
64 | ----------------
65 | */
66 |
67 | $panel_highlight_color: $gray-medium; // Highlight color for table of contents
68 | $panel_background_color: $gray-light; // Table of contents background, subhead color, drawer color
69 | $panel_border_color: $primary; // Colors the borders for panel_color
70 | $panel_text_color: $primary; // Text color for table of contents
71 | $history_drawer_border_color: $gray;
72 |
73 | /*
74 | Type Variables
75 | ----------------------
76 | */
77 |
78 | $body_font: $base-font-family;
79 |
80 | @mixin sans-font-light {
81 | font-family: $sans-serif;
82 | font-weight: 300;
83 | font-style: normal;
84 | }
85 |
86 | @mixin sans-font-regular {
87 | font-family: $sans-serif;
88 | font-weight: 400;
89 | font-style: normal;
90 | }
91 |
92 | @mixin sans-font-bold {
93 | font-family: $sans-serif;
94 | font-weight: 600;
95 | font-style: normal;
96 | }
97 |
98 | @mixin serif-font-italic {
99 | font-family: $serif;
100 | font-weight: 400;
101 | font-style: italic;
102 | }
103 |
104 | @mixin serif-font-regular {
105 | font-family: $serif;
106 | font-weight: 400;
107 | font-style: normal;
108 | }
109 |
110 | /*
111 | Layout Variables
112 | ----------------
113 | */
114 |
115 | $mainhead_height: 173px;
116 | $subhead_height: 0px;
117 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/neat/grid/_omega.scss:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | /// Removes the element's gutter margin, regardless of its position in the grid hierarchy or display property. It can target a specific element, or every `nth-child` occurrence. Works only with `block` layouts.
4 | ///
5 | /// @param {List} $query [block]
6 | /// List of arguments. Supported arguments are `nth-child` selectors (targets a specific pseudo element) and `auto` (targets `last-child`).
7 | ///
8 | /// When passed an `nth-child` argument of type `*n` with `block` display, the omega mixin automatically adds a clear to the `*n+1` th element. Note that composite arguments such as `2n+1` do not support this feature.
9 | ///
10 | /// **Deprecation warning**: The omega mixin will no longer take a `$direction` argument. To change the layout direction, use `row($direction)` or set `$default-layout-direction` instead.
11 | ///
12 | /// @example scss - Usage
13 | /// .element {
14 | /// @include omega;
15 | /// }
16 | ///
17 | /// .nth-element {
18 | /// @include omega(4n);
19 | /// }
20 | ///
21 | /// @example css - CSS Output
22 | /// .element {
23 | /// margin-right: 0;
24 | /// }
25 | ///
26 | /// .nth-element:nth-child(4n) {
27 | /// margin-right: 0;
28 | /// }
29 | ///
30 | /// .nth-element:nth-child(4n+1) {
31 | /// clear: left;
32 | /// }
33 |
34 | @mixin omega($query: block, $direction: default) {
35 | $table: belongs-to(table, $query);
36 | $auto: belongs-to(auto, $query);
37 |
38 | @if $direction != default {
39 | @include -neat-warn("The omega mixin will no longer take a $direction argument. To change the layout direction, use the direction(){...} mixin.");
40 | } @else {
41 | $direction: get-direction($layout-direction, $default-layout-direction);
42 | }
43 |
44 | @if $table {
45 | @include -neat-warn("The omega mixin no longer removes padding in table layouts.");
46 | }
47 |
48 | @if length($query) == 1 {
49 | @if $auto {
50 | &:last-child {
51 | margin-#{$direction}: 0;
52 | }
53 | }
54 |
55 | @else if contains-display-value($query) and $table == false {
56 | margin-#{$direction}: 0;
57 | }
58 |
59 | @else {
60 | @include nth-child($query, $direction);
61 | }
62 | } @else if length($query) == 2 {
63 | @if $auto {
64 | &:last-child {
65 | margin-#{$direction}: 0;
66 | }
67 | } @else {
68 | @include nth-child(nth($query, 1), $direction);
69 | }
70 | } @else {
71 | @include -neat-warn("Too many arguments passed to the omega() mixin.");
72 | }
73 | }
74 |
75 | @mixin nth-child($query, $direction) {
76 | $opposite-direction: get-opposite-direction($direction);
77 |
78 | &:nth-child(#{$query}) {
79 | margin-#{$direction}: 0;
80 | }
81 |
82 | @if type-of($query) == number and unit($query) == "n" {
83 | &:nth-child(#{$query}+1) {
84 | clear: $opposite-direction;
85 | }
86 | }
87 | }
88 |
--------------------------------------------------------------------------------
/fec_eregs/static/regulations/img/timeline.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | image/svg+xml
--------------------------------------------------------------------------------
/fec_eregs/static/regulations/img/timeline-blue.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | image/svg+xml
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/neat/grid/_media.scss:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | /// Outputs a media-query block with an optional grid context (the total number of columns used in the grid).
4 | ///
5 | /// @param {List} $query
6 | /// A list of media query features and values, where each `$feature` should have a corresponding `$value`.
7 | /// For a list of valid values for `$feature`, click [here](http://www.w3.org/TR/css3-mediaqueries/#media1).
8 | ///
9 | /// If there is only a single `$value` in `$query`, `$default-feature` is going to be used.
10 | ///
11 | /// The number of total columns in the grid can be set by passing `$columns` at the end of the list (overrides `$total-columns`).
12 | ///
13 | ///
14 | /// @param {Number (unitless)} $total-columns [$grid-columns]
15 | /// - Number of columns to use in the new grid context. Can be set as a shorthand in the first parameter.
16 | ///
17 | /// @example scss - Usage
18 | /// .responsive-element {
19 | /// @include media(769px) {
20 | /// @include span-columns(6);
21 | /// }
22 | /// }
23 | ///
24 | /// .new-context-element {
25 | /// @include media(min-width 320px max-width 480px, 6) {
26 | /// @include span-columns(6);
27 | /// }
28 | /// }
29 | ///
30 | /// @example css - CSS Output
31 | /// @media screen and (min-width: 769px) {
32 | /// .responsive-element {
33 | /// display: block;
34 | /// float: left;
35 | /// margin-right: 2.35765%;
36 | /// width: 48.82117%;
37 | /// }
38 | ///
39 | /// .responsive-element:last-child {
40 | /// margin-right: 0;
41 | /// }
42 | /// }
43 | ///
44 | /// @media screen and (min-width: 320px) and (max-width: 480px) {
45 | /// .new-context-element {
46 | /// display: block;
47 | /// float: left;
48 | /// margin-right: 4.82916%;
49 | /// width: 100%;
50 | /// }
51 | ///
52 | /// .new-context-element:last-child {
53 | /// margin-right: 0;
54 | /// }
55 | /// }
56 |
57 | @mixin media($query: $feature $value $columns, $total-columns: $grid-columns) {
58 | @if length($query) == 1 {
59 | @media screen and ($default-feature: nth($query, 1)) {
60 | $default-grid-columns: $grid-columns;
61 | $grid-columns: $total-columns !global;
62 | @content;
63 | $grid-columns: $default-grid-columns !global;
64 | }
65 | } @else {
66 | $loop-to: length($query);
67 | $media-query: "screen and ";
68 | $default-grid-columns: $grid-columns;
69 | $grid-columns: $total-columns !global;
70 |
71 | @if is-not(is-even(length($query))) {
72 | $grid-columns: nth($query, $loop-to) !global;
73 | $loop-to: $loop-to - 1;
74 | }
75 |
76 | $i: 1;
77 | @while $i <= $loop-to {
78 | $media-query: $media-query + "(" + nth($query, $i) + ": " + nth($query, $i + 1) + ") ";
79 |
80 | @if ($i + 1) != $loop-to {
81 | $media-query: $media-query + "and ";
82 | }
83 |
84 | $i: $i + 2;
85 | }
86 |
87 | @media #{$media-query} {
88 | @content;
89 | $grid-columns: $default-grid-columns !global;
90 | }
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/bourbon/helpers/_directional-values.scss:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | /// Directional-property mixins are shorthands for writing properties like the following
4 | ///
5 | /// @ignore You can also use `false` instead of `null`.
6 | ///
7 | /// @param {List} $vals
8 | /// List of directional values
9 | ///
10 | /// @example scss - Usage
11 | /// .element {
12 | /// @include border-style(dotted null);
13 | /// @include margin(null 0 10px);
14 | /// }
15 | ///
16 | /// @example css - CSS Output
17 | /// .element {
18 | /// border-bottom-style: dotted;
19 | /// border-top-style: dotted;
20 | /// margin-bottom: 10px;
21 | /// margin-left: 0;
22 | /// margin-right: 0;
23 | /// }
24 | ///
25 | /// @require {function} contains-falsy
26 | ///
27 | /// @return {List}
28 |
29 | @function collapse-directionals($vals) {
30 | $output: null;
31 |
32 | $a: nth($vals, 1);
33 | $b: if(length($vals) < 2, $a, nth($vals, 2));
34 | $c: if(length($vals) < 3, $a, nth($vals, 3));
35 | $d: if(length($vals) < 2, $a, nth($vals, if(length($vals) < 4, 2, 4)));
36 |
37 | @if $a == 0 { $a: 0; }
38 | @if $b == 0 { $b: 0; }
39 | @if $c == 0 { $c: 0; }
40 | @if $d == 0 { $d: 0; }
41 |
42 | @if $a == $b and $a == $c and $a == $d { $output: $a; }
43 | @else if $a == $c and $b == $d { $output: $a $b; }
44 | @else if $b == $d { $output: $a $b $c; }
45 | @else { $output: $a $b $c $d; }
46 |
47 | @return $output;
48 | }
49 |
50 | /// Output directional properties, for instance `margin`.
51 | ///
52 | /// @access private
53 | ///
54 | /// @param {String} $pre
55 | /// Prefix to use
56 | /// @param {String} $suf
57 | /// Suffix to use
58 | /// @param {List} $vals
59 | /// List of values
60 | ///
61 | /// @require {function} collapse-directionals
62 | /// @require {function} contains-falsy
63 |
64 | @mixin directional-property($pre, $suf, $vals) {
65 | // Property Names
66 | $top: $pre + "-top" + if($suf, "-#{$suf}", "");
67 | $bottom: $pre + "-bottom" + if($suf, "-#{$suf}", "");
68 | $left: $pre + "-left" + if($suf, "-#{$suf}", "");
69 | $right: $pre + "-right" + if($suf, "-#{$suf}", "");
70 | $all: $pre + if($suf, "-#{$suf}", "");
71 |
72 | $vals: collapse-directionals($vals);
73 |
74 | @if contains-falsy($vals) {
75 | @if nth($vals, 1) { #{$top}: nth($vals, 1); }
76 |
77 | @if length($vals) == 1 {
78 | @if nth($vals, 1) { #{$right}: nth($vals, 1); }
79 | } @else {
80 | @if nth($vals, 2) { #{$right}: nth($vals, 2); }
81 | }
82 |
83 | @if length($vals) == 2 {
84 | @if nth($vals, 1) { #{$bottom}: nth($vals, 1); }
85 | @if nth($vals, 2) { #{$left}: nth($vals, 2); }
86 | } @else if length($vals) == 3 {
87 | @if nth($vals, 3) { #{$bottom}: nth($vals, 3); }
88 | @if nth($vals, 2) { #{$left}: nth($vals, 2); }
89 | } @else if length($vals) == 4 {
90 | @if nth($vals, 3) { #{$bottom}: nth($vals, 3); }
91 | @if nth($vals, 4) { #{$left}: nth($vals, 4); }
92 | }
93 | } @else {
94 | #{$all}: $vals;
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/load_regs/README.md:
--------------------------------------------------------------------------------
1 | ## FEC's regulations
2 | When there are new regulations available in [GPO website](https://www.govinfo.gov/bulkdata/CFR/) (e.g. due to modifications in the parser, new Federal Register notices, etc.), that data must be sent to the regulations `/api` endpoint before it will be visible to users on the [website](https://www.fec.gov/regulations).
3 |
4 | If any new regulation parts have been added, add those parts to the list located in load_regs/fec_reg_parts.txt.
5 |
6 | ## Install cf-service-connect plugin on MAC
7 | After CLI upgrade, run the following command to install cf-service-connect plugin.
8 |
9 | ```
10 | cf install-plugin https://github.com/cloud-gov/cf-service-connect/releases/download/v1.1.3/cf-service-connect_darwin_amd64
11 | ```
12 |
13 | ### Load FEC's regulations on cloud.gov space
14 |
15 | 1. Parse FEC's regulations locally
16 | Follow Wiki [Parse regulations on local](https://github.com/fecgov/fec-eregs/wiki/Parse-regulations-on-local)
17 |
18 | 2. Generate local eregs database dump file
19 | Note: Verify the location of db client command(pg_dump and pg_restore) on local before generating database dump file
20 | (e.g. `/opt/homebrew/opt/postgresql@13/bin/` or /usr/local/opt/postgresql@13/bin`)
21 |
22 | ```
23 | /opt/homebrew/opt/postgresql@13/bin/pg_dump -F c --no-acl --no-owner -f //.dump postgres://:@localhost:/
24 | ```
25 | or
26 | ```
27 | /usr/local/opt/postgresql@13/bin/pg_dump -F c --no-acl --no-owner -f //.dump postgres://:@localhost:/
28 | ```
29 |
30 | 3. Create new eregs database service
31 |
32 | ```
33 | $ cf unbind-service eregs fec-eregs-db-rdn
34 | $ cf rename-service fec-eregs-db-rdn fec-eregs-db-rdn-
35 | $ cf create-service aws-rds micro-psql fec-eregs-db-rdn
36 | ```
37 |
38 | 4. Setup SSH connection and get eregs database service credentials
39 | ```
40 | $ cf connect-to-service -no-client eregs fec-eregs-db-rdn
41 | ```
42 |
43 | 5. Restore eregs database dump file to database service on space
44 | ```
45 | /opt/homebrew/opt/postgresql@13/bin/pg_restore --dbname postgres://:@localhost:/ --no-acl --no-owner //.dump
46 | ```
47 | or
48 |
49 | ```
50 | /usr/local/opt/postgresql@13/bin/pg_restore --dbname postgres://:@localhost:/ --no-acl --no-owner //.dump
51 | ```
52 |
53 | 6. Bind eregs app to the database service on space
54 | ```
55 | $ cf bind-service eregs fec-eregs-db-rdn
56 | ```
57 |
58 | 7. Restage eregs app
59 | ```
60 | $ cf restage eregs (or rebuild fec-eregs on circleci)
61 | ```
62 |
63 | 8. Reload regulations to elasticsearch service (to be able to perform a keyword search on Regulations page)
64 | ```
65 | cf run-task api --command "python cli.py initialize_legal_data ao_index" -m 4G --name initialize_legal_data_ao
66 | ```
67 |
68 | 9. Open api log terminal to verify regulations load successfully.
69 | ```
70 | cf logs api |grep ""
71 | ```
72 |
73 | 12. Delete old eregs db service
74 | ```
75 | # Get service key
76 | cf sk fec-eregs-db-rdn-
77 | cf delete-service-key fec-eregs-db-rdn-
78 | cf delete-service fec-eregs-db-rdn-
79 | ```
80 |
81 |
--------------------------------------------------------------------------------
/fec_eregs/static/fec_eregs/scss/vendor/neat/functions/_private.scss:
--------------------------------------------------------------------------------
1 | // Not function for Libsass compatibility
2 | // https://github.com/sass/libsass/issues/368
3 | @function is-not($value) {
4 | @return if($value, false, true);
5 | }
6 |
7 | // Checks if a number is even
8 | @function is-even($int) {
9 | @return $int % 2 == 0;
10 | }
11 |
12 | // Checks if an element belongs to a list or not
13 | @function belongs-to($tested-item, $list) {
14 | @return is-not(not-belongs-to($tested-item, $list));
15 | }
16 |
17 | @function not-belongs-to($tested-item, $list) {
18 | @return is-not(index($list, $tested-item));
19 | }
20 |
21 | // Contains display value
22 | @function contains-display-value($query) {
23 | @return belongs-to(table, $query)
24 | or belongs-to(block, $query)
25 | or belongs-to(inline-block, $query)
26 | or belongs-to(inline, $query);
27 | }
28 |
29 | // Parses the first argument of span-columns()
30 | @function container-span($span: $span) {
31 | @if length($span) == 3 {
32 | $container-columns: nth($span, 3);
33 | @return $container-columns;
34 | } @else if length($span) == 2 {
35 | $container-columns: nth($span, 2);
36 | @return $container-columns;
37 | }
38 |
39 | @return $grid-columns;
40 | }
41 |
42 | @function container-shift($shift: $shift) {
43 | $parent-columns: $grid-columns !default !global;
44 |
45 | @if length($shift) == 3 {
46 | $container-columns: nth($shift, 3);
47 | @return $container-columns;
48 | } @else if length($shift) == 2 {
49 | $container-columns: nth($shift, 2);
50 | @return $container-columns;
51 | }
52 |
53 | @return $parent-columns;
54 | }
55 |
56 | // Generates a striped background
57 | @function gradient-stops($grid-columns, $color: $visual-grid-color) {
58 | $transparent: transparent;
59 |
60 | $column-width: flex-grid(1, $grid-columns);
61 | $gutter-width: flex-gutter($grid-columns);
62 | $column-offset: $column-width;
63 |
64 | $values: ($transparent 0, $color 0);
65 |
66 | @for $i from 1 to $grid-columns*2 {
67 | @if is-even($i) {
68 | $values: append($values, $transparent $column-offset, comma);
69 | $values: append($values, $color $column-offset, comma);
70 | $column-offset: $column-offset + $column-width;
71 | } @else {
72 | $values: append($values, $color $column-offset, comma);
73 | $values: append($values, $transparent $column-offset, comma);
74 | $column-offset: $column-offset + $gutter-width;
75 | }
76 | }
77 |
78 | @return $values;
79 | }
80 |
81 | // Layout direction
82 | @function get-direction($layout, $default) {
83 | $direction: null;
84 |
85 | @if to-upper-case($layout) == "LTR" or to-upper-case($layout) == "RTL" {
86 | $direction: direction-from-layout($layout);
87 | } @else {
88 | $direction: direction-from-layout($default);
89 | }
90 |
91 | @return $direction;
92 | }
93 |
94 | @function direction-from-layout($layout) {
95 | $direction: null;
96 |
97 | @if to-upper-case($layout) == "LTR" {
98 | $direction: right;
99 | } @else {
100 | $direction: left;
101 | }
102 |
103 | @return $direction;
104 | }
105 |
106 | @function get-opposite-direction($direction) {
107 | $opposite-direction: left;
108 |
109 | @if $direction == "left" {
110 | $opposite-direction: right;
111 | }
112 |
113 | @return $opposite-direction;
114 | }
115 |
--------------------------------------------------------------------------------