Stripped down rebuild of TheBallot whic his a rebuild of My Ballot and The Ballot by the Bus Federation and League of Young Voters
CSS HTML Ruby JavaScript
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 100 commits ahead, 14 commits behind BusProject:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
data
images
javascripts
sharing/candidates
stylesheets
.gitignore
Gemfile
Gemfile.lock
Guardfile
Rakefile
_meta.erb
controller.rb
index.html
index.html.erb
mayors.md
photos.rb
polling_locations.rb
readme.md
sharing.erb

readme.md

Basic Ballot

This is a stripped down version of the Ballot - or an iteration of it.

Run it

bundle install # for dependencies
rake serve # starts a simple server

Will get you started. But you want to rebuild things when things change - right?

guard

guard Will run in the background and rebuild your CSS and HTML as you change it. It'll even reload your browser automatically, if you set up livereload

Structure

This is a simple HTML application that's compiled using JSON data and ERB templates. Templates are rendered with a controller class found in controller.rb that sets template variables.

The site also SASS for styles and Gridle for responsiveness.

Other Commands

There are a few other rake commands that might be helpful:

  • rake sharing will create the sharing redirection pages (stored in /sharing) that are used for social sharing optimizations.
  • rake alderpeople will import data from data/alderpeople.csv and use it to overwrite data/alderpeople.json
  • rake mayors will build the mayors.md... this is only marginally useful
  • rake all build everything except the sass.