Skip to content

Commit fc6953d

Browse files
committed
added the codeline
1 parent 2c09a80 commit fc6953d

File tree

2 files changed

+72
-15
lines changed

2 files changed

+72
-15
lines changed

components/hero.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
<section id="home" class="hero">
2+
<div class="code-background">
3+
<div class="code-line" data-text="import me">import me</div>
4+
<div class="code-line" data-text="me.whoIam()">me.whoIam()</div>
5+
<div class="code-line code-output" data-text=">>> &quot;Rohit&quot;">>>> "Rohit"</div>
6+
</div>
27
<div class="hero-content">
38
<h1>Rohit Kumar</h1>
49
<p>AI Engineer | Deep Learning Engineer | Computer Vision </p>

styles.css

Lines changed: 67 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,64 @@ body {
6464
align-items: center;
6565
justify-content: center;
6666
text-align: center;
67-
background: #ffffff;
67+
background: #2b2b2b; /* Slightly lighter dark background */
6868
padding: 2rem;
69+
position: relative;
70+
overflow: hidden;
71+
}
72+
73+
.code-background {
74+
position: absolute;
75+
top: 0;
76+
left: 0;
77+
width: 100%;
78+
height: 100%;
79+
opacity: 0.3;
80+
font-family: 'Consolas', 'Monaco', monospace;
81+
color: #00ff9d;
82+
font-size: 1.5rem;
83+
display: flex;
84+
flex-direction: column;
85+
justify-content: center;
86+
padding-left: 5%; /* Just a small padding from the left edge */
87+
}
88+
89+
.code-line {
90+
width: auto;
91+
text-align: left;
92+
white-space: pre;
93+
opacity: 0;
94+
}
95+
96+
.code-line:nth-child(1) {
97+
padding-left: 1rem; /* Indent for class */
98+
opacity: 1;
99+
}
100+
101+
.code-line:nth-child(2) {
102+
padding-left: 1rem; /* Indent for method */
103+
opacity: 1;
104+
}
105+
106+
.code-line:nth-child(3) {
107+
padding-left: 1rem; /* Indent for output */
108+
color: #ff9d00;
109+
opacity: 1;
110+
}
111+
112+
.code-output {
113+
color: #00a2ff;
69114
}
70115

71116
.hero-content {
117+
position: relative;
72118
max-width: 800px;
73119
padding: 2rem;
120+
background: rgba(255, 255, 255, 0.98); /* More opaque background */
121+
border-radius: 15px;
122+
box-shadow: 0 4px 20px rgba(0,0,0,0.2); /* Stronger shadow */
123+
z-index: 2;
124+
backdrop-filter: blur(5px); /* Added blur effect */
74125
}
75126

76127
.hero h1 {
@@ -354,6 +405,15 @@ footer {
354405
.timeline-item {
355406
padding: 1.5rem;
356407
}
408+
409+
.code-background {
410+
font-size: 1rem;
411+
}
412+
413+
.hero-content {
414+
padding: 1.5rem;
415+
margin: 0 1rem;
416+
}
357417
}
358418

359419
@media (max-width: 480px) {
@@ -377,20 +437,12 @@ footer {
377437
width: 150px;
378438
height: 150px;
379439
}
380-
}
381-
382-
/* Animations */
383-
@keyframes fadeIn {
384-
from {
385-
opacity: 0;
386-
transform: translateY(20px);
440+
441+
.code-background {
442+
font-size: 0.9rem;
387443
}
388-
to {
389-
opacity: 1;
390-
transform: translateY(0);
444+
445+
.hero-content {
446+
padding: 1rem;
391447
}
392448
}
393-
394-
.hero-content, .about-content, .contact {
395-
animation: fadeIn 1s ease-out;
396-
}

0 commit comments

Comments
 (0)