forked from topfunky/calendar_helper
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 4448b97
Showing
13 changed files
with
674 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
=== 0.2.2 / 2007-08-29 | ||
|
||
* Fixed missing tr tag in thead section. [Ian Struble] | ||
|
||
=== 0.2.1 / 2007-07-07 | ||
|
||
* Added html output to the tests for visual confirmation or | ||
for developing new stylesheets. Run 'rake' and look | ||
in the 'test/output' directory. | ||
* Adds a 'today' CSS class to the cell for the current day. | ||
Can be turned of by sending option 'show_today => false'. | ||
[Chris O'Sullivan] | ||
* Added 'accessible' option to show extra fields around | ||
days that are not in the current month. [Tom Armitage] | ||
|
||
=== 0.2.0 | ||
|
||
* Converted to hoe and a rubygem | ||
* Renamed to README.txt for Hoe compatibility | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Copyright (c) 2006 Jeremy Voorhis and Geoffrey Grosenbach | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
History.txt | ||
MIT-LICENSE | ||
Manifest.txt | ||
README.txt | ||
Rakefile | ||
generators/calendar_styles/calendar_styles_generator.rb | ||
generators/calendar_styles/templates/blue/style.css | ||
generators/calendar_styles/templates/grey/style.css | ||
generators/calendar_styles/templates/red/style.css | ||
init.rb | ||
lib/calendar_helper.rb | ||
test/test_calendar_helper.rb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
CalendarHelper | ||
============== | ||
|
||
A simple helper for creating an HTML calendar. The "calendar" method will be automatically available to your view templates. | ||
|
||
There is also a Rails generator that copies some stylesheets for use alone or alongside existing stylesheets. | ||
|
||
Authors | ||
======= | ||
|
||
Jeremy Voorhis -- http://jvoorhis.com | ||
Original implementation | ||
|
||
Geoffrey Grosenbach -- http://nubyonrails.com | ||
Test suite and conversion to a Rails plugin | ||
|
||
Contributors | ||
============ | ||
|
||
* Jarkko Laine http://jlaine.net/ | ||
* Tom Armitage http://infovore.org | ||
* Bryan Larsen http://larsen.st | ||
|
||
Usage | ||
===== | ||
|
||
See the RDoc (or use "rake rdoc"). | ||
|
||
To copy the CSS files, use | ||
|
||
./script/generate calendar_styles | ||
|
||
CSS will be copied to subdirectories of public/stylesheets/calendar. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
require 'rubygems' | ||
require 'rake' | ||
require 'rake/rdoctask' | ||
require 'hoe' | ||
require './lib/calendar_helper.rb' | ||
|
||
Hoe.new('calendar_helper', CalendarHelper::VERSION) do |p| | ||
p.rubyforge_name = 'seattlerb' | ||
p.author = 'Geoffrey Grosenbach' | ||
p.email = 'boss AT topfunky.com' | ||
p.summary = 'Generates a configurable, CSS-tagged HTML calendar.' | ||
p.description = "A simple method to create an HTML calendar for a single month. Can be styled with CSS. Usable with Ruby on Rails." | ||
p.url = "http://rubyforge.org/projects/seattlerb" | ||
p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n") | ||
p.clean_globs = ['test/output'] | ||
end | ||
|
||
# desc "Test task (actually runs specs)" | ||
# task "test" do | ||
# system "spec --format specdoc --color spec/*_spec.rb" | ||
# end | ||
|
||
# -- Rails-specific -- | ||
|
||
desc 'Generate documentation for the calendar_helper plugin.' | ||
Rake::RDocTask.new(:rdoc) do |rdoc| | ||
rdoc.rdoc_dir = 'rdoc' | ||
rdoc.title = 'CalendarHelper' | ||
rdoc.options << '--line-numbers' << '--inline-source' | ||
rdoc.rdoc_files.include('README') | ||
rdoc.rdoc_files.include('lib/**/*.rb') | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
author: topfunky | ||
summary: Generates a table-based HTML calendar that can be styled with CSS. Also includes a generator with relevant stylesheets. | ||
homepage: http://nubyonrails.com | ||
plugin: http://topfunky.net/svn/plugins/calendar_helper | ||
license: MIT | ||
version: 0.2.2 | ||
rails_version: 1.0+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
class CalendarStylesGenerator < Rails::Generator::Base | ||
|
||
def manifest | ||
record do |m| | ||
calendar_themes_dir = "public/stylesheets/calendar" | ||
m.directory calendar_themes_dir | ||
|
||
# Copy files | ||
%w(red blue grey).each do |dir| | ||
m.directory File.join(calendar_themes_dir, dir) | ||
m.file File.join("#{dir}/style.css"), File.join(calendar_themes_dir, "#{dir}/style.css") | ||
end | ||
|
||
# Dir.read("vendor/public/calendar_helper/generators/calendar_styles/templates").each do |dir| | ||
# m.file "orig", File.join(calendar_themes_dir, dir.name, "some_file.css") | ||
# end | ||
|
||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
A blue based theme, inspired by Blinksale and their ColorBurn widget. http://firewheeldesign.com | ||
AUTHOR: Geoffrey Grosenbach http://nubyonrails.com | ||
Colors: | ||
Light Blue: bbccff | ||
White: eeddee | ||
Turq: 003355 | ||
Cream: ffffdd | ||
*/ | ||
|
||
.calendar { | ||
margin: auto; | ||
} | ||
|
||
.monthName th { | ||
font-weight: normal; | ||
text-align: right; | ||
padding-top: 1em; | ||
padding-bottom: 0.7em; | ||
} | ||
|
||
.dayName th { | ||
font-size: 0.7em; | ||
padding-top: 0.6em; | ||
padding-bottom: 0.3em; | ||
background-color: #303030; | ||
color: white; | ||
} | ||
|
||
.otherMonth, .day, .specialDay { | ||
padding: 0.7em 1em; | ||
border-right: 1px solid white; | ||
|
||
} | ||
|
||
.otherMonth { | ||
color: #eeeeee; | ||
background-color: white; | ||
} | ||
|
||
.day, .specialDay { | ||
text-align: center; | ||
border-bottom: 1px dotted #bbbbbb; | ||
background-color: #bbccff; | ||
} | ||
.specialDay { | ||
background-color: #003355; | ||
color: white; | ||
} | ||
.specialDay a, .specialDay a:visited, .specialDay a:hover { | ||
color: white; | ||
text-decoration: none; | ||
padding: 1em; | ||
} | ||
.specialDay a:hover { | ||
color: white; | ||
background-color: black; | ||
} | ||
.weekendDay { | ||
background-color: #ffffdd; | ||
} | ||
.today{ | ||
background-color: #4682b4; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/* | ||
A grey based theme, inspired by Blinksale and their ColorBurn widget. http://firewheeldesign.com | ||
AUTHOR: Geoffrey Grosenbach http://nubyonrails.com | ||
Colors: | ||
dk: 787888 | ||
lt: 4f4f5b | ||
lter: a8a8a8 | ||
white: ffffff | ||
*/ | ||
|
||
/* TODO */ | ||
|
||
.calendar { | ||
margin: auto; | ||
color: white; | ||
text-align: center; | ||
} | ||
|
||
thead tr { | ||
color: black; | ||
} | ||
|
||
.monthName th { | ||
font-weight: normal; | ||
text-align: right; | ||
padding-top: 1em; | ||
padding-bottom: 0.7em; | ||
color: black; | ||
} | ||
|
||
.dayName th { | ||
font-size: 0.7em; | ||
padding-top: 0.6em; | ||
padding-bottom: 0.3em; | ||
background-color: #303030; | ||
color: white; | ||
border-bottom: 1px solid white; | ||
} | ||
|
||
.otherMonth, .day, .specialDay { | ||
padding: 0.7em 1em; | ||
border-right: 1px solid #111111; | ||
} | ||
|
||
.otherMonth { | ||
color: #999999; | ||
background-color: #4f4f5b; | ||
} | ||
|
||
.day, .specialDay { | ||
border-bottom: 1px solid #111111; | ||
background-color: #333333; | ||
} | ||
.specialDay { | ||
background-color: #a8a8a8; | ||
color: black; | ||
} | ||
.specialDay a, .specialDay a:visited, .specialDay a:hover { | ||
color: white; | ||
text-decoration: none; | ||
padding: 1em; | ||
} | ||
.specialDay a:hover { | ||
color: white; | ||
background-color: black; | ||
} | ||
.weekendDay { | ||
background-color: #787888; | ||
} | ||
.today { | ||
background-color: white; | ||
color: black; | ||
} | ||
|
||
Colors: | ||
dk: 787888 | ||
lt: 4f4f5b | ||
lter: a8a8a8 | ||
white: ffffff | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
A red, white, and grey theme. | ||
AUTHOR: Geoffrey Grosenbach http://nubyonrails.com | ||
*/ | ||
|
||
.calendar { | ||
margin: auto; | ||
} | ||
|
||
.monthName th { | ||
font-weight: normal; | ||
text-align: right; | ||
padding-top: 1em; | ||
padding-bottom: 0.7em; | ||
} | ||
|
||
.dayName th { | ||
font-size: 0.7em; | ||
padding-top: 0.6em; | ||
padding-bottom: 0.3em; | ||
background-color: #303030; | ||
color: white; | ||
} | ||
|
||
.otherMonth, .day, .specialDay { | ||
padding: 0.7em 1em; | ||
border-right: 1px solid white; | ||
|
||
} | ||
|
||
.otherMonth { | ||
color: #eeeeee; | ||
} | ||
.weekendDay { | ||
background-color: #eeeeee; | ||
} | ||
|
||
.day, .specialDay { | ||
text-align: center; | ||
border-bottom: 1px dotted #bbbbbb; | ||
} | ||
|
||
.specialDay { | ||
background-color: #d10a21; | ||
color: white; | ||
} | ||
.specialDay a, .specialDay a:visited, .specialDay a:hover { | ||
color: white; | ||
text-decoration: none; | ||
padding: 1em; | ||
} | ||
.specialDay a:hover { | ||
color: white; | ||
background-color: black; | ||
} | ||
.today { | ||
background-color: #1e90ff; | ||
color: white; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ActionView::Base.send :include, CalendarHelper |
Oops, something went wrong.