- Build status:
- Latest deploy: master branch
Because everyone really is out to get your data with no pesky responsibilities like having reliable security, as long as they’re willing to share it with the federal government. Who, you know, are totally trustworthy to use that data in a way that doesn't endanger your first amendment rights.
CAMPAIGN AND WRITING PEOPLE READ HERE PLEASE
- Site-wide meta information is super important. You can make changes to it at
_config.yml
- Generally, content is written in Markdown format. You can find documentation
for this wonderful plain text formatting syntax all over:
- daringfireball, the source of markdown
- github's docs are super easy to follow
- Discount documents some extra features we have available to us
- Any content that is blog-post-like in nature can be found in
app/_posts
. - Any additional post should follow the naming convention
YYYY-MM-DD-post-title.md
- If there’s text you need to update, but can't find, it is likely hiding in
app/_layouts/default.html
. - If you are unclear on updating the html, ask a dev and we’re happy to help!
- Composer.js JavaScript MVC
- Jekyll
- Grunt.js
- Liquid templating language
- Install/switch to Ruby 2.2.2 (i recommend rbenv)
gem install bundler
if it’s not already installednpm install
to install packages,npm start
to run grunt (compiles assets, then watches for changes and compiles those too.)- [Optional] If you’d like TypeKit fonts to load, add the line
0.0.0.0 bigsurveillance.dev
to the file at/etc/hosts
, and navigate to http://bigsurveillance.dev:9050 when the server starts
This site is automatically deployed using a shell script and travis-ci. To set up a fork, follow these steps:
- Edit
CNAME
to reflect your domain and TLD. - Enable Travis-CI for your github repo
- In Travis settings, create an env var called
GH_REF
with a value of github.com/USERNAME/REPO.git - Create a Personal Access Token at https://github.com/settings/tokens
- In Travis settings, create an env var called
GH_TOKEN
and paste in your token, taking care that "Display value in build log" is set to off.
(note: if you do not yet have a CNAME, remove cp ../CNAME ./CNAME
from
deploy-ghpages.sh)
js/main.js
contains the main page logic. It uses XHR to grab the user’s location from fftf-geocoder and also the Political Scoreboard spreadsheet from Google Docs. Once both of these are loaded, it spawns the Political Scoreboard Controllerjs/controllers
: contains all Composer controllersjs/models
: contains all Composer models and collectionsjs/views
: contains all Composer views. Right now we’re just using raw JavaScript to create DOM elements for the views. It’s not pretty, but it’s really fast.- This all compiles down to
dist/js/core.js
via grunt, which also uglifies it - If you’re adding a javascript file, make sure to add its path to the files
array around L169 of
Gruntfile.js
app/_less
├── base
│ ├── common.less
│ └── variables.less
├── components
│ ├── CTA.less
│ ├── animation.less
│ ├── histogram.less
│ └── typography.less
├── core.less
├── lib
│ └── reset.less
└── partials
├── footer.less
├── modals.less
├── politicians.less
└── scoreboard.less
- All Less files compiled and minified to
dist/css/core.css
- When in doubt, make a new Less file and import it in
core.less
—there’s no real performance hit as a result of good organization - Don’t worry about browser prefixes. Grunt handles that too.