GithubHelp home page GithubHelp logo

abzicht / jekyll-calendar Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 2.0 573 KB

A nicely designed HTML/JS/Jekyll calendar for (categorized, repetitive) events.

Home Page: https://abzicht.github.io/jekyll-calendar/

License: MIT License

Ruby 0.38% HTML 5.86% SCSS 15.46% JavaScript 43.96% TypeScript 34.34%

jekyll-calendar's Introduction

Jekyll Calendar

For a live example, head here

HTML and JavaScript calendar for Jekyll based calendar entries.

All Jekyll related data is located in _data/calendar.

Entries

All entries are stored in _data/calendar/entries.yml.

Exemplary entry:

- id: "a"
  name: "Rhoncus"
  description: "Eni sagittis lacinia lectus primis. Elit iaculis hendrerit sapien elementum ultrices augue. Fusce suspendisse ultrices nunc. Potenti, scelerisque cras duis volutpat vulputate eros cras. Congue aliquam gravida lectus neque sed. Proin. Penatibus donec quam facilisi nascetur dolor praesent id, auctor pretium eros quam nibh. Luctus nullam maecenas suspendisse mus. Rutrum eros id lorem aenean elit, condimentum. Sollicitudin in, donec dictumst enim, nec duis. Ac dictum lacus commodo nam suscipit aliquam, consectetuer auctor velit. Aliquet amet, dis sapien quisque, egestas quis a. Nec in quis. Cras nec gravida."
  category: "election"
  singular: false
  date: "0000-01-01"

If an event is marked singular, it only appears in the year it is created for. If it is not singular, it appears in each year.

Notice: If multiple events are created for the same month and day, use unique ids!

For each unique category, a category entry must be created in _data/calendar/categories.yml. The category id must match the id used by the entries. The color tag is utilized to color the calendar entries of the corresponding category.

- id: birthday
  name: Geburtstag
  color: "#0000ee"

The calendar entries can be filtered by category.

Setup

Copy directories _data, _includes, css, and js to your Jekyll project.

Write

{% include calendar.html %}
{% include calendar_categories.html %}

in the file you want to include the calendar in.

Add

<script src="/js/calendarbase.esm.js"></script>
<script src="/js/calendar-entries.js"></script>
<script defer src="/js/calendar-shell.js"></script>
<script defer src="/js/calendar-init.js"></script>

to the bottom of the file you included the calendar at.

Sources

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.