Skip to content

Commit 760d6dd

Browse files
Feature: icons are added to Footer (#96)
* the icons are added * fix prettier formatting * icons are added * style: auto-format code with Prettier (/format) --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent a36cd27 commit 760d6dd

1 file changed

Lines changed: 37 additions & 8 deletions

File tree

frontend/js/footer.js

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
if (!document.querySelector("link[data-font-awesome]")) {
2+
const iconStylesheet = document.createElement("link");
3+
iconStylesheet.rel = "stylesheet";
4+
iconStylesheet.href =
5+
"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css";
6+
iconStylesheet.setAttribute("data-font-awesome", "true");
7+
8+
document.head.appendChild(iconStylesheet);
9+
}
10+
111
document.addEventListener("DOMContentLoaded", () => {
212
if (
313
window.location.pathname.includes("index.html") ||
@@ -40,14 +50,33 @@ document.addEventListener("DOMContentLoaded", () => {
4050
</div>
4151
4252
<div class="footer-section">
43-
<h3>socials</h3>
44-
<ul>
45-
<li><a href="https://github.com/codepvg/" target="_blank">github</a></li>
46-
<li><a href="https://www.linkedin.com/company/codepvg/" target="_blank">linkedin</a></li>
47-
<li><a href="https://www.youtube.com/@codepvg529" target="_blank">youtube</a></li>
48-
<li><a href="https://chat.whatsapp.com/E5INVk1UJX6KL5oZK0wPAQ?mode=gi_t" target="_blank">whatsapp</a></li>
49-
</ul>
50-
</div>
53+
<h3>socials</h3>
54+
<ul>
55+
<li>
56+
<a href="https://github.com/codepvg/" target="_blank">
57+
<i class="fab fa-github"></i> github
58+
</a>
59+
</li>
60+
61+
<li>
62+
<a href="https://www.linkedin.com/company/codepvg/" target="_blank">
63+
<i class="fab fa-linkedin"></i> linkedin
64+
</a>
65+
</li>
66+
67+
<li>
68+
<a href="https://www.youtube.com/@codepvg529" target="_blank">
69+
<i class="fab fa-youtube"></i> youtube
70+
</a>
71+
</li>
72+
73+
<li>
74+
<a href="https://chat.whatsapp.com/E5INVk1UJX6KL5oZK0wPAQ?mode=gi_t" target="_blank">
75+
<i class="fab fa-whatsapp"></i> whatsapp
76+
</a>
77+
</li>
78+
</ul>
79+
</div>
5180
5281
<div class="footer-section">
5382
<h3>contact</h3>

0 commit comments

Comments
 (0)