app-themer 0.4.1 → 0.4.6

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.1
1
+ 0.4.6
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{app-themer}
8
- s.version = "0.4.1"
8
+ s.version = "0.4.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matthew Hager"]
12
- s.date = %q{2010-10-18}
12
+ s.date = %q{2010-10-19}
13
13
  s.description = %q{App Themer is a rails generator inspired by web-app-theme that allows you to quickly generate a complete admin template for your rails app.}
14
14
  s.email = %q{matthew@poeticsystems.com}
15
15
  s.extra_rdoc_files = [
@@ -39,6 +39,7 @@ Gem::Specification.new do |s|
39
39
  "lib/generators/app_themer/views/templates/_form.html.erb",
40
40
  "lib/generators/app_themer/views/templates/_sidebar.html.erb",
41
41
  "lib/generators/app_themer/views/templates/edit.html.erb",
42
+ "lib/generators/app_themer/views/templates/login.html.erb",
42
43
  "lib/generators/app_themer/views/templates/new.html.erb",
43
44
  "lib/generators/app_themer/views/templates/show.html.erb",
44
45
  "lib/generators/app_themer/views/templates/tables.html.erb",
data/index.html CHANGED
@@ -335,6 +335,45 @@
335
335
  </aside>
336
336
  </div>
337
337
  </div>
338
+
339
+ <div id="box">
340
+ <h1>Web App Theme</h1>
341
+ <section>
342
+ <h2>Login Box</h2>
343
+ <div class="content login">
344
+ <div class="flash">
345
+ <div class="message notice">
346
+ <p>Logged in successfully</p>
347
+ </div>
348
+ </div>
349
+ <form action="#" class="form login">
350
+ <div class="group clearfix">
351
+ <div class="left">
352
+ <label class="label right">Login</label>
353
+ </div>
354
+ <div class="right">
355
+ <input type="text" class="text_field" />
356
+ </div>
357
+ </div>
358
+ <div class="group clearfix">
359
+ <div class="left">
360
+ <label class="label right">Password</label>
361
+ </div>
362
+ <div class="right">
363
+ <input type="password" class="text_field" />
364
+ </div>
365
+ </div>
366
+ <div class="group navform clearfix">
367
+ <div class="right">
368
+ <button class="button" type="submit">
369
+ <img src="images/icons/key.png" alt="Save" /> Login
370
+ </button>
371
+ </div>
372
+ </div>
373
+ </form>
374
+ </section>
375
+ </div>
376
+
338
377
  </div> <!-- end of #container -->
339
378
 
340
379
  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
@@ -0,0 +1,23 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <!--[if IE]><![endif]-->
6
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
7
+
8
+ <title><%= options.app_name %></title>
9
+ <%%= stylesheet_link_tag "app-themer/base", "app-themer/handheld", "app-themer/themes/<%= options.theme %>/style", "app-themer/override", :cache => true %>
10
+ <%%= javascript_include_tag "app-themer/modernizr-1.5.min.js" %>
11
+ <%%= csrf_meta_tag %>
12
+ </head>
13
+ <!--[if lt IE 7 ]> <body class="ie6"> <![endif]-->
14
+ <!--[if IE 7 ]> <body class="ie7"> <![endif]-->
15
+ <!--[if IE 8 ]> <body class="ie8"> <![endif]-->
16
+ <!--[if IE 9 ]> <body class="ie9"> <![endif]-->
17
+ <!--[if (gt IE 9)|!(IE)]><!--> <body> <!--<![endif]-->
18
+
19
+ <div id="container">
20
+ <%%= yield %>
21
+ </div>
22
+ </body>
23
+ </html>
@@ -0,0 +1,42 @@
1
+ <div id="box">
2
+ <h1><%= options.app_name || "App Themer" %></h1>
3
+ <section>
4
+ <h2>Login Box</h2>
5
+ <div class="content login">
6
+ <div class="flash">
7
+ <%% flash.each do |type, message| -%>
8
+ <div class="message <%%= type %>">
9
+ <p><%%= message %></p>
10
+ </div>
11
+ <%% end -%>
12
+ </div>
13
+ <%%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => {:class => 'form login'}) do |f| %>
14
+ <div class="group clearfix">
15
+ <div class="left">
16
+ <%%= f.label :email, :class => 'label right' %>
17
+ </div>
18
+ <div class="right">
19
+ <%%= f.text_field :email, :class => 'text_field' %>
20
+ </div>
21
+ </div>
22
+ <div class="group clearfix">
23
+ <div class="left">
24
+ <%%= f.label :password, :class => 'label right' %>
25
+ </div>
26
+ <div class="right">
27
+ <%%= f.password_field :password, :class => 'text_field' %>
28
+ </div>
29
+ </div>
30
+ <div class="clearfix">
31
+ <div class="right">
32
+ <button class="button right" type="submit">
33
+ <%%= image_tag("app-themer/icons/key.png", :alt => "Login") %> Login
34
+ </button>
35
+ <%% if devise_mapping.rememberable? -%>
36
+ <span class="remember"><%%= f.check_box :remember_me %> <%%= f.label :remember_me %></span>
37
+ <%% end -%>
38
+ </div>
39
+ </div>
40
+ <%% end %>
41
+ </section>
42
+ </div>
@@ -10,7 +10,7 @@ module AppThemer
10
10
  class_option :layout, :type => :string, :desc => 'Specify the layout name'
