0.1.0 • Published 4 years ago

timelinegenerator v0.1.0

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

timelinegenerator

Simple timeline generator, built using plain CSS and JavaScript.

Installation

Include main CSS-file on top of the HTML:

<link rel="stylesheet" href="timelinecreator.css">

Include timelinecreator.js before the closing body tag:

<script src="timelinecreator.js"></script>

Initalize library(replace timeline with ID of your timeline element):

  createTimeline({
    name:document.getElementById("timeline")
  })

Usage

Basic HTML template for this library is:

<div id="timeline" class="time-line">
  <div class="time-content">
    <p class="time-date">
    </p>
    <p class="time-text">
    </p>
  </div>
</div>

Customization

CSS customziation classes:

ClassDescription
.time-yearAdds separate year mark on timeline

JavaScript customization options:

NameDescriptionDefault
alternateChoose whether or not points alternate on timelinefalse
startRightChoose whether or not points start from righttrue
colorChoose color of timeline elementsblack

You can additionally customize library for your use in the included CSS file.

License

MIT