app-themer 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.gitignore +21 -0
- data/LICENSE +20 -0
- data/README.md +158 -0
- data/Rakefile +53 -0
- data/VERSION +1 -0
- data/app-themer.gemspec +82 -0
- data/images/avatar.png +0 -0
- data/images/icons/application_edit.png +0 -0
- data/images/icons/cross.png +0 -0
- data/images/icons/key.png +0 -0
- data/images/icons/tick.png +0 -0
- data/index.html +347 -0
- data/javascripts/dd_belatedpng.js +328 -0
- data/javascripts/modernizr-1.5.min.js +28 -0
- data/lib/app_themer.rb +2 -0
- data/lib/generators/app_themer/layout/layout_generator.rb +71 -0
- data/lib/generators/app_themer/layout/templates/admin.html.erb +59 -0
- data/lib/generators/app_themer/layout/templates/login.html.erb +0 -0
- data/lib/generators/app_themer/views/templates/_form.html.erb +13 -0
- data/lib/generators/app_themer/views/templates/_sidebar.html.erb +13 -0
- data/lib/generators/app_themer/views/templates/edit.html.erb +18 -0
- data/lib/generators/app_themer/views/templates/new.html.erb +16 -0
- data/lib/generators/app_themer/views/templates/show.html.erb +23 -0
- data/lib/generators/app_themer/views/templates/tables.html.erb +50 -0
- data/lib/generators/app_themer/views/templates/text.html.erb +16 -0
- data/lib/generators/app_themer/views/views_generator.rb +126 -0
- data/stylesheets/base.css +204 -0
- data/stylesheets/handheld.css +6 -0
- data/stylesheets/override.css +1 -0
- data/stylesheets/themes/default/images/arrow.png +0 -0
- data/stylesheets/themes/default/images/boxbar-background.png +0 -0
- data/stylesheets/themes/default/images/button-background-active.png +0 -0
- data/stylesheets/themes/default/images/button-background.png +0 -0
- data/stylesheets/themes/default/images/menubar-background.png +0 -0
- data/stylesheets/themes/default/style.css +444 -0
- data/test/helper.rb +10 -0
- data/test/test_app-themer.rb +5 -0
- metadata +115 -0
data/.document
ADDED
data/.gitignore
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 Matthew Hager
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,158 @@
|
|
1
|
+
App Themer
|
2
|
+
=============
|
3
|
+
|
4
|
+
App Themer is a rails generator originally by [Andrea Franz](http://gravityblast.com) later extended by the team at Poetic Systems(http://poeticsystems.com) that you can use to generate admin panels quickly.
|
5
|
+
Inspired by cool themes like [Lighthouse](http://lighthouseapp.com/), [Basecamp](http://basecamphq.com/), [RadiantCMS](http://radiantcms.org/) and others,
|
6
|
+
it wants to be an idea to start developing a complete web application layout.
|
7
|
+
|
8
|
+
Installation
|
9
|
+
------------
|
10
|
+
|
11
|
+
You can use app-themer with Rails 3. Specify the web-app-theme gem in your Gemfile, only for :development and :test
|
12
|
+
|
13
|
+
group :development, :test do
|
14
|
+
gem 'app-themer'
|
15
|
+
end
|
16
|
+
|
17
|
+
Usage
|
18
|
+
-----
|
19
|
+
|
20
|
+
### Layout Generator
|
21
|
+
|
22
|
+
Used without parameters, app_themer generates the layout inside the application.html.erb file using the default theme.
|
23
|
+
|
24
|
+
rails g app_themer:layout
|
25
|
+
|
26
|
+
You can specify the layout file name in the first parameter:
|
27
|
+
|
28
|
+
rails g app_themer:layout admin # this will generate a layout called `admin.html.erb`
|
29
|
+
|
30
|
+
If you want to use another theme, instead of the default, you can use the `--theme` option:
|
31
|
+
|
32
|
+
rails g app_themer:layout admin --theme="drastic-dark"
|
33
|
+
|
34
|
+
You can specify the template engine with `--engine=name` option, where name can be erb (default) or haml:
|
35
|
+
|
36
|
+
rails g app_themer:layout --engine=haml # you must specify haml in your Gemfile
|
37
|
+
|
38
|
+
If you want to generate the stylesheets of a specific theme without changing the previously generated layout you can pass the `--no-layout` option:
|
39
|
+
|
40
|
+
rails g app_themer:layout --theme=bec --no-layout
|
41
|
+
|
42
|
+
|
43
|
+
You can specify the text used in the header with the `--app-name` option:
|
44
|
+
|
45
|
+
rails g app_themer:layout --app-name="My New Application"
|
46
|
+
|
47
|
+
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 `admin`
|
48
|
+
|
49
|
+
rails g app_themer:layout login --layout-type=login
|
50
|
+
|
51
|
+
### View Generator
|
52
|
+
|
53
|
+
Start creating your controllers manually or with a scaffold, and then use the `view generator` to overwrite the previously generated views.
|
54
|
+
|
55
|
+
If you have a controller named like the plural of the used model you can specify just the first parameter:
|
56
|
+
|
57
|
+
rails g app_themer:view posts # you have a model named Post and a controller named PostsController
|
58
|
+
|
59
|
+
rails g app_themer:view admin/gallery_pictures # you have a model named GalleryPicture and a controller named Admin::GalleryPicturesController
|
60
|
+
|
61
|
+
Use the `--layout` option specifying the previously generated layout to add a link to the controller you are working on:
|
62
|
+
|
63
|
+
rails g app_themer:view posts --layout=admin # you will see the `Posts` link in the navigation
|
64
|
+
|
65
|
+
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:
|
66
|
+
|
67
|
+
rails g app_themer:view items post
|
68
|
+
|
69
|
+
rails g app_themer:view admin/items post
|
70
|
+
|
71
|
+
If you use `will_paginate` for pagination use the `--with_will_paginate`:
|
72
|
+
|
73
|
+
rails g app_themer:view items post --will-paginate
|
74
|
+
|
75
|
+
You can specify the template engine with `--engine=name` option, where name can be erb (default) or haml:
|
76
|
+
|
77
|
+
rails g app_themer:view posts --engine=haml
|
78
|
+
|
79
|
+
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:
|
80
|
+
|
81
|
+
rails g app_themer:view dashboards --view-type=text
|
82
|
+
|
83
|
+
If you want to show form error messages inside the generated forms, use the following code inside your `environment.rb`
|
84
|
+
|
85
|
+
ActionView::Base.field_error_proc = Proc.new do |html_tag, instance|
|
86
|
+
if html_tag =~ /<label/
|
87
|
+
%|<div class="fieldWithErrors">#{html_tag} <span class="error">#{[instance.error_message].join(', ')}</span></div>|.html_safe
|
88
|
+
else
|
89
|
+
html_tag
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
If you want to have translated pages, simple create in your locale.yml the keys just like config/locales/en_us.yml example.
|
94
|
+
|
95
|
+
en_us:
|
96
|
+
web-app-theme:
|
97
|
+
save: Save
|
98
|
+
cancel: Cancel
|
99
|
+
list: List
|
100
|
+
edit: Edit
|
101
|
+
new: New
|
102
|
+
show: Show
|
103
|
+
delete: Delete
|
104
|
+
confirm: Are you sure?
|
105
|
+
created_at: Created at
|
106
|
+
all: All
|
107
|
+
|
108
|
+
|
109
|
+
![Web App Theme screenshot](http://img.skitch.com/20091109-c2k618qerx1ysw5ytxsighuf3f.jpg)
|
110
|
+
|
111
|
+
Contributing
|
112
|
+
---
|
113
|
+
|
114
|
+
* Fork this repository.
|
115
|
+
* Duplicate the 'themes/default' folder and rename it.
|
116
|
+
* Modify the style.css file adding your favorite colors.
|
117
|
+
* Add a link to your theme in the 'Switch Theme' block inside the index.html file.
|
118
|
+
* Send a pull request.
|
119
|
+
|
120
|
+
Links
|
121
|
+
-----
|
122
|
+
|
123
|
+
* Repository: git://github.com/pilu/web-app-theme.git
|
124
|
+
* List: <http://groups.google.com/group/web-app-theme-generator>
|
125
|
+
* Issues: <http://github.com/pilu/web-app-theme/issues>
|
126
|
+
* Gem: <http://gemcutter.org/gems/web-app-theme>
|
127
|
+
* Themes: <http://pilu.github.com/web-app-theme>
|
128
|
+
|
129
|
+
Author
|
130
|
+
------
|
131
|
+
|
132
|
+
Andrea Franz - [http://gravityblast.com](http://gravityblast.com)
|
133
|
+
|
134
|
+
Contributors
|
135
|
+
------------
|
136
|
+
|
137
|
+
* Nelson Fernandez
|
138
|
+
* Giovanni Intini
|
139
|
+
* Jeremy Durham
|
140
|
+
* Wouter de Vries
|
141
|
+
* Marco Borromeo
|
142
|
+
* rick mckay
|
143
|
+
* Peter Sarnacki
|
144
|
+
* Garret Alfert
|
145
|
+
* Mikkel Hoegh
|
146
|
+
* Juan Maria Martinez Arce
|
147
|
+
* Stas SUSHKOV
|
148
|
+
* Daniel Cukier
|
149
|
+
* Roberto Klein
|
150
|
+
* Bryan Woods
|
151
|
+
* Sandro Duarte
|
152
|
+
* David Francisco
|
153
|
+
|
154
|
+
Credits
|
155
|
+
-------
|
156
|
+
|
157
|
+
* Icons: FAMFAMFAM Silk icons <http://www.famfamfam.com/lab/icons/silk/>
|
158
|
+
* Buttons: Particletree - Rediscovering the Button Element <http://particletree.com/features/rediscovering-the-button-element/>
|
data/Rakefile
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "app-themer"
|
8
|
+
gem.summary = %Q{HTML5 web app theme generator for rails projects}
|
9
|
+
gem.description = %Q{HTML5 web app theme generator for rails projects}
|
10
|
+
gem.email = "matthew@poeticsystems.com"
|
11
|
+
gem.homepage = "http://github.com/PoeticSystems/app-themer"
|
12
|
+
gem.authors = ["Matthew Hager"]
|
13
|
+
gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
|
14
|
+
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
15
|
+
end
|
16
|
+
Jeweler::GemcutterTasks.new
|
17
|
+
rescue LoadError
|
18
|
+
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
19
|
+
end
|
20
|
+
|
21
|
+
require 'rake/testtask'
|
22
|
+
Rake::TestTask.new(:test) do |test|
|
23
|
+
test.libs << 'lib' << 'test'
|
24
|
+
test.pattern = 'test/**/test_*.rb'
|
25
|
+
test.verbose = true
|
26
|
+
end
|
27
|
+
|
28
|
+
begin
|
29
|
+
require 'rcov/rcovtask'
|
30
|
+
Rcov::RcovTask.new do |test|
|
31
|
+
test.libs << 'test'
|
32
|
+
test.pattern = 'test/**/test_*.rb'
|
33
|
+
test.verbose = true
|
34
|
+
end
|
35
|
+
rescue LoadError
|
36
|
+
task :rcov do
|
37
|
+
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
task :test => :check_dependencies
|
42
|
+
|
43
|
+
task :default => :test
|
44
|
+
|
45
|
+
require 'rake/rdoctask'
|
46
|
+
Rake::RDocTask.new do |rdoc|
|
47
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
48
|
+
|
49
|
+
rdoc.rdoc_dir = 'rdoc'
|
50
|
+
rdoc.title = "app-themer #{version}"
|
51
|
+
rdoc.rdoc_files.include('README*')
|
52
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
53
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.3.5
|
data/app-themer.gemspec
ADDED
@@ -0,0 +1,82 @@
|
|
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{app-themer}
|
8
|
+
s.version = "0.3.5"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Matthew Hager"]
|
12
|
+
s.date = %q{2010-10-18}
|
13
|
+
s.description = %q{HTML5 web app theme generator for rails projects}
|
14
|
+
s.email = %q{matthew@poeticsystems.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.md"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".gitignore",
|
22
|
+
"LICENSE",
|
23
|
+
"README.md",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"app-themer.gemspec",
|
27
|
+
"images/avatar.png",
|
28
|
+
"images/icons/application_edit.png",
|
29
|
+
"images/icons/cross.png",
|
30
|
+
"images/icons/key.png",
|
31
|
+
"images/icons/tick.png",
|
32
|
+
"index.html",
|
33
|
+
"javascripts/dd_belatedpng.js",
|
34
|
+
"javascripts/modernizr-1.5.min.js",
|
35
|
+
"lib/app_themer.rb",
|
36
|
+
"lib/generators/app_themer/layout/layout_generator.rb",
|
37
|
+
"lib/generators/app_themer/layout/templates/admin.html.erb",
|
38
|
+
"lib/generators/app_themer/layout/templates/login.html.erb",
|
39
|
+
"lib/generators/app_themer/views/templates/_form.html.erb",
|
40
|
+
"lib/generators/app_themer/views/templates/_sidebar.html.erb",
|
41
|
+
"lib/generators/app_themer/views/templates/edit.html.erb",
|
42
|
+
"lib/generators/app_themer/views/templates/new.html.erb",
|
43
|
+
"lib/generators/app_themer/views/templates/show.html.erb",
|
44
|
+
"lib/generators/app_themer/views/templates/tables.html.erb",
|
45
|
+
"lib/generators/app_themer/views/templates/text.html.erb",
|
46
|
+
"lib/generators/app_themer/views/views_generator.rb",
|
47
|
+
"stylesheets/base.css",
|
48
|
+
"stylesheets/handheld.css",
|
49
|
+
"stylesheets/override.css",
|
50
|
+
"stylesheets/themes/default/images/arrow.png",
|
51
|
+
"stylesheets/themes/default/images/boxbar-background.png",
|
52
|
+
"stylesheets/themes/default/images/button-background-active.png",
|
53
|
+
"stylesheets/themes/default/images/button-background.png",
|
54
|
+
"stylesheets/themes/default/images/menubar-background.png",
|
55
|
+
"stylesheets/themes/default/style.css",
|
56
|
+
"test/helper.rb",
|
57
|
+
"test/test_app-themer.rb"
|
58
|
+
]
|
59
|
+
s.homepage = %q{http://github.com/PoeticSystems/app-themer}
|
60
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
61
|
+
s.require_paths = ["lib"]
|
62
|
+
s.rubygems_version = %q{1.3.7}
|
63
|
+
s.summary = %q{HTML5 web app theme generator for rails projects}
|
64
|
+
s.test_files = [
|
65
|
+
"test/helper.rb",
|
66
|
+
"test/test_app-themer.rb"
|
67
|
+
]
|
68
|
+
|
69
|
+
if s.respond_to? :specification_version then
|
70
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
71
|
+
s.specification_version = 3
|
72
|
+
|
73
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
74
|
+
s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
75
|
+
else
|
76
|
+
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
77
|
+
end
|
78
|
+
else
|
79
|
+
s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
data/images/avatar.png
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|