updates
This commit is contained in:
1 parent
ae9337f78a
commit
8adee90f5e
3 files changed
+163
-157
No files matched your search
+4
-3
@@ -5,7 +5,7 @@
|
|||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>S4NKALP's Links</title>
|
<title>S4NKALP's Links</title>
|
||||||
<link rel="icon" href="images/favicon.svg" type="image/png" />
|
<link rel="icon" href="images/favicon.svg" type="image/svg+xml" />
|
||||||
<link rel="stylesheet" href="style.css" />
|
<link rel="stylesheet" href="style.css" />
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
@@ -25,13 +25,14 @@
|
|||||||
<input
|
<input
|
||||||
type="text"
|
type="text"
|
||||||
class="filter-links hide"
|
class="filter-links hide"
|
||||||
placeholder="Search Links"
|
placeholder="Search links by name or description..."
|
||||||
|
arial-label="Search links"
|
||||||
/>
|
/>
|
||||||
<ul class="link-list"></ul>
|
<ul class="link-list"></ul>
|
||||||
</section>
|
</section>
|
||||||
<h4>
|
<h4>
|
||||||
Made with ❤ by
|
Made with ❤ by
|
||||||
<a href="https://github.com/S4NKALP/links">Z4CKX</a>
|
<a href="https://github.com/S4NKALP/links">S4NKALP</a>
|
||||||
</h4>
|
</h4>
|
||||||
</main>
|
</main>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -1,31 +1,31 @@
|
|||||||
const username = 'S4NKALP';
|
const username = "S4NKALP";
|
||||||
const linkList = document.querySelector('.link-list');
|
const linkList = document.querySelector(".link-list");
|
||||||
const linksSection = document.querySelector('.links');
|
const linksSection = document.querySelector(".links");
|
||||||
const filterInput = document.querySelector('.filter-links');
|
const filterInput = document.querySelector(".filter-links");
|
||||||
|
|
||||||
const buildIcon = (link) => {
|
// Function to build an icon element with appropriate color styling
|
||||||
return `
|
const buildIcon = (linkk) => {
|
||||||
<span class='${link.icon}' style='color: ${link.color};'></span>
|
return `<span class='${linkk.icon}' style='color: ${linkk.color};'></span>`;
|
||||||
`;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const buildUrl = (link) => {
|
// Function to construct the correct URL format based on its type
|
||||||
if (link.url.includes('http')) {
|
const buildUrl = (linkk) => {
|
||||||
return link.url;
|
if (linkk.url.startsWith("http") || linkk.url.startsWith("mailto")) {
|
||||||
|
return linkk.url;
|
||||||
}
|
}
|
||||||
if (link.url.includes('mailto')) {
|
return `https://${linkk.url}${linkk.url.endsWith("/") ? "" : "/"}${username}`;
|
||||||
return link.url;
|
|
||||||
}
|
|
||||||
return 'https://' + link.url + username;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const displayLinks = (links) => {
|
// Function to display the links dynamically
|
||||||
filterInput.classList.remove('hide');
|
const displayLinks = (linkk) => {
|
||||||
for (const link of links) {
|
filterInput.classList.remove("hide");
|
||||||
let listItem = document.createElement('li');
|
linkList.innerHTML = ""; // Clear existing links before adding new ones
|
||||||
listItem.classList.add('link');
|
|
||||||
|
for (const link of linkk) {
|
||||||
|
let listItem = document.createElement("li");
|
||||||
|
listItem.classList.add("link");
|
||||||
listItem.innerHTML = `
|
listItem.innerHTML = `
|
||||||
<a href=${buildUrl(link)} target='_blank'>
|
<a href="${buildUrl(link)}" target="_blank" rel="noopener noreferrer">
|
||||||
<div>
|
<div>
|
||||||
<h3>
|
<h3>
|
||||||
${buildIcon(link)}
|
${buildIcon(link)}
|
||||||
@@ -34,160 +34,151 @@ const displayLinks = (links) => {
|
|||||||
<p>${link.description}</p>
|
<p>${link.description}</p>
|
||||||
</div>
|
</div>
|
||||||
</a>`;
|
</a>`;
|
||||||
linkList.append(listItem);
|
linkList.appendChild(listItem);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// dynamic search
|
// Dynamic search functionality
|
||||||
filterInput.addEventListener('input', (e) => {
|
filterInput.addEventListener("input", (e) => {
|
||||||
const search = e.target.value;
|
const searchText = e.target.value.toLowerCase();
|
||||||
const links = document.querySelectorAll('.link');
|
const links = document.querySelectorAll(".link");
|
||||||
const searchLowerText = search.toLowerCase();
|
|
||||||
|
|
||||||
for (const link of links) {
|
links.forEach((link) => {
|
||||||
const lowerText = link.innerText.toLowerCase();
|
link.textContent.toLowerCase().includes(searchText)
|
||||||
if (lowerText.includes(searchLowerText)) {
|
? link.classList.remove("hide")
|
||||||
link.classList.remove('hide');
|
: link.classList.add("hide");
|
||||||
} else {
|
});
|
||||||
link.classList.add('hide');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const links = [
|
// Array of links with details
|
||||||
|
const linkk = [
|
||||||
{
|
{
|
||||||
name: 'Mail',
|
name: "Mail",
|
||||||
description: 'Want to talk? Write me a mail',
|
description: "Want to talk? Write me a mail",
|
||||||
url: 'mailto:sankalptharu50028@gmail.com',
|
url: "mailto:sankalptharu50028@gmail.com",
|
||||||
icon: 'fa-brands fa-telegram',
|
icon: "fa-brands fa-telegram",
|
||||||
color: '#0088cc'
|
color: "#0088cc",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Facebook',
|
name: "Facebook",
|
||||||
description: 'Glimpse of my life and journey',
|
description: "Glimpse of my life and journey",
|
||||||
url: 'https://facebook.com/sankalptharu50028',
|
url: "https://facebook.com/sankalptharu50028",
|
||||||
icon: 'fa-brands fa-facebook',
|
icon: "fa-brands fa-facebook",
|
||||||
color: '#1877F2',
|
color: "#1877F2",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'GitHub',
|
name: "GitHub",
|
||||||
description: 'My favourite place :)',
|
description: "My favourite place :)",
|
||||||
url: 'github.com/',
|
url: "github.com/",
|
||||||
icon: 'fa-brands fa-github',
|
icon: "fa-brands fa-github",
|
||||||
color: '#fff'
|
color: "#fff",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Resume',
|
name: "GitLab",
|
||||||
description: 'What I have done so far',
|
description: "My favourite place :)",
|
||||||
url: 'https://github.com/S4NKALP/resume/blob/main/resume.pdf',
|
url: "gitlab.com/",
|
||||||
icon: 'fa-brands fa-wpforms',
|
icon: "fa-brands fa-gitlab",
|
||||||
color: '#008abd'
|
color: "#f57c00",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Twitter',
|
name: "Resume",
|
||||||
description: 'Tech, rants, philosophy, memes',
|
description: "What I have done so far",
|
||||||
url: 'twitter.com/',
|
url: "https://github.com/S4NKALP/resume/blob/main/resume.pdf",
|
||||||
icon: 'fa-brands fa-twitter',
|
icon: "fa-brands fa-wpforms",
|
||||||
color: '#1da1f2'
|
color: "#008abd",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'YouTube',
|
name: "Twitter",
|
||||||
description: 'I make tooling videos for devs',
|
description: "Tech, rants, philosophy, memes",
|
||||||
url: 'youtube.com/c/',
|
url: "twitter.com/",
|
||||||
icon: 'fa-brands fa-youtube',
|
icon: "fa-brands fa-twitter",
|
||||||
color: '#ff0000'
|
color: "#1da1f2",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'LinkedIn',
|
name: "YouTube",
|
||||||
description: 'Career updates and thoughts',
|
description: "I make tooling videos for devs",
|
||||||
url: 'linkedin.com/in/',
|
url: "youtube.com/",
|
||||||
icon: 'fa-brands fa-linkedin',
|
icon: "fa-brands fa-youtube",
|
||||||
color: '#0077B5'
|
color: "#ff0000",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Blog',
|
name: "LinkedIn",
|
||||||
description: 'About things I build and learn',
|
description: "Career updates and thoughts",
|
||||||
url: 'https://S4NKALP.github.io/blog',
|
url: "linkedin.com/",
|
||||||
icon: 'fa-brands fa-blogger',
|
icon: "fa-brands fa-linkedin",
|
||||||
color: '#f57c00'
|
color: "#0077B5",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Portfolio',
|
name: "Blog",
|
||||||
description: '/home/S4NKALP',
|
description: "About things I build and learn",
|
||||||
url: 'https://S4NKALP.github.io/Protofolio',
|
url: "https://S4NKALP.github.io/blog",
|
||||||
icon: 'fa-brands fa-fort-awesome',
|
icon: "fa-brands fa-blogger",
|
||||||
color: '#1688f0'
|
color: "#f57c00",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Projects',
|
name: "Portfolio",
|
||||||
description: 'All my projects!',
|
description: "/home/S4NKALP",
|
||||||
url: 'https://S4NKALP.github.io/projects',
|
url: "https://S4NKALP.github.io/Protofolio",
|
||||||
icon: 'fa-brands fa-product-hunt',
|
icon: "fa-brands fa-fort-awesome",
|
||||||
color: '#da552f'
|
color: "#1688f0",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Instagram',
|
name: "Projects",
|
||||||
description: 'Glimpse of my life and journey',
|
description: "All my projects!",
|
||||||
url: 'https://instagram.com/o0xsankalp',
|
url: "https://S4NKALP.github.io/projects",
|
||||||
icon: 'fa-brands fa-instagram',
|
icon: "fa-brands fa-product-hunt",
|
||||||
color: '#e1306c'
|
color: "#da552f",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Reddit',
|
name: "Instagram",
|
||||||
description: 'Lurk mostly, sometimes I post',
|
description: "Glimpse of my life and journey",
|
||||||
url: 'reddit.com/user/',
|
url: "https://instagram.com/",
|
||||||
icon: 'fa-brands fa-reddit',
|
icon: "fa-brands fa-instagram",
|
||||||
color: '#ff4500'
|
color: "#e1306c",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Dev',
|
name: "Reddit",
|
||||||
description: 'Where I connect with Devs',
|
description: "Lurk mostly, sometimes I post",
|
||||||
url: 'dev.to/',
|
url: "reddit.com/user/",
|
||||||
icon: 'fa-brands fa-dev',
|
icon: "fa-brands fa-reddit",
|
||||||
color: '#ccc'
|
color: "#ff4500",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'HackerRank',
|
name: "Dev",
|
||||||
description: 'For problem solving skills',
|
description: "Where I connect with Devs",
|
||||||
url: 'hackerrank.com/',
|
url: "dev.to/",
|
||||||
icon: 'fa-brands fa-hackerrank',
|
icon: "fa-brands fa-dev",
|
||||||
color: '#1ba94c'
|
color: "#ccc",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Exercism',
|
name: "HackerRank",
|
||||||
description: 'For learning new languages',
|
description: "For problem-solving skills",
|
||||||
url: 'exercism.org/profiles/',
|
url: "hackerrank.com/",
|
||||||
icon: 'fa-brands fa-font-awesome',
|
icon: "fa-brands fa-hackerrank",
|
||||||
color: '#1b51d2'
|
color: "#1ba94c",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'freeCodeCamp',
|
name: "Exercism",
|
||||||
description: 'Where I started web dev',
|
description: "For learning new languages",
|
||||||
url: 'freecodecamp.org/',
|
url: "exercism.org/profiles/",
|
||||||
icon: 'fa-brands fa-free-code-camp',
|
icon: "fa-brands fa-font-awesome",
|
||||||
color: '#006400'
|
color: "#1b51d2",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Twitch',
|
name: "freeCodeCamp",
|
||||||
description: 'I stream my side projects!',
|
description: "Where I started web dev",
|
||||||
url: 'twitch.tv/',
|
url: "freecodecamp.org/",
|
||||||
icon: 'fa-brands fa-twitch',
|
icon: "fa-brands fa-free-code-camp",
|
||||||
color: '#6441a5'
|
color: "#006400",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Leetcode',
|
name: "Leetcode",
|
||||||
description: 'More problem solving',
|
description: "More problem-solving",
|
||||||
url: 'leetcode.com/',
|
url: "leetcode.com/",
|
||||||
icon: 'fa-brands fa-black-tie',
|
icon: "fa-brands fa-black-tie",
|
||||||
color: '#e08b32'
|
color: "#e08b32",
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: 'Codepen',
|
|
||||||
description: 'For trying out design ideas',
|
|
||||||
url: 'codepen.io/',
|
|
||||||
icon: 'fa-brands fa-codepen',
|
|
||||||
color: '#888'
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
displayLinks(links);
|
// Display all links initially
|
||||||
|
displayLinks(linkk);
|
||||||
@@ -2,9 +2,9 @@
|
|||||||
:root {
|
:root {
|
||||||
--text: #111;
|
--text: #111;
|
||||||
--accent: #1688f0;
|
--accent: #1688f0;
|
||||||
--bg-main: #fff;
|
--bg-main: linear-gradient(to bottom right, #fff, #f0f0f0);
|
||||||
--bg-link: #f0f0f0;
|
--bg-link: linear-gradient(to bottom right, #f0f0f0, #e0e0e0);
|
||||||
--bg-alt: #f5f5f5;
|
--bg-alt: linear-gradient(to bottom right, #f5f5f5, #e0e0e0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -12,9 +12,9 @@
|
|||||||
:root {
|
:root {
|
||||||
--text: #e5e5e5;
|
--text: #e5e5e5;
|
||||||
--accent: #1688f0;
|
--accent: #1688f0;
|
||||||
--bg-main: #000;
|
--bg-main: linear-gradient(to bottom right, #000, #0a0a0f);
|
||||||
--bg-link: #0f0f1a;
|
--bg-link: linear-gradient(to bottom right, #0f0f1a, #1a1a2e);
|
||||||
--bg-alt: #0a0a0f;
|
--bg-alt: linear-gradient(to bottom right, #0a0a0f, #1a1a2e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,10 +27,11 @@ body {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-family: 'Open Sans', sans-serif;
|
font-family: "Open Sans", sans-serif;
|
||||||
background-color: var(--bg-main);
|
background: var(--bg-main);
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
@@ -44,7 +45,6 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hide {
|
.hide {
|
||||||
/* '!important' is to make sure that when we add the class using JS, it takes precendence */
|
|
||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -75,15 +75,21 @@ h2 {
|
|||||||
img {
|
img {
|
||||||
border: 2px solid var(--accent);
|
border: 2px solid var(--accent);
|
||||||
box-shadow:
|
box-shadow:
|
||||||
0 0px 6px var(--accent),
|
0 0 8px rgba(22, 136, 240, 0.8),
|
||||||
0 0px 6px var(--accent);
|
0 0 12px rgba(22, 136, 240, 0.6);
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: var(--accent);
|
color: var(--accent);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
transition: color 0.3s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
color: #125ea8;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
@@ -103,18 +109,21 @@ input {
|
|||||||
border: 2px solid var(--accent);
|
border: 2px solid var(--accent);
|
||||||
color: var(--text);
|
color: var(--text);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
box-shadow:
|
||||||
|
0 4px 6px rgba(22, 136, 240, 0.4),
|
||||||
|
0 1px 3px rgba(22, 136, 240, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
.links {
|
.links {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
background-color: var(--bg-link);
|
background: var(--bg-link);
|
||||||
margin-top: 0;
|
|
||||||
padding: 2em;
|
padding: 2em;
|
||||||
border-bottom-left-radius: 20px;
|
border-radius: 20px;
|
||||||
border-bottom-right-radius: 20px;
|
box-shadow:
|
||||||
margin-bottom: 4em;
|
0 4px 10px rgba(22, 136, 240, 0.4),
|
||||||
|
0 1px 3px rgba(22, 136, 240, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
h3 {
|
h3 {
|
||||||
@@ -140,14 +149,19 @@ h3 {
|
|||||||
border: 1px solid var(--accent);
|
border: 1px solid var(--accent);
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
background-color: var(--bg-alt);
|
background: var(--bg-alt);
|
||||||
|
transition: all 0.3s ease-in-out;
|
||||||
|
box-shadow:
|
||||||
|
0 4px 6px rgba(22, 136, 240, 0.2),
|
||||||
|
0 1px 3px rgba(22, 136, 240, 0.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
.link-list li:hover {
|
.link-list li:hover {
|
||||||
background-color: var(--bg-main);
|
background: var(--bg-main);
|
||||||
|
transform: scale(1.02);
|
||||||
box-shadow:
|
box-shadow:
|
||||||
0 3px 6px var(--accent),
|
0 6px 12px rgba(22, 136, 240, 0.5),
|
||||||
0 3px 6px var(--accent);
|
0 3px 8px rgba(22, 136, 240, 0.4);
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 700px) {
|
@media (min-width: 700px) {
|
||||||
|
|||||||
Reference in new issue
Block a user