Skip to content

Commit

Permalink
improved footer AbhiDiva96#327
Browse files Browse the repository at this point in the history
  • Loading branch information
Pjdash committed Jul 20, 2024
1 parent d823af0 commit bea20af
Show file tree
Hide file tree
Showing 3 changed files with 165 additions and 113 deletions.
5 changes: 2 additions & 3 deletions src/components/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -257,14 +257,13 @@ table {

.footer{
background-color: #f8f8f8;

padding: 10px;
text-align: center;
position: fixed;
bottom: 0;
width: 100%;

display: flex;

position:absolute;
flex-direction: row;
justify-content: space-between;
align-items: flex-end;
Expand Down
215 changes: 133 additions & 82 deletions src/pages/footer.css
Original file line number Diff line number Diff line change
@@ -1,115 +1,166 @@
.footer {
/* :root {
--background-color-light: lavender;
--text-color-light: black;
--icon-hover-color-light: red;
--background-color-dark: #1e1e1e;
--text-color-dark: #ccc;
--icon-hover-color-dark: #ff6347;
}
.footer {
position: relative;
bottom: 0;
width: 100%;
background-color: lavender;
background-color: var(--background-color-light);
box-shadow:
-7px -7px 20px 0px #fff9,
-4px -4px 5px 0px #fff9,
7px 7px 20px 0px #0002,
4px 4px 5px 0px #0001,
inset 0px 0px 0px 0px #fff9,
inset 0px 0px 0px 0px #0001,
inset 0px 0px 0px 0px #fff9, inset 0px 0px 0px 0px #0001;
transition:box-shadow 0.6s cubic-bezier(.79,.21,.06,.81);
-7px -7px 20px 0px #fff9,
-4px -4px 5px 0px #fff9,
7px 7px 20px 0px #0002,
4px 4px 5px 0px #0001,
inset 0px 0px 0px 0px #fff9,
inset 0px 0px 0px 0px #0001,
inset 0px 0px 0px 0px #fff9,
inset 0px 0px 0px 0px #0001;
transition: box-shadow 0.6s cubic-bezier(.79,.21,.06,.81), background-color 0.3s, color 0.3s;
text-align: center;
padding: 20px 0;
color: var(--text-color-light);
}
.footer-content {
padding: 1rem;
.social-icons {
margin-bottom: 10px;
}
.active .footer-content{
background-color:#000016 !important ;
.social-icons a {
color: var(--text-color-light);
margin: 0 10px;
font-size: 24px;
transition: color 0.3s;
}
.footer-text {
font-size: 10px;
.social-icons a:hover {
color: var(--icon-hover-color-light);
}
.footer-flex-container {
display: flex;
justify-content: space-evenly;
.text {
font-size: large;
color: var(--text-color-light);
}
@media (min-width: 560px) {
.footer-flex-container {
flex-direction: row;
justify-content: space-evenly;
gap: 0;
}
.footer.dark-mode {
background-color: var(--background-color-dark);
color: var(--text-color-dark);
box-shadow:
-7px -7px 20px 0px #3339,
-4px -4px 5px 0px #3339,
7px 7px 20px 0px #0002,
4px 4px 5px 0px #0001,
inset 0px 0px 0px 0px #3339,
inset 0px 0px 0px 0px #0001,
inset 0px 0px 0px 0px #3339,
inset 0px 0px 0px 0px #0001;
}
.footer-icons .icon {
cursor: pointer;
margin-right: 1rem;
display: flex;
justify-content: center;
align-items: center;
width: 2rem !important;
height: 2rem !important;
}
.footer.dark-mode .social-icons a {
color: var(--text-color-dark);
}
.footer-text {
font-size: 2rem !important;
}
.footer.dark-mode .social-icons a:hover {
color: var(--icon-hover-color-dark);
}
.footer-item.footer-copyright {
font-size: 1.5rem !important;
display: flex;
justify-content: center;
align-items: center;
}
.footer.dark-mode .text {
color: var(--text-color-dark);
}
.links .link{
color: black;
padding-left: 2rem;
font-size: 1rem;
font-weight: bold;
} */

:root {
--background-color-light: lavender;
--text-color-light: black;
--icon-hover-color-light: red;
--background-color-dark: #1e1e1e;
--text-color-dark: #ccc;
--icon-hover-color-dark: #ff6347;
}

.footer-icons {
gap: 1rem !important;
}
.footer {
bottom: 0;
width: 100%;
background-color: var(--background-color-light);
box-shadow:
-7px -7px 20px 0px #fff9,
-4px -4px 5px 0px #fff9,
7px 7px 20px 0px #0002,
4px 4px 5px 0px #0001,
inset 0px 0px 0px 0px #fff9,
inset 0px 0px 0px 0px #0001,
inset 0px 0px 0px 0px #fff9,
inset 0px 0px 0px 0px #0001;
transition: box-shadow 0.6s cubic-bezier(.79,.21,.06,.81), background-color 0.3s, color 0.3s;
text-align: center;
padding: 20px 0;
color: var(--text-color-light);
}

.footer-item {
text-align: left;
.social-icons {
margin-bottom: 10px;
}

.footer-item.footer-copyright {
text-align: left;
font-weight: 600;
color: black;
font-size: 1rem;
.social-icons a {
color: var(--text-color-light);
margin: 0 10px;
font-size: 24px;
transition: color 0.3s;
}

.social-icons a:hover {
color: var(--icon-hover-color-light);
}

.footer-item .footer-text {
font-size: 1rem;
font-weight: 600;
.text {
font-size: large;
color: var(--text-color-light);
}

margin: 1rem 0;
.links .link {
padding-left: 2rem;
font-size: 1rem;
font-weight: bold;
color: var(--text-color-light);
transition: color 0.3s;
}

@media (min-width: 1024px) {
.footer-item.footer-copyright {
font-size: 1.5rem;
display: flex;
justify-content: center;
align-items: center;
}
.footer.dark-mode {
background-color: var(--background-color-dark);
color: var(--text-color-dark);
box-shadow:
-7px -7px 20px 0px #3339,
-4px -4px 5px 0px #3339,
7px 7px 20px 0px #0002,
4px 4px 5px 0px #0001,
inset 0px 0px 0px 0px #3339,
inset 0px 0px 0px 0px #0001,
inset 0px 0px 0px 0px #3339,
inset 0px 0px 0px 0px #0001;
}

.footer-icons {
gap: 1rem !important;
}
.footer.dark-mode .social-icons a {
color: var(--text-color-dark);
}

.footer-icons {
display: flex;
align-items: center;
gap: 0.5rem;
.footer.dark-mode .social-icons a:hover {
color: var(--icon-hover-color-dark);
}

.footer-icons .icon {
cursor: pointer;
margin-right: 1rem;
display: flex;
justify-content: center;
align-items: center;
width: 1.5rem;
height: 1.5rem;
.footer.dark-mode .text {
color: var(--text-color-dark);
}

.footer-icons .icon:last-child {
margin-right: 0;
}
.footer.dark-mode .links .link {
color: var(--text-color-dark);
}
58 changes: 30 additions & 28 deletions src/pages/footer.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,35 @@
import GitHubIcon from '@mui/icons-material/GitHub';
import LinkedInIcon from '@mui/icons-material/LinkedIn';
import React, { useContext } from 'react';
import { FaFacebook, FaTwitter, FaInstagram, FaLinkedin } from 'react-icons/fa';
import './footer.css';
import { ThemeContext } from '../Content/context';

const Footer = () => {
function Footer() {
const { theme } = useContext(ThemeContext);

return (
<div className="footer">
<div className="footer-content">
<div className="footer-flex-container">
<div className="footer-item">
<span className="footer-text">
75%
</span>
</div>
<div className="footer-item footer-copyright">
Copyright @ 75%
</div>
<div className="footer-item footer-icons">
<a href="https://github.com/AbhiDiva96/75per">
<GitHubIcon className="icon" />
</a>
<a href="https://www.linkedin.com/in/abhishek-kumar-062231198/">
<LinkedInIcon className="icon" />
</a>
</div>
</div>
</div>
</div>
);
return (
<footer className={`footer ${theme === 'dark' ? 'dark-mode' : ''}`}>
<div className="social-icons">
<a href="https://www.facebook.com" target="_blank" rel="noopener noreferrer">
<FaFacebook />
</a>
<a href="https://www.twitter.com" target="_blank" rel="noopener noreferrer">
<FaTwitter />
</a>
<a href="https://www.instagram.com" target="_blank" rel="noopener noreferrer">
<FaInstagram />
</a>
<a href="https://www.linkedin.com" target="_blank" rel="noopener noreferrer">
<FaLinkedin />
</a>
</div>
<div className="links">
<a href="/Review" className="link">Review Us</a>
<a href="/Login" className="link">Login</a>
<a href="/about" className="link">About Us</a>
</div>
<p className="text">&copy; {new Date().getFullYear()} 75per. All rights reserved.</p>
</footer>
);
}

export default Footer;
export default Footer;

0 comments on commit bea20af

Please sign in to comment.