Skip to content

JTRDevelopment/codeforgreensboro.org

 
 

Repository files navigation

Stories in Ready

★ ★ ★ Code for Greensboro ★ ★ ★

codeforgreensboro.org

This is the marketing and information site for Code for Greensboro, the Code for America Brigade for the city of Greensboro, NC.

About

Ruby on Rails is fast, easy to learn, and fits well with the project landscape of Code for America. This application should probably run without a model, or with a very minimal model for page content. We handle static pages with High Voltage, which allows us to keep Rails conventions like layouts and views but without the overhead of a dedicated Pages controller.

Styling

  • Uses SASS for CSS processing
  • Uses Bourbon, Neat and Bitters for mixins, grids, responsive presentation and to manage sane defaults
  • Uses Font Awesome for quick icon goodness

Serving static files

Since a lot of the site is static or mostly static pages, we're using High Voltage to make this easier.

The essential part of High Voltage is:

Write your static pages and put them in the RAILS_ROOT/app/views/pages directory.

$ mkdir app/views/pages
$ touch app/views/pages/about.html.erb

After putting something interesting there, you can link to it from anywhere in your app with:

link_to 'About', static_path('about')

You can nest pages in a directory structure, if that makes sense from a URL perspective for you:

link_to 'Q4 Reports', static_path('about/corporate/policies/HR/en_US/biz/sales/Quarter-Four')

Bam.

Other dependencies (which we may not even be using yet)

Getting up and running

  • You should have Ruby installed, as well as Rails
  • Clone this repository
  • Run bundle install
  • Make your changes
  • Submit a pull request
  • Literally save the world

Future States

Help

If you get stuck, send us a message on Slack.

Using Docker for the Database

If you don't want to install Postgresql locally you can use Docker.

docker run -p 8080:5432 --name cfgso-postgress -e POSTGRESS_PASSWORD=password -d postgres
# Update the database.yml password and port to match your password and port
rake db:create
# Or RAILS_ENV=production rake db:create

Generate static site using wget

Run the app in production mode

bin/rails s -e production
wget -r -l inf -k -nc -nH -p -E -e robots=off -P ./static_codforgreensboro.org http://localhost:3000

About

The marketing site for Code for Greensboro

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 58.7%
  • CSS 32.5%
  • Ruby 4.4%
  • HTML 4.3%
  • CoffeeScript 0.1%