aureus 1.2.2 → 1.3.0
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/Gemfile.lock +1 -1
- data/Readme.md +2 -0
- data/app/assets/stylesheets/aureus/topbar.scss +55 -9
- data/lib/aureus/toolbar.rb +25 -0
- data/lib/aureus/version.rb +1 -1
- data/spec/lib/views/toolbar.haml +3 -0
- metadata +4 -4
data/Gemfile.lock
CHANGED
data/Readme.md
CHANGED
@@ -78,6 +78,8 @@ There are several helper methods available to generate the interface:
|
|
78
78
|
- l.link_to "root", root_url
|
79
79
|
- l.link_to "an anchor", an_anchor_url
|
80
80
|
- l.info "cool"
|
81
|
+
- l.dropdown "a caption" do |d|
|
82
|
+
- d.link_to "an anchor", an_anchor_url
|
81
83
|
- t.right do |r|
|
82
84
|
- r.info "some info"
|
83
85
|
- r.link_to "an anchor", some_other_controller_url
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#aureus-toolbar {
|
2
2
|
padding: 11px 40px;
|
3
|
-
|
3
|
+
height: 18px;
|
4
4
|
@include gradient(#333,#222);
|
5
5
|
background-image: url($asset_topbar_background);
|
6
6
|
h1 {
|
@@ -10,18 +10,18 @@
|
|
10
10
|
float: left;
|
11
11
|
text-shadow: -1px -1px 0 black;
|
12
12
|
}
|
13
|
-
ul.left {
|
13
|
+
> ul.left {
|
14
14
|
float: left;
|
15
15
|
margin-left: 20px;
|
16
16
|
}
|
17
|
-
ul.right {
|
17
|
+
> ul.right {
|
18
18
|
float: right;
|
19
19
|
}
|
20
|
-
ul {
|
21
|
-
li {
|
20
|
+
> ul {
|
21
|
+
> li {
|
22
22
|
display: inline;
|
23
23
|
position: relative;
|
24
|
-
a, span {
|
24
|
+
> a, span {
|
25
25
|
font-size: 14px ;
|
26
26
|
color: #ddd;
|
27
27
|
text-decoration: none;
|
@@ -29,15 +29,61 @@
|
|
29
29
|
@include border-radius(15px);
|
30
30
|
text-shadow: -1px -1px 0 black;
|
31
31
|
}
|
32
|
-
span {
|
32
|
+
> span {
|
33
33
|
color: #777;
|
34
34
|
}
|
35
35
|
}
|
36
|
-
li
|
37
|
-
|
36
|
+
> li.dropdown-outer {
|
37
|
+
> div {
|
38
|
+
display: inline;
|
39
|
+
font-size: 14px ;
|
40
|
+
color: #ddd;
|
41
|
+
text-decoration: none;
|
42
|
+
padding: 4px 10px;
|
43
|
+
@include border-radius(15px);
|
44
|
+
text-shadow: -1px -1px 0 black;
|
45
|
+
}
|
46
|
+
> ul.dropdown-inner {
|
47
|
+
display: none;
|
48
|
+
li {
|
49
|
+
margin: 7px 0;
|
50
|
+
a {
|
51
|
+
white-space: nowrap;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
}
|
55
|
+
}
|
56
|
+
> li:hover {
|
57
|
+
> a {
|
38
58
|
color: white;
|
39
59
|
@include gradient(#000,#333);
|
40
60
|
}
|
41
61
|
}
|
62
|
+
li.dropdown-outer:hover {
|
63
|
+
margin-bottom: 5px;
|
64
|
+
> ul.dropdown-inner {
|
65
|
+
margin-left: -20px;
|
66
|
+
display: block !important;
|
67
|
+
position: absolute;
|
68
|
+
@include gradient(#333,#222);
|
69
|
+
@include border-radius(15px);
|
70
|
+
padding: 20px;
|
71
|
+
margin-top: 5px;
|
72
|
+
li > a, span {
|
73
|
+
font-size: 14px ;
|
74
|
+
color: #ddd;
|
75
|
+
text-decoration: none;
|
76
|
+
padding: 4px 10px;
|
77
|
+
@include border-radius(15px);
|
78
|
+
text-shadow: -1px -1px 0 black;
|
79
|
+
}
|
80
|
+
> li:hover {
|
81
|
+
> a {
|
82
|
+
color: white;
|
83
|
+
@include gradient(#000,#333);
|
84
|
+
}
|
85
|
+
}
|
86
|
+
}
|
87
|
+
}
|
42
88
|
}
|
43
89
|
}
|
data/lib/aureus/toolbar.rb
CHANGED
@@ -35,6 +35,12 @@ module Aureus
|
|
35
35
|
@items << ToolbarButton.new(text,url,args)
|
36
36
|
end
|
37
37
|
|
38
|
+
def dropdown title
|
39
|
+
toolbar = ToolbarDropdown.new(title)
|
40
|
+
yield toolbar
|
41
|
+
@items << toolbar
|
42
|
+
end
|
43
|
+
|
38
44
|
def info text
|
39
45
|
@items << ToolbarInfo.new(text)
|
40
46
|
end
|
@@ -71,4 +77,23 @@ module Aureus
|
|
71
77
|
|
72
78
|
end
|
73
79
|
|
80
|
+
class ToolbarDropdown < Renderable
|
81
|
+
|
82
|
+
def initialize title
|
83
|
+
@title = title
|
84
|
+
@items = Array.new
|
85
|
+
end
|
86
|
+
|
87
|
+
def link_to text, url, *args
|
88
|
+
@items << ToolbarButton.new(text,url,args)
|
89
|
+
end
|
90
|
+
|
91
|
+
def render
|
92
|
+
title = content_tag "div", @title, :class => "dropdown-caption"
|
93
|
+
list = content_tag "ul", compact_render(*@items), :class => "dropdown-inner"
|
94
|
+
content_tag "li", title+list, :class => "dropdown-outer"
|
95
|
+
end
|
96
|
+
|
97
|
+
end
|
98
|
+
|
74
99
|
end
|
data/lib/aureus/version.rb
CHANGED
data/spec/lib/views/toolbar.haml
CHANGED
@@ -3,6 +3,9 @@
|
|
3
3
|
- t.left do |l|
|
4
4
|
- l.link_to "an anchor", "http://www.example.com"
|
5
5
|
- l.link_to "an anchor", "http://www.example.com"
|
6
|
+
- l.dropdown "a caption" do |d|
|
7
|
+
- d.link_to "an anchor", "http://www.example.com"
|
8
|
+
- d.link_to "an anchor", "http://www.example.com"
|
6
9
|
- t.right do |r|
|
7
10
|
- r.info "some info"
|
8
11
|
- r.link_to "an anchor", "http://www.example.com"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aureus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-02-12 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Aureus is a tool to quickly generate admin interfaces for a rails app.
|
15
15
|
It's between scaffolding an tools like ActiveAdmin.
|
@@ -127,7 +127,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
127
127
|
version: '0'
|
128
128
|
segments:
|
129
129
|
- 0
|
130
|
-
hash:
|
130
|
+
hash: -1985642142424112972
|
131
131
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
132
132
|
none: false
|
133
133
|
requirements:
|
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
136
|
version: '0'
|
137
137
|
segments:
|
138
138
|
- 0
|
139
|
-
hash:
|
139
|
+
hash: -1985642142424112972
|
140
140
|
requirements: []
|
141
141
|
rubyforge_project:
|
142
142
|
rubygems_version: 1.8.24
|