-
-
Save gma/4707513 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use the app.rb file to load Ruby code, modify or extend the models, or | |
# do whatever else you fancy when the theme is loaded. | |
module Nesta | |
class App | |
helpers do | |
# Add new helpers here. | |
include Sprockets::Helpers | |
end | |
# Add new routes here. | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// located in themes/my-theme/assets/stylesheets | |
//= require foundation | |
//= require coderay |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'bundler/setup' | |
Bundler.require(:default) | |
# Load in our Nesta configs | |
nesta_config = YAML::load(File.open( File.join('config', 'config.yml'))) | |
nesta_theme = nesta_config['theme'] | |
map "/assets" do | |
environment = Sprockets::Environment.new | |
%w{javascripts stylesheets images}.each do |type| | |
environment.append_path File.join('themes', nesta_theme, 'assets', type) | |
end | |
Sprockets::Helpers.configure do |config| | |
config.environment = environment | |
config.prefix = "/assets" | |
config.digest = false | |
end | |
run environment | |
end | |
require 'nesta/env' | |
Nesta::Env.root = ::File.expand_path('.', ::File.dirname(__FILE__)) | |
require 'nesta/app' | |
map "/" do | |
run Nesta::App | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'http://rubygems.org' | |
gem 'nesta', '~> 0.9.13' | |
gem 'haml' | |
gem 'haml-coderay' | |
gem 'sass' | |
gem 'compass' | |
gem 'sprockets-sass' | |
gem 'sprockets-helpers' | |
gem 'zurb-foundation' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!!! | |
%html | |
%head | |
… | |
%link{ href:stylesheet_path('application.css'), media:'screen', rel:'stylesheet' } | |
%body | |
… | |
%script{ src: javascript_path('application.js') } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment