Skip to content

Commit 04ca2f5

Browse files
committed
Update terminal styles.
1 parent 401fe2b commit 04ca2f5

File tree

2 files changed

+141
-0
lines changed

2 files changed

+141
-0
lines changed

assets/css/style.css

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -958,4 +958,65 @@ footer {
958958
padding: 2rem 4rem;
959959
/* More generous padding for desktop reading */
960960
}
961+
}
962+
963+
/* Terminal Block */
964+
.terminal-wrapper {
965+
padding: 0 3rem;
966+
margin-bottom: 2rem;
967+
max-width: 1400px;
968+
}
969+
970+
.terminal {
971+
font-family: 'Fira Code', 'Courier New', monospace;
972+
background: #1e1e1e;
973+
border-radius: 0.75rem;
974+
padding: 1.5rem;
975+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
976+
font-size: 0.9rem;
977+
line-height: 1.5;
978+
overflow: hidden;
979+
color: #00ff00;
980+
white-space: pre;
981+
border: 1px solid #333;
982+
min-height: 300px;
983+
}
984+
985+
.blink {
986+
display: inline-block;
987+
width: 8px;
988+
height: 1.2em;
989+
background: #00ff00;
990+
animation: terminal-blink 1s steps(2, start) infinite;
991+
vertical-align: middle;
992+
margin-left: 2px;
993+
}
994+
995+
@keyframes terminal-blink {
996+
50% {
997+
background: transparent;
998+
}
999+
}
1000+
1001+
.fade-in {
1002+
opacity: 0;
1003+
animation: terminal-fadeIn 0.2s forwards;
1004+
}
1005+
1006+
@keyframes terminal-fadeIn {
1007+
to {
1008+
opacity: 1;
1009+
}
1010+
}
1011+
1012+
@media (max-width: 768px) {
1013+
.terminal-wrapper {
1014+
padding: 0 1.5rem;
1015+
}
1016+
1017+
.terminal {
1018+
font-size: 0.8rem;
1019+
padding: 1rem;
1020+
min-height: 200px;
1021+
}
9611022
}

index.html

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,14 @@ <h3>Simple & Elegant</h3>
171171

172172
</div>
173173

174+
<!-- Terminal Section -->
175+
<div class="terminal-wrapper">
176+
<div class="terminal" id="terminal-main">
177+
<div id="output-main"></div>
178+
<div class="blink" id="cursor-main"></div>
179+
</div>
180+
</div>
181+
174182
<!-- Features Grid -->
175183
<section class="features-grid">
176184
<div class="feature-item">
@@ -391,6 +399,78 @@ <h4>Zero Configuration</h4>
391399
}
392400
}
393401
}
402+
403+
// Terminal Typing Effect
404+
const commands = [
405+
"$ bin/dispatcher --version",
406+
" _/ ' _ _/ _ _ _/",
407+
" / / /) (/ _) / / (/ ( / 1.7.17",
408+
" /",
409+
" ",
410+
"$ bin/dispatcher --help",
411+
"Usage: bin/dispatcher COMMAND [OPTIONS]",
412+
"Commands:",
413+
" download \tDownload a resource from other servers",
414+
" exec \tTo execute native command(s)",
415+
" generate \tPOJO object generator",
416+
" install \tInstall a package",
417+
" open \tStart a default browser to open the specific URL",
418+
" say \tOutput words",
419+
" set \tSet system property",
420+
" sql-execute \tExecutes the given SQL statement, which may be an INSERT, UPDATE, DELETE, or DDL statement",
421+
" sql-query \tExecutes the given SQL statement, which returns a single ResultSet object",
422+
" update \tUpdate for the latest version",
423+
" ",
424+
"Options:",
425+
" --allow-remote-access\tAllow to be accessed remotely",
426+
" --help \tHelp command",
427+
" --host \tHost name / IP",
428+
" --import \tImport application",
429+
" --logo \tPrint logo",
430+
" --settings \tPrint settings",
431+
" --version \tPrint version",
432+
" ",
433+
"Run 'bin/dispatcher COMMAND --help' for more information on a command.",
434+
" ",
435+
"$ bin/dispatcher say --words Hello --import tinystruct.examples.example",
436+
"Hello",
437+
" ",
438+
"# bin/dispatcher start --import org.tinystruct.system.NettyHttpServer --server-port 777",
439+
" ",
440+
" _/ ' _ _/ _ _ _/",
441+
" / / /) (/ _) / / (/ ( / 1.7.17",
442+
" /",
443+
" ",
444+
`${new Date().toLocaleString()} org.tinystruct.system.NettyHttpServer start`,
445+
"INFO: Netty server (777) startup in 30 ms"
446+
];
447+
448+
const outputMain = document.getElementById('output-main');
449+
const cursorMain = document.getElementById('cursor-main');
450+
451+
let i = 0;
452+
453+
function typeCommands() {
454+
if (i < commands.length) {
455+
const line = commands[i];
456+
const textDiv = document.createElement('div');
457+
textDiv.textContent = line;
458+
textDiv.classList.add('fade-in');
459+
outputMain.appendChild(textDiv);
460+
i++;
461+
462+
// Auto scroll to bottom
463+
const terminal = document.getElementById('terminal-main');
464+
terminal.scrollTop = terminal.scrollHeight;
465+
466+
setTimeout(typeCommands, 100);
467+
} else {
468+
// Keep cursor blinking at the end
469+
}
470+
}
471+
472+
// Start typing after a short delay
473+
setTimeout(typeCommands, 1000);
394474
</script>
395475
</body>
396476

0 commit comments

Comments
 (0)