javascript sidebar calendar plugin
William Morgan
wmorgan-hobix-is-the-way at masanjin.net
Mon Oct 4 19:32:55 EDT 2004
As per _why's suggestion, I have a version of the calendar plugin that
uses Javascript to switch between months "in place", i.e. without
loading or changing the current page. This makes it significantly easier
to install and use than the original plugin, at the cost of likely
incompatibility with older browsers (in no doubt horrific ways).
http://www.masanjin.net/~wmorgan/sidebar-calendar/sidebar-calendar-js-0.0.tgz
If you've used the original calendar plugin, it looks the same, but
please note the significant installation differences.
Here are the instructions:
## sidebar_calendar_js.rb -- Hobix Javascript sidebar calendar plugin
## version 0.0, 10/04/04. (c) 2004 William Morgan. This file is
## released under the GNU Public License.
##
## This plugin displays a monthly calendar in the sidebar. The
## calendar links individual days to a daily, monthly or yearly index
## page. Daily and monthly index pages display the corresponding month
## in the sidebar; other pages display the current month.
##
## The plugin fits within the standard sidebar. It uses Javascript to
## allow the user to view other months.
##
## USAGE:
##
## 0) Place sidebar_calendar_js.rb in your lib/ directory.
## 1) Place sidebar_calendar_js.css in your skel/ directory.
## 2) In hobix.yaml, under the requires: section, add the line:
## - sidebar_calendar_js
## If you want to give it arguments, you can specify any of the
## following:
## - sidebar_calendar_js:
## start-on-monday: true
## point-to-index: daily
## day-symbols: ["Mon" "Tue" "Wed" "Thu" "Fri" "Sat" "Sun"]
## Options for point-to-index are daily, monthly and yearly.
## 3) Add to sidebar_list:
## sidebar_list:
## [...]
## - sidebar_calendar_js
## 4) If you want the <a name> jumping to work (very useful for
## monthly and yearly index pages), also place the following under
## hobix/out/quick:
## day_header: |
## <a name="<%= day.strftime( "%Y%m%d" ) %>">
## <h2 class="dayHeader"><%= day.strftime( "%A, %B %d, %Y" ) %></h2>
## </a>
## (This may not be required for newer versions of Hobix.)
##
## BUGS
##
## 0) The sidebar page is always updated on 'hobix upgen'. There's no
## good solution to this right now.
## 1) Doesn't keep track of the month selected. Is there a way to do
## this? I don't know much Javascript.
## 2) You'll probably need to modify the CSS file to suit your
## taste. In particular, I found that Firefox didn't render things
## well at all unless I forced a specific width, which probably
## needs to be changed for your site.
## 3) Under Firefox, if the calendar sidebarBox has a sidebarTitle,
## each click makes the box a couple pixels wider. Very weird.
## (Try it!) Otherwise I'd put in a title by default.
##
## Good luck. -- William <wmorgan-hobix-sidebar-calendar at masanjin.net>
--
William <wmorgan-hobix-is-the-way at masanjin.net>
More information about the Hobix-is-the-way
mailing list