From 6763a9923ade32e6a8638f44f210b82b0f7d00c7 Mon Sep 17 00:00:00 2001 From: Joe Buhlig Date: Fri, 12 Feb 2016 11:09:29 -0600 Subject: [PATCH] Added tertiary color to digest Added hash to color in helper Added anchor_color to topic and site name links Styled the unsubscribe link --- app/helpers/user_notifications_helper.rb | 4 ++-- app/mailers/user_notifications.rb | 1 + app/views/user_notifications/digest.html.erb | 14 +++++++------- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/app/helpers/user_notifications_helper.rb b/app/helpers/user_notifications_helper.rb index 51a5e7ffea0..24ca2ef221e 100644 --- a/app/helpers/user_notifications_helper.rb +++ b/app/helpers/user_notifications_helper.rb @@ -28,8 +28,8 @@ module UserNotificationsHelper logo_url end - def html_site_link - "#{@site_name}" + def html_site_link(color) + "#{@site_name}" end def first_paragraph_from(html) diff --git a/app/mailers/user_notifications.rb b/app/mailers/user_notifications.rb index 51729427816..a338e607f26 100644 --- a/app/mailers/user_notifications.rb +++ b/app/mailers/user_notifications.rb @@ -62,6 +62,7 @@ class UserNotifications < ActionMailer::Base @site_name = SiteSetting.email_prefix.presence || SiteSetting.title @header_color = ColorScheme.hex_for_name('header_background') + @anchor_color = ColorScheme.hex_for_name('tertiary') @last_seen_at = short_date(@user.last_seen_at || @user.created_at) # A list of topics to show the user diff --git a/app/views/user_notifications/digest.html.erb b/app/views/user_notifications/digest.html.erb index 959562b2ea4..304250e12f7 100644 --- a/app/views/user_notifications/digest.html.erb +++ b/app/views/user_notifications/digest.html.erb @@ -1,7 +1,7 @@
- + <%- if logo_url.blank? %> <%= SiteSetting.title %> <%- else %> @@ -11,7 +11,7 @@
- <%= raw(t 'user_notifications.digest.why', site_link: html_site_link, last_seen_at: @last_seen_at) %> + <%= raw(t 'user_notifications.digest.why', site_link: html_site_link(@anchor_color), last_seen_at: @last_seen_at) %> <%- if @featured_topics.present? %>
@@ -20,7 +20,7 @@ <%- @featured_topics.each_with_index do |t, i| %> @@ -43,7 +43,7 @@ <%- @new_topics.each do |t| %>