Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 15
- Log:
Attempt to update Typo to a Typo SVN HEAD release from around the
time the prototype installation was set up on the RISC OS Open Limited
web site. Timestamps place this at 04-Jul so a revision from 05-Jul or
earlier was pulled and copied over the 2.6.0 tarball stable code.
- Author:
- adh
- Date:
- Sat Jul 22 23:27:35 +0100 2006
- Size:
- 1117 Bytes
1 | class ThemeController < ContentController |
2 | caches_page :stylesheets, :javascript, :images |
3 | session :off |
4 | |
5 | def stylesheets |
6 | render_theme_item(:stylesheets, params[:filename], 'text/css') |
7 | end |
8 | |
9 | def javascript |
10 | render_theme_item(:javascript, params[:filename], 'text/javascript') |
11 | end |
12 | |
13 | def images |
14 | render_theme_item(:images, params[:filename]) |
15 | end |
16 | |
17 | def error |
18 | render :nothing => true, :status => 404 |
19 | end |
20 | |
21 | def static_view_test |
22 | end |
23 | |
24 | private |
25 | |
26 | def render_theme_item(type, file, mime = mime_for(file)) |
27 | render :text => "Not Found", :status => 404 and return if file.split(%r{[\\/]}).include?("..") |
28 | send_file this_blog.current_theme_path + "/#{type}/#{file}", :type => mime, :disposition => 'inline', :stream => false |
29 | end |
30 | |
31 | def mime_for(filename) |
32 | case filename.downcase |
33 | when /\.js$/ |
34 | 'text/javascript' |
35 | when /\.css$/ |
36 | 'text/css' |
37 | when /\.gif$/ |
38 | 'image/gif' |
39 | when /(\.jpg|\.jpeg)$/ |
40 | 'image/jpeg' |
41 | when /\.png$/ |
42 | 'image/png' |
43 | when /\.swf$/ |
44 | 'application/x-shockwave-flash' |
45 | else |
46 | 'application/binary' |
47 | end |
48 | end |
49 | |
50 | |
51 | end |
52 |