-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
119 lines (105 loc) · 6.62 KB
/
script.js
File metadata and controls
119 lines (105 loc) · 6.62 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
109
110
111
112
113
114
115
116
117
118
119
(function () {
"use strict";
var portfolio = {
name: "Vaishnavi KN",
about: "Vaishnavi KN is a second-year Computer Science Engineering student at BNM Institute of Technology, Bangalore. She is building a strong foundation in software development, data structures, and problem-solving. Her interests include web development, core programming concepts, and solving algorithmic problems. She actively practices coding on LeetCode and works on personal projects. She is focused on writing clean code, learning industry-relevant tools, and growing as a software engineer.",
skills: ["Python", "C", "C++", "Java", "HTML", "CSS", "JavaScript", "Node.js", "React", "Android", "Kotlin", "Flutter", "MySQL", "MongoDB"],
projects: [
{ name: "Syntheta – AI Video Editor", desc: "AI-powered video editor that automates trimming, caption generation, and enhances creator productivity using GenAI workflows.", tags: "AI, GenAI, Video Processing, UX Design" },
{ name: "Intrusion Detection System", desc: "A cybersecurity system that monitors network traffic and detects potential intrusions using rule-based and analytical techniques.", tags: "Cybersecurity, Networking, Python" },
{ name: "Vacayo – Smart Trip Planner", desc: "A mobile-first travel planner with an Instagram-style UI that provides personalized trip recommendations.", tags: "Mobile App, UI/UX, Flutter" },
{ name: "Video Summarization using GenAI", desc: "Extracts key insights from long videos using modern LLM techniques to generate concise summaries.", tags: "GenAI, LLMs, NLP" }
],
education: [
{ period: "2024 – Present", place: "BNM Institute of Technology, Bengaluru", degree: "Bachelor of Engineering – Computer Science", score: "CGPA: 9.45" },
{ period: "2022 – 2024", place: "Alva's Pre-University College", degree: null, score: "97.33%" },
{ period: "2022", place: "Chinmaya Vidyalaya, Kolar", degree: null, score: "100% (625/625)" }
],
contact: {
email: "vaishnavikn122@gmail.com",
github: "https://github.com/Vaishnavi-Iyer67",
linkedin: "https://www.linkedin.com/in/vaishnavi-kn67",
leetcode: "https://leetcode.com/u/vaishnavi_676/"
}
};
var header = document.querySelector(".header");
var menuBtn = document.querySelector(".header-menu");
var headerNav = document.querySelector(".header-nav");
var chatTrigger = document.querySelector(".chat-btn");
var chatPanel = document.getElementById("chatPanel");
var chatClose = document.querySelector(".chat-close");
var chatMessages = document.getElementById("chatMessages");
var chatInput = document.getElementById("chatInput");
var chatSend = document.getElementById("chatSend");
if (menuBtn && headerNav) {
menuBtn.addEventListener("click", function () {
headerNav.classList.toggle("open");
menuBtn.classList.toggle("open");
});
headerNav.querySelectorAll("a").forEach(function (link) {
link.addEventListener("click", function () {
headerNav.classList.remove("open");
menuBtn.classList.remove("open");
});
});
}
if (chatTrigger && chatPanel) {
chatTrigger.addEventListener("click", function () {
chatPanel.hidden = !chatPanel.hidden;
if (!chatPanel.hidden && chatInput) chatInput.focus();
});
}
function getBotReply(userText) {
var t = userText.toLowerCase().trim();
if (!t) return "Try: \"What are her skills?\" • \"What projects?\" • \"Where did she study?\" • \"What is her email?\"";
if (/\bemail\b|mail\b/.test(t)) return "Vaishnavi's email: vaishnavikn122@gmail.com";
if (/\bgithub\b/.test(t) && !/project|built/.test(t)) return "GitHub: https://github.com/Vaishnavi-Iyer67";
if (/\blinkedin\b/.test(t)) return "LinkedIn: https://www.linkedin.com/in/vaishnavi-kn67";
if (/\bleetcode\b/.test(t)) return "LeetCode: https://leetcode.com/u/vaishnavi_676/";
if (/\bcontact\b|reach\b|get in touch/.test(t))
return "Email: vaishnavikn122@gmail.com\nGitHub, LinkedIn, LeetCode links on the Contact section. Open to internships & hackathons.";
if (/\bcgpa\b|gpa/.test(t)) return "CGPA at BNMIT: 9.45 (B.E. Computer Science).";
if (/\bcollege\b|where.*study|bnm/.test(t))
return "BNM Institute of Technology, Bengaluru — B.E. CSE (2024–Present). Also: Alva's PUC (97.33%), Chinmaya Vidyalaya (100%, Topper).";
if (/\beducation\b|study|degree|school|topper/.test(t)) {
var out = "Education:\n";
portfolio.education.forEach(function (e) {
out += "• " + e.period + " — " + e.place + ", " + e.score + "\n";
});
return out.trim();
}
if (/\bskills?\b|technolog|language|tools/.test(t))
return "Skills: " + portfolio.skills.join(", ") + ".";
if (/\bproject|built|work\b|syntheta|vacayo|intrusion|genai/.test(t)) {
var out = "Projects:\n";
portfolio.projects.forEach(function (p) {
out += "• " + p.name + " — " + p.desc + "\n";
});
return out.trim();
}
if (/\bwho\b|about|tell me about|vaishnavi/.test(t)) return portfolio.about;
if (/^hi|^hello|^hey|thanks/.test(t)) return "Hi! Ask about her skills, projects, education, or contact.";
return "I only have portfolio info. Try: \"What are her skills?\" or \"What projects?\" or \"Email?\"";
}
function addMessage(isUser, text) {
var wrap = document.createElement("div");
wrap.className = "chat-msg " + (isUser ? "user" : "bot");
var p = document.createElement("p");
p.textContent = text;
wrap.appendChild(p);
chatMessages.appendChild(wrap);
chatMessages.scrollTop = chatMessages.scrollHeight;
}
function sendUserMessage() {
var text = chatInput && chatInput.value ? chatInput.value.trim() : "";
if (!text) return;
chatInput.value = "";
addMessage(true, text);
addMessage(false, getBotReply(text));
}
if (chatClose && chatPanel) chatClose.addEventListener("click", function () { chatPanel.hidden = true; });
if (chatSend && chatInput) {
chatSend.addEventListener("click", sendUserMessage);
chatInput.addEventListener("keydown", function (e) { if (e.key === "Enter") sendUserMessage(); });
}
})();