Giter VIP home page Giter VIP logo

odca-jekyll's Introduction

Open Disclosure Oakland CircleCI

Open Disclosure is a project of OpenOakland. The website provides transparent, non-partisan campaign contribution and expenditure data in an accessible and easy to understand format. We hope this site will engage the voting public and raise awareness and accountability. Ultimately, this is one step toward shifting politics into a movement of civic engagement and ultimate citizen action.

Contents

Code of conduct

To participate in this project, we ask you to abide by the OpenOakland Code of Conduct.

Quickstart for developers

There are two ways to run the website locally for development: using Docker, and running everything locally.

Run using Docker

Prerequisites

Ensure you have the backend cloned as a sibling to this repo. Find more details below in Finance disclosures.

Note: If you are switching from the "local" build to the "docker" build you need to:

$ rm -rf .jekyll-metadata

Run this command in your terminal

$ make docker

Open your web browser to http://localhost:4000/.

Run locally

Prerequisites

Run these commands in your terminal

$ nvm install && nvm use # To get on the right node version
$ make setup # To install all dependencies

Ensure you have the backend cloned as a sibling to this repo. Find more details below in Finance disclosures.

$ make pull-finance
$ make serve

Open your web browser to http://localhost:4000/.

Additional commands

You can build the site without running a server, if needed

$ make build

You can run the tests locally too

$ make test

Finance disclosures

The process of downloading, converting, and calculating the reported financial disclosures is handled by disclosure-backend-static. To get the finance data into this project, we use gulp.js to copy the files over and do some light transformations on their file paths.

If you have thoughts on how this could be improved, let us know!

Update the finance data

In order to get the latest finance data, first clone disclosure-backend-static as a sibling to this project's directory. It is important that the disclosure-backend-static project is cloned to the correct path (../disclosure-backend-static) which is hardcoded in the gulpfile (pull requests welcome).

Then you can run the pull-finance task.

$ make pull-finance

Now rebuild your site with the finance data.

$ make serve

Deployment Information

This site is deployed by a scheduled CI task twice daily. It clones the disclosure-backend-static repo and pulls in the finance data before doing a build. Merges to the master branch will also trigger a deploy.

The site is hosted on GitHub Pages. The deploy consists of a force push of the _site directory to the gh-pages branch done by _bin/deploy.sh.

Project documentation

License

Content for this website is available under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Code is licensed under the GNU Affero General Public License.

    www.opendisclosure.io California’s online source for local campaign finance data
    Copyright (C) 2020  OpenOakland

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as
    published by the Free Software Foundation, either version 3 of the
    License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Font Awesome Icons located under assets/fontawesome/ available under the CC-BY-4.0 License.

odca-jekyll's People

Contributors

adborden avatar anlawyer avatar ckingbailey avatar dependabot[bot] avatar elinaru avatar gauravmk avatar greenrabite avatar hedera46 avatar jenny-heath avatar jessecodescode avatar joshling1919 avatar lpatmo avatar lukehtravis avatar mford008 avatar mikeubell avatar mrvantastic avatar r-i-c-h avatar sfdoran avatar sseiter avatar tdooner avatar timwis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

odca-jekyll's Issues

Committee page styling

Part of #18 to style the committee page.

We want our jekyll site to look like the ODCA mocks and not necessarily the existing site. We should re-use the existing styles where possible but build towards the mocks if there is some divergence.

You can take a look at this branch for the disclosure-frontend converted LESS files in case it's helpful.

Help us shape our CSS architecture by documenting your work or suggesting better process and methods.

Move this repo to caciviclab

  • Document the gulp tasks as an optional step to get the latest finance data
  • Describe what this project is and how it fits in with ODCA
  • Add some kind of CI and tests
  • Describe any technical pre-reqs for development
  • Link to project tasks in README
  • Link to onboarding docs
  • Add a deprecation notice to disclosure-frontend and instructions on where to go/what to do in order to participate (link to backend-static and this)
  • Rename the repo to www.opendisclosure.io

