theme_generator 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/USAGE +2 -2
- data/templates/README +5 -2
- data/templates/actioncontroller_ex.rb +0 -3
- data/templates/layout.liquid +1 -1
- metadata +1 -1
data/USAGE
CHANGED
@@ -12,11 +12,11 @@ DESCRIPTION
|
|
12
12
|
|
13
13
|
Included:
|
14
14
|
- Abstraction of Typo style theme support
|
15
|
-
- Tag helpers for accessing theme
|
15
|
+
- Tag helpers for accessing theme specific content
|
16
16
|
- Support for overriding views in theme
|
17
17
|
- Support for ERb templates and Liquid templates
|
18
18
|
- Theme system can allow a mix of both template types, or Liquid templates only
|
19
|
-
- Liquid tag for accessing theme
|
19
|
+
- Liquid tag for accessing theme specific content
|
20
20
|
|
21
21
|
EXAMPLE
|
22
22
|
./script/generate theme default
|
data/templates/README
CHANGED
@@ -26,7 +26,8 @@ stored in the user object, you could implement that like this:
|
|
26
26
|
|
27
27
|
end
|
28
28
|
|
29
|
-
In
|
29
|
+
In your application views, there are theme specific helper tags
|
30
|
+
available to you.
|
30
31
|
|
31
32
|
- theme_image_tag
|
32
33
|
- theme_image_path
|
@@ -35,7 +36,7 @@ In the views, there are theme specific helper tags available to you.
|
|
35
36
|
- theme_stylesheet_link_tag
|
36
37
|
- theme_stylesheet_path
|
37
38
|
|
38
|
-
Views can be
|
39
|
+
Views can be overridden by themes placing templates in the themes/[theme_name]/views
|
39
40
|
folder. You can use the default ERb templates, or Liquid templates.
|
40
41
|
|
41
42
|
You can tell the theme system to only allow Liquid templates in a theme by
|
@@ -80,6 +81,8 @@ running:
|
|
80
81
|
|
81
82
|
== Changelog
|
82
83
|
|
84
|
+
1.2.1 - Bug-fixes and documentation clean up.
|
85
|
+
|
83
86
|
1.2.0 - Updated actionview_ex with the new render_file additions from
|
84
87
|
Typo. Renamed the rake tasks so that they all start with
|
85
88
|
'theme' (theme_create_cache, theme_remove_cache,
|
@@ -15,9 +15,6 @@ ActionController::Base.class_eval do
|
|
15
15
|
write_inheritable_attribute "force_liquid", force_liquid_value
|
16
16
|
end
|
17
17
|
|
18
|
-
|
19
|
-
# You need to override this in your +ApplicationController+
|
20
|
-
# This should return the current theme name
|
21
18
|
def current_theme(passed_theme=nil)
|
22
19
|
theme = passed_theme || self.class.read_inheritable_attribute("theme")
|
23
20
|
|
data/templates/layout.liquid
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
<html>
|
4
4
|
<head>
|
5
5
|
<title></title>
|
6
|
-
<link href="{% themeitem %} <%= file_name
|
6
|
+
<link href="{% themeitem %} <%= file_name %>.css {% endthemeitem %}" media="screen" rel="Stylesheet" type="text/css" />
|
7
7
|
</head>
|
8
8
|
<body>
|
9
9
|
{{ content_for_layout }}
|
metadata
CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: theme_generator
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 1.2.
|
6
|
+
version: 1.2.1
|
7
7
|
date: 2005-11-11 00:00:00 -06:00
|
8
8
|
summary: "[Rails] Theme generator adds support for themes into Rails applications"
|
9
9
|
require_paths:
|