Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Newsletter Section to Footer #534

Merged
merged 3 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 58 additions & 16 deletions src/Component/Footer.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
.footer {
background-color: #000000;
color: #ffffff;
padding: 0px 20px;
padding: 0px 12px;
margin-top: 22px;
}

Expand All @@ -17,7 +17,7 @@
.footer-wrapper {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 40px;
gap: 10px;
max-width: 1200px;
margin: 0 auto;
}
Expand All @@ -36,6 +36,7 @@
font-size: 1.8em;
color: #8a2be2;
margin-bottom: 10px;
margin-left: -52px;
}

/* Footer favicon */
Expand Down Expand Up @@ -104,8 +105,8 @@
/* Social icons */
.footer-social-icons {
display: flex;
gap: 15px;
margin: 10px 0;
gap: 14px;
margin: 14px 22px;
}

.footer-social-icons a {
Expand All @@ -122,14 +123,15 @@
.footer-qr {
width: 110px;
margin: 14 auto 1.5px;
margin-left: -0.4rem;
margin-left: 1.6rem;
display: block;
margin-top: 0.8rem;
margin-top: 2.8rem;
}

/* Rate us section */
.rate-us {
margin-top: 0.2rem;
font-size: 20px;
}

/* Copy section */
Expand All @@ -138,6 +140,7 @@
padding: 20px 0;
border-top: 1px solid #333;
font-size: 0.9em;
background: linear-gradient(to right, rgba(204, 204, 204, 0), #8a2be2, rgba(204, 204, 204, 0)); /* Gradient effect */
}

/* Icons styling */
Expand Down Expand Up @@ -196,21 +199,21 @@

.icons:nth-child(5) a::after {
background: linear-gradient(
40deg,
rgb(0, 255, 255),
rgb(0, 191, 255),
rgb(0, 128, 255),
rgb(0, 64, 255)
40deg,
rgb(0, 255, 255),
rgb(0, 191, 255),
rgb(0, 128, 255),
rgb(0, 64, 255)
);
}

.icons:nth-child(3) a::after {
background: linear-gradient(
40deg,
rgb(95, 0, 140),
rgb(95, 0, 140),
rgb(27, 1, 39),
rgb(27, 1, 39)
40deg,
rgb(95, 0, 140),
rgb(95, 0, 140),
rgb(27, 1, 39),
rgb(27, 1, 39)
);
}

Expand Down Expand Up @@ -240,3 +243,42 @@
.head {
@apply xs:text-[12px];
}

/* Newsletter section */
.footer-newsletter {
display: flex;
flex-direction: column;
}

body .footer-newsletter input[type="email"] {
padding: 10px;
font-size: 16px;
border-radius: 4px;
margin-bottom: 10px;
width: 170px;
height: 40px;
background-color: white; /* Background color set to white */
color: black; /* Font color set to black */
border: 2px solid white; /* Optional: border color for better visibility */
}
body .footer-newsletter input[type="email"]::placeholder {
color: grey; /* Placeholder font color set to black */
}
.footer-newsletter button {
width: 170px; /* Width same as input */
height: 40px; /* Height same as input */
font-size: 16px; /* Font size set */
color: #ffffff; /* Font color set to white */
background-color: #8a2be2; /* Background color set */
border: 2px solid white; /* Border color set */
border-radius: 4px; /* Border radius set */
cursor: pointer; /* Pointer cursor for hover effect */
transition: background-color 0.3s ease; /* Smooth transition for hover effect */
display: inline-block; /* Ensures the button fits its content */
line-height: normal; /* Ensures proper line height */
padding: 0; /* Removes additional padding */
}

.footer-newsletter button:hover {
background-color: #5d1783; /* Background color change on hover */
}
12 changes: 10 additions & 2 deletions src/Component/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import './Footer.css';

function Footer() {
const currentYear = new Date().getFullYear();

return (
<footer className="footer">
<div className="footer-wrapper">
Expand Down Expand Up @@ -41,10 +42,9 @@ function Footer() {
<div className="footer-section">
<h4 className="footer-heading">Legal</h4>
<ul className="footer-links">
<li><span> <a href="/privacypolicy">Privacy Policy</a></span></li>
<li><span><a href="/privacypolicy">Privacy Policy</a></span></li>
<li><span><a href="/terms">Terms and Conditions</a></span></li>
<li><span><a href="/licensing">MIT License</a></span></li>

<li><span><a href="/codeofconduct">Code of Conduct</a></span></li>
</ul>
<h4 className="footer-heading">Get in touch</h4>
Expand All @@ -69,6 +69,14 @@ function Footer() {
<div className="rate-us">Rate us!</div>
</div>
</div>
<div className="footer-section footer-newsletter">
<h4 className="footer-heading">Newsletter</h4>
<input
type="email"
placeholder="Enter your email"
/>
<button>Subscribe</button>
</div>
</div>

<div className="copy">
Expand Down