-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
436 lines (407 loc) · 19.8 KB
/
index.html
File metadata and controls
436 lines (407 loc) · 19.8 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
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
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Alex Code - Full Stack Developer | Terminal Portfolio</title>
<meta name="description" content="Alex Code - Full Stack Developer specializing in React, Node.js, and Python. Terminal-style portfolio showcasing projects and skills.">
<meta name="keywords" content="full stack developer, react developer, node.js, python, web development, software engineer, terminal portfolio">
<meta name="author" content="Alex Code">
<meta name="robots" content="index, follow">
<meta property="og:title" content="Alex Code - Terminal Portfolio">
<meta property="og:description" content="Full Stack Developer with terminal-style portfolio. Check out my projects and skills.">
<meta property="og:type" content="website">
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Alex Code - Terminal Portfolio">
<meta name="twitter:description" content="Full Stack Developer terminal portfolio">
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
<link rel="stylesheet" href="./index.css">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Person",
"name": "Alex Code",
"jobTitle": "Full Stack Developer",
"description": "Full Stack Developer specializing in React, Node.js, and Python",
"knowsAbout": ["JavaScript", "React", "Node.js", "Python", "Web Development"]
}
</script>
</head>
<body>
<a href="#terminal-content" class="skip-link">Skip to main content</a>
<div class="terminal-container">
<div class="terminal-header">
<div class="terminal-buttons">
<span class="btn-close"></span>
<span class="btn-minimize"></span>
<span class="btn-maximize"></span>
</div>
<div class="terminal-title">alexcode@devmachine: ~/portfolio</div>
</div>
<div class="terminal-body" id="terminal-content">
</div>
</div>
<!-- Scroll to Top Button -->
<button class="scroll-to-top" id="scrollToTop" aria-label="Scroll to top of page" title="Back to top">
</button>
<script>
/**
* Terminal Portfolio Class
* Handles the animated terminal experience with typing effects
* and smooth scrolling functionality
*/
class TerminalPortfolio {
constructor() {
// DOM elements
this.terminal = document.getElementById('terminal-content');
this.scrollToTopBtn = document.getElementById('scrollToTop');
// Animation settings
this.currentStep = 0;
this.isTyping = false;
this.typeSpeed = 50; // Speed of typing animation in milliseconds
this.commandDelay = 1000; // Delay after typing command
this.sectionDelay = 2000; // Delay after showing section
// Scroll settings
this.scrollThreshold = 300; // Pixels to scroll before showing button
// Terminal commands and sections data
this.commands = [
{
type: 'command',
text: 'whoami',
delay: 1000
},
{
type: 'section',
title: 'Profile Section',
content: `
<div class="profile-section">
<div class="profile-card">
<div class="profile-image">
<img src="https://plus.unsplash.com/premium_photo-1734388422993-b1822f3c54f1?q=80&w=870&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt="Alex Code" />
</div>
<div class="profile-info">
<h1 class="name">Alex Code</h1>
<div class="role">Full-Stack Developer & Open Source Enthusiast</div>
<div class="location">📍 San Francisco, CA</div>
</div>
</div>
</div>
`
},
{
type: 'command',
text: 'cat about.txt',
delay: 2000
},
{
type: 'section',
title: 'About Section',
content: `
<div class="about-section">
<p>Hey there! I'm a passionate developer who loves building things that matter. I specialize in React, Node.js, and Python, with a growing interest in machine learning and AI.</p>
<p>When I'm not coding, you'll find me contributing to open source projects, writing technical blogs, or exploring the latest in web technologies. I believe in clean code, good documentation, and coffee ☕</p>
</div>
`
},
{
type: 'command',
text: 'ls -la skills/',
delay: 2000
},
{
type: 'section',
title: 'Skills Section',
content: `
<div class="skills-header">
<h2>Technical Skills</h2>
</div>
<div class="skills-grid">
<div class="skill-card">
<div class="skill-title">Frontend</div>
<ul class="skill-list">
<li>React.js / Next.js</li>
<li>TypeScript</li>
<li>Tailwind CSS</li>
<li>Vue.js</li>
</ul>
</div>
<div class="skill-card">
<div class="skill-title">Backend</div>
<ul class="skill-list">
<li>Node.js / Express</li>
<li>Python / Django</li>
<li>PostgreSQL</li>
<li>Redis</li>
</ul>
</div>
<div class="skill-card">
<div class="skill-title">Tools & Others</div>
<ul class="skill-list">
<li>Docker</li>
<li>AWS / Vercel</li>
<li>Git / GitHub</li>
<li>Linux</li>
</ul>
</div>
</div>
`
},
{
type: 'command',
text: 'cat projects.json',
delay: 2000
},
{
type: 'section',
title: 'Projects Section',
content: `
<div class="projects-header">
<h2>Featured Projects</h2>
</div>
<div class="projects-grid">
<div class="project-card">
<div class="project-image">
<img src="https://images.unsplash.com/photo-1505238680356-667803448bb6?q=80&w=870&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt="TaskFlow Dashboard" />
</div>
<div class="project-info">
<div class="project-title">TaskFlow - Project Management</div>
<div class="project-desc">A modern project management tool built with React and Node.js. Features real-time collaboration and AI-powered task suggestions.</div>
<div class="project-links">
<a href="#" class="link-github">GitHub</a>
<a href="#" class="link-demo">Live Demo</a>
</div>
</div>
</div>
<div class="project-card">
<div class="project-image">
<img src="https://images.unsplash.com/photo-1521185496955-15097b20c5fe?q=80&w=750&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt="WeatherPro App" />
</div>
<div class="project-info">
<div class="project-title">WeatherPro - Mobile App</div>
<div class="project-desc">React Native weather app with beautiful animations and location-based forecasts. Over 10k downloads on app stores.</div>
<div class="project-links">
<a href="#" class="link-github">GitHub</a>
<a href="#" class="link-demo">App Store</a>
</div>
</div>
</div>
<div class="project-card">
<div class="project-image">
<img src="https://images.unsplash.com/photo-1515504846179-94ac6b34ebb9?q=80&w=726&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D" alt="DataViz Library" />
</div>
<div class="project-info">
<div class="project-title">DataViz - Visualization Library</div>
<div class="project-desc">Open source data visualization library for React. Lightweight, customizable, and TypeScript-first approach.</div>
<div class="project-links">
<a href="#" class="link-github">GitHub</a>
<a href="#" class="link-demo">NPM</a>
</div>
</div>
</div>
</div>
`
},
{
type: 'command',
text: 'find . -name "social*"',
delay: 2000
},
{
type: 'section',
title: 'Social Section',
content: `
<div class="social-header">
<h2>Connect With Me</h2>
</div>
<div class="social-section">
<ul class="social-list">
<li><a href="https://github.com/#" target="_blank">GitHub - @Alex Code</a></li>
<li><a href="https://twitter.com/#" target="_blank">Twitter - @Alex Code</a></li>
<li><a href="https://linkedin.com/in/#" target="_blank">LinkedIn - Alex Code</a></li>
<li><a href="mailto:alex@alexcode.dev">Email - alex@alexcode.dev</a></li>
</ul>
</div>
`
},
{
type: 'command',
text: 'echo "Thanks for visiting!"',
delay: 2000
},
{
type: 'section',
title: 'Thanks Section',
content: `
<div class="thanks-section">
<p>Thanks for checking out my portfolio! Feel free to reach out if you want to collaborate on something cool or just chat about tech.</p>
</div>
<div class="terminal-footer">
<p>© 2025 HErl | Built with ❤️ and lots of ☕ | <a href="https://github.com/petherl/hellish-portfolio" target="_blank">Open Source</a></p>
</div>
`
}
];
// Initialize the portfolio
this.init();
}
/**
* Initialize the terminal portfolio
* Sets up event listeners and starts the animation
*/
init() {
this.setupScrollToTop();
this.startAnimation();
}
/**
* Set up scroll-to-top button functionality
* Handles showing/hiding button based on scroll position
*/
setupScrollToTop() {
// Show/hide scroll button based on scroll position
window.addEventListener('scroll', () => {
const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
if (scrollTop > this.scrollThreshold) {
this.scrollToTopBtn.classList.add('visible');
// Add pulse effect when first shown
if (!this.scrollToTopBtn.classList.contains('pulse')) {
this.scrollToTopBtn.classList.add('pulse');
// Remove pulse after 4 seconds
setTimeout(() => {
this.scrollToTopBtn.classList.remove('pulse');
}, 4000);
}
} else {
this.scrollToTopBtn.classList.remove('visible');
this.scrollToTopBtn.classList.remove('pulse');
}
});
// Handle click event for scroll to top
this.scrollToTopBtn.addEventListener('click', () => {
this.scrollToTop();
});
// Handle keyboard navigation for accessibility
this.scrollToTopBtn.addEventListener('keydown', (e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
this.scrollToTop();
}
});
}
/**
* Smooth scroll to top of page
*/
scrollToTop() {
window.scrollTo({
top: 0,
behavior: 'smooth'
});
// Focus on skip link for accessibility
setTimeout(() => {
const skipLink = document.querySelector('.skip-link');
if (skipLink) {
skipLink.focus();
}
}, 500);
}
/**
* Start the terminal animation sequence
* Loops through all commands and sections
*/
async startAnimation() {
for (let i = 0; i < this.commands.length; i++) {
const command = this.commands[i];
if (command.type === 'command') {
await this.typeCommand(command.text);
await this.delay(command.delay || this.commandDelay);
} else if (command.type === 'section') {
await this.showSection(command.title, command.content);
await this.delay(this.sectionDelay);
}
}
}
/**
* Type out a command with realistic typing animation
* @param {string} text - The command text to type
*/
async typeCommand(text) {
// Create command line element
const commandDiv = document.createElement('div');
commandDiv.className = 'command-line';
commandDiv.innerHTML = `
<span class="prompt">alexcode@devmachine</span>
<span class="path">~/portfolio</span>
<span class="dollar">$</span>
<span class="command-text"></span>
<span class="cursor">█</span>
`;
this.terminal.appendChild(commandDiv);
this.scrollToBottom();
// Get references to text and cursor elements
const commandText = commandDiv.querySelector('.command-text');
const cursor = commandDiv.querySelector('.cursor');
// Type each character with delay
for (let i = 0; i < text.length; i++) {
commandText.textContent += text[i];
await this.delay(this.typeSpeed);
}
// Hide cursor after typing is complete
cursor.style.display = 'none';
}
/**
* Show a section with smooth fade-in animation
* @param {string} title - Section title
* @param {string} content - Section HTML content
*/
async showSection(title, content) {
// Create section header
const headerDiv = document.createElement('div');
headerDiv.className = 'section-header';
headerDiv.textContent = title;
this.terminal.appendChild(headerDiv);
// Create section content with initial hidden state
const contentDiv = document.createElement('div');
contentDiv.className = 'section-content';
contentDiv.innerHTML = content;
contentDiv.style.opacity = '0';
contentDiv.style.transform = 'translateY(20px)';
this.terminal.appendChild(contentDiv);
this.scrollToBottom();
// Animate content appearance
await this.delay(300);
contentDiv.style.transition = 'all 0.5s ease';
contentDiv.style.opacity = '1';
contentDiv.style.transform = 'translateY(0)';
}
/**
* Smooth scroll to bottom of page
* Used during terminal animation to follow content
*/
scrollToBottom() {
setTimeout(() => {
window.scrollTo({
top: document.body.scrollHeight,
behavior: 'smooth'
});
}, 100);
}
/**
* Create a delay/pause in execution
* @param {number} ms - Milliseconds to delay
* @returns {Promise} Promise that resolves after delay
*/
delay(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
}
/**
* Initialize the terminal portfolio when DOM is ready
*/
document.addEventListener('DOMContentLoaded', () => {
new TerminalPortfolio();
});
</script>
</body>
</html>