-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
262 lines (218 loc) · 9.86 KB
/
index.html
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/robinjayaswal.me/index.css">
<title>Robin Jayaswal</title>
<script>
window.setInterval(typeCommandText, 200);
var count = 0;
var stringToShow = "cat welcomeMessage.txt";
var secondLineString = "help"
var secondTypeDelay = 10
function typeCommandText() {
if (count < stringToShow.length){
document.getElementById("firstLine").innerHTML += stringToShow[count];
}
else if (count == stringToShow.length){
document.getElementById("firstLineCursor").style.display = "none";
document.getElementById("welcomeMessage").style.display = "block";
document.getElementById("secondLine").style.display = "flex";
}
else if (count > stringToShow.length + secondTypeDelay && count < stringToShow.length + secondTypeDelay + secondLineString.length + 1) {
secondStringIndex = count - stringToShow.length - secondTypeDelay - 1;
document.getElementById("secondLineText").innerHTML += secondLineString[secondStringIndex];
}
else if (count === stringToShow.length + secondTypeDelay + secondLineString.length + 1){
document.getElementById("secondLineCursor").style.display = "none";
document.getElementById("helpMessage").style.display = "block";
document.getElementById("inputLines").style.display = "flex";
document.getElementById("inputLine1").focus();
// the following code was based off the following stack overflow answer:
// http://stackoverflow.com/questions/155188/trigger-a-button-click-with-javascript-on-the-enter-key-in-a-text-box
// it allows the detection of the enter key in a text box
document.getElementById("inputLine1")
.addEventListener("keyup", function(event) {
handleInput(event);
}
);
}
count += 1;
}
var currentInputLine = 1;
var inputHandler = null;
function resumeClicked() {
var win = window.open('/assets/robinJResume.pdf', '_blank');
win.focus();
}
function aboutMeClicked() {
document.getElementById("about-me-container").scrollIntoView({block: "start", behavior: "smooth"});
}
function projectsClicked() {
document.getElementById("projects-container").scrollIntoView({block: "start", behavior: "smooth"});
}
function handleInput(event) {
event.stopImmediatePropagation();
if (event.keyCode == 13) {
var inputLineElement = "inputLine" + currentInputLine;
document.getElementById(inputLineElement).readOnly = true;
document.getElementById(inputLineElement).blur();
document.getElementById(inputLineElement).removeEventListener("keyup", handleInput)
// add another input line below the current one
var inputLineDiv = document.createElement('div');
currentInputLine += 1;
newInputLineElement = "inputLine" + currentInputLine;
inputLineDiv.className = 'input-line';
inputLineDiv.innerHTML = '<p>' + (currentInputLine + 2) + ':~/browser/ $ </p>\
<input type="text" id=' + newInputLineElement + '>';
document.getElementById('inputLines').appendChild(inputLineDiv);
document.getElementById(newInputLineElement).focus();
document.getElementById(newInputLineElement)
.addEventListener("keyup", function(event) {
handleInput(event);
}
);
// inputHandler = setTimeout(handleInput, 100);
var text = document.getElementById(inputLineElement).value;
if (text === "open github"){
// the following code comes from the stackoverflow answer:
//http://stackoverflow.com/questions/4907843/open-a-url-in-a-new-tab-and-not-a-new-window-using-javascript
// it opens a window in new tab
var win = window.open('https://github.com/RobinJayaswal', '_blank');
win.focus();
}
if (text === "open linkedin"){
// the following code comes from the stackoverflow answer:
//http://stackoverflow.com/questions/4907843/open-a-url-in-a-new-tab-and-not-a-new-window-using-javascript
// it opens a window in new tab
var win = window.open('https://www.linkedin.com/in/robinjayaswal', '_blank');
win.focus();
}
if (text == "open projects"){
document.getElementById("projects-container").scrollIntoView({block: "start", behavior: "smooth"});
}
if (text == "open resume"){
var win = window.open('/assets/robinJResume.pdf', '_blank');
win.focus();
}
if (text == "open about"){
document.getElementById("about-me-container").scrollIntoView({block: "start", behavior: "smooth"});
}
// make current input line read only
}
}
</script>
</head>
<body>
<div class="top-nav-bar">
<div class="robin-emoji-container">
<p>🐦</p>
</div>
<div class="link-container">
<div class="small-border">
</div>
<div class="link" onclick="resumeClicked()">
Resume
</div>
<div class="small-border">
</div>
<div class="link" onclick="projectsClicked()">
Projects
</div>
<div class="small-border">
</div>
<div class="link" onclick="aboutMeClicked()">
About
</div>
<div class="small-border">
</div>
<div class="link gh">
<a href="https://github.com/RobinJayaswal"><img src="assets/whitegit32.png" /></a>
</div>
<div class="small-border">
</div>
<div class="link li">
<a href="https://www.linkedin.com/in/robinjayaswal"><img src="assets/linkedin2.png" /></a>
</div>
<div class="small-border">
</div>
</div>
</div>
<div class="intro-banner">
<div class="first-line">
<p id="firstLine">1:~/browser/ $ </p>
<!-- Following code is from: https://codepen.io/ArtemGordinsky/pen/GnLBq
It blinks a cursor-->
<span class="blinking-cursor" id="firstLineCursor">|</span>
</div>
<div class="welcome-message" id="welcomeMessage">
<p>Welcome to my site!</br>My name is Robin Jayaswal, and I study CS and
math at Dartmouth College.</p>
</div>
<div class="second-line" id="secondLine">
<p id="secondLineText">2:~/browser/ $ </p>
<!-- Following code is from: https://codepen.io/ArtemGordinsky/pen/GnLBq
It blinks a cursor-->
<span class="blinking-cursor" id="secondLineCursor">|</span>
</div>
<div class="help-message" id="helpMessage">
<p>To open any menu item, press the link, OR, just type 'open [item]' right here
</br> For example, typing 'open github' will open my github in a new tab!</br>
Possible commands are 'open [github, linkedin, resume, about, projects]'</p>
</div>
<div class="input-lines" id="inputLines">
<div class="input-line">
<p>3:~/browser/ $ </p>
<input type="text" id="inputLine1">
</div>
</div>
</div>
<div class="projects-container" id="projects-container">
<h2>Projects</h2>
<div class="project-row">
<div class="project-container">
<span class="project-title">College Pulse</span>
<a href="https://dartmouthpulse.com">dartmouthpulse.com</a>
<span>
Funded by Dartmouth Administration to create an institutional research platform.
</span>
<span>
Product is a web app (native mobile is next on list) aimed at increasing survey response rates and lowering costs of polling for institutions. Currently in testing by administration officials and student group leaders.
</span>
<span>
Written in Javascript, React, Node.js, a >20,000 lines of code production quality app.
</span>
<span>
</span>
</div>
<div class="project-container">
<span class="project-title">Tiny Search Engine</span>
<a href="https://github.com/RobinJayaswal/searchEngine">Github (Private, required by Dartmouth)</a>
<span>The Tiny Search Engine is a basic, modular search engine program capabale of crawling, indexing, and querying webpages internal to the Dartmouth CS Department server.</span>
</div>
<div class="project-container">
<span class="project-title">Linpy</span>
<a href="https://github.com/RobinJayaswal/linpy">Github</a>
<span>A homegrown library for matrix row reduction, inverse calculation, transposing, multiplication, and more.</span>
</div>
</div>
<div class="project-row">
<div class="project-container">
<span class="project-title">Spy Game</span>
<a href="https://gitlab.cs.dartmouth.edu/jay/project-starter-kit">Gitlab (Private, required by Dartmouth)</a>
<span>Pebble app, game server, and computer program that allows teams to play a real life spy game with communication and scoring through server. C</span>
</div>
<div class="project-container">
<span class="project-title">Source for this Site</span>
<a href="https://github.com/RobinJayaswal/robinjayaswal.me">Github</a>
<span>Pure HTML, CSS, and JS. No libraries.</span>
</div>
</div>
</div>
<div class="about-me-container" id="about-me-container">
<h2>About Me</h2>
<p>
Robin is majoring in Computer Science and in Mathematics modified with Economics at Dartmouth College. He will be happy to tell you more upon request.
</p>
</div>
</body>
</html>