Sha256: 94a5f181a800accd868692c8e3a09a030b9424a98e8369887150c179fb7b36cd
Contents?: true
Size: 1023 Bytes
Versions: 20
Compression:
Stored size: 1023 Bytes
Contents
require 'awestruct/handlers/base_handler' require 'compass' require 'ninesixty' require 'bootstrap-sass' module Awestruct module Handlers class BaseSassHandler < BaseHandler attr_reader :syntax def initialize(site, delegate, syntax) super( site, delegate ) @syntax = syntax end def simple_name File.basename( relative_source_path, ".#{syntax}" ) end def output_filename simple_name + '.css' end def rendered_content(context, with_layouts=true) sass_opts = Compass.sass_engine_options sass_opts[:load_paths] ||= [] Compass::Frameworks::ALL.each do |framework| sass_opts[:load_paths] << framework.stylesheets_directory end sass_opts[:load_paths] << File.dirname( context.page.source_path ) sass_opts[:syntax] = syntax sass_opts[:custom] = site sass_engine = Sass::Engine.new( raw_content, sass_opts ) sass_engine.render end end end end
Version data entries
20 entries across 20 versions & 2 rubygems