Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 193
- Log:
First stage commit of Typo 4.1, modified for the ROOL site.
Includes all local modifications but a final pass needs to be
made to delete any files left over from earlier Typo versions
that shouldn't be here anymore. See the 'tags' section of the
repository for a clean Typo 4.1 tree.Note that symlinks to shared files in the RISC OS Open theme
directory have been deliberately included this time around; I
decided that on balance it was better to leave them in as
placeholders, since unlike symlinks in app/views/shared, the
Typo theme structure is not a standard Rails concept.
- Author:
- rool
- Date:
- Wed Apr 04 18:51:02 +0100 2007
- Size:
- 593 Bytes
1 | class TagSidebar < Sidebar |
2 | display_name "Tags" |
3 | description "Show most popular tags for this blog" |
4 | |
5 | setting :maximum_tags, 20 |
6 | |
7 | def tags |
8 | @tags ||= Tag.find_all_with_article_counters(maximum_tags.to_i).sort_by {|t| t.name} |
9 | end |
10 | |
11 | def sizes |
12 | return @sizes if @sizes |
13 | total = @tags.inject(0) {|total, tag| total + tag.article_counter } |
14 | average = total.to_f / @tags.size.to_f |
15 | @sizes = @tags.inject({}) do |h,tag| |
16 | size = tag.article_counter.to_f / average |
17 | h.merge tag => [[2.0/3.0, size].max, 2].min * 100 |
18 | end |
19 | end |
20 | |
21 | def font_multiplier |
22 | 80 |
23 | end |
24 | end |