11
11
  class_option :engine, :type => :string, :default => 'erb', :desc => 'Specify the template engine'
12
12
  class_option :will_paginate, :type => :boolean, :default => false, :desc => 'Specify if you use will_paginate'
13
- class_option :view_type, :type => :string, :default => 'crud', :desc => 'Specify the theme type, crud or text. Default is crud'
13
+ class_option :view_type, :type => :string, :default => 'crud', :desc => 'Specify the type of view(s): crud, text or login.'
14
14
 
15
15
  def initialize(args, *options)
16
16
  super(args, *options)
@@ -94,6 +94,9 @@ module AppThemer
94
94
  'text' => {
95
95
  'text.html.erb' => File.join('app/views', @controller_file_path, "show.html.#{options.engine}"),
96
96
  '_sidebar.html.erb' => File.join('app/views', @controller_file_path, "_sidebar.html.#{options.engine}")
97
+ },
98
+ 'login' => {
99
+ 'login.html.erb' => File.join('app/views', @controller_file_path, "new.html.#{options.engine}")
97
100
  }
98
101
  }
99
102
  selected_views = views[options.view_type]
@@ -68,108 +68,132 @@ button { width: auto; overflow: visible; }
68
68
  * base styles
69
69
  */
70
70
 
71
- body {
72
- font:13px "Lucida Grande","Lucida Sans Unicode",Arial,Verdana,sans-serif; *font-size:small; *font:x-small; line-height:1.22;
73
- line-height: 160%;
74
- background-color: #e5e5e5;
75
- }
76
- body, select, input, textarea { color:#111; }
77
- a {color: #111;}
78
- h1 {font-size: 197%; letter-spacing: -1px;}
79
- h2 {font-size: 182%;margin: 15px 0;letter-spacing: -1px;}
80
- p {margin: 15px 0;}
81
- .small {font-size: 85%;}
82
- .gray {
83
- color: #999;
84
- font-style: italic;
85
- font-family: Georgia, serif;
86
- }
87
-
88
- .highlight {
89
- color: #363636;
90
- background-color: #ff8;
91
- font-weight: bold;
92
- }
93
-
94
- nav ul li {
95
- float: left;
96
- padding: 0 15px;
97
- }
98
-
99
- nav ul li a {
100
- text-decoration: none;
101
- }
102
-
103
- #wrapper {
104
- padding: 20px;
105
- }
106
-
107
- #main {
108
- float:left;
109
- width:71%;
110
- }
111
-
112
- .pagination a, .pagination span, .pagination em {
113
- padding: 2px 5px;
114
- margin-right: 5px;
115
- display: block;
116
- float: left;
117
- border-style: solid;
118
- border-width: 1px;
119
- }
120
-
121
- .pagination em {
122
- font-weight: bold;
123
- }
124
-
125
- .pagination a {
126
- text-decoration: none;
127
- }
128
-
129
- a.button:link, a.button:visited, a.button:hover, a.button:active, button.button {
130
- color: #222;
131
- display:block;
132
- float:left;
133
- margin:0 7px 0 0;
134
- background-color: #eee;
135
- border:1px solid #bfbfbf;
136
- font-size: 1em;
137
- line-height: 1.3em;
138
- font-weight:bold;
139
- cursor:pointer;
140
- padding:5px 10px 6px 7px;
141
- text-decoration: none;
142
- }
143
-
144
- button.button {
145
- width:auto;
146
- overflow:visible;
147
- padding:4px 10px 3px 7px; /* IE6 */
148
- }
149
- button.button[type] {
150
- padding:5px 10px 5px 7px; /* Firefox */
151
- line-height:17px; /* Safari */
152
- }
153
-
154
- *:first-child+html button.button[type] {
155
- padding:4px 10px 3px 7px; /* IE7 */
156
- }
157
-
158
- button.button img, a.button img {
159
- margin:0 3px -3px 0 !important;
160
- padding:0;
161
- border:none;
162
- width:16px;
163
- height:16px;
164
- }
165
-
166
- button.button:hover, a.button:hover {
167
- background-color:#dedede;
168
- }
169
-
170
- button.button:active, a.button:active {
171
- background-color:#e5e5e5;
172
- }
71
+ body {
72
+ font:13px "Lucida Grande","Lucida Sans Unicode",Arial,Verdana,sans-serif; *font-size:small; *font:x-small; line-height:1.22;
73
+ line-height: 160%;
74
+ background-color: #e5e5e5;
75
+ }
76
+ body, select, input, textarea { color:#111; }
77
+ a {color: #111;}
78
+ h1 {font-size: 197%; letter-spacing: -1px;}
79
+ h2 {font-size: 182%;margin: 15px 0;letter-spacing: -1px;}
80
+ p {margin: 15px 0;}
81
+ .small {font-size: 85%;}
82
+ .gray {
83
+ color: #999;
84
+ font-style: italic;
85
+ font-family: Georgia, serif;
86
+ }
87
+
88
+ .highlight {
89
+ color: #363636;
90
+ background-color: #ff8;
91
+ font-weight: bold;
92
+ }
93
+
94
+ nav ul li {
95
+ float: left;
96
+ padding: 0 15px;
97
+ }
98
+
99
+ nav ul li a {
100
+ text-decoration: none;
101
+ }
102
+
103
+ #wrapper {
104
+ padding: 20px;
105
+ }
106
+
107
+ #main {
108
+ float:left;
109
+ width:71%;
110
+ }
111
+
112
+ .pagination a, .pagination span, .pagination em {
113
+ padding: 2px 5px;
114
+ margin-right: 5px;
115
+ display: block;
116
+ float: left;
117
+ border-style: solid;
118
+ border-width: 1px;
119
+ }
120
+
121
+ .pagination em {
122
+ font-weight: bold;
123
+ }
124
+
125
+ .pagination a {
126
+ text-decoration: none;
127
+ }
128
+
129
+ a.button:link, a.button:visited, a.button:hover, a.button:active, button.button {
130
+ color: #222;
131
+ display:block;
132
+ float:left;
133
+ margin:0 7px 0 0;
134
+ background-color: #eee;
135
+ border:1px solid #bfbfbf;
136
+ font-size: 1em;
137
+ line-height: 1.3em;
138
+ font-weight:bold;
139
+ cursor:pointer;
140
+ padding:5px 10px 6px 7px;
141
+ text-decoration: none;
142
+ }
143
+
144
+ button.button {
145
+ width:auto;
146
+ overflow:visible;
147
+ padding:4px 10px 3px 7px; /* IE6 */
148
+ }
149
+ button.button[type] {
150
+ padding:5px 10px 5px 7px; /* Firefox */
151
+ line-height:17px; /* Safari */
152
+ }
153
+
154
+ *:first-child+html button.button[type] {
155
+ padding:4px 10px 3px 7px; /* IE7 */
156
+ }
157
+
158
+ button.button img, a.button img {
159
+ margin:0 3px -3px 0 !important;
160
+ padding:0;
161
+ border:none;
162
+ width:16px;
163
+ height:16px;
164
+ }
165
+
166
+ button.button:hover, a.button:hover {
167
+ background-color:#dedede;
168
+ }
169
+
170
+ button.button:active, a.button:active {
171
+ background-color:#e5e5e5;
172
+ }
173
+
174
+ /* box */
175
+
176
+ #box {
177
+ width: 500px;
178
+ margin: 50px auto;
179
+ }
180
+
181
+ #box h1 {
182
+ margin-bottom: 15px;
183
+ }
184
+
185
+ #box section {
186
+ margin-bottom: 20px;
187
+ }
188
+
189
+ #box section h2 {
190
+ padding: 10px 15px;
191
+ margin: 0;
192
+ }
193
+
194
+ #box section .content {
195
+ padding: 10px 20px;
196
+ }
173
197
 
