|
| 1 | +/** |
| 2 | + * Footer Component |
| 3 | + * Social links and external resources |
| 4 | + */ |
| 5 | + |
| 6 | +import styles from './Footer.module.css'; |
| 7 | + |
| 8 | +interface SocialLink { |
| 9 | + name: string; |
| 10 | + url: string; |
| 11 | + icon: React.ReactNode; |
| 12 | +} |
| 13 | + |
| 14 | +const socialLinks: SocialLink[] = [ |
| 15 | + { |
| 16 | + name: 'GitHub', |
| 17 | + url: 'https://github.com/PramithaMJ', |
| 18 | + icon: ( |
| 19 | + <svg viewBox="0 0 24 24" fill="currentColor"> |
| 20 | + <path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" /> |
| 21 | + </svg> |
| 22 | + ), |
| 23 | + }, |
| 24 | + { |
| 25 | + name: 'LinkedIn', |
| 26 | + url: 'https://www.linkedin.com/in/pramitha-jayasooriya/', |
| 27 | + icon: ( |
| 28 | + <svg viewBox="0 0 24 24" fill="currentColor"> |
| 29 | + <path d="M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.062 2.062 0 01-2.063-2.065 2.064 2.064 0 112.063 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z" /> |
| 30 | + </svg> |
| 31 | + ), |
| 32 | + }, |
| 33 | + { |
| 34 | + name: 'Twitter', |
| 35 | + url: 'https://x.com/PramithaMJ', |
| 36 | + icon: ( |
| 37 | + <svg viewBox="0 0 24 24" fill="currentColor"> |
| 38 | + <path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" /> |
| 39 | + </svg> |
| 40 | + ), |
| 41 | + }, |
| 42 | + { |
| 43 | + name: 'YouTube', |
| 44 | + url: 'https://www.youtube.com/@PramithaJayasooriya', |
| 45 | + icon: ( |
| 46 | + <svg viewBox="0 0 24 24" fill="currentColor"> |
| 47 | + <path d="M23.498 6.186a3.016 3.016 0 00-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 00.502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 002.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 002.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z" /> |
| 48 | + </svg> |
| 49 | + ), |
| 50 | + }, |
| 51 | + { |
| 52 | + name: 'Medium', |
| 53 | + url: 'https://medium.com/@lpramithamj', |
| 54 | + icon: ( |
| 55 | + <svg viewBox="0 0 24 24" fill="currentColor"> |
| 56 | + <path d="M13.54 12a6.8 6.8 0 01-6.77 6.82A6.8 6.8 0 010 12a6.8 6.8 0 016.77-6.82A6.8 6.8 0 0113.54 12zM20.96 12c0 3.54-1.51 6.42-3.38 6.42-1.87 0-3.39-2.88-3.39-6.42s1.52-6.42 3.39-6.42 3.38 2.88 3.38 6.42M24 12c0 3.17-.53 5.75-1.19 5.75-.66 0-1.19-2.58-1.19-5.75s.53-5.75 1.19-5.75C23.47 6.25 24 8.83 24 12z" /> |
| 57 | + </svg> |
| 58 | + ), |
| 59 | + }, |
| 60 | + { |
| 61 | + name: 'Facebook', |
| 62 | + url: 'https://www.facebook.com/Pramitha.ayasooriya/', |
| 63 | + icon: ( |
| 64 | + <svg viewBox="0 0 24 24" fill="currentColor"> |
| 65 | + <path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z" /> |
| 66 | + </svg> |
| 67 | + ), |
| 68 | + }, |
| 69 | + { |
| 70 | + name: 'Portfolio', |
| 71 | + url: 'https://pramithamj.live/', |
| 72 | + icon: ( |
| 73 | + <svg viewBox="0 0 24 24" fill="currentColor"> |
| 74 | + <path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z" /> |
| 75 | + </svg> |
| 76 | + ), |
| 77 | + }, |
| 78 | +]; |
| 79 | + |
| 80 | +interface ExternalProject { |
| 81 | + title: string; |
| 82 | + description: string; |
| 83 | + url: string; |
| 84 | + color: string; |
| 85 | +} |
| 86 | + |
| 87 | +const externalProjects: ExternalProject[] = [ |
| 88 | + { |
| 89 | + title: 'Microservices Architecture', |
| 90 | + description: 'Complete Spring Boot microservices implementation', |
| 91 | + url: 'https://pramithamj.github.io/fully-completed-microservices-Java-Springboot/', |
| 92 | + color: '#86efac', |
| 93 | + }, |
| 94 | + { |
| 95 | + title: 'Art of Software Design', |
| 96 | + description: 'Design patterns and architectural principles', |
| 97 | + url: 'https://pramithamj.github.io/art-of-software-design/', |
| 98 | + color: '#a855f7', |
| 99 | + }, |
| 100 | + { |
| 101 | + title: 'Thread Lifecycle Visualizer', |
| 102 | + description: 'Interactive thread state visualization', |
| 103 | + url: 'https://pramithamj.github.io/thread-lifecycle-visualizer/', |
| 104 | + color: '#fcd34d', |
| 105 | + }, |
| 106 | + { |
| 107 | + title: 'CPU Scheduling Visualizer', |
| 108 | + description: 'OS scheduling algorithms visualization', |
| 109 | + url: 'https://pramithamj.github.io/cpu-scheduling-visualizer/', |
| 110 | + color: '#60a5fa', |
| 111 | + }, |
| 112 | +]; |
| 113 | + |
| 114 | +export function Footer() { |
| 115 | + return ( |
| 116 | + <footer className={styles.footer}> |
| 117 | + {/* External Projects */} |
| 118 | + <section className={styles.projectsSection}> |
| 119 | + <h3 className={styles.sectionTitle}>Related Projects</h3> |
| 120 | + <div className={styles.projectsGrid}> |
| 121 | + {externalProjects.map((project) => ( |
| 122 | + <a |
| 123 | + key={project.title} |
| 124 | + href={project.url} |
| 125 | + target="_blank" |
| 126 | + rel="noopener noreferrer" |
| 127 | + className={styles.projectCard} |
| 128 | + style={{ '--accent': project.color } as React.CSSProperties} |
| 129 | + > |
| 130 | + <div className={styles.projectIcon}> |
| 131 | + <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2"> |
| 132 | + <path d="M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6M15 3h6v6M10 14L21 3" strokeLinecap="round" strokeLinejoin="round" /> |
| 133 | + </svg> |
| 134 | + </div> |
| 135 | + <div className={styles.projectInfo}> |
| 136 | + <h4>{project.title}</h4> |
| 137 | + <p>{project.description}</p> |
| 138 | + </div> |
| 139 | + </a> |
| 140 | + ))} |
| 141 | + </div> |
| 142 | + </section> |
| 143 | + |
| 144 | + {/* Social Links */} |
| 145 | + <div className={styles.socialSection}> |
| 146 | + <div className={styles.socialLinks}> |
| 147 | + {socialLinks.map((link) => ( |
| 148 | + <a |
| 149 | + key={link.name} |
| 150 | + href={link.url} |
| 151 | + target="_blank" |
| 152 | + rel="noopener noreferrer" |
| 153 | + className={styles.socialLink} |
| 154 | + aria-label={link.name} |
| 155 | + > |
| 156 | + {link.icon} |
| 157 | + </a> |
| 158 | + ))} |
| 159 | + </div> |
| 160 | + <p className={styles.copyright}> |
| 161 | + © {new Date().getFullYear()} Pramitha Jayasooriya. Built with React & TypeScript. |
| 162 | + </p> |
| 163 | + </div> |
| 164 | + </footer> |
| 165 | + ); |
| 166 | +} |
0 commit comments