module Inkcite

Image swapping technique courtesy of Email on Acid. www.emailonacid.com/blog/details/C13/a_slick_new_image_swapping_technique_for_responsive_emails

Fresh thinking on mobile-only content courtesy of FreshInbox's technique freshinbox.com/blog/bulletproof-solution-to-hiding-mobile-content-when-opened-in-non-mobile-email-clients/

Brian Graves' Toggle Responsive Pattern briangraves.github.io/ResponsiveEmailPatterns/patterns/navigation/toggle.html

Includes hex color manipulation from www.redguava.com.au/2011/10/lighten-or-darken-a-hexadecimal-color-in-ruby-on-rails/

Constants

VERSION

Public Class Methods

asset_path() click to toggle source
# File lib/inkcite.rb, line 36
def self.asset_path
  File.join(File.expand_path('../', File.dirname(__FILE__)), 'assets')
end
blueprint_image64() click to toggle source

Loads (and caches) the base64-encoded PNG data for the subtle background texture that Inkcite installs on the <body> tag in development mode.

# File lib/inkcite.rb, line 42
def self.blueprint_image64
  @blueprint64 ||= begin
    blueprint_path = File.join(asset_path, 'blueprint.png')
    Base64.encode64(File.read(blueprint_path)).gsub(/[\r\f\n]/, '')
  end
end