web-app-theme 0.5.3 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -1
- data/README.md +24 -23
- data/VERSION +1 -1
- data/index.html +1 -0
- data/{rails_generators/theme/templates/view_layout_administration.html.erb → lib/generators/web_app_theme/theme/templates/layout_admin.html.erb} +9 -8
- data/lib/generators/web_app_theme/theme/templates/layout_sign.html.erb +15 -0
- data/lib/generators/web_app_theme/theme/theme_generator.rb +61 -0
- data/{rails_generators → lib/generators/web_app_theme}/themed/templates/view_edit.html.erb +1 -1
- data/{rails_generators → lib/generators/web_app_theme}/themed/templates/view_form.html.erb +2 -2
- data/{rails_generators → lib/generators/web_app_theme}/themed/templates/view_new.html.erb +1 -1
- data/{rails_generators → lib/generators/web_app_theme}/themed/templates/view_show.html.erb +2 -2
- data/{rails_generators → lib/generators/web_app_theme}/themed/templates/view_sidebar.html.erb +0 -0
- data/{rails_generators → lib/generators/web_app_theme}/themed/templates/view_signin.html.erb +0 -0
- data/{rails_generators → lib/generators/web_app_theme}/themed/templates/view_signup.html.erb +0 -0
- data/{rails_generators → lib/generators/web_app_theme}/themed/templates/view_tables.html.erb +1 -1
- data/{rails_generators → lib/generators/web_app_theme}/themed/templates/view_text.html.erb +0 -0
- data/lib/generators/web_app_theme/themed/themed_generator.rb +126 -0
- data/stylesheets/base.css +2 -2
- data/stylesheets/override.css +1 -0
- data/stylesheets/themes/activo/style.css +466 -0
- data/stylesheets/themes/amro/style.css +1 -1
- data/stylesheets/themes/bec-green/style.css +1 -1
- data/stylesheets/themes/bec/style.css +1 -1
- data/stylesheets/themes/blue/style.css +1 -1
- data/stylesheets/themes/default/style.css +1 -1
- data/stylesheets/themes/djime-cerulean/style.css +1 -1
- data/stylesheets/themes/drastic-dark/style.css +1 -1
- data/stylesheets/themes/kathleene/style.css +1 -1
- data/stylesheets/themes/olive/style.css +1 -1
- data/stylesheets/themes/orange/style.css +1 -1
- data/stylesheets/themes/reidb-greenish/style.css +1 -1
- data/stylesheets/themes/warehouse/style.css +1 -1
- data/web-app-theme.gemspec +17 -29
- metadata +20 -32
- data/rails_generators/theme/USAGE +0 -5
- data/rails_generators/theme/templates/view_layout_administration.html.haml +0 -30
- data/rails_generators/theme/templates/view_layout_sign.html.erb +0 -15
- data/rails_generators/theme/templates/view_layout_sign.html.haml +0 -10
- data/rails_generators/theme/templates/web_app_theme_override.css +0 -1
- data/rails_generators/theme/theme_generator.rb +0 -45
- data/rails_generators/themed/USAGE +0 -5
- data/rails_generators/themed/templates/view_edit.html.haml +0 -13
- data/rails_generators/themed/templates/view_form.html.haml +0 -11
- data/rails_generators/themed/templates/view_new.html.haml +0 -12
- data/rails_generators/themed/templates/view_show.html.haml +0 -18
- data/rails_generators/themed/templates/view_sidebar.html.haml +0 -10
- data/rails_generators/themed/templates/view_signin.html.haml +0 -22
- data/rails_generators/themed/templates/view_signup.html.haml +0 -32
- data/rails_generators/themed/templates/view_tables.html.haml +0 -36
- data/rails_generators/themed/templates/view_text.html.haml +0 -15
- data/rails_generators/themed/themed_generator.rb +0 -107
data/web-app-theme.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{web-app-theme}
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.6.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Andrea Franz"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-09-28}
|
13
13
|
s.description = %q{Web app theme generator for rails projects}
|
14
14
|
s.email = %q{andrea@gravityblast.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -38,35 +38,23 @@ Gem::Specification.new do |s|
|
|
38
38
|
"javascripts/jquery-1.3.min.js",
|
39
39
|
"javascripts/jquery.localscroll.js",
|
40
40
|
"javascripts/jquery.scrollTo.js",
|
41
|
+
"lib/generators/web_app_theme/theme/templates/layout_admin.html.erb",
|
42
|
+
"lib/generators/web_app_theme/theme/templates/layout_sign.html.erb",
|
43
|
+
"lib/generators/web_app_theme/theme/theme_generator.rb",
|
44
|
+
"lib/generators/web_app_theme/themed/templates/view_edit.html.erb",
|
45
|
+
"lib/generators/web_app_theme/themed/templates/view_form.html.erb",
|
46
|
+
"lib/generators/web_app_theme/themed/templates/view_new.html.erb",
|
47
|
+
"lib/generators/web_app_theme/themed/templates/view_show.html.erb",
|
48
|
+
"lib/generators/web_app_theme/themed/templates/view_sidebar.html.erb",
|
49
|
+
"lib/generators/web_app_theme/themed/templates/view_signin.html.erb",
|
50
|
+
"lib/generators/web_app_theme/themed/templates/view_signup.html.erb",
|
51
|
+
"lib/generators/web_app_theme/themed/templates/view_tables.html.erb",
|
52
|
+
"lib/generators/web_app_theme/themed/templates/view_text.html.erb",
|
53
|
+
"lib/generators/web_app_theme/themed/themed_generator.rb",
|
41
54
|
"lib/web_app_theme.rb",
|
42
|
-
"rails_generators/theme/USAGE",
|
43
|
-
"rails_generators/theme/templates/view_layout_administration.html.erb",
|
44
|
-
"rails_generators/theme/templates/view_layout_administration.html.haml",
|
45
|
-
"rails_generators/theme/templates/view_layout_sign.html.erb",
|
46
|
-
"rails_generators/theme/templates/view_layout_sign.html.haml",
|
47
|
-
"rails_generators/theme/templates/web_app_theme_override.css",
|
48
|
-
"rails_generators/theme/theme_generator.rb",
|
49
|
-
"rails_generators/themed/USAGE",
|
50
|
-
"rails_generators/themed/templates/view_edit.html.erb",
|
51
|
-
"rails_generators/themed/templates/view_edit.html.haml",
|
52
|
-
"rails_generators/themed/templates/view_form.html.erb",
|
53
|
-
"rails_generators/themed/templates/view_form.html.haml",
|
54
|
-
"rails_generators/themed/templates/view_new.html.erb",
|
55
|
-
"rails_generators/themed/templates/view_new.html.haml",
|
56
|
-
"rails_generators/themed/templates/view_show.html.erb",
|
57
|
-
"rails_generators/themed/templates/view_show.html.haml",
|
58
|
-
"rails_generators/themed/templates/view_sidebar.html.erb",
|
59
|
-
"rails_generators/themed/templates/view_sidebar.html.haml",
|
60
|
-
"rails_generators/themed/templates/view_signin.html.erb",
|
61
|
-
"rails_generators/themed/templates/view_signin.html.haml",
|
62
|
-
"rails_generators/themed/templates/view_signup.html.erb",
|
63
|
-
"rails_generators/themed/templates/view_signup.html.haml",
|
64
|
-
"rails_generators/themed/templates/view_tables.html.erb",
|
65
|
-
"rails_generators/themed/templates/view_tables.html.haml",
|
66
|
-
"rails_generators/themed/templates/view_text.html.erb",
|
67
|
-
"rails_generators/themed/templates/view_text.html.haml",
|
68
|
-
"rails_generators/themed/themed_generator.rb",
|
69
55
|
"stylesheets/base.css",
|
56
|
+
"stylesheets/override.css",
|
57
|
+
"stylesheets/themes/activo/style.css",
|
70
58
|
"stylesheets/themes/amro/style.css",
|
71
59
|
"stylesheets/themes/bec-green/style.css",
|
72
60
|
"stylesheets/themes/bec/style.css",
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: web-app-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version: 0.
|
8
|
+
- 6
|
9
|
+
- 0
|
10
|
+
version: 0.6.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Andrea Franz
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-
|
18
|
+
date: 2010-09-28 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -50,35 +50,23 @@ files:
|
|
50
50
|
- javascripts/jquery-1.3.min.js
|
51
51
|
- javascripts/jquery.localscroll.js
|
52
52
|
- javascripts/jquery.scrollTo.js
|
53
|
+
- lib/generators/web_app_theme/theme/templates/layout_admin.html.erb
|
54
|
+
- lib/generators/web_app_theme/theme/templates/layout_sign.html.erb
|
55
|
+
- lib/generators/web_app_theme/theme/theme_generator.rb
|
56
|
+
- lib/generators/web_app_theme/themed/templates/view_edit.html.erb
|
57
|
+
- lib/generators/web_app_theme/themed/templates/view_form.html.erb
|
58
|
+
- lib/generators/web_app_theme/themed/templates/view_new.html.erb
|
59
|
+
- lib/generators/web_app_theme/themed/templates/view_show.html.erb
|
60
|
+
- lib/generators/web_app_theme/themed/templates/view_sidebar.html.erb
|
61
|
+
- lib/generators/web_app_theme/themed/templates/view_signin.html.erb
|
62
|
+
- lib/generators/web_app_theme/themed/templates/view_signup.html.erb
|
63
|
+
- lib/generators/web_app_theme/themed/templates/view_tables.html.erb
|
64
|
+
- lib/generators/web_app_theme/themed/templates/view_text.html.erb
|
65
|
+
- lib/generators/web_app_theme/themed/themed_generator.rb
|
53
66
|
- lib/web_app_theme.rb
|
54
|
-
- rails_generators/theme/USAGE
|
55
|
-
- rails_generators/theme/templates/view_layout_administration.html.erb
|
56
|
-
- rails_generators/theme/templates/view_layout_administration.html.haml
|
57
|
-
- rails_generators/theme/templates/view_layout_sign.html.erb
|
58
|
-
- rails_generators/theme/templates/view_layout_sign.html.haml
|
59
|
-
- rails_generators/theme/templates/web_app_theme_override.css
|
60
|
-
- rails_generators/theme/theme_generator.rb
|
61
|
-
- rails_generators/themed/USAGE
|
62
|
-
- rails_generators/themed/templates/view_edit.html.erb
|
63
|
-
- rails_generators/themed/templates/view_edit.html.haml
|
64
|
-
- rails_generators/themed/templates/view_form.html.erb
|
65
|
-
- rails_generators/themed/templates/view_form.html.haml
|
66
|
-
- rails_generators/themed/templates/view_new.html.erb
|
67
|
-
- rails_generators/themed/templates/view_new.html.haml
|
68
|
-
- rails_generators/themed/templates/view_show.html.erb
|
69
|
-
- rails_generators/themed/templates/view_show.html.haml
|
70
|
-
- rails_generators/themed/templates/view_sidebar.html.erb
|
71
|
-
- rails_generators/themed/templates/view_sidebar.html.haml
|
72
|
-
- rails_generators/themed/templates/view_signin.html.erb
|
73
|
-
- rails_generators/themed/templates/view_signin.html.haml
|
74
|
-
- rails_generators/themed/templates/view_signup.html.erb
|
75
|
-
- rails_generators/themed/templates/view_signup.html.haml
|
76
|
-
- rails_generators/themed/templates/view_tables.html.erb
|
77
|
-
- rails_generators/themed/templates/view_tables.html.haml
|
78
|
-
- rails_generators/themed/templates/view_text.html.erb
|
79
|
-
- rails_generators/themed/templates/view_text.html.haml
|
80
|
-
- rails_generators/themed/themed_generator.rb
|
81
67
|
- stylesheets/base.css
|
68
|
+
- stylesheets/override.css
|
69
|
+
- stylesheets/themes/activo/style.css
|
82
70
|
- stylesheets/themes/amro/style.css
|
83
71
|
- stylesheets/themes/bec-green/style.css
|
84
72
|
- stylesheets/themes/bec/style.css
|
@@ -1,30 +0,0 @@
|
|
1
|
-
!!! Strict
|
2
|
-
%html
|
3
|
-
%head
|
4
|
-
%meta{'http-equiv' => 'Content-Type', :content => 'text/html; charset=utf-8'}
|
5
|
-
%title <%= options[:app_name] %>
|
6
|
-
= stylesheet_link_tag "web_app_theme", "web_app_theme_override", "themes/<%= options[:theme] %>/style", :cache => true
|
7
|
-
%body
|
8
|
-
#container
|
9
|
-
#header
|
10
|
-
%h1 <a href="/"><%= options[:app_name] %></a>
|
11
|
-
#user-navigation
|
12
|
-
%ul.wat-cf
|
13
|
-
<li><a href="#">#{ t("web-app-theme.profile", :default => "Profile") }</a></li>
|
14
|
-
<li><a href="#">#{ t("web-app-theme.settings", :default => "Settings") }</a></li>
|
15
|
-
<li><a href="/logout" class="logout">#{ t("web-app-theme.logout", :default => "Logout") }</a></li>
|
16
|
-
<div id="main-navigation">
|
17
|
-
<ul class="wat-cf"></ul>
|
18
|
-
</div>
|
19
|
-
#wrapper.wat-cf
|
20
|
-
.flash
|
21
|
-
- flash.each do |type, message|
|
22
|
-
.message{:class => type.to_s}
|
23
|
-
<p>#{ message }</p>
|
24
|
-
#main
|
25
|
-
= yield
|
26
|
-
#footer
|
27
|
-
.block
|
28
|
-
<p>Copyright © #{ Time.now.year } Your Site.</p>
|
29
|
-
#sidebar
|
30
|
-
= yield :sidebar
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2
|
-
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
|
3
|
-
<head>
|
4
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
5
|
-
<title><%= options[:app_name] %></title>
|
6
|
-
<%%= stylesheet_link_tag 'web_app_theme', "themes/<%= options[:theme] %>/style", :cache => true %>
|
7
|
-
</head>
|
8
|
-
<body>
|
9
|
-
<div id="container">
|
10
|
-
<div id="box">
|
11
|
-
<%%= yield %>
|
12
|
-
</div>
|
13
|
-
</div>
|
14
|
-
</body>
|
15
|
-
</html>
|
@@ -1,10 +0,0 @@
|
|
1
|
-
!!! Strict
|
2
|
-
%html
|
3
|
-
%head
|
4
|
-
%meta{'http-equiv' => 'Content-Type', :content => 'text/html; charset=utf-8'}
|
5
|
-
%title <%= options[:app_name] %>
|
6
|
-
= stylesheet_link_tag 'web_app_theme', "themes/<%= options[:theme] %>/style", :cache => true
|
7
|
-
%body
|
8
|
-
#container
|
9
|
-
#box
|
10
|
-
= yield
|
@@ -1 +0,0 @@
|
|
1
|
-
/* Override here any style definide by web-app-theme */
|
@@ -1,45 +0,0 @@
|
|
1
|
-
class ThemeGenerator < Rails::Generator::Base
|
2
|
-
|
3
|
-
default_options :app_name => 'Web App',
|
4
|
-
:layout_type => :administration,
|
5
|
-
:theme => :default,
|
6
|
-
:no_layout => false,
|
7
|
-
:engine => :erb
|
8
|
-
|
9
|
-
def initialize(runtime_args, runtime_options = {})
|
10
|
-
super
|
11
|
-
@name = @args.first || (options[:layout_type].to_s == "sign" ? "sign" : "application")
|
12
|
-
end
|
13
|
-
|
14
|
-
def manifest
|
15
|
-
record do |m|
|
16
|
-
m.directory("app/views/layouts")
|
17
|
-
m.directory("public/images/web-app-theme")
|
18
|
-
%w(cross key tick application_edit).each do |icon|
|
19
|
-
m.file("../../../images/icons/#{icon}.png", "public/images/web-app-theme/#{icon}.png")
|
20
|
-
end
|
21
|
-
m.directory("public/stylesheets/themes/#{options[:theme]}/")
|
22
|
-
m.template("view_layout_#{options[:layout_type]}.html.#{options[:engine]}", File.join("app/views/layouts", "#{@name}.html.#{options[:engine]}")) unless options[:no_layout]
|
23
|
-
m.template("../../../stylesheets/base.css", File.join("public/stylesheets", "web_app_theme.css"))
|
24
|
-
m.template("web_app_theme_override.css", File.join("public/stylesheets", "web_app_theme_override.css"))
|
25
|
-
m.template("../../../stylesheets/themes/#{options[:theme]}/style.css", File.join("public/stylesheets/themes/#{options[:theme]}", "style.css"))
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
def banner
|
30
|
-
"Usage: #{$0} theme [layout_name] [options]"
|
31
|
-
end
|
32
|
-
|
33
|
-
protected
|
34
|
-
|
35
|
-
def add_options!(opt)
|
36
|
-
opt.separator ''
|
37
|
-
opt.separator 'Options:'
|
38
|
-
opt.on("--app_name=app_name", String, "") { |v| options[:app_name] = v }
|
39
|
-
opt.on("--type=layout_type", String, "Specify the layout type") { |v| options[:layout_type] = v }
|
40
|
-
opt.on("--theme=theme", String, "Specify the theme") { |v| options[:theme] = v }
|
41
|
-
opt.on("--no-layout", "Don't create layout") { |v| options[:no_layout] = true }
|
42
|
-
opt.on("--engine=haml", "Use HAML instead of ERB template engine") { |v| options[:engine] = v }
|
43
|
-
end
|
44
|
-
|
45
|
-
end
|
@@ -1,5 +0,0 @@
|
|
1
|
-
./script/generate themed ControllerPath
|
2
|
-
./script/generate themed ControllerPath ModelName
|
3
|
-
./script/generate themed ControllerPath ModelName --layout=application
|
4
|
-
./script/generate themed ControllerPath ModelName --with_will_paginate
|
5
|
-
./script/generate themed ControllerPath ModelName --engine=haml
|
@@ -1,13 +0,0 @@
|
|
1
|
-
.block
|
2
|
-
.secondary-navigation
|
3
|
-
%ul.wat-cf
|
4
|
-
%li.first= link_to t("web-app-theme.list", :default => "List"), <%= controller_routing_path %>_path
|
5
|
-
%li= link_to t("web-app-theme.new", :default => "New"), new_<%= singular_controller_routing_path %>_path
|
6
|
-
%li.active= link_to t("web-app-theme.edit", :default => "Edit"), edit_<%= singular_controller_routing_path %>_path
|
7
|
-
.content
|
8
|
-
%h2.title #{ t("web-app-theme.edit", :default => "Edit") } <%= model_name %>
|
9
|
-
.inner
|
10
|
-
- form_for @<%= model_name.underscore %>, :url => <%= singular_controller_routing_path %>_path(@<%= resource_name %>), :html => { :class => :form } do |f|
|
11
|
-
= render :partial => "form", :locals => {:f => f}
|
12
|
-
|
13
|
-
- content_for :sidebar, render(:partial => 'sidebar')
|
@@ -1,11 +0,0 @@
|
|
1
|
-
<% columns.each do |column| %>
|
2
|
-
.group
|
3
|
-
= f.label :<%= column.name %>, t("activerecord.attributes.<%= model_name.underscore %>.<%= column.name %>", :default => "<%= column.name.humanize %>"), :class => :label
|
4
|
-
= f.<%= column.field_type %> :<%= column.name %>, :class => '<%= column.field_type %>'
|
5
|
-
<span class="description">Ex: a simple text</span>
|
6
|
-
<%- end -%>
|
7
|
-
.group.navform.wat-cf
|
8
|
-
%button.button{:type => 'submit'}
|
9
|
-
= image_tag("web-app-theme/tick.png", :alt => "#{t("web-app-theme.save", :default => "Save")}")
|
10
|
-
= t("web-app-theme.save", :default => "Save")
|
11
|
-
= link_to "#{image_tag("web-app-theme/cross.png", :alt => "#{t("web-app-theme.cancel", :default => "Cancel")}")} #{t("web-app-theme.cancel", :default => "Cancel")}", <%= controller_routing_path %>_path, :class => "button"
|
@@ -1,12 +0,0 @@
|
|
1
|
-
.block
|
2
|
-
.secondary-navigation
|
3
|
-
%ul.wat-cf
|
4
|
-
%li.first= link_to t("web-app-theme.list", :default => "List"), <%= controller_routing_path %>_path
|
5
|
-
%li.active= link_to t("web-app-theme.new", :default => "New"), new_<%= singular_controller_routing_path %>_path
|
6
|
-
.content
|
7
|
-
%h2.title #{ t("web-app-theme.new", :default => "New")} <%= model_name %>
|
8
|
-
.inner
|
9
|
-
- form_for @<%= model_name.underscore %>, :url => <%= controller_routing_path %>_path, :html => { :class => :form } do |f|
|
10
|
-
= render :partial => "form", :locals => {:f => f}
|
11
|
-
|
12
|
-
- content_for :sidebar, render(:partial => 'sidebar')
|
@@ -1,18 +0,0 @@
|
|
1
|
-
.block
|
2
|
-
.secondary-navigation
|
3
|
-
%ul.wat-cf
|
4
|
-
%li.first= link_to t("web-app-theme.list", :default => "List"), <%= controller_routing_path %>_path
|
5
|
-
%li= link_to t("web-app-theme.new", :default => "New"), new_<%= singular_controller_routing_path %>_path
|
6
|
-
%li.active= link_to t("web-app-theme.show", :default => "Show"), <%= singular_controller_routing_path %>_path
|
7
|
-
.content
|
8
|
-
.inner
|
9
|
-
<% columns.each do |column| -%>
|
10
|
-
%p
|
11
|
-
<b>#{ t("activerecord.attributes.<%= singular_controller_routing_path %>.<%= column.name %>", :default => t("activerecord.labels.<%= column.name %>", :default => "<%= column.name.humanize %>")) }:</b>
|
12
|
-
= @<%= resource_name %>.<%= column.name %>
|
13
|
-
<% end -%>
|
14
|
-
.wat-cf
|
15
|
-
#{ link_to "#{image_tag("web-app-theme/application_edit.png", :alt => t("web-app-theme.edit", :default=> "Edit"))} #{t("web-app-theme.edit", :default=> "Edit")}", edit_<%= singular_controller_routing_path %>_path(@<%= resource_name %>), :class => "button" }
|
16
|
-
#{ link_to "#{image_tag("web-app-theme/cross.png", :alt => t("web-app-theme.delete", :default=> "Delete"))} #{t("web-app-theme.delete", :default => "Delete")}", <%= singular_controller_routing_path %>_path(@<%= resource_name %>), :method => "delete", :class => "button", :confirm => t("web-app-theme.confirm", :default => "Are you sure?") }
|
17
|
-
|
18
|
-
- content_for :sidebar, render(:partial => 'sidebar')
|