How do we identify referendums that have no number?

The Library Parcel Tax does not have a number yet. Using the referendum number is the most straight forward way to identify a referendum (and what most humans would refer to it as). How should we identify it?

Note: that in order to be globally unique, we really identify it with the election, locality, and number.

This shows up when I'm pulling in supporting/opposing money for referendums and I noticed the slug for the Library Parcel Tax was missing.

Candidate page styling

Part of #18 to style the candidate page.

We want our jekyll site to look like the ODCA mocks and not necessarily the existing site. We should re-use the existing styles where possible but build towards the mocks if there is some divergence.

You can take a look at this branch for the disclosure-frontend converted LESS files in case it's helpful.

Help us shape our CSS architecture by documenting your work or suggesting better process and methods.

Experiment: move generated finance data to _data

Moving the generated finance data to _data instead of the collection files will keep a cleaner distinction between the human-editable files and the finance data which is generated from disclosure-backend-static.

This is somewhat of an experiment, because I'm not really sure how it will work out.

Header/footer styling

Part of #18.

We want our jekyll site to look like the ODCA mocks and not necessarily the existing site. We should re-use the existing styles where possible but build towards the mocks if there is some divergence.

You can take a look at this branch for the disclosure-frontend converted LESS files in case it's helpful.

Help us shape our CSS architecture by documenting your work or suggesting better process and methods.

For the header nav, let's try to keep it CSS-only and avoid pulling in any javascript at this point.

Automated finance updates

We need to be able to update the finance information automatically. Currently, you run the gulp tasks and then have to manually review the changes.

Home page styling and branding

Part of #18.

We want our jekyll site to look like the ODCA mocks and not necessarily the existing site. We should re-use the existing styles where possible but build towards the mocks if there is some divergence.

You can take a look at this branch for the disclosure-frontend converted LESS files in case it's helpful.

Help us shape our CSS architecture by documenting your work or suggesting better process and methods.

money filter assumes whole numbers are pennies

The money filter assumes you're dealing with pennies so 109521.66 -> $1,095.22

We don't track fractions of dollars nor do we use non USD currency, so I think we should create a new filter dollar that will round and convert to dollar formatting.

Content page styling

Part of #18 to style the about page and other content pages.

We want our jekyll site to look like the ODCA mocks and not necessarily the existing site. We should re-use the existing styles where possible but build towards the mocks if there is some divergence.

You can take a look at this branch for the disclosure-frontend converted LESS files in case it's helpful.

Help us shape our CSS architecture by documenting your work or suggesting better process and methods.

Design review

We are overdue for a design review. Let's step through the site so far and create issues and fixes for where the site doesn't match the design.

Referendum page styling

Part of #18 to style the referendum page.

We want our jekyll site to look like the ODCA mocks and not necessarily the existing site. We should re-use the existing styles where possible but build towards the mocks if there is some divergence.

You can take a look at this branch for the disclosure-frontend converted LESS files in case it's helpful.

Help us shape our CSS architecture by documenting your work or suggesting better process and methods.

Add Oakland election total to landing page

Election totals are available on the backend. They Oakland-wide election total should appear on the landing page.

To implement, we need to copy the totals to the front end.

  1. Add a gulp task to copy over the totals.
  2. In the landing page template, fetch the totals for the cities you're interested (let's just start with Oakland).

Add GA config

I think we already have a GA analytics ID for ODCA, we just need to add it to the config.

Port or apply ODCA styles and branding

We want our jekyll site to look like the ODCA mocks and not necessarily the existing site. We should re-use the existing styles where possible but build towards the mocks if there is some divergence.

Referendum supporting/opposing page styling

Part of #18 to style the referendum supporting/opposing page.

We want our jekyll site to look like the ODCA mocks and not necessarily the existing site. We should re-use the existing styles where possible but build towards the mocks if there is some divergence.

You can take a look at this branch for the disclosure-frontend converted LESS files in case it's helpful.

Help us shape our CSS architecture by documenting your work or suggesting better process and methods.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.