Giter Club home page Giter Club logo

petitions's Introduction

Petitions

Petitions is a web app for viewing UK Parliament petition data.

The UK's Parliamentary Petitions website is like change.org for political issues affecting the UK. Any UK resident can create a petition and, providing they get enough signatures, have their issue debated in Parliament. This app shows signatures broken out by country and by parliamentary constituency. Try it out here.

Install/Build

Petitions is made with Elm and Sass. The easiest way to build it is with the provided NPM scripts (also compatible with Yarn). But if you don't have NPM/Yarn, it's easy enough to build the project manually.

Start by cloning/downloading the repo. Then do one of the following:

Build With NPM/Yarn (Recommended)

  1. Run npm install (or yarn) in the root directory to install Elm, Sass and other build dependencies
  2. Run npm start (or yarn start) to build the project and serve it from localhost:8080
  3. For development, run npm run watch (or yarn run watch) which is the same as the start command but with live reloading whenever the Sass/Elm source files change

Build Manually

  1. Make sure you have Elm and Sass installed
  2. Create a build folder for the project
  3. Copy the contents of static to your build folder
  4. From the project root, compile the Elm code with elm-make --output=path/to/build/folder/assets/js/elm.js src/elm/Main.elm
  5. Compile the Sass files with sass src/scss/styles.scss:path/to/build/folder/assets/css/styles.css
  6. You can now serve the project from your build folder (or navigate to the files directly with file:///path/to/build/folder/index.html)

TODO

Functionality

  • Petition search
  • Indicate closed/rejected status in the petition title
  • Indicate totals mismatches on the summary page
  • Indicate government/parliament response status on the details page
  • Browser history and titles (see Elm's Navigation package, History API, document.title)
  • Transitions between screens
  • Provide a "Try again" link if a petition fails to load
  • Handle edge cases sensibly (e.g. no signatures, one signature, all signatures in one country)
  • Warn user if localStorage is unavailable
  • Add remove/clear links to petition lists

Project

  • Tests
  • Uglify Elm JS
  • Make sure the build scripts work on Windows

Licensing

Petitions is provided under an MIT License. See the LICENSE file for details.

petitions's People

Contributors

deepilla avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.