maktoub 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +68 -0
  3. data/Rakefile +39 -0
  4. data/app/assets/javascripts/maktoub/application.js +9 -0
  5. data/app/assets/javascripts/maktoub/archives.js +2 -0
  6. data/app/assets/stylesheets/maktoub/application.css +7 -0
  7. data/app/assets/stylesheets/maktoub/archives.css +4 -0
  8. data/app/controllers/maktoub/application_controller.rb +4 -0
  9. data/app/controllers/maktoub/archives_controller.rb +13 -0
  10. data/app/helpers/maktoub/application_helper.rb +4 -0
  11. data/app/helpers/maktoub/archives_helper.rb +4 -0
  12. data/app/mailers/maktoub/newsletter_mailer.rb +32 -0
  13. data/app/views/layouts/maktoub/application.html.erb +14 -0
  14. data/app/views/layouts/maktoub/newsletter_mailer.erb +474 -0
  15. data/app/views/maktoub/newsletters/readme.erb +3 -0
  16. data/config/routes.rb +8 -0
  17. data/lib/maktoub.rb +36 -0
  18. data/lib/maktoub/engine.rb +6 -0
  19. data/lib/maktoub/version.rb +3 -0
  20. data/lib/tasks/maktoub_tasks.rake +26 -0
  21. data/test/dummy/Rakefile +7 -0
  22. data/test/dummy/app/assets/images/logo.jpg +0 -0
  23. data/test/dummy/app/assets/javascripts/application.js +9 -0
  24. data/test/dummy/app/assets/stylesheets/application.css +7 -0
  25. data/test/dummy/app/controllers/application_controller.rb +3 -0
  26. data/test/dummy/app/helpers/application_helper.rb +2 -0
  27. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  28. data/test/dummy/app/views/maktoub/newsletters/test_template.erb +0 -0
  29. data/test/dummy/config.ru +4 -0
  30. data/test/dummy/config/application.rb +45 -0
  31. data/test/dummy/config/boot.rb +10 -0
  32. data/test/dummy/config/database.yml +25 -0
  33. data/test/dummy/config/environment.rb +5 -0
  34. data/test/dummy/config/environments/development.rb +30 -0
  35. data/test/dummy/config/environments/production.rb +60 -0
  36. data/test/dummy/config/environments/test.rb +39 -0
  37. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  38. data/test/dummy/config/initializers/inflections.rb +10 -0
  39. data/test/dummy/config/initializers/maktoub.rb +18 -0
  40. data/test/dummy/config/initializers/mime_types.rb +5 -0
  41. data/test/dummy/config/initializers/secret_token.rb +7 -0
  42. data/test/dummy/config/initializers/session_store.rb +8 -0
  43. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  44. data/test/dummy/config/locales/en.yml +5 -0
  45. data/test/dummy/config/routes.rb +5 -0
  46. data/test/dummy/db/development.sqlite3 +0 -0
  47. data/test/dummy/db/test.sqlite3 +0 -0
  48. data/test/dummy/log/development.log +6132 -0
  49. data/test/dummy/log/test.log +453 -0
  50. data/test/dummy/public/404.html +26 -0
  51. data/test/dummy/public/422.html +26 -0
  52. data/test/dummy/public/500.html +26 -0
  53. data/test/dummy/public/favicon.ico +0 -0
  54. data/test/dummy/script/rails +6 -0
  55. data/test/dummy/tmp/cache/assets/CA2/C20/sprockets%2F5603f1da541a5e3c72d26611478813da +0 -0
  56. data/test/dummy/tmp/cache/assets/CB4/BE0/sprockets%2F57f7e5c53278ac52062992433f317acc +0 -0
  57. data/test/dummy/tmp/cache/assets/CBC/F80/sprockets%2F95bdffc2824328543384db8ea7890153 +0 -0
  58. data/test/dummy/tmp/cache/assets/CCF/9C0/sprockets%2Fae24de6a552b3d6057517681a1a363e0 +0 -0
  59. data/test/dummy/tmp/cache/assets/CDD/630/sprockets%2F75757e115102f4fcc9ed52a2249bf082 +0 -0
  60. data/test/dummy/tmp/cache/assets/D34/130/sprockets%2F9a5c11d810e2e1f87ea6452113cc7e4c +0 -0
  61. data/test/dummy/tmp/cache/assets/D68/E80/sprockets%2F2c93d36471b04c04bb72a9aeeaf496a8 +0 -0
  62. data/test/dummy/tmp/cache/assets/D6E/8A0/sprockets%2Fa833bda5303fa2c89da36ec6b469618d +0 -0
  63. data/test/dummy/tmp/cache/assets/D70/6F0/sprockets%2Ff37da951add08a3d2866a4767b5afc43 +0 -0
  64. data/test/dummy/tmp/cache/assets/D74/710/sprockets%2F4865a147f154cadc0b49ebe873be7a85 +0 -0
  65. data/test/dummy/tmp/cache/assets/D76/B40/sprockets%2F8aea19137c7b683ef195fa3bf2a9704f +0 -0
  66. data/test/dummy/tmp/cache/assets/D7D/170/sprockets%2F15742d263cfefba79b76652f6e94ac6d +0 -0
  67. data/test/dummy/tmp/cache/assets/DC6/1E0/sprockets%2F5fad4aa8ef2c006cc0dd5233e98dd922 +0 -0
  68. data/test/functional/maktoub/archives_controller_test.rb +24 -0
  69. data/test/functional/maktoub/newsletter_mailer_test.rb +31 -0
  70. data/test/integration/navigation_test.rb +10 -0
  71. data/test/maktoub_test.rb +45 -0
  72. data/test/test_helper.rb +11 -0
  73. data/test/unit/helpers/maktoub/archives_helper_test.rb +6 -0
  74. metadata +220 -0
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2011 YOURNAME
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,68 @@
1
+ = Maktoub
2
+
3
+ Maktoub is a Ruby on Rails engine for email newsletters.
4
+ * Write your newsletter as you would write any view (erb partial)
5
+ * Maktoub sends your email in multipart as both html and text
6
+
7
+
8
+ == Installation
9
+
10
+ # Add this line to your Gemfile
11
+ gem 'maktoub', :git => 'git://github.com/Sandglaz/maktoub.git'
12
+
13
+ Then 'bundle install'
14
+
15
+ == Usage
16
+
17
+ === Configuration
18
+ In config initializers create a maktoub.rb file and configure your settings. Example below:
19
+
20
+ Maktoub.from = "Test Sender <maktoub@example.com>" # the email the newsletter is sent from
21
+ Maktoub.twitter_url = "http://twitter.com/#!/twitter" # your twitter page
22
+ Maktoub.facebook_url = "http://www.facebook.com/facebook" # your facebook oage
23
+ Maktoub.subscription_preferences_url = "http://example.com/manage_subscriptions" #subscribers management url
24
+ Maktoub.logo = "logo.jpg" # path to your logo asset
25
+ Maktoub.home_domain = "example.com" # your domain
26
+ Maktoub.app_name = "Maktoub" # your app name
27
+
28
+ # pass a block to subscribers_extractor that returns an object that reponds to :name and :email
29
+ # (fields can be configured as shown below)
30
+ require "ostruct"
31
+ Maktoub.subscribers_extractor do
32
+ users = []
33
+ (1..5).each do |i|
34
+ users << OpenStruct.new({name: "tester#{i}", email: "test#{i}@example.com"})
35
+ end
36
+ return users
37
+ end
38
+
39
+ # uncomment lines below to change subscriber fields that contain email and
40
+ # Maktoub.email_field = :address
41
+ # Maktoub.name_field = :nickname
42
+
43
+ === Authoring
44
+
45
+ Create a newsletter as a normal view partial in app/views/maktoub/newsletters/.
46
+ The subject of the newsletter will be automatically deduced from the partial's name.
47
+
48
+ === Sending messages
49
+ Maktoub comes with two rake tasks to allow you to:
50
+ * send a test message to the "from" address of your newsletter.
51
+
52
+ rake maktoub:test['name_of_my_newsletter_partial']
53
+
54
+ * publish the newsletter to all your subscribers. If you have delayed_job installed then it will use it to deliver each email as a background job
55
+
56
+ rake maktoub:mail['name_of_my_newsletter_parial']
57
+
58
+
59
+ Alternatively you have access to a Maktoub::NewsletterMailer ActionMailer object with a publish method
60
+ Maktoub::NewsletterMail.publish('my_newsletter_partial', :name => 'User name', :email => 'user@example.com')
61
+
62
+ === View in browser
63
+ To be able to view your newsletter in a browser add it to routes.rb.
64
+ # mount the engine at a path of your choice.
65
+ # you would access the newsletter at: http://example.com/newsletter/my_awesome_newletter
66
+ mount Maktoub::Engine => "/"
67
+
68
+
data/Rakefile ADDED
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env rake
2
+ begin
3
+ require 'bundler/setup'
4
+ rescue LoadError
5
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
+ end
7
+ begin
8
+ require 'rdoc/task'
9
+ rescue LoadError
10
+ require 'rdoc/rdoc'
11
+ require 'rake/rdoctask'
12
+ RDoc::Task = Rake::RDocTask
13
+ end
14
+
15
+ RDoc::Task.new(:rdoc) do |rdoc|
16
+ rdoc.rdoc_dir = 'rdoc'
17
+ rdoc.title = 'Maktoub'
18
+ rdoc.options << '--line-numbers'
19
+ rdoc.rdoc_files.include('README.rdoc')
20
+ rdoc.rdoc_files.include('lib/**/*.rb')
21
+ end
22
+
23
+ APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__)
24
+ load 'rails/tasks/engine.rake'
25
+
26
+
27
+ Bundler::GemHelper.install_tasks
28
+
29
+ require 'rake/testtask'
30
+
31
+ Rake::TestTask.new(:test) do |t|
32
+ t.libs << 'lib'
33
+ t.libs << 'test'
34
+ t.pattern = 'test/**/*_test.rb'
35
+ t.verbose = false
36
+ end
37
+
38
+
39
+ task :default => :test
@@ -0,0 +1,9 @@
1
+ // This is a manifest file that'll be compiled into including all the files listed below.
2
+ // Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
3
+ // be included in the compiled file accessible from http://example.com/assets/application.js
4
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
5
+ // the compiled file.
6
+ //
7
+ //= require jquery
8
+ //= require jquery_ujs
9
+ //= require_tree .
@@ -0,0 +1,2 @@
1
+ // Place all the behaviors and hooks related to the matching controller here.
2
+ // All this logic will automatically be available in application.js.
@@ -0,0 +1,7 @@
1
+ /*
2
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
3
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
5
+ *= require_self
6
+ *= require_tree .
7
+ */
@@ -0,0 +1,4 @@
1
+ /*
2
+ Place all the styles related to the matching controller here.
3
+ They will automatically be included in application.css.
4
+ */
@@ -0,0 +1,4 @@
1
+ module Maktoub
2
+ class ApplicationController < ActionController::Base
3
+ end
4
+ end
@@ -0,0 +1,13 @@
1
+ module Maktoub
2
+ class ArchivesController < ApplicationController
3
+ layout 'maktoub/newsletter_mailer'
4
+ def show
5
+ @archive = true
6
+ @subject = params[:newsletter] || 'readme'
7
+
8
+ render "maktoub/newsletters/#{@subject}"
9
+ end
10
+
11
+ end
12
+ end
13
+
@@ -0,0 +1,4 @@
1
+ module Maktoub
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module Maktoub
2
+ module ArchivesHelper
3
+ end
4
+ end
@@ -0,0 +1,32 @@
1
+ require 'premailer'
2
+
3
+ module Maktoub
4
+ class NewsletterMailer < ActionMailer::Base
5
+ default from: Maktoub.from,
6
+ parts_order: [ "text/html", "text/plain" ]
7
+
8
+ default_url_options[:host] = Maktoub.home_domain
9
+
10
+ def publish(newsletter_name, params)
11
+ @name = params[:name]
12
+ @subject = newsletter_name.humanize.titleize
13
+ @email = params[:email]
14
+ @newsletter_name = newsletter_name
15
+ mail_fields = {
16
+ subject: @subject,
17
+ to: params[:email]
18
+ }
19
+
20
+ premailer = Premailer.new(render("maktoub/newsletters/#{newsletter_name}").to_s,
21
+ with_html_string: true,
22
+ link_query_string: CGI::escape("utm_source=newsletter&utm_medium=email&utm_campaign=#{@subject}")
23
+ )
24
+
25
+ mail(mail_fields) do |format|
26
+ format.text { premailer.to_plain_text.html_safe }
27
+ format.html { premailer.to_inline_css.html_safe }
28
+ end
29
+ end
30
+ end
31
+ end
32
+
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Maktoub</title>
5
+ <%= stylesheet_link_tag "maktoub/application" %>
6
+ <%= javascript_include_tag "maktoub/application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,474 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5
+
6
+ <!-- Facebook sharing information tags -->
7
+ <meta property="og:title" content="<%= @subject %>" />
8
+ <meta name="viewport" content="width=680px, initial-scale=0.5">
9
+ <title><%= @subject %></title>
10
+ <style type="text/css">
11
+ /* Client-specific Styles */
12
+ #outlook a{padding:0;} /* Force Outlook to provide a "view in browser" button. */
13
+ body{width:100% !important;} .ReadMsgBody{width:100%;} .ExternalClass{width:100%;} /* Force Hotmail to display emails at full width */
14
+ body{-webkit-text-size-adjust:none;} /* Prevent Webkit platforms from changing default text sizes. */
15
+
16
+ /* Reset Styles */
17
+ body{margin:0; padding:0;}
18
+ img{border:0; height:auto; line-height:100%; outline:none; text-decoration:none;}
19
+ table td{border-collapse:collapse;}
20
+ #backgroundTable{height:100% !important; margin:0; padding:0; width:100% !important;}
21
+
22
+ /* Template Styles */
23
+
24
+ /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: COMMON PAGE ELEMENTS /\/\/\/\/\/\/\/\/\/\ */
25
+
26
+ /**
27
+ * @tab Page
28
+ * @section background color
29
+ * @tip Set the background color for your email. You may want to choose one that matches your company's branding.
30
+ * @theme page
31
+ */
32
+ body, #backgroundTable{
33
+ background-color:#FCFCFC;
34
+ }
35
+
36
+ hr {
37
+ margin-top: 0;
38
+ color: #CCCCCC;
39
+ }
40
+
41
+ /**
42
+ * @tab Page
43
+ * @section email border
44
+ * @tip Set the border for your email.
45
+ */
46
+ #templateContainer{
47
+
48
+ }
49
+
50
+ /**
51
+ * @tab Page
52
+ * @section heading 1
53
+ * @tip Set the styling for all first-level headings in your emails. These should be the largest of your headings.
54
+ * @style heading 1
55
+ */
56
+ h1, .h1{
57
+ color: #0099FF;
58
+ display:block;
59
+ font-family:Arial;
60
+ font-size:34px;
61
+ font-weight:bold;
62
+ line-height:100%;
63
+ margin-top:0;
64
+ margin-right:0;
65
+ margin-bottom:10px;
66
+ margin-left:0;
67
+ text-align:left;
68
+ }
69
+
70
+ /**
71
+ * @tab Page
72
+ * @section heading 2
73
+ * @tip Set the styling for all second-level headings in your emails.
74
+ * @style heading 2
75
+ */
76
+ h2, .h2{
77
+ color: #0099FF;
78
+ display:block;
79
+ font-family:Arial;
80
+ font-size:30px;
81
+ font-weight:bold;
82
+ line-height:100%;
83
+ margin-top:0;
84
+ margin-right:0;
85
+ margin-bottom:10px;
86
+ margin-left:0;
87
+ text-align:left;
88
+ }
89
+
90
+ /**
91
+ * @tab Page
92
+ * @section heading 3
93
+ * @tip Set the styling for all third-level headings in your emails.
94
+ * @style heading 3
95
+ */
96
+ h3, .h3{
97
+ color: #0099FF;
98
+ display:block;
99
+ font-family:Arial;
100
+ font-size:26px;
101
+ font-weight:bold;
102
+ line-height:100%;
103
+ margin-top:0;
104
+ margin-right:0;
105
+ margin-bottom:10px;
106
+ margin-left:0;
107
+ text-align:left;
108
+ }
109
+
110
+ /**
111
+ * @tab Page
112
+ * @section heading 4
113
+ * @tip Set the styling for all fourth-level headings in your emails. These should be the smallest of your headings.
114
+ * @style heading 4
115
+ */
116
+ h4, .h4{
117
+ color: #0099FF;
118
+ display:block;
119
+ font-family:Arial;
120
+ font-size:22px;
121
+ font-weight:bold;
122
+ line-height:100%;
123
+ margin-top:0;
124
+ margin-right:0;
125
+ margin-bottom:10px;
126
+ margin-left:0;
127
+ text-align:left;
128
+ }
129
+
130
+ /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: PREHEADER /\/\/\/\/\/\/\/\/\/\ */
131
+
132
+ /**
133
+ * @tab Header
134
+ * @section preheader style
135
+ * @tip Set the background color for your email's preheader area.
136
+ * @theme page
137
+ */
138
+ #templatePreheader{
139
+ background-color:#FCFCFC;
140
+ }
141
+
142
+ /**
143
+ * @tab Header
144
+ * @section preheader text
145
+ * @tip Set the styling for your email's preheader text. Choose a size and color that is easy to read.
146
+ */
147
+ .preheaderContent div{
148
+ color:#505050;
149
+ font-family:Arial;
150
+ font-size:10px;
151
+ line-height:100%;
152
+ text-align:left;
153
+ }
154
+
155
+ /**
156
+ * @tab Header
157
+ * @section preheader link
158
+ * @tip Set the styling for your email's preheader links. Choose a color that helps them stand out from your text.
159
+ */
160
+ .preheaderContent div a:link, .preheaderContent div a:visited, /* Yahoo! Mail Override */ .preheaderContent div a .yshortcuts /* Yahoo! Mail Override */{
161
+ color:#336699;
162
+ font-weight:normal;
163
+ text-decoration:underline;
164
+ }
165
+
166
+ /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: HEADER /\/\/\/\/\/\/\/\/\/\ */
167
+
168
+ /**
169
+ * @tab Header
170
+ * @section header style
171
+ * @tip Set the background color and border for your email's header area.
172
+ * @theme header
173
+ */
174
+ #templateHeader{
175
+ background-color:#FCFCFC;
176
+ border-bottom:0;
177
+ }
178
+
179
+ /**
180
+ * @tab Header
181
+ * @section header text
182
+ * @tip Set the styling for your email's header text. Choose a size and color that is easy to read.
183
+ */
184
+ .headerContent{
185
+ color:#202020;
186
+ font-family:Arial;
187
+ font-size:34px;
188
+ font-weight:bold;
189
+ line-height:100%;
190
+ padding:0;
191
+ text-align:left;
192
+ vertical-align:middle;
193
+ }
194
+
195
+ /**
196
+ * @tab Header
197
+ * @section header link
198
+ * @tip Set the styling for your email's header links. Choose a color that helps them stand out from your text.
199
+ */
200
+ .headerContent a:link, .headerContent a:visited, /* Yahoo! Mail Override */ .headerContent a .yshortcuts /* Yahoo! Mail Override */{
201
+ color:#336699;
202
+ font-weight:normal;
203
+ text-decoration:underline;
204
+ }
205
+
206
+ #headerImage{
207
+ height:auto;
208
+ max-width:600px !important;
209
+ }
210
+
211
+ /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: MAIN BODY /\/\/\/\/\/\/\/\/\/\ */
212
+
213
+ /**
214
+ * @tab Body
215
+ * @section body style
216
+ * @tip Set the background color for your email's body area.
217
+ */
218
+ #templateContainer, .bodyContent{
219
+ background-color:#FCFCFC;
220
+ }
221
+
222
+ /**
223
+ * @tab Body
224
+ * @section body text
225
+ * @tip Set the styling for your email's main content text. Choose a size and color that is easy to read.
226
+ * @theme main
227
+ */
228
+ .bodyContent div{
229
+ color:#505050;
230
+ font-family:Arial;
231
+ font-size:14px;
232
+ line-height:150%;
233
+ text-align:left;
234
+ }
235
+
236
+ /**
237
+ * @tab Body
238
+ * @section body link
239
+ * @tip Set the styling for your email's main content links. Choose a color that helps them stand out from your text.
240
+ */
241
+ .bodyContent div a:link, .bodyContent div a:visited, /* Yahoo! Mail Override */ .bodyContent div a .yshortcuts /* Yahoo! Mail Override */{
242
+ color:#336699;
243
+ font-weight:normal;
244
+ text-decoration:underline;
245
+ }
246
+
247
+ .bodyContent img{
248
+ display:inline;
249
+ height:auto;
250
+ }
251
+
252
+ /* /\/\/\/\/\/\/\/\/\/\ STANDARD STYLING: FOOTER /\/\/\/\/\/\/\/\/\/\ */
253
+
254
+ /**
255
+ * @tab Footer
256
+ * @section footer style
257
+ * @tip Set the background color and top border for your email's footer area.
258
+ * @theme footer
259
+ */
260
+ #templateFooter{
261
+ background-color:#FCFCFC;
262
+ border-top:0;
263
+ }
264
+
265
+ /**
266
+ * @tab Footer
267
+ * @section footer text
268
+ * @tip Set the styling for your email's footer text. Choose a size and color that is easy to read.
269
+ * @theme footer
270
+ */
271
+ .footerContent div{
272
+ color:#707070;
273
+ font-family:Arial;
274
+ font-size:12px;
275
+ line-height:125%;
276
+ text-align:left;
277
+ }
278
+
279
+ /**
280
+ * @tab Footer
281
+ * @section footer link
282
+ * @tip Set the styling for your email's footer links. Choose a color that helps them stand out from your text.
283
+ */
284
+ .footerContent div a:link, .footerContent div a:visited, /* Yahoo! Mail Override */ .footerContent div a .yshortcuts /* Yahoo! Mail Override */{
285
+ color:#336699;
286
+ font-weight:normal;
287
+ text-decoration:underline;
288
+ }
289
+
290
+ .footerContent img{
291
+ display:inline;
292
+ }
293
+
294
+ /**
295
+ * @tab Footer
296
+ * @section social bar style
297
+ * @tip Set the background color and border for your email's footer social bar.
298
+ * @theme footer
299
+ */
300
+ #social{
301
+ background-color:#FCFCFC;
302
+ border:0;
303
+ }
304
+
305
+ /**
306
+ * @tab Footer
307
+ * @section social bar style
308
+ * @tip Set the background color and border for your email's footer social bar.
309
+ */
310
+ #social div{
311
+ text-align:center;
312
+ }
313
+
314
+ /**
315
+ * @tab Footer
316
+ * @section utility bar style
317
+ * @tip Set the background color and border for your email's footer utility bar.
318
+ * @theme footer
319
+ */
320
+ #utility{
321
+ background-color:#FCFCFC;
322
+ border:0;
323
+ }
324
+
325
+ /**
326
+ * @tab Footer
327
+ * @section utility bar style
328
+ * @tip Set the background color and border for your email's footer utility bar.
329
+ */
330
+ #utility div{
331
+ text-align:center;
332
+ }
333
+
334
+ #monkeyRewards img{
335
+ max-width:190px;
336
+ }
337
+ </style>
338
+ </head>
339
+ <body leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
340
+ <center>
341
+ <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="backgroundTable">
342
+ <tr>
343
+ <td align="center" valign="top">
344
+ <!-- // Begin Template Preheader \\ -->
345
+ <table border="0" cellpadding="10" cellspacing="0" width="600" id="templatePreheader">
346
+ <tr>
347
+ <td valign="top" class="preheaderContent">
348
+
349
+ <!-- // Begin Module: Standard Preheader \ -->
350
+ <table border="0" cellpadding="10" cellspacing="0" width="100%">
351
+ <tr>
352
+ <td valign="top">
353
+ <div>
354
+ <%= yield(:teaser) %>
355
+ </div>
356
+ </td>
357
+
358
+ <%- unless @archive %>
359
+ <td valign="top" width="190">
360
+ <div>
361
+ <%= @template %>
362
+ Is this email not displaying correctly?<br /><%= link_to "View it in your browser", newsletter_url(@newsletter_name), target: "_blank" %>.
363
+ </div>
364
+ </td>
365
+ <%- end %>
366
+ </tr>
367
+ </table>
368
+ <!-- // End Module: Standard Preheader \ -->
369
+
370
+ </td>
371
+ </tr>
372
+ </table>
373
+ <!-- // End Template Preheader \\ -->
374
+ <table border="0" cellpadding="0" cellspacing="0" width="600" id="templateContainer">
375
+ <tr>
376
+ <td align="center" valign="top">
377
+ <!-- // Begin Template Header \\ -->
378
+ <table border="0" cellpadding="0" cellspacing="0" width="600" id="templateHeader">
379
+ <tr>
380
+ <td class="headerContent">
381
+
382
+ <!-- // Begin Module: Standard Header Image \\ -->
383
+ <% img = image_tag Maktoub.logo, :style => "max-width:600px", :id => "headerImage campaign-icon", :alt => Maktoub.app_name %>
384
+ <%= link_to img, Maktoub.home_url, :target => "_blank" %>
385
+ <!-- // End Module: Standard Header Image \\ -->
386
+ <hr />
387
+ </td>
388
+ </tr>
389
+ </table>
390
+ <!-- // End Template Header \\ -->
391
+ </td>
392
+ </tr>
393
+ <tr>
394
+ <td align="center" valign="top">
395
+ <!-- // Begin Template Body \\ -->
396
+ <table border="0" cellpadding="0" cellspacing="0" width="600" id="templateBody">
397
+ <tr>
398
+ <td valign="top" class="bodyContent">
399
+
400
+ <!-- // Begin Module: Standard Content \\ -->
401
+ <table border="0" cellpadding="20" cellspacing="0" width="100%">
402
+ <tr>
403
+ <td valign="top">
404
+ <div mc:edit="std_content00">
405
+ <%= yield %>
406
+ </div>
407
+ </td>
408
+ </tr>
409
+ </table>
410
+ <!-- // End Module: Standard Content \\ -->
411
+
412
+ </td>
413
+ </tr>
414
+ </table>
415
+ <!-- // End Template Body \\ -->
416
+ </td>
417
+ </tr>
418
+ <tr>
419
+ <td align="center" valign="top">
420
+ <!-- // Begin Template Footer \\ -->
421
+ <table border="0" cellpadding="10" cellspacing="0" width="600" id="templateFooter">
422
+ <tr>
423
+ <td valign="top" class="footerContent">
424
+
425
+ <!-- // Begin Module: Standard Footer \\ -->
426
+ <table border="0" cellpadding="10" cellspacing="0" width="100%">
427
+ <tr>
428
+ <td colspan="2" valign="middle" id="social">
429
+ <div mc:edit="std_social">
430
+ &nbsp;<%= link_to 'follow on Twitter', Maktoub.twitter_url, :target => "_blank" %> | <%= link_to 'friend on Facebook', Maktoub.facebook_url, :target => "_blank" %> &nbsp;
431
+ </div>
432
+ </td>
433
+ </tr>
434
+ <tr>
435
+ <td valign="top" width="350">
436
+ <div mc:edit="std_footer">
437
+ <em>Copyright &copy; <%= Time.now.year %> Sandglaz, All rights reserved.</em>
438
+ <br />
439
+ <em>You are receiving this email because you opted in at our website <%= link_to Maktoub.home_url, Maktoub.home_url, :target => "_blank" %>.</em>
440
+ <br />
441
+ <%- unless @archive %>
442
+ <%# we are not including mailing addresses %>
443
+ <%#<br /><strong>Our mailing address is:</strong><br /> %>
444
+ <%# 928 Greenwood Ave, Toronto ON, M4J4C3 Canada %>
445
+ <%- end %>
446
+ </div>
447
+ </td>
448
+
449
+ </tr>
450
+ <tr>
451
+ <td colspan="2" valign="middle" id="utility">
452
+ <div>
453
+ &nbsp;<%= link_to 'update subscription preferences', Maktoub.subscription_preferences_url, :target => "_blank" %>&nbsp;
454
+ </div>
455
+ </td>
456
+ </tr>
457
+ </table>
458
+ <!-- // End Module: Standard Footer \\ -->
459
+
460
+ </td>
461
+ </tr>
462
+ </table>
463
+ <!-- // End Template Footer \\ -->
464
+ </td>
465
+ </tr>
466
+ </table>
467
+ <br />
468
+ </td>
469
+ </tr>
470
+ </table>
471
+ </center>
472
+ </body>
473
+ </html>
474
+