web-app-theme 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
data/README.md
CHANGED
@@ -1,10 +1,92 @@
|
|
1
1
|
Web App Theme
|
2
|
-
|
2
|
+
=============
|
3
3
|
|
4
|
-
|
4
|
+
Web App Theme is a rails generator by [Andrea Franz](http://gravityblast.com) that you can use to generate admin panels quickly.
|
5
5
|
Inspired by cool themes like [Lighthouse](http://lighthouseapp.com/), [Basecamp](http://basecamphq.com/), [RadiantCMS](http://radiantcms.org/) and others,
|
6
6
|
it wants to be an idea to start developing a complete web application layout.
|
7
7
|
|
8
|
+
Installation
|
9
|
+
------------
|
10
|
+
|
11
|
+
Install the gem with:
|
12
|
+
|
13
|
+
sudo gem install web-app-theme -s http://gemcutter.org
|
14
|
+
|
15
|
+
You can also install it as a rails plugin:
|
16
|
+
|
17
|
+
script/plugin install git://github.com/pilu/web-app-theme.git
|
18
|
+
|
19
|
+
Usage
|
20
|
+
-----
|
21
|
+
|
22
|
+
### Theme Generator
|
23
|
+
|
24
|
+
Used without parameters, it generates the layout inside the application.html.erb file using the default theme.
|
25
|
+
|
26
|
+
script/generate theme
|
27
|
+
|
28
|
+
You can specify the layout file name in the first parameter:
|
29
|
+
|
30
|
+
script/generate theme admin # it will generate a layout called `admin.html.erb`
|
31
|
+
|
32
|
+
If you want to use another theme, instead of the default, you can use the `--theme` option:
|
33
|
+
|
34
|
+
script/generate theme --theme="drastic-dark"
|
35
|
+
|
36
|
+
|
37
|
+
If you want to generate the stylesheets of a specific theme without changing the previously generated layout you can pass the `--no-layout` option:
|
38
|
+
|
39
|
+
script/generate theme --theme=bec --no_layout
|
40
|
+
|
41
|
+
|
42
|
+
You can specify the text used in the header with the `--app-name` option:
|
43
|
+
|
44
|
+
script/generate theme --app_name="My New Application"
|
45
|
+
|
46
|
+
If you need a layout for login and signup pages, you can use the `--type` option with `sign` as value. Ìf not specified, the default value is `administration`
|
47
|
+
|
48
|
+
script/generate theme --type=sign
|
49
|
+
|
50
|
+
### Themed Generator
|
51
|
+
|
52
|
+
Start creating your controllers manually or with a scaffold, and then use the `themed generator` to overwrite the previously generated views.
|
53
|
+
|
54
|
+
If you have a controller named like the plural of the used model you can specify just the first parameter:
|
55
|
+
|
56
|
+
script/generate themed posts # you have a model named Post and a controller named PostsController
|
57
|
+
|
58
|
+
script/generate themed admin/gallery_pictures # you have a model named GalleryPicture and a controller named Admin::GalleryPicturesController
|
59
|
+
|
60
|
+
Use the `--layout` option specifying the previously generated layout to add a link to the controller you are working on:
|
61
|
+
|
62
|
+
script/generate themed posts --layout=admin # you will see the `Posts` link in the navigation
|
63
|
+
|
64
|
+
If the controller has a name different to the model used, specify the controller path in the first parameter and the model name in the second one:
|
65
|
+
|
66
|
+
script/generate themed items post
|
67
|
+
|
68
|
+
script/generate themed admin/items post
|
69
|
+
|
70
|
+
If you use `will_paginate` for pagination use the `--with_will_paginate`:
|
71
|
+
|
72
|
+
script/generate themed items post --with_will_paginate
|
73
|
+
|
74
|
+
If you have something like `map.resource :dashboard` in your `routes.rb` file, you can use the `--type=text` to generate a view with just text:
|
75
|
+
|
76
|
+
script/generate themed homes --type=text
|
77
|
+
|
78
|
+
If you want to show form error messages inside the generated forms, use the following code inside your `environment.rb`
|
79
|
+
|
80
|
+
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
|
81
|
+
if html_tag =~ /<label/
|
82
|
+
%|<div class="fieldWithErrors">#{html_tag} <span class="error">#{[instance.error_message].join(', ')}</span></div>|
|
83
|
+
else
|
84
|
+
html_tag
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
![Web App Theme screenshot](http://img.skitch.com/20091109-c2k618qerx1ysw5ytxsighuf3f.jpg)
|
89
|
+
|
8
90
|
Contributing
|
9
91
|
---
|
10
92
|
|
@@ -14,9 +96,29 @@ Contributing
|
|
14
96
|
* Add a link to your theme in the 'Switch Theme' block inside the index.html file.
|
15
97
|
* Send a pull request.
|
16
98
|
|
17
|
-
|
99
|
+
Links
|
100
|
+
-----
|
101
|
+
|
102
|
+
* Repository: git://github.com/pilu/web-app-theme.git
|
103
|
+
* Issues: <http://github.com/pilu/web-app-theme/issues>
|
104
|
+
* Gem: <http://gemcutter.org/gems/web-app-theme>
|
105
|
+
|
106
|
+
Author
|
107
|
+
------
|
108
|
+
|
109
|
+
Andrea Franz - [http://gravityblast.com](http://gravityblast.com)
|
18
110
|
|
19
111
|
Contributors
|
20
112
|
---
|
21
113
|
|
22
|
-
Nelson Fernandez
|
114
|
+
* Nelson Fernandez
|
115
|
+
* Giovanni Intini
|
116
|
+
* Jeremy Durham
|
117
|
+
* Wouter de Vries
|
118
|
+
* Marco Borromeo
|
119
|
+
* rick mckay
|
120
|
+
* Peter Sarnacki
|
121
|
+
* Garret Alfert
|
122
|
+
* Mikkel Hoegh
|
123
|
+
* Juan Maria Martinez Arce
|
124
|
+
* Stas SUSHKOV
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.4.0
|
@@ -3,7 +3,7 @@
|
|
3
3
|
<head>
|
4
4
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
5
5
|
<title><%= options[:app_name] %></title>
|
6
|
-
<%%= stylesheet_link_tag 'web_app_theme', "themes/<%= options[:theme] %>/style" %>
|
6
|
+
<%%= stylesheet_link_tag 'web_app_theme', "themes/<%= options[:theme] %>/style", :cache => true %>
|
7
7
|
</head>
|
8
8
|
<body>
|
9
9
|
<div id="container">
|
@@ -0,0 +1,87 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{web-app-theme}
|
8
|
+
s.version = "0.4.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Andrea Franz"]
|
12
|
+
s.date = %q{2009-11-10}
|
13
|
+
s.description = %q{Web app theme generator for rails projects}
|
14
|
+
s.email = %q{andrea@gravityblast.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.md"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".gitignore",
|
21
|
+
"LICENSE",
|
22
|
+
"README.md",
|
23
|
+
"Rakefile",
|
24
|
+
"VERSION",
|
25
|
+
"features/step_definitions/layout_steps.rb",
|
26
|
+
"features/step_definitions/themed_steps.rb",
|
27
|
+
"features/support/env.rb",
|
28
|
+
"features/theme_generator.feature",
|
29
|
+
"features/themed_generator.feature",
|
30
|
+
"images/avatar.png",
|
31
|
+
"index.html",
|
32
|
+
"javascripts/jquery-1.3.min.js",
|
33
|
+
"javascripts/jquery.localscroll.js",
|
34
|
+
"javascripts/jquery.scrollTo.js",
|
35
|
+
"lib/web_app_theme.rb",
|
36
|
+
"rails_generators/theme/USAGE",
|
37
|
+
"rails_generators/theme/templates/view_layout_administration.html.erb",
|
38
|
+
"rails_generators/theme/templates/view_layout_sign.html.erb",
|
39
|
+
"rails_generators/theme/templates/web_app_theme_override.css",
|
40
|
+
"rails_generators/theme/theme_generator.rb",
|
41
|
+
"rails_generators/themed/USAGE",
|
42
|
+
"rails_generators/themed/templates/view_edit.html.erb",
|
43
|
+
"rails_generators/themed/templates/view_form.html.erb",
|
44
|
+
"rails_generators/themed/templates/view_new.html.erb",
|
45
|
+
"rails_generators/themed/templates/view_show.html.erb",
|
46
|
+
"rails_generators/themed/templates/view_sidebar.html.erb",
|
47
|
+
"rails_generators/themed/templates/view_signin.html.erb",
|
48
|
+
"rails_generators/themed/templates/view_signup.html.erb",
|
49
|
+
"rails_generators/themed/templates/view_tables.html.erb",
|
50
|
+
"rails_generators/themed/templates/view_text.html.erb",
|
51
|
+
"rails_generators/themed/themed_generator.rb",
|
52
|
+
"stylesheets/base.css",
|
53
|
+
"stylesheets/themes/bec-green/style.css",
|
54
|
+
"stylesheets/themes/bec/style.css",
|
55
|
+
"stylesheets/themes/blue/style.css",
|
56
|
+
"stylesheets/themes/default/style.css",
|
57
|
+
"stylesheets/themes/djime-cerulean/style.css",
|
58
|
+
"stylesheets/themes/drastic-dark/style.css",
|
59
|
+
"stylesheets/themes/kathleene/style.css",
|
60
|
+
"stylesheets/themes/orange/style.css",
|
61
|
+
"stylesheets/themes/reidb-greenish/style.css",
|
62
|
+
"stylesheets/themes/warehouse/style.css",
|
63
|
+
"test/spec_helper.rb",
|
64
|
+
"test/themed_generator_spec.rb",
|
65
|
+
"web-app-theme.gemspec"
|
66
|
+
]
|
67
|
+
s.homepage = %q{http://github.com/pilu/web-app-theme}
|
68
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
69
|
+
s.require_paths = ["lib"]
|
70
|
+
s.rubygems_version = %q{1.3.5}
|
71
|
+
s.summary = %q{Web app theme generator}
|
72
|
+
s.test_files = [
|
73
|
+
"test/spec_helper.rb",
|
74
|
+
"test/themed_generator_spec.rb"
|
75
|
+
]
|
76
|
+
|
77
|
+
if s.respond_to? :specification_version then
|
78
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
79
|
+
s.specification_version = 3
|
80
|
+
|
81
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
82
|
+
else
|
83
|
+
end
|
84
|
+
else
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: web-app-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrea Franz
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-10
|
12
|
+
date: 2009-11-10 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -68,6 +68,7 @@ files:
|
|
68
68
|
- stylesheets/themes/warehouse/style.css
|
69
69
|
- test/spec_helper.rb
|
70
70
|
- test/themed_generator_spec.rb
|
71
|
+
- web-app-theme.gemspec
|
71
72
|
has_rdoc: true
|
72
73
|
homepage: http://github.com/pilu/web-app-theme
|
73
74
|
licenses: []
|