Giter VIP home page Giter VIP logo

brackets-viewer.js's Introduction

brackets-viewer.js

A simple library to display tournament brackets (round-robin, single elimination, double elimination)

It contains all the logic needed to display tournaments.

  • Supports translation (i18next)
  • Full vanilla JS (no framework)
  • A full working example of creating and displaying brackets (see ./demo/with-ui.html)
  • Themes supported, with CSS variables (see ./demo/themes)

npm Downloads jsDelivr Package Quality

Screenshot

How to use?

Import the library from npm using jsDelivr (you can replace @latest to lock a specific version):

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/brackets-viewer@latest/dist/brackets-viewer.min.css" />
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/brackets-viewer@latest/dist/brackets-viewer.min.js"></script>

Or from GitHub with (you can replace @master by any branch name, tag name or commit id):

<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Drarig29/brackets-viewer.js@master/dist/brackets-viewer.min.css" />
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/Drarig29/brackets-viewer.js@master/dist/brackets-viewer.min.js"></script>

Now, you can use it with data generated using brackets-manager or with crafted data following the brackets-model.

Demos

To quickly test, you can also try the demos by visiting ./demo/index.html.

To use json-server, you can:

  • Run the npm script named db to serve the static database file ./demo/db.json

    npm run db
  • Or use directly the db.json file generated by unit tests in the brackets-manager project

    npx json-server --watch path/to/brackets-manager/db.json

Credits

This library has been created to be used by the Nantarena.

It has been inspired by:

brackets-viewer.js's People

Contributors

dependabot[bot] avatar drarig29 avatar mrfastdie avatar ozgurg avatar pustur avatar

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.