GithubHelp home page GithubHelp logo

ka215 / sunorhc.timeline Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 6.4 MB

The vanilla TypeScript library for creating horizontal timelines, a successor to jQuery.Timeline.

License: MIT License

CSS 5.08% JavaScript 0.53% HTML 1.33% Sass 6.30% TypeScript 86.75%

sunorhc.timeline's Introduction

Sunorhc.Timeline

See the future, reflect on the past. Control time with Sunorhc.Timeline.
At last, the long-awaited successor to jQuery.Timeline is here.
Sunorhc.Timeline inherits the useful features of its predecessor and breaks new ground.

Sunorhc.Timeline is not a library that simply refactors the source code of jQuery.Timeline.
It is a type-safe application that inherits only the useful specifications of its predecessor and is completely redesigned from scratch in TypeScript.
We use Vite for development and builds, Vitest for coverage testing, lz-string for event data cache compression, and pino for logger.

screenshot-01

Features

  • Option settings similar to jQuery.Timeline
  • Type-safe robustness and extensibility with TypeScript
  • High degree of customization freedom
  • High performance with asynchronous event loading
  • Supports operation on touch devices

More details will be coming soon, so stay tuned!

Getting Started

To get started, first get the library in one of the following ways:

The following files stored in the dists directory in the package are the core files of the library.

css/sunorhc.timeline.css
js/sunorhc.timeline.js

Each package also includes a gzip compressed file, so please use whichever you need.

Alternatively, you can load the relevant resources via a CDN.

Usage

  1. Include the CSS file in the head tag of your HTML and load the JS file before the end of the body tag.
<link rel="stylesheet" src="/path/to/css/sunorhc.timeline.css">

<script src="/path/to/js/sunorhc.timeline.js"></script>
  1. Then, prepare a container element within the body tag to display the timeline.
<div id="myTimeline"></div>
  1. Finally, instantiate the timeline component within the script tag to complete the process.
Sunorhc.Timeline.create('myTimeline', { sidebar: { items: [ { type: 'text', label: 'Row 1'} ] } })

Note: Currently instantiation will fail unless at least one sidebar item is defined.

Note: The instantiated timeline component is automatically registered to the global Window object. To access the instance after it is created, refer to the window.SunorhcTimelineInstances property.

Note: To control the component after it is instantiated, we recommend using asynchronous instantiation, as see below.

(async () => {
    await Sunorhc.Timeline.create('myTimeline', { sidebar: { items: [ { type: 'text', label: 'Row 1'} ] } })
    .then(thisInstance => {
        console.log(window.SunorhcTimelineInstances, thisInstance.getOptions())
    })
})()

Documentaion

Please check the Wiki for updates as they occur.

Wiki Home

Demo Build

The demo on the Github page below allows you to try out various features of the timeline component.
Come and experience the potential of Sunorhc.Timeline!

Version 0.9.1 with tester

Coverage

Latest coverages on 11 June, 2024

Contributors

Copyright and License

Code and documentation copyright 2024- the ka2. Code released under the MIT License.

sunorhc.timeline's People

Watchers

ka2 avatar

sunorhc.timeline's Issues

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.