Skip to content

Commit 5e097a3

Browse files
Fix dark mode styling for Follow Up Email Template (button, text, dividers, container, icons)
1 parent de4fb7a commit 5e097a3

2 files changed

Lines changed: 93 additions & 27 deletions

File tree

src/components/CommunityPortal/Activities/FollowUpEmailTemplate.jsx

Lines changed: 40 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,44 @@
11
import { useParams, Link } from 'react-router-dom';
2+
import { useSelector } from 'react-redux';
23
import styles from './FollowUpEmailTemplate.module.css';
34
import { FaLinkedin, FaInstagram, FaFacebook } from 'react-icons/fa';
45
import companyLogo from '../../../assets/images/logo2.png';
56

67
function FollowUpEmailTemplate() {
7-
const { eventId = 1234, email = '' } = useParams(); // || { email: '' };
8+
const { eventId = 1234, email = '' } = useParams();
9+
10+
// Dark mode state from Redux
11+
const darkMode = useSelector(state => state.theme.darkMode);
12+
813
return (
9-
<div className={styles.emailTemplateContainer}>
14+
<div
15+
className={`${styles.emailTemplateContainer} ${
16+
darkMode ? styles.emailTemplateContainerDark : ''
17+
}`}
18+
>
1019
{/* Company Logo */}
1120
<img src={companyLogo} alt="One Community Logo" className={styles.emailLogo} />
1221

13-
<h2>Hi {email || '[Name]'},</h2>
14-
<p>
22+
<h2 className={darkMode ? styles.textLight : ''}>Hi {email || '[Name]'},</h2>
23+
24+
<p className={darkMode ? styles.textLight : ''}>
1525
We hope you enjoyed our recent event. Your feedback is valuable to us as we strive to
1626
improve our future events.
1727
</p>
1828

19-
<p>
29+
<p className={darkMode ? styles.textLight : ''}>
2030
Please take a moment to share your thoughts:
2131
<br />
2232
<Link
2333
to={`/communityportal/activities/FeedbackForm/${eventId}/${email || 'no-email'}`}
24-
className={styles.feedbackLink}
34+
className={`${styles.feedbackLink} ${darkMode ? styles.feedbackLinkDark : ''}`}
2535
>
2636
Survey Form
2737
</Link>
2838
</p>
2939

30-
<p>If you’d like to:</p>
31-
<ul>
40+
<p className={darkMode ? styles.textLight : ''}>If you’d like to:</p>
41+
<ul className={`${darkMode ? styles.textLight : ''} ${darkMode ? styles.linkSoftDark : ''}`}>
3242
<li>
3343
Reschedule: <a href="https://www.onecommunityevents.org/reschedule">Reschedule Link</a>
3444
</li>
@@ -38,24 +48,24 @@ function FollowUpEmailTemplate() {
3848
</li>
3949
</ul>
4050

41-
<p>Best regards,</p>
42-
<p>One Community Team</p>
43-
<p>Primary Email: jae@onecommunityglobal.org</p>
44-
<p>Google Email: onecommunityglobal@gmail.com</p>
45-
<p>Timezone: Los Angeles, CA - Pacific Time</p>
51+
<p className={darkMode ? styles.textLight : ''}>Best regards,</p>
52+
<p className={darkMode ? styles.textLight : ''}>One Community Team</p>
53+
<p className={darkMode ? styles.textLight : ''}>Primary Email: jae@onecommunityglobal.org</p>
54+
<p className={darkMode ? styles.textLight : ''}>Google Email: onecommunityglobal@gmail.com</p>
55+
<p className={darkMode ? styles.textLight : ''}>Timezone: Los Angeles, CA - Pacific Time</p>
4656

47-
{/* Horizontal Line */}
48-
<hr className={styles.emailDivider} />
57+
{/* Divider */}
58+
<hr className={`${styles.emailDivider} ${darkMode ? styles.emailDividerDark : ''}`} />
4959

50-
{/* Social Media Icons */}
51-
<div className={styles.socialIcons}>
60+
{/* Social Icons */}
61+
<div className={`${styles.socialIcons} ${darkMode ? styles.socialIconsDark : ''}`}>
5262
<a
5363
href="https://www.linkedin.com/company/one-community-global/"
5464
target="_blank"
5565
rel="noopener noreferrer"
5666
aria-label="LinkedIn"
5767
>
58-
<FaLinkedin className={`${styles.socialIcon} ${styles.socialIconLinkedin}`} />
68+
<FaLinkedin className={styles.socialIcon} />
5969
</a>
6070

6171
<a
@@ -64,7 +74,7 @@ function FollowUpEmailTemplate() {
6474
rel="noopener noreferrer"
6575
aria-label="Instagram"
6676
>
67-
<FaInstagram className={`${styles.socialIcon} ${styles.socialIconInstagram}`} />
77+
<FaInstagram className={styles.socialIcon} />
6878
</a>
6979

7080
<a
@@ -73,19 +83,25 @@ function FollowUpEmailTemplate() {
7383
rel="noopener noreferrer"
7484
aria-label="Facebook"
7585
>
76-
<FaFacebook className={`${styles.socialIcon} ${styles.socialIconFacebook}`} />
86+
<FaFacebook className={styles.socialIcon} />
7787
</a>
7888
</div>
7989

80-
{/* Horizontal Line */}
81-
<hr className={styles.emailDivider} />
90+
{/* Divider */}
91+
<hr className={`${styles.emailDivider} ${darkMode ? styles.emailDividerDark : ''}`} />
8292

83-
<p style={{ fontWeight: 'bold', textAlign: 'center' }}>
93+
<p
94+
style={{ fontWeight: 'bold', textAlign: 'center' }}
95+
className={darkMode ? styles.textLight : ''}
96+
>
8497
Jae M.Sabol <br /> Executive Director - One Community <br />
8598
&quot;Open Source Sustainability for The Highest Good of All&quot;
8699
</p>
87100

88-
<p style={{ fontSize: '12px', textAlign: 'center', color: '#888' }}>
101+
<p
102+
style={{ fontSize: '12px', textAlign: 'center' }}
103+
className={darkMode ? styles.textLight : ''}
104+
>
89105
You are receiving this mail because you registered to join the One Community Global platform
90106
as a user or a creator. This also shows that you agree to our Terms of Use and Privacy
91107
Policies. If you no longer want to receive mails from us, click the unsubscribe link below.

src/components/CommunityPortal/Activities/FollowUpEmailTemplate.module.css

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,22 @@
99
background-color: #ffffff;
1010
}
1111

12+
/* DARK MODE CONTAINER */
13+
.emailTemplateContainerDark {
14+
background-color: #1C2541 !important;
15+
border: 1px solid #3A506B !important;
16+
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.45) !important;
17+
color: #ffffff !important;
18+
}
19+
20+
.textLight {
21+
color: #ffffff !important;
22+
}
23+
24+
.linkSoftDark a {
25+
color: #9fc1ff !important;
26+
}
27+
1228
.emailLogo {
1329
display: block;
1430
margin: 0 auto;
@@ -21,16 +37,24 @@
2137
color: #333;
2238
}
2339

40+
.emailTemplateContainerDark h2 {
41+
color: #ffffff !important;
42+
}
43+
2444
.emailTemplateContainer p {
2545
font-size: 16px;
2646
color: #555;
2747
margin: 5px 0;
2848
line-height: 1.3;
2949
}
3050

51+
/* BUTTON — LIGHT MODE */
3152
.feedbackLink {
32-
display: inline-block;
53+
display: flex;
54+
justify-content: center;
55+
align-items: center;
3356
width: 100%;
57+
height: 45px;
3458
margin-top: 10px;
3559
padding: 10px 15px;
3660
background-color: #007bff;
@@ -44,17 +68,33 @@
4468
transition: background-color 0.3s ease, box-shadow 0.3s ease;
4569
}
4670

71+
/* BUTTON — DARK MODE */
72+
.feedbackLinkDark {
73+
background-color: #3A506B !important;
74+
color: #ffffff !important;
75+
border: none !important;
76+
height: 45px !important;
77+
display: flex !important;
78+
justify-content: center !important;
79+
align-items: center !important;
80+
}
81+
82+
.feedbackLinkDark:hover {
83+
background-color: #5B7CA6 !important;
84+
}
85+
86+
/* LIGHT MODE HOVER */
4787
.feedbackLink:hover {
4888
background-color: #3399ff;
4989
box-shadow: 0px 4px 10px rgba(0, 123, 255, 0.2);
50-
text-decoration: none;
5190
}
5291

5392
.feedbackLink:active {
5493
background-color: #0056b3;
5594
box-shadow: none;
5695
}
5796

97+
/* LIST */
5898
.emailTemplateContainer ul {
5999
padding-left: 20px;
60100
}
@@ -63,14 +103,18 @@
63103
margin-bottom: 5px;
64104
}
65105

66-
/* Social Media Icons */
106+
/* SOCIAL ICONS */
67107
.socialIcons {
68108
display: flex;
69109
justify-content: center;
70110
gap: 15px;
71111
margin: 10px 0;
72112
}
73113

114+
.socialIconsDark .socialIcon {
115+
color: #ffffff !important;
116+
}
117+
74118
.socialIcon {
75119
font-size: 28px;
76120
color: #333;
@@ -89,6 +133,7 @@
89133
color: #07a3db;
90134
}
91135

136+
/* FOOTER LINKS */
92137
.footerLinksContainer {
93138
display: flex;
94139
flex-direction: row;
@@ -114,6 +159,7 @@
114159
text-decoration: underline;
115160
}
116161

162+
/* DIVIDER */
117163
.emailDivider {
118164
width: 95%;
119165
height: 1px;
@@ -122,3 +168,7 @@
122168
margin: 10px auto;
123169
}
124170

171+
.emailDividerDark {
172+
background-color: #3A506B !important;
173+
}
174+

0 commit comments

Comments
 (0)