anycoder-38200828 / index.html
johnpoe's picture
Upload folder using huggingface_hub
04ab259 verified
Raw History Blame Contribute Delete
18.2 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Modern Link Hub</title>
<!-- Google Fonts: Inter -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<!-- Phosphor Icons -->
<script src="https://unpkg.com/@phosphor-icons/web"></script>
<style>
:root {
/* Color Palette - Modern Dark Theme */
--bg-color: #0f172a;
--bg-gradient: radial-gradient(circle at top right, #1e293b 0%, #0f172a 100%);
--card-bg: rgba(30, 41, 59, 0.6);
--card-border: rgba(255, 255, 255, 0.08);
--card-hover-border: rgba(99, 102, 241, 0.5);
--text-main: #f8fafc;
--text-muted: #94a3b8;
--primary: #6366f1;
--primary-glow: rgba(99, 102, 241, 0.4);
--accent-pink: #ec4899;
--accent-cyan: #06b6d4;
--accent-green: #10b981;
--radius-sm: 8px;
--radius-md: 12px;
--radius-lg: 16px;
--transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', sans-serif;
background: var(--bg-color);
background-image: var(--bg-gradient);
color: var(--text-main);
min-height: 100vh;
display: flex;
flex-direction: column;
line-height: 1.5;
overflow-x: hidden;
}
/* --- Header Section --- */
header {
padding: 2rem 1.5rem;
max-width: 1200px;
margin: 0 auto;
width: 100%;
display: flex;
flex-direction: column;
gap: 1.5rem;
align-items: center;
text-align: center;
}
.brand-container {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
}
h1 {
font-size: 2.5rem;
font-weight: 700;
letter-spacing: -0.02em;
background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
margin-bottom: 0.5rem;
}
.subtitle {
color: var(--text-muted);
font-size: 1rem;
max-width: 600px;
}
/* --- Search Bar --- */
.search-container {
position: relative;
width: 100%;
max-width: 500px;
}
.search-input {
width: 100%;
padding: 1rem 1rem 1rem 3rem;
border-radius: var(--radius-lg);
border: 1px solid var(--card-border);
background: var(--card-bg);
color: var(--text-main);
font-size: 1rem;
font-family: inherit;
backdrop-filter: blur(10px);
transition: var(--transition);
outline: none;
}
.search-input:focus {
border-color: var(--primary);
box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}
.search-icon {
position: absolute;
left: 1rem;
top: 50%;
transform: translateY(-50%);
color: var(--text-muted);
font-size: 1.25rem;
pointer-events: none;
}
/* --- Filter Tabs --- */
.filters {
display: flex;
gap: 0.75rem;
flex-wrap: wrap;
justify-content: center;
margin-bottom: 1rem;
}
.filter-btn {
background: transparent;
border: 1px solid var(--card-border);
color: var(--text-muted);
padding: 0.5rem 1.25rem;
border-radius: 20px;
font-size: 0.875rem;
font-weight: 500;
cursor: pointer;
transition: var(--transition);
}
.filter-btn:hover {
background: rgba(255, 255, 255, 0.05);
color: var(--text-main);
}
.filter-btn.active {
background: var(--primary);
border-color: var(--primary);
color: white;
box-shadow: 0 4px 12px var(--primary-glow);
}
/* --- Grid Layout --- */
main {
flex: 1;
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 0 1.5rem 3rem;
}
.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1.5rem;
}
/* --- Card Design --- */
.card {
background: var(--card-bg);
border: 1px solid var(--card-border);
border-radius: var(--radius-md);
padding: 1.5rem;
text-decoration: none;
color: inherit;
display: flex;
flex-direction: column;
gap: 1rem;
transition: var(--transition);
position: relative;
overflow: hidden;
backdrop-filter: blur(10px);
animation: fadeIn 0.5s ease-out forwards;
opacity: 0;
transform: translateY(10px);
}
.card:hover {
transform: translateY(-4px);
border-color: var(--card-hover-border);
box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
}
.card::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 100%);
z-index: 0;
pointer-events: none;
}
.card-top {
display: flex;
justify-content: space-between;
align-items: flex-start;
z-index: 1;
}
.icon-box {
width: 48px;
height: 48px;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
background: rgba(255, 255, 255, 0.05);
transition: var(--transition);
}
.card:hover .icon-box {
transform: scale(1.1) rotate(5deg);
}
.external-link {
opacity: 0;
transform: translateX(-10px);
transition: var(--transition);
color: var(--text-muted);
}
.card:hover .external-link {
opacity: 1;
transform: translateX(0);
}
.card-content {
z-index: 1;
}
.card-title {
font-size: 1.125rem;
font-weight: 600;
margin-bottom: 0.25rem;
color: var(--text-main);
}
.card-desc {
font-size: 0.875rem;
color: var(--text-muted);
line-height: 1.6;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.card-meta {
margin-top: auto;
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--text-muted);
z-index: 1;
}
.tag {
padding: 2px 8px;
border-radius: 4px;
background: rgba(255, 255, 255, 0.05);
color: var(--text-main);
}
/* --- Footer --- */
footer {
padding: 2rem;
text-align: center;
border-top: 1px solid var(--card-border);
background: rgba(15, 23, 42, 0.8);
}
.anycoder-link {
color: var(--text-muted);
text-decoration: none;
font-size: 0.9rem;
font-weight: 500;
transition: var(--transition);
display: inline-flex;
align-items: center;
gap: 0.5rem;
}
.anycoder-link:hover {
color: var(--primary);
}
/* --- Dynamic Icon Colors --- */
.color-dev { color: var(--accent-cyan); background: rgba(6, 182, 212, 0.1); }
.color-design { color: var(--accent-pink); background: rgba(236, 72, 153, 0.1); }
.color-social { color: var(--primary); background: rgba(99, 102, 241, 0.1); }
.color-tools { color: var(--accent-green); background: rgba(16, 185, 129, 0.1); }
/* --- Animations --- */
@keyframes fadeIn {
to {
opacity: 1;
transform: translateY(0);
}
}
/* --- Responsive --- */
@media (max-width: 600px) {
h1 { font-size: 2rem; }
.grid { grid-template-columns: 1fr; }
.filters { width: 100%; overflow-x: auto; padding-bottom: 0.5rem; justify-content: flex-start; }
.filter-btn { flex-shrink: 0; }
}
</style>
</head>
<body>
<header>
<div class="brand-container">
<h1>Link Hub</h1>
<p class="subtitle">A curated collection of resources, tools, and inspiration for creators.</p>
</div>
<div class="search-container">
<i class="ph ph-magnifying-glass search-icon"></i>
<input type="text" id="searchInput" class="search-input" placeholder="Search links...">
</div>
<nav class="filters" id="filterContainer">
<button class="filter-btn active" data-category="all">All</button>
<button class="filter-btn" data-category="dev">Development</button>
<button class="filter-btn" data-category="design">Design</button>
<button class="filter-btn" data-category="social">Social</button>
<button class="filter-btn" data-category="tools">Tools</button>
</nav>
</header>
<main>
<div class="grid" id="linkGrid">
<!-- Cards will be injected here via JS -->
</div>
</main>
<footer>
<a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="anycoder-link">
<i class="ph ph-sparkle"></i> Built with anycoder
</a>
</footer>
<script>
// Data Source
const links = [
{
id: 1,
title: "MDN Web Docs",
url: "https://developer.mozilla.org",
desc: "The ultimate resource for web developers. Documentation for HTML, CSS, JavaScript and more.",
category: "dev",
icon: "ph-file-code"
},
{
id: 2,
title: "Dribbble",
url: "https://dribbble.com",
desc: "Discover the world's top designers & creatives. The leading destination to find & showcase creative work.",
category: "design",
icon: "ph-paint-brush"
},
{
id: 3,
title: "GitHub",
url: "https://github.com",
desc: "Where the world builds software. Millions of developers and companies build, ship, and maintain their software.",
category: "dev",
icon: "ph-github-logo"
},
{
id: 4,
title: "Figma",
url: "https://figma.com",
desc: "The collaborative interface design tool. Connect everyone in the design process so teams can deliver better products.",
category: "design",
icon: "ph-figma-logo"
},
{
id: 5,
title: "Twitter / X",
url: "https://twitter.com",
desc: "From breaking news and entertainment to sports and politics, get the full story with all the live commentary.",
category: "social",
icon: "ph-twitter-logo"
},
{
id: 6,
title: "Notion",
url: "https://notion.so",
desc: "A new tool that blends your everyday work apps into one. It's the all-in-one workspace for you and your team.",
category: "tools",
icon: "ph-notebook"
},
{
id: 7,
title: "Stack Overflow",
url: "https://stackoverflow.com",
desc: "Where Developers Learn, Share, & Build Careers. The largest online community for programmers.",
category: "dev",
icon: "ph-stack-overflow-logo"
},
{
id: 8,
title: "Behance",
url: "https://behance.net",
desc: "The world's largest creative network for showcasing and discovering creative work.",
category: "design",
icon: "ph-behance-logo"
},
{
id: 9,
title: "LinkedIn",
url: "https://linkedin.com",
desc: "Manage your professional identity. Build and engage with your professional network.",
category: "social",
icon: "ph-linkedin-logo"
},
{
id: 10,
title: "Canva",
url: "https://canva.com",
desc: "Free design tool for creating social media graphics, presentations, posters, documents and other visual content.",
category: "tools",
icon: "ph-pen-nib"
},
{
id: 11,
title: "Vercel",
url: "https://vercel.com",
desc: "Develop. Preview. Ship. The platform for frontend developers, providing the speed and reliability innovators need.",
category: "dev",
icon: "ph-rocket-launch"
},
{
id: 12,
title: "Slack",
url: "https://slack.com",
desc: "Slack is a new way to communicate with your team. It's faster, better organized, and more secure than email.",
category: "tools",
icon: "ph-slack-logo"
}
];
// DOM Elements
const grid = document.getElementById('linkGrid');
const searchInput = document.getElementById('searchInput');
const filterBtns = document.querySelectorAll('.filter-btn');
// State
let activeCategory = 'all';
let searchQuery = '';
// Render Function
function renderLinks() {
grid.innerHTML = '';
const filteredLinks = links.filter(link => {
const matchesCategory = activeCategory === 'all' || link.category === activeCategory;
const matchesSearch = link.title.toLowerCase().includes(searchQuery.toLowerCase()) ||
link.desc.toLowerCase().includes(searchQuery.toLowerCase());
return matchesCategory && matchesSearch;
});
if (filteredLinks.length === 0) {
grid.innerHTML = `
<div style="grid-column: 1/-1; text-align: center; padding: 3rem; color: var(--text-muted);">
<i class="ph ph-smiley-sad" style="font-size: 3rem; margin-bottom: 1rem; display: block;"></i>
<p>No links found matching your criteria.</p>
</div>
`;
return;
}
filteredLinks.forEach((link, index) => {
const card = document.createElement('a');
card.href = link.url;
card.target = "_blank";
card.className = 'card';
card.style.animationDelay = `${index * 0.05}s`; // Stagger animation
// Determine color class based on category
const colorClass = `color-${link.category}`;
card.innerHTML = `
<div class="card-top">
<div class="icon-box ${colorClass}">
<i class="ph ${link.icon}"></i>
</div>
<i class="ph ph-arrow-square-out external-link"></i>
</div>
<div class="card-content">
<h3 class="card-title">${link.title}</h3>
<p class="card-desc">${link.desc}</p>
</div>
<div class="card-meta">
<span class="tag">${link.category}</span>
</div>
`;
grid.appendChild(card);
});
}
// Event Listeners
searchInput.addEventListener('input', (e) => {
searchQuery = e.target.value;
renderLinks();
});
filterBtns.forEach(btn => {
btn.addEventListener('click', () => {
// Remove active class from all
filterBtns.forEach(b => b.classList.remove('active'));
// Add to clicked
btn.classList.add('active');
// Update state
activeCategory = btn.dataset.category;
renderLinks();
});
});
// Initial Render
renderLinks();
</script>
</body>
</html>