merb-ui 0.4 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -14,7 +14,7 @@ spec = Gem::Specification.new do |s|
14
14
  s.name = 'merb-ui'
15
15
  s.rubyforge_project = 'uipoet'
16
16
  s.summary = 'User Interface Components for Merb'
17
- s.version = '0.4'
17
+ s.version = '0.4.1'
18
18
  end
19
19
 
20
20
  Rake::GemPackageTask.new(spec) do |pkg|
@@ -8,6 +8,8 @@ module Merb::GlobalHelpers
8
8
  attributes = {}
9
9
  attributes[:align] = options[:align] if options[:align]
10
10
  attributes[:class] = 'mui_block'
11
+ attributes[:class] << ' mui_subtle' if options[:subtle]
12
+ attributes[:class] << ' mui_truncate' if options[:truncate]
11
13
  if options[:inline]
12
14
  tag_type = :span
13
15
  else
@@ -323,7 +325,18 @@ module Merb::GlobalHelpers
323
325
  attributes[:style] << "width:#{options[:width]};" if options[:width]
324
326
  end
325
327
  content = ''
326
- content << mui_title(:title => options[:title], :title_size => options[:title_size]) if options[:title]
328
+ if options[:title]
329
+ title_attributes = {}
330
+ title_attributes[:class] = 'mui_tray_title mui_truncate'
331
+ if options[:title_url]
332
+ title_attributes[:class] << ' mui_link'
333
+ title_attributes[:href] = options[:title_url]
334
+ title_type = :a
335
+ else
336
+ title_type = :div
337
+ end
338
+ content << tag(title_type, options[:title], title_attributes)
339
+ end
327
340
  content << capture(&block) if block_given?
328
341
  tag(tag_type, content, attributes)
329
342
  end
@@ -258,19 +258,19 @@ button.mui_button td {
258
258
  /* link */
259
259
 
260
260
  .mui_link {
261
- color: #0066ff;
261
+ color: <%= color(0, 0.2, 1) %>;
262
262
  text-decoration: none;
263
263
  }
264
264
  .mui_link:visited {
265
- color: #993399;
265
+ color: <%= color(0.5, 0.25, 0.5) %>;
266
266
  }
267
267
  .mui_link:active {
268
- color: #3399ff;
268
+ color: <%= color(0.1, 0.6, 1) %>;
269
269
  outline: 0;
270
270
  text-decoration: underline;
271
271
  }
272
272
  .mui_link:focus {
273
- color: #3399ff;
273
+ color: <%= color(0.1, 0.6, 1) %>;
274
274
  outline: 0;
275
275
  }
276
276
  .mui_link:hover {
@@ -359,6 +359,16 @@ p.mui_paragraph+p.mui_paragraph {
359
359
  <%= round %>
360
360
  }
361
361
 
362
+ /* subtle */
363
+
364
+ .mui_subtle {
365
+ color: <%= color(0.25, 0.25, 0.25) %>;
366
+ font-size: 0.85em;
367
+ }
368
+ .mui_subtle b {
369
+ color: <%= color(0, 0, 0) %>;
370
+ }
371
+
362
372
  /* tab */
363
373
 
364
374
  .mui_tab {
@@ -409,19 +419,25 @@ p.mui_paragraph+p.mui_paragraph {
409
419
  /* tray */
410
420
 
411
421
  .mui_tray {
412
- background-color: <%= color(0.95, 0.95, 0.95) %>;
422
+ background-image: url('<%= mui_path :image %>/bezel.png');
423
+ background-color: <%= color(1, 1, 1) %>;
424
+ background-position: top center;
425
+ background-repeat: repeat-x;
413
426
  border-bottom-color: <%= color(0.9, 0.9, 0.9) %>;
414
427
  border-left-color: <%= color(0.8, 0.8, 0.8) %>;
415
428
  border-right-color: <%= color(0.8, 0.8, 0.8) %>;
416
- border-top-color: <%= color(0.7, 0.7, 0.7) %>;
417
429
  border-style: solid;
430
+ border-top-color: <%= color(0.6, 0.6, 0.6) %>;
418
431
  border-width: 1px;
419
432
  margin: 0.5em;
420
- padding: 1em;
433
+ padding: 0 0 0.5em; 0;
421
434
  <%= round %>
422
435
  }
423
436
  .mui_tray .mui_block, .mui_tray .mui_tray {
424
- margin: 0;
437
+ margin: 0.5em 1em 0 1em;
438
+ }
439
+ .mui_tray .mui_subtle {
440
+ margin: 0 1em 0 1em !important;
425
441
  }
426
442
  .mui_tray .mui_divider {
427
443
  margin-bottom: 1em;
@@ -436,19 +452,33 @@ span.mui_tray {
436
452
  display: inline-block;
437
453
  vertical-align: top;
438
454
  }
455
+ .mui_tray_title {
456
+ background-color: <%= color(0.95, 0.95, 0.95) %>;
457
+ background-image: url('<%= mui_path :image %>/bezel.png');
458
+ background-position: top center;
459
+ background-repeat: repeat-x;
460
+ border-bottom-color: <%= color(1, 1, 1) %>;
461
+ border-bottom-style: solid;
462
+ border-bottom-width: 1px;
463
+ font-size: 1.125em;
464
+ padding: 0.25em 1em 0.25em 1em;
465
+ white-space: nowrap;
466
+ <%= round(:top_left => true, :top_right => true) %>
467
+ }
468
+ a.mui_tray_title {
469
+ display: block;
470
+ }
471
+ a.mui_tray_title:hover {
472
+ background-color: <%= color(1, 1, 1) %>;
473
+ cursor: pointer;
474
+ }
439
475
 
440
476
  /* truncate */
441
477
 
442
478
  .mui_truncate {
443
- color: <%= color(0.5, 0.5, 0.5) %>;
444
- font-size: 0.85em;
445
- }
446
-
447
- /* url */
448
-
449
- .mui_url {
450
- color: <%= color(0.5, 0.5, 0.5) %>;
451
- font-size: 0.85em;
479
+ overflow: hidden;
480
+ text-overflow: ellipsis;
481
+ white-space: nowrap;
452
482
  }
453
483
 
454
484
  /* window */
Binary file
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: merb-ui
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.4"
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - UiPoet
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-15 00:00:00 -08:00
12
+ date: 2008-12-16 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -57,7 +57,9 @@ files:
57
57
  - lib/merb-ui/spectasks.rb
58
58
  - lib/merb-ui.rb
59
59
  - public/images
60
+ - public/images/bezel.png
60
61
  - public/images/glass.png
62
+ - public/images/metal.png
61
63
  - public/images/nil.png
62
64
  - public/images/plastic.png
63
65
  - public/images/rubber.png