Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main #8093

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Main #8093

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 29 additions & 26 deletions contributors/contributorsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -1975,119 +1975,122 @@ contributors = [
},

{
id: 410,
id: 391,

fullname: "Vjelson Tuazonl",
username: "https://github.com/VJelson",
},
{
id: 411,
id: 392,
fullname: "Isnani",
username: "https://github.com/Isnani25",
},

{
id: 412,
id: 393,
fullname: "Garima Jain",
username: "https://github.com/garimajain12",
},
{
id: 413,
id: 394,
fullname: "Niraj Pradhan",
username: "https://github.com/nirajpdn",
},
{
id: 414,
id: 395,
fullname: "David Gillick",
username: "https://github.com/VertexAssassins",
},
{
id: 415,
id: 396,
fullname: "Vatsal K",
username: "https://github.com/vatsalkudecha",
},
{
id: 416,
id: 397,
fullname: "Alejandro Armenta",
username: "https://github.com/alexanderNWO",
},
{
id: 417,
id: 398,
fullname: "Krish Katyal",
username: "https://github.com/krishkatyal",
},

{
id: 418,
id: 399,
fullname: "Arshpreet Singh Bedi",
username: "https://github.com/avibedi1768",
},
{
id: 419,
id: 400,
fullname: "Amit Kumar",
username: "https://github.com/amit-kumar",
},
{
id: 420,
id: 401,
fullname: "Keshav R Karanth",
username: "https://github.com/keshavrkaranth",
},

{
id: 421,
id: 402,
fullname: "Gautami SInha",
username: "https://github.com/amnotcreative",
},
{
id: 422,
id: 403,
fullname: "Evgeny Skorlov",
username: "https://github.com/ru-asdx",
},
{
id: 423,
id: 404,
fullname: "Mohit Yadav",
username: "https://github.com/ymohit1603",
},
{
id: 424,
id: 405,
fullname: "Sumit Br",
username: "https://github.com/SumitBr",
},
{
id: 425,
id: 406,
fullname: "Auro S.",
username: "https://github.com/aurocodes",
},
{
id: 426,
id: 407,
fullname: "Diana Babenko",
username: "https://github.com/DianaBabenko",
},
{
id: 427,
id: 408,
fullname: "Yajnesh Kumar",
username: "https://github.com/yajneshkumar790",
},
{
id: 428,
id: 409,
fullname: "Aviraj Saha",
username: "https://github.com/avirsaha",

},
{
id: 429,
id: 410,
fullname: "Kali Kai",
username: "https://github.com/kalijester68",
},
{
id: 430,
id: 411,
fullname: "Vinícius Bezerra",
username: "https://github.com/viniciuseneas",
},
{
id: 441,
},
{
id: 412,
fullname: "Parth Panjwani",
username: "https://github.com/Parth-Panjwani",
},

