Add yourself to the list if you contribute.
@@ -133,8 +135,9 @@
Hacktoberfest
+ integrity="sha384-MrcW6QA4fZSN7NTMZBeZfFgOwOLfLZc4eME6vH3kn4tEWvJgC4ndOlxogypGLyBI"
+ crossorigin="anonymous">
+
diff --git a/scripts/main.js b/scripts/main.js
index f4e53650d6..a55c6d9091 100644
--- a/scripts/main.js
+++ b/scripts/main.js
@@ -212,6 +212,7 @@ $(".tdnn").click(function () {
$(".tdnn").toggleClass("day");
});
+
// Display live stats with the dynamic year
document.getElementById(
"stats"
diff --git a/scripts/menu.js b/scripts/menu.js
index 2e8a593a82..fb166d86c5 100644
--- a/scripts/menu.js
+++ b/scripts/menu.js
@@ -2,88 +2,78 @@ const menu = {
'Home': {
'text': 'Contribute here',
'href': 'https://github.com/fineanmol/Hacktoberfest2022/blob/master/contributors/contributorsList.js#L1934'
- },'hacktoberfest1':{
-'text':'HacktoberFest Project 1',
- 'href':'https://github.com/fineanmol/Annoying-submit-button'
-
-},'hacktoberfest2':{
-'text':'HacktoberFest Project 2',
- 'href':'https://github.com/fineanmol/hacktoberfest'
-
-},
- //'Others': {
- 'Instagram': {
- 'text': 'Instagram Connect',
- 'href': 'https://instagram.com/fineanmol'
- },
- 'Instagram': {
- 'text': 'Connect on
',
- 'href': 'https://instagram.com/fineanmol'
- },
- 'Facebook': {
- 'text': '
acebook',
- 'href': 'https://www.facebook.com/fineanmol',
- 'id': 'facebook'
- },
- 'Linkedin': {
- 'text': 'Linked
',
- 'href': 'https://www.linkedin.com/in/fineanmol/',
- 'id': 'linkedin'
- },
- 'NDC': {
- 'text': 'Twitter',
- 'href': 'https://twitter.com/fineanmol',
- 'id': 'tools'
- },
- 'Stars': {
- 'text': '
Stars',
- 'href': 'https://github.com/fineanmol/Hacktoberfest2022',
- 'id': 'tools'
- },
- 'Forks': {
- 'text': '
Fork',
- 'href': 'https://github.com/fineanmol/Hacktoberfest2022',
- 'id': 'tools'
- }
-
+ },
+ 'hacktoberfest1': {
+ 'text': 'HacktoberFest Project 1',
+ 'href': 'https://github.com/fineanmol/Annoying-submit-button'
+ },
+ 'hacktoberfest2': {
+ 'text': 'HacktoberFest Project 2',
+ 'href': 'https://github.com/fineanmol/hacktoberfest'
+ }
+}
+const socialmenu = {
+ 'Emptyone': {
+ 'text': '
<<<<',
+ },
+ 'Stars': {
+ 'text': '
Stars',
+ 'href': 'https://github.com/fineanmol/Hacktoberfest2022',
+ 'id': 'tools'
+ },
+ 'Forks': {
+ 'text': '
Fork',
+ 'href': 'https://github.com/fineanmol/Hacktoberfest2022',
+ 'id': 'tools'
+ },
+ 'Emptytwo': {
+ 'text': '
>>>>',
+ },
+ 'Instagram': {
+ 'text': '
Instagram',
+ 'href': 'https://instagram.com/fineanmol'
+ },
+ 'Facebook': {
+ 'text': '
acebook',
+ 'href': 'https://www.facebook.com/fineanmol',
+ 'id': 'facebook'
+ },
+ 'Linkedin': {
+ 'text': '
Linked',
+ 'href': 'https://www.linkedin.com/in/fineanmol/',
+ 'id': 'linkedin'
+ },
+ 'NDC': {
+ 'text': '
Twitter',
+ 'href': 'https://twitter.com/fineanmol',
+ 'id': 'tools'
+ }
}
-function buildMenuHTML (obj = {}) {
+function buildMenuHTML(obj = {}, targetId) {
let html = ''
let path = window.location.pathname.split('/')
let currentPage = path[path.length - 1] === '' ? '/' : path[path.length - 1]
Object.entries(obj).forEach(([key, item]) => {
- if (key == 'Others') {
- html += '
'
- html += ' Others '
- html += ''
- Object.entries(item).forEach(([key, item]) => {
- let isCurrent = (currentPage === item.href)
-
- html += '
'
- })
- html += '
'
- } else {
- if (currentPage.indexOf('.html') == -1) {
- currentPage = currentPage.concat('.html')
- }
+ if (currentPage.indexOf('.html') == -1) {
+ currentPage = currentPage.concat('.html')
+ }
- let isCurrent = (currentPage === item.href)
+ let isCurrent = (currentPage === item.href)
- html += ''
- html += '' + item.text + ''
- html += ''
- }
+ html += '
'
+ html += '' + item.text + ''
+ html += ''
})
- document.getElementById('menu').innerHTML = html
+
+ document.getElementById(targetId).innerHTML = html
}
-function buildMenu () {
- buildMenuHTML(menu)
+function buildMenu() {
+ buildMenuHTML(menu, 'menu') // Populate main menu
+ buildMenuHTML(socialmenu, 'socialmenu') // Populate social menu
}
-buildMenu()
+buildMenu()
\ No newline at end of file