Skip to content
Browse files

Added version numbers for the newly required gems, updated the Compas…

…s config and added new styles rake tasks
  • Loading branch information...
1 parent 1a8f344 commit a05fef2510cd5151e134856e60873886aa785b82 @adamstac committed Apr 17, 2011
Showing with 189 additions and 19 deletions.
  1. +2 −2 Gemfile
  2. +3 −3 Gemfile.lock
  3. +3 −0 Rakefile
  4. +13 −14 config.rb
  5. +112 −0 public/stylesheets/application.css
  6. +56 −0 tasks/styles.rake
View
4 Gemfile
@@ -4,5 +4,5 @@ gem "sinatra", "1.0"
gem "shotgun", "~> 0.8"
gem "haml", "~> 3.0"
gem "compass", "~> 0.10.1"
-gem "grid-coordinates"
-gem "meyer-reset"
+gem "grid-coordinates", "~> 1.1.4"
+gem "meyer-reset", "~> 2.0"
View
6 Gemfile.lock
@@ -3,7 +3,7 @@ GEM
specs:
compass (0.10.6)
haml (>= 3.0.4)
- grid-coordinates (1.1.3)
+ grid-coordinates (1.1.4)
compass (>= 0.10.5)
haml (3.0.24)
meyer-reset (2.0.0)
@@ -19,8 +19,8 @@ PLATFORMS
DEPENDENCIES
compass (~> 0.10.1)
- grid-coordinates
+ grid-coordinates (~> 1.1.4)
haml (~> 3.0)
- meyer-reset
+ meyer-reset (~> 2.0)
shotgun (~> 0.8)
sinatra (= 1.0)
View
3 Rakefile
@@ -1,3 +1,6 @@
+require 'rubygems'
+require 'bundler'
require 'rake'
+Bundler.setup
Dir["tasks/*.rake"].sort.each { |ext| load ext }
View
27 config.rb
@@ -1,36 +1,35 @@
-if defined?(Sinatra)
- # This is the configuration to use when running within sinatra
- project_path = Sinatra::Application.root
- environment = :development
-else
- # this is the configuration to use when running within the compass command line tool.
- css_dir = File.join 'public', 'stylesheets'
- # Determine whether Compass asset helper functions generate relative
- # or absolute paths
- relative_assets = true
- environment = :production
-end
+require 'app'
# Compass Configuration
require 'grid-coordinates'
require 'meyer-reset'
+# Configuration to use when running within Sinatra
+project_path = Sinatra::Application.root
+
# HTTP paths
http_path = '/'
http_stylesheets_path = '/stylesheets'
http_images_path = '/images'
http_javascripts_path = '/javascripts'
# File system locations
+css_dir = File.join 'public', 'stylesheets'
sass_dir = File.join 'views', 'stylesheets'
images_dir = File.join 'public', 'images'
javascripts_dir = File.join 'public', 'javascripts'
-# Set to true for easier debugging
+# Syntax preference
+preferred_syntax = :sass
+
+# Determine whether Compass generates relative or absolute paths
+relative_assets = false
+
+# Determines whether line comments should be added to compiled css for easier debugging
line_comments = false
# CSS output style - :nested, :expanded, :compact, or :compressed
output_style = :expanded
-# Learn more: http://compass-style.org/docs/tutorials/configuration-reference/
+# Learn more: http://beta.compass-style.org/help/tutorials/configuration-reference/
View
112 public/stylesheets/application.css
@@ -0,0 +1,112 @@
+@charset "UTF-8";
+html, body, div, span, applet, object, iframe,
+h1, h2, h3, h4, h5, h6, p, blockquote, pre,
+a, abbr, acronym, address, big, cite, code,
+del, dfn, em, font, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ outline: 0;
+ font-weight: inherit;
+ font-style: inherit;
+ font-size: 100%;
+ font-family: inherit;
+ vertical-align: baseline;
+}
+
+body {
+ line-height: 1;
+ color: black;
+ background: white;
+}
+
+ol, ul {
+ list-style: none;
+}
+
+table {
+ border-collapse: separate;
+ border-spacing: 0;
+ vertical-align: middle;
+}
+
+caption, th, td {
+ text-align: left;
+ font-weight: normal;
+ vertical-align: middle;
+}
+
+q, blockquote {
+ quotes: "" "";
+}
+q:before, q:after, blockquote:before, blockquote:after {
+ content: "";
+}
+
+a img {
+ border: none;
+}
+
+article, aside, canvas, details, figcaption, figure, footer, header, hgroup, menu, nav, section, summary {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ outline: 0;
+ display: block;
+}
+
+a {
+ color: #3366cc;
+}
+a:hover {
+ color: #3366cc;
+ text-decoration: none;
+}
+a:focus, a:active {
+ outline: none;
+}
+
+body {
+ font: 13px Arial, Helvetica, sans-serif;
+ background: white;
+ color: #0d0d0d;
+}
+body h1 {
+ position: absolute;
+ top: 50%;
+ left: 0;
+ font-size: 40px;
+ font-weight: bold;
+ margin-top: -40px;
+ text-align: center;
+ width: 100%;
+}
+body ul {
+ -moz-border-radius: 6px;
+ -webkit-border-radius: 6px;
+ -o-border-radius: 6px;
+ -ms-border-radius: 6px;
+ -khtml-border-radius: 6px;
+ border-radius: 6px;
+ background: #e7e7e7;
+ border: 1px solid #cccccc;
+ margin-top: 10px;
+ margin-left: 10px;
+ margin-right: 10px;
+}
+body ul li {
+ display: inline;
+ line-height: 30px;
+ padding: 0 15px;
+}
+body ul li a {
+ color: black;
+ text-decoration: none;
+}
+body ul li a:hover {
+ text-decoration: underline;
+}
View
56 tasks/styles.rake
@@ -0,0 +1,56 @@
+namespace :styles do
+
+ desc "Run compass stats"
+ task :stats => ["stats:default"]
+
+ namespace :stats do
+
+ task :default do
+ puts "*** Running compass stats ***"
+ system "compass stats"
+ end
+
+ desc "Create a log of compass stats"
+ task :log do
+ t = DateTime.now
+ filename = "compass-stats-#{t.strftime("%Y%m%d")}-#{t.strftime("%H%M%S")}.log"
+ log_dir = "log"
+ puts "*** Logging stats ***"
+ system "compass stats > #{log_dir}/#{filename}"
+ puts "Created #{log_dir}/#{filename}"
+ end
+
+ end
+
+ desc "Clear the styles"
+ task :clear => ["compile:clear"]
+
+ desc "List the styles"
+ task :list do
+ system "ls -lh public/stylesheets"
+ end
+
+ desc "Compile new styles"
+ task :compile => ["compile:default"]
+
+ namespace :compile do
+
+ task :clear do
+ puts "*** Clearing styles ***"
+ system "rm -Rfv public/stylesheets/*"
+ end
+
+ task :default => :clear do
+ puts "*** Compiling styles ***"
+ system "compass compile"
+ end
+
+ desc "Compile new styles for production"
+ task :production => :clear do
+ puts "*** Compiling styles ***"
+ system "compass compile --output-style compressed --force"
+ end
+
+ end
+
+end

0 comments on commit a05fef2

Please sign in to comment.
Something went wrong with that request. Please try again.