Skip to content

Commit 9f27e98

Browse files
Fixing the UI and making it cleaner
1 parent a60339d commit 9f27e98

File tree

6 files changed

+506
-96
lines changed

6 files changed

+506
-96
lines changed

app/global.css

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,7 @@
7171
color: rgba(255, 255, 255, 0.8) !important;
7272
}
7373

74-
.nextra-footer a,
75-
footer a {
76-
color: #f783ac !important;
77-
transition: color 0.2s ease !important;
78-
}
7974

80-
.nextra-footer a:hover,
81-
footer a:hover {
82-
color: #f56565 !important;
83-
}
8475

8576
/* Force override all Nextra backgrounds */
8677
[class*="nextra"] {

app/page.module.css

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,32 @@
180180
font-size: 0.875rem;
181181
line-height: 1.6;
182182
white-space: pre-wrap;
183-
min-height: 200px;
183+
height: 250px;
184+
max-height: 250px;
185+
overflow-y: auto;
184186
margin: 0;
187+
padding: 1rem;
188+
scrollbar-width: thin;
189+
scrollbar-color: var(--mantine-color-dark-6) var(--mantine-color-dark-9);
190+
}
191+
192+
/* Custom scrollbar styles for webkit browsers */
193+
.terminalContent::-webkit-scrollbar {
194+
width: 8px;
195+
}
196+
197+
.terminalContent::-webkit-scrollbar-track {
198+
background: var(--mantine-color-dark-9);
199+
border-radius: 4px;
200+
}
201+
202+
.terminalContent::-webkit-scrollbar-thumb {
203+
background: var(--mantine-color-dark-6);
204+
border-radius: 4px;
205+
}
206+
207+
.terminalContent::-webkit-scrollbar-thumb:hover {
208+
background: var(--mantine-color-dark-5);
185209
}
186210

187211
.carouselContainer {

app/page.tsx

Lines changed: 55 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
'use client';
2121

22-
import { useState, useEffect } from 'react';
22+
import { useState, useEffect, useRef } from 'react';
2323
import {
2424
Container,
2525
Title,
@@ -94,6 +94,7 @@ export default function ResilientDBLanding() {
9494
const [typewriterText, setTypewriterText] = useState('');
9595
const [currentLine, setCurrentLine] = useState(0);
9696
const [currentIndex, setCurrentIndex] = useState(Math.floor((ecosystemProjects.length - 3) / 2));
97+
const terminalRef = useRef<HTMLPreElement>(null);
9798

9899
const terminalLines = [
99100
'🔗 ResilientDB Node Dependencies:',
@@ -115,6 +116,13 @@ export default function ResilientDBLanding() {
115116
}
116117
}, [currentLine, terminalLines]);
117118

119+
// Auto-scroll to bottom when text updates
120+
useEffect(() => {
121+
if (terminalRef.current) {
122+
terminalRef.current.scrollTop = terminalRef.current.scrollHeight;
123+
}
124+
}, [typewriterText]);
125+
118126
const cardWidth = 320;
119127
const canGoNext = currentIndex < ecosystemProjects.length - 3;
120128
const canGoPrev = currentIndex > 0;
@@ -288,11 +296,26 @@ export default function ResilientDBLanding() {
288296
<Text
289297
component={Link}
290298
href="https://resilientdb.com/"
291-
c="pink"
292-
td="underline"
293299
style={{
294-
transition: 'color 0.2s ease',
295-
cursor: 'pointer'
300+
color: '#51cf66',
301+
textDecoration: 'none',
302+
padding: '2px 6px',
303+
borderRadius: '4px',
304+
background: 'rgba(81, 207, 102, 0.1)',
305+
border: '1px solid rgba(81, 207, 102, 0.2)',
306+
transition: 'all 0.3s ease',
307+
cursor: 'pointer',
308+
fontWeight: 500
309+
}}
310+
onMouseEnter={(e) => {
311+
e.currentTarget.style.background = 'rgba(81, 207, 102, 0.2)';
312+
e.currentTarget.style.borderColor = 'rgba(81, 207, 102, 0.4)';
313+
e.currentTarget.style.transform = 'translateY(-1px)';
314+
}}
315+
onMouseLeave={(e) => {
316+
e.currentTarget.style.background = 'rgba(81, 207, 102, 0.1)';
317+
e.currentTarget.style.borderColor = 'rgba(81, 207, 102, 0.2)';
318+
e.currentTarget.style.transform = 'translateY(0)';
296319
}}
297320
>
298321
the official website
@@ -382,15 +405,21 @@ export default function ResilientDBLanding() {
382405
</Group>
383406

384407
<Box
408+
ref={terminalRef}
385409
component="pre"
386410
style={{
387411
color: '#51cf66',
388412
fontFamily: "'Monaco', 'Menlo', 'Ubuntu Mono', monospace",
389413
fontSize: '0.875rem',
390414
lineHeight: 1.6,
391415
whiteSpace: 'pre-wrap',
392-
minHeight: '200px',
393-
margin: 0
416+
height: '250px',
417+
maxHeight: '250px',
418+
overflowY: 'auto',
419+
margin: 0,
420+
padding: '1rem',
421+
scrollbarWidth: 'thin',
422+
scrollbarColor: '#373a40 #1a1b23'
394423
}}
395424
>
396425
{typewriterText}
@@ -411,14 +440,29 @@ export default function ResilientDBLanding() {
411440
<Text
412441
component={Link}
413442
href="https://github.com/ResilientApp"
414-
c="pink"
415-
td="underline"
416443
style={{
417-
transition: 'color 0.2s ease',
444+
color: '#51cf66',
445+
textDecoration: 'none',
446+
padding: '6px 12px',
447+
borderRadius: '6px',
448+
background: 'rgba(81, 207, 102, 0.1)',
449+
border: '1px solid rgba(81, 207, 102, 0.2)',
450+
transition: 'all 0.3s ease',
418451
cursor: 'pointer',
452+
fontWeight: 500,
419453
display: 'inline-flex',
420454
alignItems: 'center',
421-
gap: '4px'
455+
gap: '6px'
456+
}}
457+
onMouseEnter={(e) => {
458+
e.currentTarget.style.background = 'rgba(81, 207, 102, 0.2)';
459+
e.currentTarget.style.borderColor = 'rgba(81, 207, 102, 0.4)';
460+
e.currentTarget.style.transform = 'translateY(-1px)';
461+
}}
462+
onMouseLeave={(e) => {
463+
e.currentTarget.style.background = 'rgba(81, 207, 102, 0.1)';
464+
e.currentTarget.style.borderColor = 'rgba(81, 207, 102, 0.2)';
465+
e.currentTarget.style.transform = 'translateY(0)';
422466
}}
423467
>
424468
Visit the ResilientDB Hub for more projects

0 commit comments

Comments
 (0)