Skip to content
This repository has been archived by the owner on Jan 5, 2019. It is now read-only.

cassidyjames/terminal.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

terminal.js

This is a project I wrote (and @funnylookinhat heavily refactored) for System76. Basically you set up all the fake Terminal output in the DOM and use data attributes to control the speed of each line.

Then just runTerminal() on a jQuery object to kick it off, i.e. runTerminal($('#terminal')).

See terminal.mustache for example HTML, or a demo implementation here.

Data Attributes

On the container:

  • data-terminal-prompt
  • string: Prepend each prompt line, i.e. "system76@Galago-UltraPro:~$ "

On each span:

  • data-terminal
    • string "text" (default): type out the message on the currently-last line
    • string "line": echo the whole line at once on a new line
  • data-terminal-message:
    • string: the text to output
  • data-terminal-time
    • integer: How long to wait in milliseconds after the previous step starts. Account for 200ms/character in the previous message if it was data-terminal="text"

Featured at:

About

DOM-driven fake terminal output jQuery plugin

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published