Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 330d1f2
Showing
6 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.sass_cache/* |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
h1. Reloader | ||
|
||
This is a painless boilerplate code to start designing Web sites in "Haml":http://haml-lang.com/, "Sass":http://sass-lang.com/ and "Compass":http://compass-style.org/. | ||
|
||
h2. Dependencies | ||
|
||
You'd want to install the following dependencies to get the engines running. | ||
|
||
@sudo gem install sinatra shotgun haml compass@ | ||
|
||
h2. Rollin' it | ||
|
||
Open up Terminal and fire up @shotgun site.rb@. Browsers will now answer to every refresh with reloaded styles. Open up @views@ in your favorite text editor and you're ready to go. | ||
|
||
That's all there is to it. | ||
|
||
h2. Why? | ||
|
||
This is supposed to be a helping tool during designing web pages. The files would probably be copied manually outside somewhere when finished. | ||
|
||
I use this to design my websites before coding anything, helping me focus on design by just refreshing the page (like old-school HTML/CSS). |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# You should be up and running without editing this file. | ||
|
||
require "rubygems" | ||
require "sinatra" | ||
require "Haml" | ||
require "Sass" | ||
require "compass" | ||
|
||
configure do | ||
Compass.configuration do |config| | ||
config.project_path = File.dirname(__FILE__) | ||
config.sass_dir = 'views' | ||
config.output_style = :compact | ||
end | ||
|
||
set :haml, { :format => :html5 } | ||
set :sass, Compass.sass_engine_options | ||
end | ||
|
||
get '/' do | ||
haml :index | ||
end | ||
|
||
get '/stylesheet.css' do | ||
headers 'Content-Type' => 'text/css; charset=utf-8' | ||
sass :stylesheet | ||
end | ||
|
||
# This adds another page. | ||
# Create about.haml in views. | ||
|
||
# get '/about' do | ||
# haml :about | ||
# 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// This file contains common variables and mixins you'd like to use | ||
// in stylesheet.sass. | ||
// | ||
// Import your compass frameworks here. | ||
// @import compass/reset.sass | ||
// @import compass/utilities.sass | ||
// @import blueprint/screen.sass |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
!!! html | ||
%html | ||
%head | ||
%link{:href => '/stylesheet.css', :media => 'screen', :rel => 'stylesheet', :type => 'text/css'} | ||
|
||
%body | ||
Hello from 'live-refreshing' Haml/Sass. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// This is where the main styles would go. | ||
@import _base.sass |