@@ -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