Skip to content

Commit

Permalink
Merge pull request #115 from AbhineshJha/footer
Browse files Browse the repository at this point in the history
added a responsive footer
  • Loading branch information
sadanandpai authored Oct 8, 2023
2 parents 2d73594 + d020f41 commit c296bad
Show file tree
Hide file tree
Showing 6 changed files with 148 additions and 0 deletions.
9 changes: 9 additions & 0 deletions native/helpers/challenges.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,15 @@ export const challenges = [
youtube: 'https://youtu.be/urA5ogzG0L0',
tags: [],
},
{
title: 'Footer',
link: 'Footer',
difficulty: 'easy',
developer: 'AbhineshJha',
youtube: 'https://youtu.be/FRRlFLfdvBE?si=HWn88BwJGTJvEBUD',
tags: [],
isNew: true,
},
{
title: 'Multi Typing',
link: 'multi-typing',
Expand Down
1 change: 1 addition & 0 deletions native/helpers/contributors.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ export const contributors = new Map([
['Sukomal07', { name: 'Sukomal Dutta', pic: 'https://avatars.githubusercontent.com/u/100500478' }],
['5h0ov', { name: 'Shuvadipta Das', pic: 'https://avatars.githubusercontent.com/u/83227649' }],
['shruti-sen2004', { name: 'Shruti Sen', pic: 'https://avatars.githubusercontent.com/u/115914670' }],
['AbhineshJha', { name: 'ABHINESH KUMAR JHA', pic: 'https://avatars.githubusercontent.com/u/142514166' }],
]);
49 changes: 49 additions & 0 deletions native/machine-coding/Footer/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="../../logo.svg" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="../../helpers/challenges.js" type="module" defer></script>
<link rel="stylesheet" href="style.css">
<title>Enhanced Responsive Footer</title>
<script src="https://kit.fontawesome.com/61673b2d06.js" crossorigin="anonymous"></script>
</head>

<body>
<div class="container">
<footer>
<div class="footer-content">
<div class="footer-logo">
<img src="logo.png" alt="Company Logo">
</div>
<div class="footer-links">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About Us</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Contact</a></li>
</ul>
</div>
<div class="footer-social">
<ul>
<li><a href="#"><i class="fab fa-facebook"></i></a></li>
<li><a href="#"><i class="fab fa-twitter"></i></a></li>
<li><a href="#"><i class="fab fa-linkedin"></i></a></li>
</ul>
</div>
</div>
<div class="footer-contact">
<p>Contact Us: <a href="mailto:info@example.com">info@example.com</a></p>
</div>
<div class="footer-bottom">
&copy; 2023 Company Name. All rights reserved.
</div>
</footer>
</div>
<script src="script.js"></script>
</body>
</html>
Binary file added native/machine-coding/Footer/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions native/machine-coding/Footer/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// JavaScript functionality for toggling the mobile navigation menu
const toggleMenu = () => {
const footerLinks = document.querySelector('.footer-links ul');
footerLinks.classList.toggle('show');
};

const menuButton = document.querySelector('.footer-links button');
menuButton.addEventListener('click', toggleMenu);
81 changes: 81 additions & 0 deletions native/machine-coding/Footer/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/* Reset some default styles */
body, ul {
margin: 0;
padding: 0;
}

/* Define styles for the footer */
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}

footer {
background-color: #7f3535;
color: #fff;
padding: 20px;
border-top: 2px solid #555;
}

.footer-content {
display: flex;
justify-content: space-between;
align-items: center;
}

.footer-logo img {
max-width: 100px;
background: white;
border-radius: 85px;
}

.footer-links ul,
.footer-social ul {
list-style: none;
font-size: 25px;
font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
padding: 0;
}

.footer-links ul li,
.footer-social ul li {
margin: 5px 0;
}

.footer-links a,
.footer-social a {
text-decoration: none;
color: #fff;
}

.footer-contact p {
margin: 10px 0;
}

.footer-contact a {
color: #fff;
}

.footer-bottom {
text-align: center;
padding-top: 10px;
}

/* Media query for responsiveness */
@media screen and (min-width: 768px) {
.footer-content {
flex-direction: row; /* Display elements in a row on larger screens */
justify-content: space-between; /* Add spacing between elements */
align-items: center; /* Vertically align content */
text-align: left; /* Reset text alignment */
}
.footer-logo img {
margin-bottom: 10px;
}

.footer-links ul,
.footer-social ul {
text-align: center;
}
}

0 comments on commit c296bad

Please sign in to comment.