{
id: 413,
fullname: "Abhinav Bansal ",
username: "https://github.com/BansalAbhinav",
},
];
159 changes: 86 additions & 73 deletions scripts/menu.js
Original file line number Diff line number Diff line change
@@ -1,89 +1,102 @@
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'

},
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 <i class="fa fa-instagram" style="font-size:22px"></i>',
'href': 'https://instagram.com/fineanmol'
},
'Facebook': {
'text': '<i class="fa fa-facebook" style="font-size:20px"></i>acebook',
'href': 'https://www.facebook.com/fineanmol',
'id': 'facebook'
},
'Linkedin': {
'text': 'Linked<i class="fa fa-linkedin" style="font-size:20px"></i>',
'href': 'https://www.linkedin.com/in/fineanmol/',
'id': 'linkedin'
},
'NDC': {
'text': '<i class="fa fa-twitter" style="font-size:20px"></i>Twitter',
'href': 'https://twitter.com/fineanmol',
'id': 'tools'
},
'Stars': {
'text': '<a class="github-button" href="https://github.com/fineanmol/Hacktoberfest2022" data-icon="octicon-star" data-show-count="true" aria-label="Star fineanmol/Hacktoberfest2022 on GitHub">Stars</a>',
'href': 'https://github.com/fineanmol/Hacktoberfest2022',
'id': 'tools'
},
'Forks': {
'text': '<a class="github-button" href="https://github.com/fineanmol/Hacktoberfest2022/fork" data-icon="octicon-repo-forked" data-show-count="true" aria-label="Fork fineanmol/Hacktoberfest2022 on GitHub">Fork</a>',
'href': 'https://github.com/fineanmol/Hacktoberfest2022',
'id': 'tools'
}


}
Instagram: {
text: "Instagram Connect",
href: "https://instagram.com/fineanmol",
},
Instagram: {
text: 'Connect on <i class="fa fa-instagram" style="font-size:22px"></i>',
href: "https://instagram.com/fineanmol",
},
Facebook: {
text: '<i class="fa fa-facebook" style="font-size:20px"></i>acebook',
href: "https://www.facebook.com/fineanmol",
id: "facebook",
},
Linkedin: {
text: 'Linked<i class="fa fa-linkedin" style="font-size:20px"></i>',
href: "https://www.linkedin.com/in/fineanmol/",
id: "linkedin",
},
NDC: {
text: '<i class="fa fa-twitter" style="font-size:20px"></i>X',
href: "https://twitter.com/fineanmol",
id: "tools",
},
Stars: {
text: '<a class="github-button" href="https://github.com/fineanmol/Hacktoberfest2022" data-icon="octicon-star" data-show-count="true" aria-label="Star fineanmol/Hacktoberfest2022 on GitHub">Stars</a>',
href: "https://github.com/fineanmol/Hacktoberfest2022",
id: "tools",
},
Forks: {
text: '<a class="github-button" href="https://github.com/fineanmol/Hacktoberfest2022/fork" data-icon="octicon-repo-forked" data-show-count="true" aria-label="Fork fineanmol/Hacktoberfest2022 on GitHub">Fork</a>',
href: "https://github.com/fineanmol/Hacktoberfest2022",
id: "tools",
},
};

function buildMenuHTML (obj = {}) {
let html = ''
let path = window.location.pathname.split('/')
let currentPage = path[path.length - 1] === '' ? '/' : path[path.length - 1]
function buildMenuHTML(obj = {}) {
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 += '<li class="dropdown">'
html += '<a class="nav-link nested-dropdown" href="#" id="Others"> Others </a>'
html += '<div class="dropdown-content">'
if (key == "Others") {
html += '<li class="dropdown">';
html +=
'<a class="nav-link nested-dropdown" href="#" id="Others"> Others </a>';
html += '<div class="dropdown-content">';
Object.entries(item).forEach(([key, item]) => {
let isCurrent = (currentPage === item.href)
let isCurrent = currentPage === item.href;

html += '<div class="nav-item' + (isCurrent ? ' active' : '') + '">'
html += '<a target="_blank" class="nav-link" href="' + item.href + '"' + (item.id ? ' id="' + item.id + '"' : '') + '>' + item.text + '</a>'
html += '</div>'
})
html += '</div>'
html += '<div class="nav-item' + (isCurrent ? " active" : "") + '">';
html +=
'<a target="_blank" class="nav-link" href="' +
item.href +
'"' +
(item.id ? ' id="' + item.id + '"' : "") +
">" +
item.text +
"</a>";
html += "</div>";
});
html += "</div>";
} 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 += '<li class="nav-item' + (isCurrent ? ' active' : '') + '">'
html += '<a target="_blank" class="nav-link" href="' + item.href + '"' + (item.id ? ' id="' + item.id + '"' : '') + '>' + item.text + '</a>'
html += '</li>'
html += '<li class="nav-item' + (isCurrent ? " active" : "") + '">';
html +=
'<a target="_blank" class="nav-link" href="' +
item.href +
'"' +
(item.id ? ' id="' + item.id + '"' : "") +
">" +
item.text +
"</a>";
html += "</li>";
}
})
document.getElementById('menu').innerHTML = html
});
document.getElementById("menu").innerHTML = html;
}

function buildMenu () {
buildMenuHTML(menu)
function buildMenu() {
buildMenuHTML(menu);
}

buildMenu()
buildMenu();
Loading