Skip to content

Commit 1b17b37

Browse files
authored
Merge pull request #7 from modeitsch/visual-enhancements
feat: Add visual enhancements
2 parents 8bbeb8e + 64417fe commit 1b17b37

4 files changed

Lines changed: 388 additions & 10 deletions

File tree

src/app.css

Lines changed: 205 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -117,25 +117,47 @@ html.dark ::-webkit-scrollbar-thumb:hover {
117117
background-color: rgb(107, 114, 128);
118118
}
119119

120-
/* Code blocks */
120+
/* Code blocks with syntax highlighting */
121121
pre {
122122
background-color: rgb(17, 24, 39);
123123
color: rgb(229, 231, 235);
124-
padding: 1rem;
125-
border-radius: 0.5rem;
124+
padding: 1.25rem;
125+
border-radius: 0.75rem;
126126
overflow-x: auto;
127+
border: 1px solid rgb(55, 65, 81);
128+
position: relative;
129+
font-size: 0.9rem;
130+
line-height: 1.6;
127131
}
128132

129133
html.dark pre {
130-
background-color: rgb(31, 41, 55);
134+
background-color: rgb(17, 24, 39);
135+
border-color: rgb(55, 65, 81);
136+
}
137+
138+
/* Code block with language label */
139+
pre[class*="language-"]::before {
140+
content: attr(class);
141+
position: absolute;
142+
top: 0;
143+
right: 0.75rem;
144+
padding: 0.25rem 0.75rem;
145+
font-size: 0.7rem;
146+
font-weight: 600;
147+
text-transform: uppercase;
148+
letter-spacing: 0.05em;
149+
color: rgb(156, 163, 175);
150+
background: rgb(31, 41, 55);
151+
border-radius: 0 0.5rem 0 0.5rem;
131152
}
132153

133154
code {
134155
background-color: rgb(243, 244, 246);
135156
color: rgb(37, 99, 235);
136-
padding: 0.125rem 0.25rem;
137-
border-radius: 0.25rem;
157+
padding: 0.2rem 0.4rem;
158+
border-radius: 0.375rem;
138159
font-size: 0.875rem;
160+
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
139161
}
140162

141163
html.dark code {
@@ -147,6 +169,84 @@ pre code {
147169
background-color: transparent;
148170
color: rgb(229, 231, 235);
149171
padding: 0;
172+
font-size: inherit;
173+
}
174+
175+
/* Syntax highlighting colors */
176+
.prose pre code .comment,
177+
pre code .comment {
178+
color: rgb(107, 114, 128);
179+
font-style: italic;
180+
}
181+
182+
.prose pre code .keyword,
183+
pre code .keyword {
184+
color: rgb(249, 115, 22);
185+
}
186+
187+
.prose pre code .string,
188+
pre code .string {
189+
color: rgb(52, 211, 153);
190+
}
191+
192+
.prose pre code .number,
193+
pre code .number {
194+
color: rgb(251, 191, 36);
195+
}
196+
197+
.prose pre code .function,
198+
pre code .function {
199+
color: rgb(96, 165, 250);
200+
}
201+
202+
.prose pre code .class-name,
203+
pre code .class-name {
204+
color: rgb(244, 114, 182);
205+
}
206+
207+
.prose pre code .operator,
208+
pre code .operator {
209+
color: rgb(167, 139, 250);
210+
}
211+
212+
.prose pre code .punctuation,
213+
pre code .punctuation {
214+
color: rgb(156, 163, 175);
215+
}
216+
217+
/* Line numbers for code blocks (optional via data attribute) */
218+
pre[data-line-numbers] {
219+
padding-left: 3.5rem;
220+
counter-reset: line;
221+
}
222+
223+
pre[data-line-numbers] code {
224+
counter-increment: line;
225+
}
226+
227+
pre[data-line-numbers] code::before {
228+
content: counter(line);
229+
position: absolute;
230+
left: 0;
231+
width: 2.5rem;
232+
text-align: right;
233+
padding-right: 0.75rem;
234+
color: rgb(75, 85, 99);
235+
border-right: 1px solid rgb(55, 65, 81);
236+
}
237+
238+
/* Code block copy button area (for future enhancement) */
239+
pre:hover::after {
240+
content: 'Code';
241+
position: absolute;
242+
bottom: 0.5rem;
243+
right: 0.5rem;
244+
padding: 0.25rem 0.5rem;
245+
font-size: 0.65rem;
246+
color: rgb(107, 114, 128);
247+
background: rgb(31, 41, 55);
248+
border-radius: 0.25rem;
249+
opacity: 0.5;
150250
}
151251

152252
/* Modern animations */
@@ -377,6 +477,105 @@ html.dark .glass {
377477
opacity: 1;
378478
}
379479

480+
/* Animated gradient border for cards */
481+
.gradient-border {
482+
position: relative;
483+
background: linear-gradient(var(--card-bg, white), var(--card-bg, white)) padding-box,
484+
linear-gradient(135deg,
485+
rgb(37, 99, 235),
486+
rgb(147, 51, 234),
487+
rgb(236, 72, 153),
488+
rgb(37, 99, 235)
489+
) border-box;
490+
border: 2px solid transparent;
491+
background-size: 100% 100%, 300% 300%;
492+
animation: gradient-border-shift 4s ease infinite;
493+
}
494+
495+
html.dark .gradient-border {
496+
--card-bg: rgb(31, 41, 55);
497+
}
498+
499+
@keyframes gradient-border-shift {
500+
0%, 100% {
501+
background-position: 0% 0%, 0% 50%;
502+
}
503+
50% {
504+
background-position: 0% 0%, 100% 50%;
505+
}
506+
}
507+
508+
/* Image hover effects */
509+
.image-hover {
510+
overflow: hidden;
511+
position: relative;
512+
}
513+
514+
.image-hover img {
515+
transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.3s ease;
516+
}
517+
518+
.image-hover:hover img {
519+
transform: scale(1.05);
520+
}
521+
522+
.image-hover::after {
523+
content: '';
524+
position: absolute;
525+
inset: 0;
526+
background: radial-gradient(
527+
circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
528+
rgba(147, 51, 234, 0.15) 0%,
529+
transparent 50%
530+
);
531+
opacity: 0;
532+
transition: opacity 0.3s ease;
533+
pointer-events: none;
534+
}
535+
536+
.image-hover:hover::after {
537+
opacity: 1;
538+
}
539+
540+
/* Profile image glow effect */
541+
.profile-glow {
542+
position: relative;
543+
}
544+
545+
.profile-glow::before {
546+
content: '';
547+
position: absolute;
548+
inset: -4px;
549+
border-radius: 50%;
550+
background: linear-gradient(135deg,
551+
rgb(37, 99, 235),
552+
rgb(147, 51, 234),
553+
rgb(236, 72, 153),
554+
rgb(37, 99, 235)
555+
);
556+
background-size: 300% 300%;
557+
animation: profile-glow-rotate 3s linear infinite;
558+
opacity: 0;
559+
transition: opacity 0.3s ease;
560+
z-index: -1;
561+
}
562+
563+
.profile-glow:hover::before {
564+
opacity: 1;
565+
}
566+
567+
@keyframes profile-glow-rotate {
568+
0% {
569+
background-position: 0% 50%;
570+
}
571+
50% {
572+
background-position: 100% 50%;
573+
}
574+
100% {
575+
background-position: 0% 50%;
576+
}
577+
}
578+
380579
/* Character animation styles */
381580
.char {
382581
display: inline-block;

0 commit comments

Comments
 (0)