+ {/* Holographic Border Effect */}
+
+
+ {/* Premium Browser Header */}
+
+
+
+
+
+
🔒
+
github.com
+
/
+
recodehive
+
/
+
+ {items[activeItem].title.toLowerCase().replace(/\s+/g, '-')}
+
+
+
+
+
+ LIVE
+
+
+
+ {/* Ultra-Enhanced Screenshot Display */}
+
+
+ {(items[activeItem].title === "Awesome GitHub Profile" || items[activeItem].title === "Machine Learning Repository") ? (
+ /* Auto-scrolling Website Iframe */
+ window.open(getWebsiteUrl(items[activeItem].title), '_blank')}
+ >
+
+
+ ) : (
+ /* Interactive Screenshot for other projects */
+ window.open(getWebsiteUrl(items[activeItem].title), '_blank')}
+ >
+
+
+ {/* Click to Visit Overlay */}
+
+
+ 🔗 Click to Visit Repository
+
+
+
+ )}
+
+ {/* Dynamic Indicator */}
+
+ {(items[activeItem].title === "Awesome GitHub Profile" || items[activeItem].title === "Machine Learning Repository") ? (
+ <>
+
+ Auto-scrolling Live Site
+ >
+ ) : (
+ "👆 Hover & Click to Explore"
+ )}
+
+
+ {/* Holographic Overlay */}
+
+
+
+
+
+
+
+
+ {/* 3D Floating Background Mockups */}
+
+ {items.map((item, index) => {
+ if (index === activeItem) return null;
+ const positions = [
+ { top: '8%', left: '2%', rotate: '-15deg', scale: '0.25', z: '-50px' },
+ { top: '65%', left: '5%', rotate: '12deg', scale: '0.22', z: '-30px' },
+ { top: '15%', right: '3%', rotate: '18deg', scale: '0.28', z: '-40px' },
+ { bottom: '12%', right: '6%', rotate: '-10deg', scale: '0.20', z: '-60px' }
+ ];
+ const pos = positions[index % positions.length];
+
+ return (
+
+
+
+
+

+
+
+
+
+ );
+ })}
+
+
);
};
diff --git a/src/database/blogs/index.tsx b/src/database/blogs/index.tsx
index 3846ea32..8c87fa07 100644
--- a/src/database/blogs/index.tsx
+++ b/src/database/blogs/index.tsx
@@ -4,6 +4,7 @@ interface Blog {
image: string;
description: string;
slug: string;
+ authors: string[];
}
const blogs: Blog[] = [
@@ -14,6 +15,7 @@ const blogs: Blog[] = [
description:
"User experience design can be overwhelming because of the number of factors that influence what a product should look like and how it should function.",
slug: "streamline-ux-ui",
+ authors: ["dharshibalasubramaniyam", "sanjay-kv"],
},
{
@@ -23,6 +25,7 @@ const blogs: Blog[] = [
description:
" Are you passionate about design and dreaming of a career in it? Or maybe you are already in the design space and looking to pivot into UI/UX? ",
slug: "ux-ui-design-job",
+ authors: ["dharshibalasubramaniyam", "sanjay-kv"],
},
{
id: 3,
@@ -31,6 +34,7 @@ const blogs: Blog[] = [
description:
"The impact of technology on UX design is undeniable. Automation and artificial intelligence are making it easier to identify user needs and create tailored experiences.",
slug: "ux-designers-ai",
+ authors: ["dharshibalasubramaniyam", "sanjay-kv"],
},
{
id: 4,
@@ -39,14 +43,16 @@ const blogs: Blog[] = [
description:
"DeepMind is an auxiliary of Google that centers around man-made brainpower. It utilizes a part of AI called AI",
slug: "google-deepmind",
+ authors: ["dharshibalasubramaniyam", "sanjay-kv"],
},
{
id: 5,
title: "What are backlinks for SEO",
image: "/img/blogs/01-seo-image.png",
description:
- "An SEO backlink is created when one website links to another, and they’re extremely important for SEO. ",
+ "An SEO backlink is created when one website links to another, and they're extremely important for SEO. ",
slug: "google-backlinks",
+ authors: ["sanjay-kv"],
},
{
@@ -56,15 +62,9 @@ const blogs: Blog[] = [
description:
"The GitHub Copilot Coding Agent is an asynchronous software engineering agent that assists developers by suggesting code snippets",
slug: "git-coding-agent",
+ authors: ["sanjay-kv"],
},
- {
- id: 6,
- title: "Apache Spark Tutorial",
- image: "/img/blogs/07-spark-blog-banner.png",
- description:
- "Apache Spark is an open-source unified analytics engine for large-scale data processing, with built-in modules for streaming, SQL, machine learning, and graph processing.",
- slug: "spark-architecture",
- },
+
];
-export default blogs;
+export default blogs;
\ No newline at end of file
diff --git a/src/pages/dashboard/giveaway/index.tsx b/src/pages/dashboard/giveaway/index.tsx
index be38eb3d..b8f85eeb 100644
--- a/src/pages/dashboard/giveaway/index.tsx
+++ b/src/pages/dashboard/giveaway/index.tsx
@@ -1,25 +1,471 @@
-import React, { useState } from "react";
+import React, { useState, useEffect } from "react";
import Layout from "@theme/Layout";
import Head from "@docusaurus/Head";
import { motion } from "framer-motion";
import SlotCounter from "react-slot-counter";
import NavbarIcon from "../../../components/navbar/NavbarIcon";
import { useHistory } from "@docusaurus/router";
+import { Home, MessageCircle, Gift, Trophy, Crown, Star, Award, Clock, Users, TrendingUp, Medal } from "lucide-react";
import "../dashboard.css";
+// Giveaway-specific styles
+const giveawayStyles = `
+.giveaway-stats-banner {
+ display: flex;
+ justify-content: space-between;
+ gap: 0.75rem;
+ margin-bottom: 2rem;
+ padding: 0 1rem;
+}
+
+.stat-item {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ gap: 0.5rem;
+ background: var(--ifm-background-color);
+ border: 1px solid var(--ifm-color-emphasis-200);
+ border-radius: 8px;
+ padding: 0.5rem;
+ transition: all 0.3s ease;
+ box-shadow: 0 2px 8px var(--ifm-color-emphasis-200);
+}
+
+.stat-item:hover {
+ transform: translateY(-2px);
+ box-shadow: 0 4px 16px var(--ifm-color-emphasis-300);
+}
+
+.timer-icon {
+ background: linear-gradient(135deg, #ff6b6b, #ffa726) !important;
+}
+
+.entries-icon {
+ background: linear-gradient(135deg, #4ecdc4, #44a08d) !important;
+}
+
+.score-icon {
+ background: linear-gradient(135deg, #667eea, #764ba2) !important;
+}
+
+.winners-icon {
+ background: linear-gradient(135deg, #f093fb, #f5576c) !important;
+}
+
+.stat-icon {
+ width: 28px;
+ height: 28px;
+ border-radius: 6px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 0.9rem;
+ flex-shrink: 0;
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
+}
+
+.stat-content {
+ min-width: 0;
+}
+
+.stat-content h3 {
+ font-size: 0.65rem;
+ font-weight: 600;
+ color: var(--ifm-color-emphasis-700);
+ margin: 0 0 0.15rem 0;
+ text-transform: uppercase;
+ letter-spacing: 0.5px;
+}
+
+.stat-value {
+ font-size: 1.1rem;
+ font-weight: 800;
+ color: var(--ifm-color-emphasis-900);
+ display: flex;
+ align-items: baseline;
+ gap: 0.15rem;
+ margin-bottom: 0.15rem;
+}
+
+.stat-value span {
+ font-size: 0.6rem;
+ font-weight: 600;
+ color: var(--ifm-color-emphasis-600);
+}
+
+.stat-content p {
+ font-size: 0.55rem;
+ color: var(--ifm-color-emphasis-500);
+ margin: 0;
+}
+
+[data-theme='dark'] .stat-item {
+ background: var(--ifm-color-emphasis-100);
+ border-color: var(--ifm-color-emphasis-300);
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
+}
+
+[data-theme='dark'] .stat-item:hover {
+ box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
+}
+
+.giveaway-leaderboard-section {
+ margin: 3rem 0;
+ padding: 0 1rem;
+}
+
+.giveaway-leaderboard-header {
+ text-align: center;
+ margin-bottom: 2rem;
+}
+
+.giveaway-leaderboard-title {
+ font-size: 2.5rem;
+ font-weight: 800;
+ margin-bottom: 0.5rem;
+ color: var(--ifm-color-emphasis-900);
+}
+
+.giveaway-leaderboard-subtitle {
+ font-size: 1.1rem;
+ color: var(--ifm-color-emphasis-700);
+ margin: 0;
+}
+
+.giveaway-loading {
+ text-align: center;
+ padding: 3rem;
+ color: var(--ifm-color-emphasis-700);
+}
+
+.giveaway-leaderboard-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
+ gap: 1.5rem;
+ max-width: 1200px;
+ margin: 0 auto;
+}
+
+.giveaway-leaderboard-card {
+ background: var(--ifm-background-color);
+ border: 1px solid var(--ifm-color-emphasis-300);
+ border-radius: 16px;
+ padding: 1.5rem;
+ position: relative;
+ overflow: hidden;
+ transition: all 0.3s ease;
+ box-shadow: 0 4px 12px var(--ifm-color-emphasis-200);
+}
+
+.giveaway-leaderboard-card:hover {
+ box-shadow: 0 8px 25px var(--ifm-color-emphasis-300);
+ border-color: var(--ifm-color-primary);
+ transform: translateY(-2px);
+}
+
+.giveaway-leaderboard-card.rank-1 {
+ background: linear-gradient(135deg, #ffd700, #ffed4e);
+ border-color: #ffd700;
+}
+
+.giveaway-leaderboard-card.rank-2 {
+ background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
+ border-color: #c0c0c0;
+}
+
+.giveaway-leaderboard-card.rank-3 {
+ background: linear-gradient(135deg, #cd7f32, #daa520);
+ border-color: #cd7f32;
+}
+
+[data-theme='dark'] .giveaway-leaderboard-card {
+ background: var(--ifm-color-emphasis-100);
+ border-color: var(--ifm-color-emphasis-400);
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
+}
+
+[data-theme='dark'] .giveaway-leaderboard-card:hover {
+ box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
+}
+
+[data-theme='dark'] .giveaway-leaderboard-card.rank-1 {
+ background: linear-gradient(135deg, #b8860b, #daa520);
+}
+
+[data-theme='dark'] .giveaway-leaderboard-card.rank-2 {
+ background: linear-gradient(135deg, #708090, #a9a9a9);
+}
+
+[data-theme='dark'] .giveaway-leaderboard-card.rank-3 {
+ background: linear-gradient(135deg, #8b4513, #cd853f);
+}
+
+.giveaway-rank-badge {
+ position: absolute;
+ top: 1rem;
+ right: 1rem;
+ width: 40px;
+ height: 40px;
+ border-radius: 50%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-weight: bold;
+ font-size: 0.9rem;
+ background: var(--ifm-color-primary);
+ color: var(--ifm-color-primary-contrast-background);
+}
+
+.giveaway-avatar {
+ position: relative;
+ width: 80px;
+ height: 80px;
+ margin: 0 auto 1rem;
+}
+
+.giveaway-avatar img {
+ width: 100%;
+ height: 100%;
+ border-radius: 50%;
+ object-fit: cover;
+ border: 3px solid var(--ifm-color-primary);
+}
+
+.giveaway-badge {
+ position: absolute;
+ bottom: -5px;
+ left: 50%;
+ transform: translateX(-50%);
+ background: var(--ifm-color-primary);
+ color: var(--ifm-color-primary-contrast-background);
+ padding: 0.25rem 0.5rem;
+ border-radius: 12px;
+ font-size: 0.7rem;
+ font-weight: 600;
+ white-space: nowrap;
+}
+
+.giveaway-info {
+ text-align: center;
+ margin-bottom: 1rem;
+}
+
+.giveaway-name {
+ font-size: 1.2rem;
+ font-weight: 700;
+ margin-bottom: 0.5rem;
+ color: var(--ifm-color-emphasis-900);
+}
+
+.giveaway-leaderboard-card.rank-1 .giveaway-name,
+.giveaway-leaderboard-card.rank-2 .giveaway-name,
+.giveaway-leaderboard-card.rank-3 .giveaway-name {
+ color: var(--ifm-color-emphasis-1000);
+}
+
+.giveaway-stats {
+ display: flex;
+ justify-content: space-around;
+ gap: 1rem;
+}
+
+.giveaway-stat {
+ text-align: center;
+}
+
+.giveaway-stat .stat-value {
+ display: block;
+ font-size: 1.5rem;
+ font-weight: 700;
+ color: var(--ifm-color-primary);
+}
+
+.giveaway-leaderboard-card.rank-1 .stat-value,
+.giveaway-leaderboard-card.rank-2 .stat-value,
+.giveaway-leaderboard-card.rank-3 .stat-value {
+ color: var(--ifm-color-emphasis-1000);
+}
+
+.giveaway-stat .stat-label {
+ font-size: 0.8rem;
+ color: var(--ifm-color-emphasis-600);
+ text-transform: uppercase;
+ letter-spacing: 0.5px;
+}
+
+.giveaway-leaderboard-card.rank-1 .stat-label,
+.giveaway-leaderboard-card.rank-2 .stat-label,
+.giveaway-leaderboard-card.rank-3 .stat-label {
+ color: var(--ifm-color-emphasis-800);
+}
+
+.giveaway-profile-btn {
+ display: block;
+ width: 100%;
+ padding: 0.75rem;
+ background: var(--ifm-color-primary);
+ color: var(--ifm-color-primary-contrast-background);
+ text-decoration: none;
+ border-radius: 8px;
+ text-align: center;
+ font-weight: 600;
+ transition: all 0.3s ease;
+}
+
+.giveaway-profile-btn:hover {
+ background: var(--ifm-color-primary-dark);
+ color: var(--ifm-color-primary-contrast-background);
+ text-decoration: none;
+ transform: translateY(-2px);
+}
+
+.giveaway-leaderboard-card.rank-1 .giveaway-profile-btn,
+.giveaway-leaderboard-card.rank-2 .giveaway-profile-btn,
+.giveaway-leaderboard-card.rank-3 .giveaway-profile-btn {
+ background: var(--ifm-color-emphasis-800);
+ color: var(--ifm-color-emphasis-0);
+}
+
+.giveaway-leaderboard-card.rank-1 .giveaway-profile-btn:hover,
+.giveaway-leaderboard-card.rank-2 .giveaway-profile-btn:hover,
+.giveaway-leaderboard-card.rank-3 .giveaway-profile-btn:hover {
+ background: var(--ifm-color-emphasis-900);
+ color: var(--ifm-color-emphasis-0);
+}
+
+@media (max-width: 768px) {
+ .giveaway-stats-banner {
+ flex-direction: column;
+ gap: 0.5rem;
+ }
+
+ .stat-item {
+ padding: 0.4rem;
+ }
+
+ .stat-icon {
+ width: 24px;
+ height: 24px;
+ font-size: 0.8rem;
+ }
+
+ .stat-value {
+ font-size: 1rem;
+ }
+
+ .stat-content h3 {
+ font-size: 0.6rem;
+ }
+
+ .stat-content p {
+ font-size: 0.5rem;
+ }
+
+ .giveaway-leaderboard-grid {
+ grid-template-columns: 1fr;
+ gap: 1rem;
+ }
+
+ .giveaway-leaderboard-title {
+ font-size: 2rem;
+ }
+}
+`;
+
+// Inject styles
+if (typeof document !== 'undefined') {
+ const existingStyle = document.getElementById('giveaway-styles');
+ if (!existingStyle) {
+ const styleSheet = document.createElement('style');
+ styleSheet.id = 'giveaway-styles';
+ styleSheet.textContent = giveawayStyles;
+ document.head.appendChild(styleSheet);
+ }
+}
+
+interface GiveawayEntry {
+ rank: number;
+ name: string;
+ avatar: string;
+ points: number;
+ contributions: number;
+ github_url: string;
+ badge?: string;
+}
+
const GiveawayPage: React.FC = () => {
const history = useHistory();
const [isSidebarCollapsed, setIsSidebarCollapsed] = useState(false);
const [isMobileSidebarOpen, setIsMobileSidebarOpen] = useState(false);
+ const [leaderboard, setLeaderboard] = useState