GithubHelp home page GithubHelp logo

5310 / almanac15 Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 15 KB

This year I decided to make my personal print calendar in HTML.

Home Page: http://5310.github.io/almanac15?year=2015&region=india-wb

JavaScript 43.56% CSS 30.98% HTML 25.46%

almanac15's Introduction

Almanac '15

This year I decided to make my personal print calendar in HTML.

Being a personal calendar, it only contains holidays for my locality. But if anyone wants to they can add their own quite easily by following the example in holidays-2015-india-wb.js.

It certainly beats doing it by hand like I did a few years ago, and also is easier than doing it purely procedurally. CSS3 isn't anywhere near perfect, but it's quite good enough for what I wanted.

I'm using Shaven.js to generate the markup and the calendar generation module from ramalho/calendar.js

The biggest problem was converting the app to a printable form. I gave up on converting the site to a pdf very quickly, and resorted to a secondary scaling stylesheet to enlarge the pages and then using Firefox' fullpage screenshot functionality ( screenshot screenshot.png --fullpage ) and then splitting it manually.

The calendar reads some URL parameters and draws accordingly:

  • region Sets the holiday region. Defaults is india-wb which is also the only holiday region present!
  • year Sets the year of the calendar.
  • page If true renders only a single page of the calendar.
  • month1 & month2 If page is set, then these two months are rendered to the page.
  • export If true renders the export/screenshot view. Default is false.
  • debug If true draws all the background boxes in the layout. Default is false.

Example: 5310.github.io/almanac15/index.html?year=2015&page=true&month1=0&month2=11&export=true draws a single page of the calendar with January and December of 2015 (default) with holidays from India WB (default).

Compatibility notes:

  • To be frank, it only works and draws properly on Firefox. I don't care enough to normalize it, it's been made for print.

almanac15's People

Contributors

5310 avatar

Watchers

 avatar  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.