|
219 | 219 | margin: 0.5rem 0; |
220 | 220 | } |
221 | 221 | } |
| 222 | + |
| 223 | + .terminal { |
| 224 | + font-family: 'Courier New', monospace; |
| 225 | + background: #1e1e1e; |
| 226 | + border-radius: 8px; |
| 227 | + padding: 20px; |
| 228 | + box-shadow: 0 0 10px rgba(0, 255, 0, 0.5); |
| 229 | + font-size: 16px; |
| 230 | + line-height: 1.5; |
| 231 | + overflow: hidden; |
| 232 | + color: #00ff00; |
| 233 | + white-space: pre; /* Preserve spaces and tabs */ |
| 234 | + } |
| 235 | + .output { |
| 236 | + margin-top: 10px; |
| 237 | + } |
| 238 | + .command { |
| 239 | + color: #ffffff; |
| 240 | + } |
| 241 | + .blink { |
| 242 | + display: inline-block; |
| 243 | + width: 10px; |
| 244 | + background: #00ff00; |
| 245 | + animation: blink 1s steps(2, start) infinite; |
| 246 | + } |
| 247 | + @keyframes blink { |
| 248 | + 50% { background: transparent; } |
| 249 | + } |
| 250 | + .highlight { |
| 251 | + color: #ffcc00; |
| 252 | + } |
| 253 | + .fade-in { |
| 254 | + opacity: 0; |
| 255 | + animation: fadeIn 1s forwards; |
| 256 | + } |
| 257 | + @keyframes fadeIn { |
| 258 | + to { opacity: 1; } |
| 259 | + } |
| 260 | + .urls a { |
| 261 | + color: #4caf50; |
| 262 | + text-decoration: none; |
| 263 | + } |
| 264 | + .urls a:hover { |
| 265 | + text-decoration: underline; |
| 266 | + } |
222 | 267 | </style> |
223 | 268 | </head> |
224 | 269 | <body> |
|
249 | 294 | <div class="container" id="about"> |
250 | 295 | <h2 class="lang" data-en="What is tinystruct?" data-fr="Qu'est-ce que tinystruct?" data-de="Was ist tinystruct?" data-zh="什么是 tinystruct?">What is tinystruct?</h2> |
251 | 296 | <p class="lang" data-en="tinystruct is a lightweight Java framework designed to simplify application development by emphasizing simplicity and performance. Its core philosophy is encapsulated in the motto: 'Simplicity is difficult, while complexity is easy. Better thinking leads to better design.'" data-fr="tinystruct est un framework Java léger conçu pour simplifier le développement d'applications en mettant l'accent sur la simplicité et les performances. Sa philosophie centrale est résumée dans la devise : 'La simplicité est difficile, tandis que la complexité est facile. Une meilleure réflexion conduit à une meilleure conception.'" data-de="tinystruct ist ein leichtgewichtiges Java-Framework, das entwickelt wurde, um die Anwendungsentwicklung durch Betonung von Einfachheit und Leistung zu vereinfachen. Die zentrale Philosophie ist im Motto zusammengefasst: 'Einfachheit ist schwierig, während Komplexität einfach ist. Besseres Denken führt zu besserem Design.'" data-zh="tinystruct 是一个轻量级的 Java 框架,旨在通过强调简单性和性能来简化应用程序开发。其核心理念总结在座右铭中:‘简单是困难的,而复杂是容易的。更好的思考带来更好的设计。’">tinystruct is a lightweight Java framework designed to simplify application development by emphasizing simplicity and performance. Its core philosophy is encapsulated in the motto: 'Simplicity is difficult, while complexity is easy. Better thinking leads to better design.'</p> |
| 297 | + <!-- Main Terminal --> |
| 298 | + <div class="terminal" id="terminal-main"><div id="output-main"></div><div class="blink" id="cursor-main"></div></div> |
252 | 299 |
|
253 | 300 | <h2 id="features" class="lang" data-en="Key Features" data-fr="Caractéristiques principales" data-de="Hauptfunktionen" data-zh="主要特点">Key Features</h2> |
254 | 301 | <ul> |
@@ -318,6 +365,7 @@ <h2 id="installation" class="lang" data-en="Installation and Getting Started" da |
318 | 365 | } |
319 | 366 | </code><button class="copy-btn" onclick="copyCode(this)">Copy</button> |
320 | 367 | </pre> |
| 368 | + <div class="terminal" id="terminal-secondary"><div id="output-secondary"></div><div class="blink" id="cursor-secondary"></div></div> |
321 | 369 | <a href="https://github.com/tinystruct/tinystruct" class="btn" target="_blank">GitHub Repository</a> |
322 | 370 | <a href="https://mvnrepository.com/artifact/org.tinystruct/tinystruct" class="btn" target="_blank">Maven Repository</a> |
323 | 371 |
|
@@ -363,6 +411,87 @@ <h2>Why Choose Tinystruct?</h2> |
363 | 411 | console.error('Failed to copy code:', err); |
364 | 412 | }); |
365 | 413 | } |
| 414 | + |
| 415 | + const mainCommands = [ |
| 416 | + "$ bin/dispatcher --version", |
| 417 | + " _/ ' _ _/ _ _ _/", |
| 418 | + " / / /) (/ _) / / (/ ( / 1.4.5", |
| 419 | + " /", |
| 420 | + " ", |
| 421 | + "$ bin/dispatcher --help", |
| 422 | + "Usage: bin/dispatcher COMMAND [OPTIONS]", |
| 423 | + "Commands:", |
| 424 | + " download \tDownload a resource from other servers", |
| 425 | + " exec \tTo execute native command(s)", |
| 426 | + " generate \tPOJO object generator", |
| 427 | + " install \tInstall a package", |
| 428 | + " open \tStart a default browser to open the specific URL", |
| 429 | + " say \tOutput words", |
| 430 | + " set \tSet system property", |
| 431 | + " sql-execute \tExecutes the given SQL statement, which may be an INSERT, UPDATE, DELETE, or DDL statement", |
| 432 | + " sql-query \tExecutes the given SQL statement, which returns a single ResultSet object", |
| 433 | + " update \tUpdate for the latest version", |
| 434 | + " ", |
| 435 | + "Options:", |
| 436 | + " --allow-remote-access\tAllow to be accessed remotely", |
| 437 | + " --help \tHelp command", |
| 438 | + " --host \tHost name / IP", |
| 439 | + " --import \tImport application", |
| 440 | + " --logo \tPrint logo", |
| 441 | + " --settings \tPrint settings", |
| 442 | + " --version \tPrint version", |
| 443 | + " ", |
| 444 | + "Run 'bin/dispatcher COMMAND --help' for more information on a command." |
| 445 | + ]; |
| 446 | + |
| 447 | + const secondaryCommands = [ |
| 448 | + "$ bin/dispatcher say --words Hello --import tinystruct.examples.example", |
| 449 | + "Hello", |
| 450 | + " ", |
| 451 | + "# bin/dispatcher start --import org.tinystruct.system.NettyHttpServer", |
| 452 | + "You can access the below URLs:", |
| 453 | + " http://localhost:8080/?q=say/Praise%20to%20the%20Lord!", |
| 454 | + " http://localhost:8080/?q=praise" |
| 455 | + ]; |
| 456 | + |
| 457 | + const outputMain = document.getElementById('output-main'); |
| 458 | + const cursorMain = document.getElementById('cursor-main'); |
| 459 | + const outputSecondary = document.getElementById('output-secondary'); |
| 460 | + const cursorSecondary = document.getElementById('cursor-secondary'); |
| 461 | + |
| 462 | + let iMain = 0; |
| 463 | + let iSecondary = 0; |
| 464 | + |
| 465 | + function typeMainCommands() { |
| 466 | + if (iMain < mainCommands.length) { |
| 467 | + const line = mainCommands[iMain]; |
| 468 | + const textDiv = document.createElement('div'); |
| 469 | + textDiv.textContent = line; |
| 470 | + textDiv.classList.add('fade-in'); |
| 471 | + outputMain.appendChild(textDiv); |
| 472 | + iMain++; |
| 473 | + setTimeout(typeMainCommands, 100); |
| 474 | + } else { |
| 475 | + cursorMain.style.display = 'none'; |
| 476 | + typeSecondaryCommands(); |
| 477 | + } |
| 478 | + } |
| 479 | + |
| 480 | + function typeSecondaryCommands() { |
| 481 | + if (iSecondary < secondaryCommands.length) { |
| 482 | + const line = secondaryCommands[iSecondary]; |
| 483 | + const textDiv = document.createElement('div'); |
| 484 | + textDiv.textContent = line; |
| 485 | + textDiv.classList.add('fade-in'); |
| 486 | + outputSecondary.appendChild(textDiv); |
| 487 | + iSecondary++; |
| 488 | + setTimeout(typeSecondaryCommands, 100); |
| 489 | + } else { |
| 490 | + cursorSecondary.style.display = 'none'; |
| 491 | + } |
| 492 | + } |
| 493 | + |
| 494 | + typeMainCommands(); |
366 | 495 | </script> |
367 | 496 | </body> |
368 | 497 | </html> |
0 commit comments