fix compass filters
This commit is contained in:
parent
faa00b1318
commit
b8886b7f43
2 changed files with 17 additions and 10 deletions
|
@ -50,16 +50,6 @@ class Middleman < Sinatra::Base
|
||||||
puts "== The Middleman is already standing watch on port #{port}!"
|
puts "== The Middleman is already standing watch on port #{port}!"
|
||||||
end
|
end
|
||||||
|
|
||||||
configure do
|
|
||||||
Compass.configuration do |config|
|
|
||||||
config.project_path = Dir.pwd
|
|
||||||
config.sass_dir = File.join(File.expand_path(self.views), "stylesheets")
|
|
||||||
config.output_style = :nested
|
|
||||||
config.images_dir = File.join(File.basename(self.public), "images")
|
|
||||||
config.http_images_path = "/images/"
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# Check for local config
|
# Check for local config
|
||||||
local_config = File.join(self.root, "init.rb")
|
local_config = File.join(self.root, "init.rb")
|
||||||
if File.exists? local_config
|
if File.exists? local_config
|
||||||
|
@ -67,6 +57,19 @@ class Middleman < Sinatra::Base
|
||||||
class_eval File.read(local_config)
|
class_eval File.read(local_config)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
configure do
|
||||||
|
Compass.configuration do |config|
|
||||||
|
config.project_path = Dir.pwd
|
||||||
|
config.sass_dir = File.join(File.basename(self.views), "stylesheets")
|
||||||
|
config.output_style = :nested
|
||||||
|
config.images_dir = File.join(File.basename(self.public), "images")
|
||||||
|
config.http_images_path = "/images/"
|
||||||
|
config.add_import_path(config.sass_dir)
|
||||||
|
end
|
||||||
|
|
||||||
|
Compass.configure_sass_plugin!
|
||||||
|
end
|
||||||
|
|
||||||
get /(.*)/ do |path|
|
get /(.*)/ do |path|
|
||||||
path << "index.html" if path.match(%r{/$})
|
path << "index.html" if path.match(%r{/$})
|
||||||
path.gsub!(%r{^/}, '')
|
path.gsub!(%r{^/}, '')
|
||||||
|
|
|
@ -14,4 +14,8 @@ Middleman.helpers do
|
||||||
classes += additional unless additional.empty?
|
classes += additional unless additional.empty?
|
||||||
classes.join(' ')
|
classes.join(' ')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def asset_url(path, tld_length = 1)
|
||||||
|
"/#{path}"
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue