Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated the Sass setup. Dropped sass initializer from app.rb and /lib…

…, added Compass config, updated the Gemfile and updated the locations of the sass and css
  • Loading branch information...
commit 45228b1596ad42dc7aef5c5094d324435bfcbda0 1 parent 5d71f02
@adamstac adamstac authored
View
4 Gemfile
@@ -6,8 +6,8 @@ gem 'rack-flash'
gem 'thin' # or mongrel
# Component requirements
-gem 'haml', '3.0.2'
-gem 'compass', '0.10.0'
+gem 'sass', '~> 3.1.1'
+gem 'compass', '~> 0.11.1'
gem 'nokogiri'
# Test requirements
View
14 Gemfile.lock
@@ -2,12 +2,15 @@ GEM
remote: http://rubygems.org/
specs:
activesupport (2.3.5)
- compass (0.10.0)
- haml (>= 3.0.0)
+ chunky_png (1.2.0)
+ compass (0.11.1)
+ chunky_png (~> 1.1)
+ fssm (>= 0.2.7)
+ sass (~> 3.1)
daemons (1.1.3)
eventmachine (0.12.10)
+ fssm (0.2.7)
fuzzyhash (0.0.11)
- haml (3.0.2)
i18n (0.5.0)
nokogiri (1.4.4)
padrino (0.9.10)
@@ -40,6 +43,7 @@ GEM
rack-test (0.6.0)
rack (>= 1.0)
rake (0.8.7)
+ sass (3.1.1)
shoulda (2.11.3)
sinatra (1.2.6)
rack (~> 1.1)
@@ -58,12 +62,12 @@ PLATFORMS
ruby
DEPENDENCIES
- compass (= 0.10.0)
- haml (= 3.0.2)
+ compass (~> 0.11.1)
nokogiri
padrino (= 0.9.10)
rack-flash
rack-test
rake
+ sass (~> 3.1.1)
shoulda
thin
View
32 app/app.rb
@@ -1,36 +1,4 @@
class Fumblr < Padrino::Application
- configure do
- register SassInitializer
-
- ##
- # Application-specific configuration options
- #
- # set :raise_errors, true # Show exceptions (default for development)
- # set :public # Location for static assets (default root/public)
- # set :reload, false # Reload application files (default in development)
- # set :default_builder, "foo" # Set a custom form builder (default 'StandardFormBuilder')
- # set :locale_path, "bar" # Set path for I18n translations (default your_app/locales)
- # enable :sessions # Disabled by default
- # disable :flash # Disables rack-flash (enabled by default if sessions)
- # disable :padrino_helpers # Disables padrino markup helpers (enabled by default if present)
- # disable :padrino_mailer # Disables padrino mailer (enabled by default if present)
- # enable :authentication # Enable padrino-admin authentication (disabled by default)
- # layout :my_layout # Layout can be in views/layouts/foo.ext or views/foo.ext (default :application)
-
- Compass.configuration do |config|
- config.project_path = Padrino.root
- config.sass_dir = "public/stylesheets"
- config.project_type = :stand_alone
- config.http_path = "/"
- config.css_dir = "public/css"
- config.images_dir = "images"
- config.output_style = :compressed
- config.cache = false
- end
-
- Sass::Plugin.options.merge!(Compass.sass_engine_options)
- end
-
##
# You can configure for a specified environment like:
View
26 config.rb
@@ -0,0 +1,26 @@
+# Compass Configuration
+
+# HTTP paths
+http_path = '/'
+http_stylesheets_path = '/css'
+http_images_path = '/images'
+http_javascripts_path = '/javascripts'
+
+# File system locations
+sass_dir = 'public/sass'
+css_dir = 'public/css'
+images_dir = 'public/images'
+javascripts_dir = 'public/javascripts'
+
+# Set to true for easier debugging
+line_comments = false
+preferred_syntax = :sass
+
+# CSS output style - :nested, :expanded, :compact, or :compressed
+output_style = :expanded
+
+# Determine whether Compass asset helper functions generate relative
+# or absolute paths
+relative_assets = true
+
+# Learn more: http://compass-style.org/docs/tutorials/configuration-reference/
View
16 lib/sass_plugin.rb
@@ -1,16 +0,0 @@
-# Enables support for SASS template reloading in rack applications.
-# See http://nex-3.com/posts/88-sass-supports-rack for more details.
-# Store SASS files (by default) within 'app/stylesheets'
-
-module SassInitializer
- def self.registered(app)
- require 'sass/plugin/rack'
- Sass::Plugin.options[:template_location] = Padrino.root("public/stylesheets")
- Sass::Plugin.options[:css_location] = Padrino.root("public/css")
- #Sass::Plugin.options[:cache_location] = Padrino.root("tmp/.sass-cache")
- Sass::Plugin.options[:style] = :compact
- Sass::Plugin.options[:syntax] = :sass
-
- app.use Sass::Plugin::Rack
- end
-end
View
56 public/css/screen.css
@@ -0,0 +1,56 @@
+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, img, ins, kbd, q, s, samp,
+small, strike, strong, sub, sup, tt, var,
+b, u, i, center,
+dl, dt, dd, ol, ul, li,
+fieldset, form, label, legend,
+table, caption, tbody, tfoot, thead, tr, th, td,
+article, aside, canvas, details, embed,
+figure, figcaption, footer, header, hgroup,
+menu, nav, output, ruby, section, summary,
+time, mark, audio, video {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-size: 100%;
+ font: inherit;
+ vertical-align: baseline;
+}
+
+body {
+ line-height: 1;
+}
+
+ol, ul {
+ list-style: none;
+}
+
+table {
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+
+caption, th, td {
+ text-align: left;
+ font-weight: normal;
+ vertical-align: middle;
+}
+
+q, blockquote {
+ quotes: none;
+}
+q:before, q:after, blockquote:before, blockquote:after {
+ content: "";
+ content: none;
+}
+
+a img {
+ border: none;
+}
+
+article, aside, details, figcaption, figure,
+footer, header, hgroup, menu, nav, section {
+ display: block;
+}
View
10 public/sass/_base.sass
@@ -0,0 +1,10 @@
+// CSS Reset
+@import compass/reset
+
+// Compass Stuff
+@import compass/utilities
+@import compass/layout
+@import compass/css3
+
+// Project
+// ...
View
1  public/sass/screen.sass
@@ -0,0 +1 @@
+@import base
View
1  public/stylesheets/screen.sass
@@ -1 +0,0 @@
-// @import "compass/css3"
Please sign in to comment.
Something went wrong with that request. Please try again.