Coder Social home page Coder Social logo

b2.typer.template's Introduction

b2.typer.template

This is a starter template to help you make a home page that looks and feels like a Retro Terminal. It's pure javascript, html and css - nothing fancy, simple static stuff.

Check out the DEMO [ HERE ]

The script was put together in a few hours, so don't expect perfection :)

I put some variables to the beginning of the main.js file, so you can fine-tune it to your liking

    // const -------------------------------------------

    const NORMAL_SPEED = 1;
    const FAST_SPEED = 100;

    ...

    // config ------------------------------------------

    let crsr = 'โ–ˆ';
    let container = $.getElementById('main_container');
    let titleSpan = $.getElementById('titleSpan');
    let mutedSpan = $.getElementById('muteSpan');
    let mutedOff = '/sound';
    let mutedOn = '/<strike>sound</strike>';
    let img = $.getElementById('img');
    let submenuContainer = $.getElementById('submenu');
    let writeMaxDelay = 50;
    let spaceDelay = 10;
    let deleteMaxDelay = 100;
    let errorCharMaxCnt = 2;
    let errorPorbability = 5;
    let pauseDelay = 300;
    let pauseChar = "^";
    let deleteLineChar = "~";
    let speedUpChar = "{";
    let slowDownChar = "}";
    let animCursor = "<span id=\"crsr\">"+crsr+"</span>";
    let speedDivider = NORMAL_SPEED;
    let allowSkip = true;
    let maxVolume = 0.5;

There are some special characters that will affect how the content is displayed - see the content.js file for more info. The content can be modified in content.js , but here's an example of some things that you can use:

^ - this character will make the cursor pause
~ - this will make it delete a line back
whatever you put in between { and } will be written out full speed
you can add internal links usign this syntax [LINK TEXT=link_target]

user can speed up the animation by clicking/tapping on the page, or pressing the space button

that's all from the top of my head :) have fun!

Feel free to modify or use this script as you feel, but please attribute the author.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.