174
198
  /*
175
199
  * print styles
@@ -273,6 +273,11 @@ input.checkbox {
273
273
  border: 1px solid #e2e2e2;
274
274
  }
275
275
 
276
+ .login .form input.text_field, .login .form textarea.text_area {
277
+ width: 97%;
278
+ border: 1px solid #e2e2e2;
279
+ }
280
+
276
281
  .ie6 .form input.text_field, .ie6 .form textarea.text_area {
277
282
  width: 98%;
278
283
  }
@@ -441,4 +446,17 @@ aside h2 {
441
446
  border-bottom: none;
442
447
  padding-bottom: 0;
443
448
  }
444
- /* @end */
449
+ /* @end */
450
+
451
+ #box section {
452
+ background: #fff;
453
+
454
+ -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
455
+ -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
456
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
457
+ }
458
+
459
+ #box section h2 {
460
+ background: #002134;
461
+ color: #fff;
462
+ }
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 1
9
- version: 0.4.1
8
+ - 6
9
+ version: 0.4.6
10
10
  platform: ruby
11
11
  authors:
12
12
  - Matthew Hager
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-10-18 00:00:00 -05:00
17
+ date: 2010-10-19 00:00:00 -05:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -62,6 +62,7 @@ files:
62
62
  - lib/generators/app_themer/views/templates/_form.html.erb
63
63
  - lib/generators/app_themer/views/templates/_sidebar.html.erb
64
64
  - lib/generators/app_themer/views/templates/edit.html.erb
65
+ - lib/generators/app_themer/views/templates/login.html.erb
65
66
  - lib/generators/app_themer/views/templates/new.html.erb
66
67
  - lib/generators/app_themer/views/templates/show.html.erb
67
68
  - lib/generators/app_themer/views/templates/tables.html.erb