Repository navigation
Expand file tree
/
Copy pathscript.js
More file actions
108 lines (99 loc) · 3.58 KB
/
Copy pathscript.js
File metadata and controls
108 lines (99 loc) · 3.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
// ============================================================
// PROJECTS DATA
// TODO: Replace these with your real projects!
// Each project needs: title, description, tags, and optional links.
// Ask Copilot: "Add a project card for a [project type] called [name]"
// ============================================================
const projects = [
{
title: "Project One",
description: "A short description of what this project does and why you built it.",
tags: ["Python", "Flask"],
github: "https://github.com/yourusername/project-one",
demo: null,
},
{
title: "Project Two",
description: "Another project you're proud of. What problem did it solve?",
tags: ["JavaScript", "React"],
github: "https://github.com/yourusername/project-two",
demo: "https://yourproject.netlify.app",
},
{
title: "Project Three",
description: "Keep it brief — one or two sentences is plenty.",
tags: ["Java", "Algorithms"],
github: "https://github.com/yourusername/project-three",
demo: null,
},
];
// ============================================================
// SKILLS DATA
// TODO: Replace with your actual skills.
// Ask Copilot to help format this list based on your resume.
// ============================================================
const skills = [
"Python", "JavaScript", "Java", "C",
"HTML & CSS", "Git & GitHub",
"React", "Node.js",
"SQL", "Linux",
];
// ============================================================
// RENDER PROJECTS
// ============================================================
function renderProjects() {
const container = document.getElementById("projects-container");
if (!container) return;
container.innerHTML = projects
.map(
(project) => `
<div class="project-card">
<h3>${project.title}</h3>
<p>${project.description}</p>
<div class="project-tags">
${project.tags.map((tag) => `<span class="tag">${tag}</span>`).join("")}
</div>
<div class="project-links">
${project.github ? `<a href="${project.github}" target="_blank">GitHub →</a>` : ""}
${project.demo ? `<a href="${project.demo}" target="_blank">Live Demo →</a>` : ""}
</div>
</div>
`
)
.join("");
}
// ============================================================
// RENDER SKILLS
// ============================================================
function renderSkills() {
const container = document.getElementById("skills-container");
if (!container) return;
container.innerHTML = skills
.map((skill) => `<span class="skill-badge">${skill}</span>`)
.join("");
}
// ============================================================
// DARK MODE TOGGLE
// TODO: Implement this! Here's a stub to get you started.
// Ask Copilot (inline chat on this function): "Implement dark mode
// toggle that saves preference to localStorage"
// ============================================================
function toggleDarkMode() {
// Your implementation here
}
// ============================================================
// UPDATE FOOTER YEAR
// ============================================================
function updateYear() {
const yearEl = document.getElementById("year");
if (yearEl) yearEl.textContent = new Date().getFullYear();
}
// ============================================================
// INIT
// ============================================================
document.addEventListener("DOMContentLoaded", () => {
renderProjects();
renderSkills();
updateYear();
// TODO: Wire up your dark mode toggle button here once you add it
});