Coder Social home page Coder Social logo

timetable's Introduction

Timetable

npm (scoped) GitHub Code style npm

Responsive timetable element.

Installation

Load from a CDN:

<script src="https://cdn.jsdelivr.net/npm/@mszgs/timetable"></script>

Install via npm:

npm install @mszgs/timetable

Usage

<mszgs-timetable>
    <mszgs-timetable-item data-title="Subject 1" data-time-start="10:20" data-time-end="12:00" data-day="MON">...</mszgs-timetable-item>
    <mszgs-timetable-item data-title="Subject 3" data-time-start="14:00" data-time-end="20:00" data-day="WED">...</mszgs-timetable-item>
    <mszgs-timetable-item data-title="Subject 2" data-time-start="10:00" data-time-end="12:00" data-day="TUE">...</mszgs-timetable-item>
    <mszgs-timetable-item data-title="Subject 4" data-time-start="15:00" data-time-end="00:120" data-day="THU">...</mszgs-timetable-item>
    ...
</mszgs-timetable> 
import { Timetable, TimetableItem } from "@mszgs/timetable";

const timetable = new Timetable();
document.body.appendChild(timetable);

const subject = new TimetableItem({
  day: "MON",
  timeStart: "08:00",
  timeEnd: "10:00",
  title: "subjectTitle",
});

timetable.appendChild(subject);

Customization

Locals

<link href="https://cdn.jsdelivr.net/npm/@mszgs/timetable/locales/[language].css" rel="stylesheet">

Currently supported languages:

  • English
  • Hungarian
  • German

Style

Custom CSS properties:

  • --mszgs-timetable-background
  • --mszgs-timetable-border-color
  • --mszgs-timetable-color
  • --mszgs-timetable-font-family
  • --mszgs-timetable-header-background
  • --mszgs-timetable-item-border-radius
  • --mszgs-timetable-item-primary-color
  • --mszgs-timetable-min-width

License

Distributed under the MIT license. See LICENSE for details.

timetable's People

Contributors

mszgs avatar dependabot[bot] avatar

Watchers

 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.