CHANGE: Last iteration with Gemini. It's a bit dumb :D
This commit is contained in:
13
Dockerfile
13
Dockerfile
@@ -1,8 +1,13 @@
|
||||
# Use the official Nginx image from Docker Hub
|
||||
# Use the official lightweight Nginx image
|
||||
FROM nginx:alpine
|
||||
|
||||
# Copy index.html to the default Nginx public folder
|
||||
COPY index.html /usr/share/nginx/html/
|
||||
# Set the working directory inside the container
|
||||
WORKDIR /usr/share/nginx/html
|
||||
|
||||
# Listen on port 80
|
||||
# Copy all project files from the build context to the working directory
|
||||
# The '.' means 'copy everything from the current folder (my-portfolio)'
|
||||
# into the WORKDIR of the container. This is the key fix.
|
||||
COPY . .
|
||||
|
||||
# Expose port 80 to the Docker host
|
||||
EXPOSE 80
|
||||
478
index.html
478
index.html
@@ -4,325 +4,89 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Maksym Buz - Making Technology Work</title>
|
||||
<link rel="icon" type="image/png" href="favicon.png">
|
||||
<link rel="icon" type="image/png" href="favicon.png">
|
||||
<style>
|
||||
/* --- Google Font Import --- */
|
||||
/* --- COMMENTS ARE IN ENGLISH AS REQUESTED --- */
|
||||
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;900&family=Inter:wght@400;500;600&display=swap');
|
||||
|
||||
/* --- CSS Variables (Root) --- */
|
||||
:root {
|
||||
--bg-dark-blue: #121826;
|
||||
--bg-light-blue: #1A2035;
|
||||
--bg-color: #121826;
|
||||
--card-bg-color: #1A2035;
|
||||
--text-color: #E0E0E0;
|
||||
--accent-color: #00BFFF;
|
||||
--card-bg-color: #1A2035;
|
||||
--header-font: 'Montserrat', sans-serif;
|
||||
--body-font: 'Inter', sans-serif;
|
||||
}
|
||||
|
||||
/* --- Base & Reset --- */
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html {
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
/* FIX: Body now has a gradient for a smooth transition from hero to content */
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
html { scroll-behavior: smooth; }
|
||||
body {
|
||||
background: linear-gradient(180deg, var(--bg-light-blue) 0%, var(--bg-dark-blue) 30%);
|
||||
background-color: var(--bg-color);
|
||||
color: var(--text-color);
|
||||
font-family: var(--body-font);
|
||||
line-height: 1.7;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
/* The modal-open class will be toggled on the body */
|
||||
body.modal-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* --- Dynamic Background --- */
|
||||
/* FIX: Background is now absolute, so it scrolls with the page */
|
||||
#dynamic-bg {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
/* --- The Engine Room (Hero Section) --- */
|
||||
.engine-room {
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
padding: 0 1rem;
|
||||
}
|
||||
|
||||
/* FIX: Re-added a soft overlay for text readability */
|
||||
.engine-room::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: radial-gradient(ellipse at center, rgba(26, 32, 53, 0.4) 0%, rgba(18, 24, 38, 0.9) 80%);
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
.hero-content {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
animation: fadeIn 1.5s ease-out;
|
||||
}
|
||||
|
||||
.engine-room h1 {
|
||||
font-family: var(--header-font);
|
||||
font-size: clamp(3rem, 7vw, 6rem);
|
||||
font-weight: 900;
|
||||
letter-spacing: -2px;
|
||||
margin-bottom: 1rem;
|
||||
text-shadow: 0 0 20px rgba(0, 191, 255, 0.3);
|
||||
}
|
||||
|
||||
.scroll-cue {
|
||||
position: absolute;
|
||||
bottom: 2rem;
|
||||
z-index: 1;
|
||||
color: var(--text-color);
|
||||
text-decoration: none;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
animation: pulse 2s infinite;
|
||||
}
|
||||
|
||||
/* --- The Toolkit (Main Content) --- */
|
||||
.toolkit {
|
||||
max-width: 960px;
|
||||
margin: 0 auto;
|
||||
padding: 6rem 1.5rem;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.section {
|
||||
margin-bottom: 5rem;
|
||||
opacity: 0;
|
||||
transform: translateY(30px);
|
||||
transition: opacity 0.6s ease-out, transform 0.6s ease-out;
|
||||
}
|
||||
|
||||
.section.is-visible {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.profile-header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
margin-bottom: 4rem;
|
||||
}
|
||||
|
||||
.profile-pic {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
border-radius: 50%;
|
||||
border: 4px solid var(--accent-color);
|
||||
margin-bottom: 1.5rem;
|
||||
box-shadow: 0 0 25px rgba(0, 191, 255, 0.3);
|
||||
object-fit: cover; /* Ensures the image covers the area without distortion */
|
||||
}
|
||||
|
||||
.contact-links {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 2rem;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
.contact-links a:hover {
|
||||
transform: translateY(-3px);
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-family: var(--header-font);
|
||||
font-size: 2.5rem;
|
||||
margin-bottom: 2.5rem;
|
||||
text-align: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.section-title::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: -10px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 80px;
|
||||
height: 4px;
|
||||
background-color: var(--accent-color);
|
||||
}
|
||||
|
||||
/* --- FIX: Restyled Technologies section for a balanced 2x2 grid --- */
|
||||
.technologies-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
grid-auto-rows: 1fr; /* Ensures all cards in the grid have the same height */
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.card {
|
||||
background-color: var(--card-bg-color);
|
||||
padding: 2rem;
|
||||
border-radius: 12px;
|
||||
border: 1px solid #2a3149;
|
||||
transition: transform 0.3s ease, border-color 0.3s ease;
|
||||
display: flex;
|
||||
flex-direction: column; /* Align content inside card */
|
||||
}
|
||||
|
||||
.card:hover {
|
||||
transform: translateY(-5px);
|
||||
border-color: var(--accent-color);
|
||||
}
|
||||
|
||||
.card h3 {
|
||||
font-family: var(--header-font);
|
||||
font-size: 1.5rem;
|
||||
color: var(--accent-color);
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.skill-tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.75rem;
|
||||
margin-top: auto; /* Pushes tags to the bottom of the card */
|
||||
}
|
||||
|
||||
/* FIX: New styles for Homelab list items */
|
||||
.homelab-list {
|
||||
list-style: none;
|
||||
margin-top: 1.5rem;
|
||||
margin-bottom: 1.5rem;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.homelab-list li {
|
||||
position: relative;
|
||||
padding-left: 2rem;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.homelab-list li::before {
|
||||
content: '⚙️'; /* Gear emoji as bullet point */
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
||||
.homelab-goal {
|
||||
font-style: italic;
|
||||
opacity: 0.8;
|
||||
margin-top: 1.5rem;
|
||||
}
|
||||
|
||||
/* --- NEW: Modal Styles --- */
|
||||
.modal-overlay {
|
||||
body.modal-open { overflow: hidden; }
|
||||
.page-background {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.7);
|
||||
backdrop-filter: blur(5px);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 1000;
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: opacity 0.3s ease, visibility 0.3s ease;
|
||||
}
|
||||
|
||||
body.modal-open .modal-overlay {
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background-color: var(--card-bg-color);
|
||||
padding: 3rem;
|
||||
border-radius: 12px;
|
||||
border: 1px solid var(--accent-color);
|
||||
position: relative;
|
||||
text-align: center;
|
||||
transform: scale(0.9);
|
||||
transition: transform 0.3s ease;
|
||||
}
|
||||
|
||||
body.modal-open .modal-content {
|
||||
transform: scale(1);
|
||||
}
|
||||
|
||||
.modal-close {
|
||||
position: absolute;
|
||||
top: 1rem;
|
||||
right: 1rem;
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--text-color);
|
||||
font-size: 2rem;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.modal-content h2 {
|
||||
font-family: var(--header-font);
|
||||
color: var(--accent-color);
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
|
||||
/* --- Responsive Design --- */
|
||||
@media (max-width: 768px) {
|
||||
.technologies-grid {
|
||||
grid-template-columns: 1fr; /* Stack cards on mobile */
|
||||
}
|
||||
z-index: -1;
|
||||
background-color: var(--bg-color);
|
||||
background-image:
|
||||
radial-gradient(circle at 25% 25%, rgba(0, 191, 255, 0.1), transparent 30%),
|
||||
radial-gradient(circle at 75% 75%, rgba(0, 191, 255, 0.08), transparent 40%);
|
||||
}
|
||||
.engine-room { height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; position: relative; padding: 0 1rem; }
|
||||
.hero-content { position: relative; z-index: 1; animation: fadeIn 1.5s ease-out; }
|
||||
.engine-room h1 { font-family: var(--header-font); font-size: clamp(3rem, 7vw, 6rem); font-weight: 900; letter-spacing: -2px; margin-bottom: 1rem; text-shadow: 0 0 20px rgba(0, 191, 255, 0.3); }
|
||||
.scroll-cue { position: absolute; bottom: 2rem; z-index: 1; text-decoration: none; color: var(--text-color); display: flex; flex-direction: column; align-items: center; gap: 0.5rem; animation: pulse 2s infinite; }
|
||||
.toolkit { max-width: 960px; margin: 0 auto; padding: 6rem 1.5rem; position: relative; z-index: 1; }
|
||||
.section { margin-bottom: 5rem; opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
|
||||
.section.is-visible { opacity: 1; transform: translateY(0); }
|
||||
.profile-header { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 4rem; }
|
||||
.profile-pic { width: 150px; height: 150px; border-radius: 50%; border: 4px solid var(--accent-color); margin-bottom: 1.5rem; box-shadow: 0 0 25px rgba(0, 191, 255, 0.3); object-fit: cover; }
|
||||
.contact-links { display: flex; justify-content: center; gap: 2rem; margin-top: 2rem; }
|
||||
.contact-links a { color: var(--text-color); transition: color 0.3s ease, transform 0.3s ease; }
|
||||
.contact-links a:hover { color: var(--accent-color); transform: translateY(-3px); }
|
||||
.section-title { font-family: var(--header-font); font-size: 2.5rem; margin-bottom: 2.5rem; text-align: center; position: relative; }
|
||||
.section-title::after { content: ''; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 80px; height: 4px; background-color: var(--accent-color); }
|
||||
.technologies-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); grid-auto-rows: 1fr; gap: 1.5rem; }
|
||||
.card { background-color: var(--card-bg-color); padding: 2rem; border-radius: 12px; border: 1px solid #2a3149; transition: transform 0.3s ease, border-color 0.3s ease; display: flex; flex-direction: column; }
|
||||
.card:hover { transform: translateY(-5px); border-color: var(--accent-color); }
|
||||
.card h3 { font-family: var(--header-font); font-size: 1.5rem; color: var(--accent-color); margin-bottom: 1rem; }
|
||||
.card p { color: var(--text-color); opacity: 0.8; }
|
||||
.skill-tags { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: auto; }
|
||||
.tag { background-color: var(--bg-color); color: var(--text-color); padding: 0.5rem 1rem; border-radius: 20px; font-size: 0.9rem; font-weight: 500; border: 1px solid transparent; transition: all 0.3s ease; }
|
||||
.tag:hover { color: var(--accent-color); border-color: var(--accent-color); }
|
||||
.experience-card { background-color: var(--card-bg-color); padding: 2.5rem; border-radius: 12px; }
|
||||
.experience-list { list-style: none; }
|
||||
.experience-list li { position: relative; padding-left: 2rem; margin-bottom: 1rem; }
|
||||
.experience-list li::before { content: '⚡'; position: absolute; left: 0; top: 0; color: var(--accent-color); font-size: 1.2rem; }
|
||||
.homelab-list { list-style: none; margin: 1.5rem 0; text-align: left; }
|
||||
.homelab-list li { position: relative; padding-left: 2rem; margin-bottom: 1rem; }
|
||||
.homelab-list li::before { content: '⚙️'; position: absolute; left: 0; top: 0; font-size: 1.2rem; }
|
||||
.homelab-goal { font-style: italic; opacity: 0.8; margin-top: 1.5rem; }
|
||||
.cta-button { font-family: var(--header-font); background-color: var(--accent-color); color: var(--bg-color); font-size: 1.2rem; font-weight: 700; padding: 1rem 3rem; border: 2px solid var(--accent-color); border-radius: 8px; text-decoration: none; text-transform: uppercase; letter-spacing: 1px; transition: all 0.3s ease; cursor: pointer; }
|
||||
.cta-button:hover { background-color: transparent; color: var(--accent-color); }
|
||||
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(5px); display: flex; justify-content: center; align-items: center; z-index: 1000; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; }
|
||||
body.modal-open .modal-overlay { opacity: 1; visibility: visible; }
|
||||
.modal-content { background-color: var(--card-bg-color); padding: 3rem; border-radius: 12px; border: 1px solid var(--accent-color); position: relative; text-align: center; transform: scale(0.9); transition: transform 0.3s ease; }
|
||||
body.modal-open .modal-content { transform: scale(1); }
|
||||
.modal-close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; color: var(--text-color); font-size: 2rem; cursor: pointer; }
|
||||
.modal-content h2 { font-family: var(--header-font); color: var(--accent-color); margin-bottom: 2rem; }
|
||||
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
|
||||
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 0.7; } 50% { transform: scale(1.05); opacity: 1; } }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<canvas id="dynamic-bg"></canvas>
|
||||
|
||||
<div class="page-background"></div>
|
||||
<header class="engine-room" id="home">
|
||||
<div class="hero-content">
|
||||
<h1>Making Technology Work</h1>
|
||||
</div>
|
||||
<a href="#toolkit" class="scroll-cue">
|
||||
<span>Explore the Toolkit</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="24" height="24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3" />
|
||||
</svg>
|
||||
</a>
|
||||
<div class="hero-content"><h1>Making Technology Work</h1></div>
|
||||
<a href="#toolkit" class="scroll-cue"><span>Explore the Toolkit</span><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" width="24" height="24"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3" /></svg></a>
|
||||
</header>
|
||||
|
||||
<main class="toolkit" id="toolkit">
|
||||
|
||||
<section class="profile-header section">
|
||||
<img src="profile.jpg" alt="Maksym Buz Profile Picture" class="profile-pic">
|
||||
<h1>Maksym Buz</h1>
|
||||
@@ -333,34 +97,19 @@
|
||||
<a href="https://t.me/mx_bz" target="_blank" rel="noopener noreferrer" title="Telegram"><svg viewBox="0 0 24 24" fill="currentColor" width="32" height="32"><path d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.17.91-.494 1.202-.82 1.23-.698.054-1.22-.43-1.864-.848-.994-.65-1.55-1.05-2.52-1.682a.295.295 0 0 1-.088-.187l.002-.002c.02-.193.18-1.63.18-1.63l4.125-3.824a.43.43 0 0 0-.14-.333.433.433 0 0 0-.376-.027l-5.12 3.22a2.31 2.31 0 0 1-1.012.318.89.89 0 0 1-.72-.315c-.2-.224-.27-.453-.25-.662.015-.17.06-.39.13-.666l2.12-6.72a2.034 2.034 0 0 1 .64-1.1c.32-.27.703-.418 1.14-.418.12-.002.39.01.69.055z"/></svg></a>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<h2 class="section-title">Technologies & Tools</h2>
|
||||
<div class="technologies-grid">
|
||||
<div class="card">
|
||||
<h3>Core Languages</h3>
|
||||
<div class="skill-tags"><span class="tag">Python</span><span class="tag">Bash</span><span class="tag">SQL</span></div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h3>Infrastructure & Automation</h3>
|
||||
<div class="skill-tags"><span class="tag">Linux</span><span class="tag">Ansible</span><span class="tag">Docker</span><span class="tag">Proxmox</span><span class="tag">Git</span><span class="tag">IaC Principles</span></div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h3>Monitoring & Observability</h3>
|
||||
<div class="skill-tags"><span class="tag">Zabbix</span><span class="tag">SNMP</span></div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<h3>Databases & APIs</h3>
|
||||
<div class="skill-tags"><span class="tag">PostgreSQL</span><span class="tag">MySQL</span><span class="tag">REST API</span><span class="tag">JSON</span></div>
|
||||
</div>
|
||||
<div class="card"><h3>Core Languages</h3><div class="skill-tags"><span class="tag">Python</span><span class="tag">Bash</span><span class="tag">SQL</span></div></div>
|
||||
<div class="card"><h3>Infrastructure & Automation</h3><div class="skill-tags"><span class="tag">Linux</span><span class="tag">Ansible</span><span class="tag">Docker</span><span class="tag">Proxmox</span><span class="tag">Git</span></div></div>
|
||||
<div class="card"><h3>Databases & APIs</h3><div class="skill-tags"><span class="tag">PostgreSQL</span><span class="tag">MySQL</span><span class="tag">REST API</span><span class="tag">JSON</span></div></div>
|
||||
<div class="card"><h3>IaC & Monitoring</h3><div class="skill-tags"><span class="tag">IaC Principles</span><span class="tag">Zabbix</span><span class="tag">SNMP</span></div></div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<h2 class="section-title">Professional Experience</h2>
|
||||
<div class="card experience-card">
|
||||
<p style="font-size: 1.1rem; opacity: 0.9;">A results-oriented engineer with a proven track record in both corporate IT and specialized product environments. My career is focused on enhancing system reliability, automating complex processes, and delivering high-value, turnkey projects.</p>
|
||||
<br>
|
||||
<p>A results-oriented engineer with a proven track record in both corporate IT and specialized product environments. My career is focused on enhancing system reliability, automating complex processes, and delivering high-value, turnkey projects.</p>
|
||||
<ul class="experience-list">
|
||||
<li>Led the end-to-end delivery of enterprise-grade monitoring solutions, ensuring stability for high-stakes client infrastructures.</li>
|
||||
<li>Developed robust automation scripts (Python, Bash, Ansible) that significantly reduced manual deployment times and operational errors.</li>
|
||||
@@ -369,25 +118,22 @@
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="section">
|
||||
<h2 class="section-title">Personal R&D: The Homelab</h2>
|
||||
<div class="card homelab-section">
|
||||
<div class="card">
|
||||
<p>Beyond professional duties, my passion for engineering thrives in my Homelab. It's my dedicated space for hands-on experimentation and mastering complex system deployments. Key features include:</p>
|
||||
<ul class="homelab-list">
|
||||
<li>A multi-node virtualization environment using Proxmox and Docker.</li>
|
||||
<li>A self-contained Git service for personal project version control.</li>
|
||||
<li>Dozens of self-hosted multimedia and productivity services.</li>
|
||||
</ul>
|
||||
<p class="homelab-goal">My primary objective is the complete automation of this entire infrastructure.</p>
|
||||
<p class="homelab-goal">The complete automation of this entire infrastructure is my primary objective.</p>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="cta-section section">
|
||||
<button id="cta-button" class="cta-button">Let's Build a Solution</button>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
<div id="contact-modal" class="modal-overlay">
|
||||
<div class="modal-content">
|
||||
<button id="close-modal" class="modal-close">×</button>
|
||||
@@ -402,97 +148,7 @@
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// --- Dynamic Background Script ---
|
||||
const canvas = document.getElementById('dynamic-bg');
|
||||
const ctx = canvas.getContext('2d');
|
||||
let animationFrameId;
|
||||
|
||||
function setupCanvas() {
|
||||
canvas.width = window.innerWidth;
|
||||
canvas.height = document.documentElement.scrollHeight; // Make canvas as tall as the whole page
|
||||
particlesArray = [];
|
||||
let numberOfParticles = (canvas.height * canvas.width) / 12000; // Adjusted density
|
||||
for (let i = 0; i < numberOfParticles; i++) {
|
||||
let size = (Math.random() * 2) + 1;
|
||||
let x = (Math.random() * ((innerWidth - size * 2) - (size * 2)) + size * 2);
|
||||
let y = (Math.random() * ((innerHeight - size * 2) - (size * 2)) + size * 2);
|
||||
let directionX = (Math.random() * 0.4) - 0.2;
|
||||
let directionY = (Math.random() * 0.4) - 0.2;
|
||||
particlesArray.push(new Particle(x, y, directionX, directionY, size));
|
||||
}
|
||||
}
|
||||
|
||||
class Particle {
|
||||
constructor(x, y, directionX, directionY, size) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.directionX = directionX;
|
||||
this.directionY = directionY;
|
||||
this.size = size;
|
||||
}
|
||||
draw() {
|
||||
ctx.beginPath();
|
||||
ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2, false);
|
||||
ctx.fillStyle = 'rgba(0, 191, 255, 0.5)';
|
||||
ctx.fill();
|
||||
}
|
||||
update() {
|
||||
if (this.x > canvas.width || this.x < 0) { this.directionX = -this.directionX; }
|
||||
if (this.y > canvas.height || this.y < 0) { this.directionY = -this.directionY; }
|
||||
this.x += this.directionX;
|
||||
this.y += this.directionY;
|
||||
this.draw();
|
||||
}
|
||||
}
|
||||
|
||||
function connect() {
|
||||
let opacityValue = 1;
|
||||
for (let a = 0; a < particlesArray.length; a++) {
|
||||
for (let b = a; b < particlesArray.length; b++) {
|
||||
let distance = ((particlesArray[a].x - particlesArray[b].x) ** 2) + ((particlesArray[a].y - particlesArray[b].y) ** 2);
|
||||
if (distance < (canvas.width / 7) * (canvas.height / 7)) {
|
||||
opacityValue = 1 - (distance / 20000);
|
||||
ctx.strokeStyle = `rgba(0, 191, 255, ${opacityValue})`;
|
||||
ctx.lineWidth = 1;
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(particlesArray[a].x, particlesArray[a].y);
|
||||
ctx.lineTo(particlesArray[b].x, particlesArray[b].y);
|
||||
ctx.stroke();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function animate() {
|
||||
animationFrameId = requestAnimationFrame(animate);
|
||||
ctx.clearRect(0, 0, innerWidth, innerHeight);
|
||||
for (let i = 0; i < particlesArray.length; i++) {
|
||||
particlesArray[i].update();
|
||||
}
|
||||
connect();
|
||||
}
|
||||
|
||||
// Debounce function to limit how often a function can run
|
||||
function debounce(func, delay) {
|
||||
let timeout;
|
||||
return function(...args) {
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(() => func.apply(this, args), delay);
|
||||
};
|
||||
}
|
||||
|
||||
const handleResize = debounce(() => {
|
||||
cancelAnimationFrame(animationFrameId);
|
||||
setupCanvas();
|
||||
animate();
|
||||
}, 250);
|
||||
|
||||
window.addEventListener('resize', handleResize);
|
||||
|
||||
setupCanvas();
|
||||
animate();
|
||||
|
||||
// --- Scroll Animation Observer ---
|
||||
// This script fades in sections as they become visible on scroll
|
||||
const sections = document.querySelectorAll('.section');
|
||||
const observer = new IntersectionObserver(entries => {
|
||||
entries.forEach(entry => {
|
||||
@@ -503,7 +159,7 @@
|
||||
}, { threshold: 0.1 });
|
||||
sections.forEach(section => observer.observe(section));
|
||||
|
||||
// --- NEW: Modal Logic ---
|
||||
// This script controls the contact modal
|
||||
const ctaButton = document.getElementById('cta-button');
|
||||
const modal = document.getElementById('contact-modal');
|
||||
const closeModalButton = document.getElementById('close-modal');
|
||||
@@ -514,7 +170,7 @@
|
||||
ctaButton.addEventListener('click', openModal);
|
||||
closeModalButton.addEventListener('click', closeModal);
|
||||
modal.addEventListener('click', (event) => {
|
||||
if (event.target === modal) { // Close if clicked on the overlay itself
|
||||
if (event.target === modal) { // Close if clicked on the overlay
|
||||
closeModal();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user