-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Footer component implementation using footer.js
-Added footer tag in each page.(index, itinerary) -Removed obsolete footer section in index.html
- Loading branch information
1 parent
43467c9
commit 5805b4e
Showing
3 changed files
with
54 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
const footerCode = `<section | ||
class="mt-7 flex h-80 w-full items-center justify-center bg-celeb-banner bg-no-repeat" | ||
> | ||
<p class="text-center text-5xl font-bold text-white"> | ||
CELEBRATE THE FREEDOM OF COLLABORATION | ||
</p> | ||
</section> | ||
<section class="h-[313px] w-full bg-[#111111] flex items-center justify-center mt-8"> | ||
<div class="h-[54%] w-1/2 flex items-center justify-center flex-col gap-8"> | ||
<div class="w-full h-1/2 flex items-center justify-center gap-8"> | ||
<div class="w-[66px] h-[66px] bg-white flex items-center justify-center rounded-full"><a href="#" target="_blank"><img src="../assets/socialmedia/instagram.svg" alt="instagram"></a></div> | ||
<div class="w-[66px] h-[66px] bg-white flex items-center justify-center rounded-full"><a href="#" target="_blank"><img src="../assets/socialmedia/x.svg" alt="instagram"></a></div> | ||
<div class="w-[66px] h-[66px] bg-white flex items-center justify-center rounded-full"><a href="#" target="_blank"><img src="../assets/socialmedia/facebook.svg" alt="instagram"></a></div> | ||
<div class="w-[66px] h-[66px] bg-white flex items-center justify-center rounded-full"><a href="#" target="_blank"><img src="../assets/socialmedia/linkedin.svg" alt="instagram"></a></div> | ||
<div class="w-[66px] h-[66px] bg-white flex items-center justify-center rounded-full"><a href="#" target="_blank"><img src="../assets/socialmedia/website.svg" alt="instagram"></a></div> | ||
</div> | ||
<div class="w-full h-1/2"> | ||
<ul class="flex items-center justify-center gap-4 "> | ||
<li><a href="" target="_blank" class="text-white font-semibold text-xl hover:text-red-600">Home</a></li> | ||
<li><a href="" target="_blank" class="text-white font-semibold text-xl hover:text-red-600">About</a></li> | ||
<li><a href="" target="_blank" class="text-white font-semibold text-xl hover:text-red-600">Itinerary</a></li> | ||
<li><a href="" target="_blank" class="text-white font-semibold text-xl hover:text-red-600">Team</a></li> | ||
<li><a href="" target="_blank" class="text-white font-semibold text-xl hover:text-red-600">Highlights</a></li> | ||
<li><a href="" target="_blank" class="text-white font-semibold text-xl hover:text-red-600">FAQs</a></li> | ||
<li><a href="" target="_blank" class="text-white font-semibold text-xl hover:text-red-600">Contact</a></li> | ||
</ul> | ||
</ul> | ||
</div> | ||
</div> | ||
</section> | ||
<section class="h-[70px] w-full bg-black flex items-center justify-center"> | ||
<p class="bg-black text-white text-center">Copyright© Software Freedom Day 2024 x Nepal Open Source Club</p> | ||
</section> `; | ||
|
||
// Adding footer when DOMContentLoaded inside body | ||
document.addEventListener('DOMContentLoaded', () => { | ||
// Get the first <footer> element | ||
const footer = document.getElementsByTagName("footer")[0].innerHTML; | ||
|
||
// Insert the footer content along with the existing footer content | ||
document.querySelector("footer").innerHTML = footerCode + footer; | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters