Calendar icons not only for your blog

October
26
2007

calendarsI have found a little bit of time last night to create few calendar icons to represent published date of the post. The idea is fairly simple. One icon per month with different colour. I have tried to make the colours relevant as how I see them here in Europe, but if you want to change them you can get the source code of these icons in .xcf format (gimp) at the end of this post.

How to implement them

HTML Code for one calendar icon

  1. <div class="calendar calendar-icon-10">
  2.   <div class="calendar-day">26</div>
  3. </div>

There are 12 classes, calendar-icon-X where X is the number of the month. In each calendar-icon-X is background image of the month.

Main Calendar CSS Code

  1. .calendar {
  2.   float: left;
  3.   margin-right: 6px;
  4.   width: 42px;
  5.   height: 42px;
  6. }

CSS Code for one icon

  1. #content .calendar-icon-10 {
  2.   background: url('calendar/10.gif');
  3. }

CSS Code for day

  1. .calendar-day {
  2.   font-weight: bold;
  3.   font-size: 1.3em;
  4.   color: #000;
  5.   width: 42px;
  6.   text-align:center;
  7.   padding-top: 14px;
  8. }

How to use this in a Drupal theme

Insert all css classes (above) to your style.css file. Open up your node.tpl.php file and add there:

  1. <div class="calendar calendar-icon-<?php print Date("m", $node->created) ?>">
  2.   <div class="calendar-day"><?php print Date("j", $node->created) ?></div>
  3. </div>

Icons Licence

Icons are FREE! Enjoy and post some comments where you are using them if so. ;)

Suggestions and comments welcome.

AttachmentSize
calendar-icons.tar.gz14.73 KB
calendar-icon-src.xcf20.63 KB
Marek

COMMENTS

Can those icons be used in Drupal GPL licensed Themes?

Yes, you can use them wherever you want and do whatever you want with them. ;)

can someone tell me how can add these icons to my webpages, I am using Frontpage

Epic FAIL.

Very nice!
thanks

using in HTML
can i use the following css in plane HTML

Yes you can,
just copy the html and css.
That will do it. :)

I just wanted to say thanks, i was looking for exactly this.

Very nice icons. Are they free to use?

Yes, they are!

I have been coding my own CMS/blog/galery/news system for a few weeks now and this will make it look so much better

thanks

it's wonderfull, this web uses your icon:
http://www.dircom.udep.edu.pe/semana.php

it looks great :)

Hey, can we know how did you create them?

I want to lern to use gimpo as a proffesional jejeje... but there's some tool that I can find...

Can you upload a video doing one of these cool icons?

I'm writing from Chile, I hope to you can understand my english!

thank you very nice. succesfull article

Yes you can,
just copy the html and css.
That will do it. :)

Merci pour ces informations! Il est intéressant et nouveau casino fr!

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options