express_ui 0.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +38 -0
- data/Rakefile +37 -0
- data/app/assets/config/express_ui_manifest.js +2 -0
- data/app/assets/javascripts/express_ui/application.js +1 -0
- data/app/assets/javascripts/express_ui/copy_code.js +63 -0
- data/app/assets/javascripts/express_ui/search.js +103 -0
- data/app/assets/javascripts/express_ui/styleguide.js +90 -0
- data/app/assets/stylesheets/express_ui/atoms/_animations.sass +35 -0
- data/app/assets/stylesheets/express_ui/atoms/_buttons.sass +119 -0
- data/app/assets/stylesheets/express_ui/atoms/_headings.sass +51 -0
- data/app/assets/stylesheets/express_ui/atoms/_icons.sass +3 -0
- data/app/assets/stylesheets/express_ui/atoms/_images.sass +37 -0
- data/app/assets/stylesheets/express_ui/atoms/_media_queries.sass +27 -0
- data/app/assets/stylesheets/express_ui/atoms/_mixins.sass +33 -0
- data/app/assets/stylesheets/express_ui/atoms/_reset.sass +11 -0
- data/app/assets/stylesheets/express_ui/atoms/_typography.sass +167 -0
- data/app/assets/stylesheets/express_ui/atoms/_variables.sass +52 -0
- data/app/assets/stylesheets/express_ui/molecules/_button_group.sass +54 -0
- data/app/assets/stylesheets/express_ui/molecules/_container.sass +29 -0
- data/app/assets/stylesheets/express_ui/molecules/_flash_messages.sass +56 -0
- data/app/assets/stylesheets/express_ui/molecules/_form_groups.sass +96 -0
- data/app/assets/stylesheets/express_ui/molecules/_forms.sass +159 -0
- data/app/assets/stylesheets/express_ui/molecules/_lists.sass +56 -0
- data/app/assets/stylesheets/express_ui/molecules/_nav.sass +85 -0
- data/app/assets/stylesheets/express_ui/molecules/_tables.sass +77 -0
- data/app/assets/stylesheets/express_ui/molecules/_tabs.sass +23 -0
- data/app/assets/stylesheets/express_ui/organisms/_header.sass +29 -0
- data/app/assets/stylesheets/express_ui/organisms/_sidebar.sass +113 -0
- data/app/assets/stylesheets/express_ui/style.sass +31 -0
- data/app/assets/stylesheets/express_ui/styleguide.sass +200 -0
- data/app/assets/stylesheets/express_ui/templates/_content_sidebar.sass +31 -0
- data/app/assets/stylesheets/express_ui/templates/_full_width.sass +5 -0
- data/app/assets/stylesheets/express_ui/templates/_half_width.sass +8 -0
- data/app/assets/stylesheets/express_ui/templates/_master_detail.sass +50 -0
- data/app/components/code_demo.rb +31 -0
- data/app/controllers/express_ui/about_controller.rb +10 -0
- data/app/controllers/express_ui/application_controller.rb +5 -0
- data/app/controllers/express_ui/styleguide_controller.rb +10 -0
- data/app/controllers/express_ui/templates_controller.rb +26 -0
- data/app/controllers/express_ui/uicomponents_controller.rb +26 -0
- data/app/helpers/express_ui/application_helper.rb +28 -0
- data/app/jobs/express_ui/application_job.rb +4 -0
- data/app/mailers/express_ui/application_mailer.rb +6 -0
- data/app/models/express_ui/application_record.rb +5 -0
- data/app/views/express_ui/atoms/_animations.html.erb +33 -0
- data/app/views/express_ui/atoms/_buttons.html.erb +129 -0
- data/app/views/express_ui/atoms/_headings.html.erb +3 -0
- data/app/views/express_ui/atoms/_icons.html.erb +13 -0
- data/app/views/express_ui/atoms/_mixins.html.erb +6 -0
- data/app/views/express_ui/atoms/_typography.html.erb +201 -0
- data/app/views/express_ui/atoms/_variables.html.erb +50 -0
- data/app/views/express_ui/molecules/_button_group.html.erb +90 -0
- data/app/views/express_ui/molecules/_container.html.erb +32 -0
- data/app/views/express_ui/molecules/_flash_messages.html.erb +49 -0
- data/app/views/express_ui/molecules/_form_group_horizontal.html.erb +14 -0
- data/app/views/express_ui/molecules/_form_group_inline.html.erb +1 -0
- data/app/views/express_ui/molecules/_form_group_single_line.html.erb +9 -0
- data/app/views/express_ui/molecules/_form_groups.html.erb +69 -0
- data/app/views/express_ui/molecules/_forms.html.erb +209 -0
- data/app/views/express_ui/molecules/_forms_checkbox.html.erb +20 -0
- data/app/views/express_ui/molecules/_forms_radio.html.erb +12 -0
- data/app/views/express_ui/molecules/_forms_select.html.erb +11 -0
- data/app/views/express_ui/molecules/_nav.html.erb +11 -0
- data/app/views/express_ui/molecules/_nav_mega_menu.html.erb +74 -0
- data/app/views/express_ui/molecules/_table.html.erb +93 -0
- data/app/views/express_ui/molecules/_table_with_filtering.html.erb +55 -0
- data/app/views/express_ui/organisms/_header.html.erb +24 -0
- data/app/views/express_ui/shared/_header.html.erb +10 -0
- data/app/views/express_ui/shared/_search_box.html.erb +6 -0
- data/app/views/express_ui/shared/_sidebar_left.html.erb +4 -0
- data/app/views/express_ui/shared/_sidebar_right.html.erb +5 -0
- data/app/views/express_ui/styleguide/about.html.erb +22 -0
- data/app/views/express_ui/styleguide/index.html.erb +79 -0
- data/app/views/express_ui/templates/_header.html.erb +15 -0
- data/app/views/express_ui/templates/_templates.html.erb +57 -0
- data/app/views/express_ui/templates/content_and_sidebar.html.erb +32 -0
- data/app/views/express_ui/templates/content_and_sidebar_fixed.html.erb +34 -0
- data/app/views/express_ui/templates/full_width.html.erb +25 -0
- data/app/views/express_ui/templates/half_width.html.erb +25 -0
- data/app/views/express_ui/templates/master_detail.html.erb +41 -0
- data/app/views/express_ui/templates/master_detail_fixed.html.erb +36 -0
- data/app/views/express_ui/uicomponents/_buttons.html.et +10 -0
- data/app/views/express_ui/uicomponents/_flash_message.html.et +19 -0
- data/app/views/express_ui/uicomponents/_forms.html.et +118 -0
- data/app/views/express_ui/uicomponents/_heading.html.et +24 -0
- data/app/views/express_ui/uicomponents/_icons.html.et +35 -0
- data/app/views/express_ui/uicomponents/_layout.html.et +47 -0
- data/app/views/express_ui/uicomponents/_lists.html.et +9 -0
- data/app/views/express_ui/uicomponents/_login.html.erb +15 -0
- data/app/views/express_ui/uicomponents/_nav.html.et +18 -0
- data/app/views/express_ui/uicomponents/_pages.html.et +22 -0
- data/app/views/express_ui/uicomponents/_panel.html.et +33 -0
- data/app/views/express_ui/uicomponents/_popup.html.et +19 -0
- data/app/views/express_ui/uicomponents/_register.html.erb +14 -0
- data/app/views/express_ui/uicomponents/_sidebar.html.et +8 -0
- data/app/views/express_ui/uicomponents/_table.html.et +29 -0
- data/app/views/express_ui/uicomponents/_widget_box.html.et +14 -0
- data/app/views/express_ui/uicomponents/index.html.erb +55 -0
- data/app/views/layouts/express_ui/styleguide.html.erb +20 -0
- data/config/routes.rb +12 -0
- data/lib/express_ui.rb +5 -0
- data/lib/express_ui/engine.rb +12 -0
- data/lib/express_ui/version.rb +3 -0
- data/lib/tasks/express_ui_tasks.rake +4 -0
- metadata +251 -0
@@ -0,0 +1,31 @@
|
|
1
|
+
.ae-template-content-sidebar
|
2
|
+
@include sidebar(15%)
|
3
|
+
display: flex
|
4
|
+
flex-flow: row nowrap
|
5
|
+
align-items: stretch
|
6
|
+
max-width: 100%
|
7
|
+
|
8
|
+
.ae-sidebar-left
|
9
|
+
height: auto
|
10
|
+
overflow: visible
|
11
|
+
|
12
|
+
.ae-content
|
13
|
+
padding: $container-padding*2 $container-padding*4
|
14
|
+
width: $container
|
15
|
+
|
16
|
+
.ae-template-content-sidebar-fixed
|
17
|
+
@include sidebar-fixed(15%)
|
18
|
+
display: flex
|
19
|
+
flex-flow: row nowrap
|
20
|
+
align-items: stretch
|
21
|
+
max-width: 100%
|
22
|
+
height: 100%
|
23
|
+
|
24
|
+
.ae-sidebar-left
|
25
|
+
position: fixed
|
26
|
+
height: 100%
|
27
|
+
|
28
|
+
.ae-content
|
29
|
+
position: absolute
|
30
|
+
padding: $container-padding*2 $container-padding*4
|
31
|
+
right: $container-padding*4
|
@@ -0,0 +1,50 @@
|
|
1
|
+
@mixin sidebar-right($width)
|
2
|
+
.ae-content
|
3
|
+
right: $width
|
4
|
+
|
5
|
+
.ae-sidebar-right
|
6
|
+
width: $width
|
7
|
+
|
8
|
+
.ae-template-master-detail
|
9
|
+
@include sidebar(15%)
|
10
|
+
@include sidebar-right(30%)
|
11
|
+
display: flex
|
12
|
+
flex-flow: row nowrap
|
13
|
+
align-items: stretch
|
14
|
+
max-width: 100%
|
15
|
+
|
16
|
+
.ae-sidebar-left
|
17
|
+
height: auto
|
18
|
+
overflow: visible
|
19
|
+
|
20
|
+
.ae-sidebar-right
|
21
|
+
@include container-table-cell
|
22
|
+
height: 100%
|
23
|
+
right: 0
|
24
|
+
position: absolute
|
25
|
+
|
26
|
+
.ae-content
|
27
|
+
padding: $container-padding $container-padding*4
|
28
|
+
width: $container
|
29
|
+
|
30
|
+
.ae-template-master-detail-fixed
|
31
|
+
@include sidebar-right(30%)
|
32
|
+
@include sidebar-fixed(15%)
|
33
|
+
display: flex
|
34
|
+
flex-flow: row nowrap
|
35
|
+
align-items: stretch
|
36
|
+
max-width: 100%
|
37
|
+
height: 100%
|
38
|
+
|
39
|
+
.ae-sidebar-left
|
40
|
+
position: fixed
|
41
|
+
height: 100%
|
42
|
+
|
43
|
+
.ae-sidebar-right
|
44
|
+
position: fixed
|
45
|
+
height: 100%
|
46
|
+
right: 0
|
47
|
+
|
48
|
+
.ae-content
|
49
|
+
position: absolute
|
50
|
+
padding: $container-padding $container-padding*4
|
@@ -0,0 +1,31 @@
|
|
1
|
+
class CodeDemo < ExpressTemplates::Components::Container
|
2
|
+
|
3
|
+
before_build -> {
|
4
|
+
set_attribute(:class, 'ae-demo-container')
|
5
|
+
}
|
6
|
+
|
7
|
+
contains -> (&block) {
|
8
|
+
ul(class: 'ae-tabs') {
|
9
|
+
li(class: 'ae-tab active-tab', 'data-tab' => 'input'){
|
10
|
+
"Input"
|
11
|
+
}
|
12
|
+
li(class: 'ae-tab', 'data-tab' => 'output'){
|
13
|
+
"Output"
|
14
|
+
}
|
15
|
+
}
|
16
|
+
|
17
|
+
div(id: 'input', class: 'ae-tab-content active-tab'){
|
18
|
+
highlight_code_block {
|
19
|
+
block.call
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
div(id: 'output', class: 'ae-tab-content'){
|
24
|
+
div(class: 'demo-container'){
|
25
|
+
eval block.call.html_safe
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require_dependency "express_ui/application_controller"
|
2
|
+
|
3
|
+
module ExpressUi
|
4
|
+
class TemplatesController < ApplicationController
|
5
|
+
layout "express_ui/styleguide"
|
6
|
+
|
7
|
+
def master_detail_scroll
|
8
|
+
end
|
9
|
+
|
10
|
+
def master_detail_fixed
|
11
|
+
end
|
12
|
+
|
13
|
+
def content_and_sidebar
|
14
|
+
end
|
15
|
+
|
16
|
+
def content_and_sidebar_fixed
|
17
|
+
end
|
18
|
+
|
19
|
+
def half_width
|
20
|
+
end
|
21
|
+
|
22
|
+
def full_width
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require_dependency "express_ui/application_controller"
|
2
|
+
|
3
|
+
module ExpressUi
|
4
|
+
class UicomponentsController < ApplicationController
|
5
|
+
layout "express_ui/styleguide"
|
6
|
+
|
7
|
+
def index
|
8
|
+
end
|
9
|
+
|
10
|
+
def master_detail_scroll
|
11
|
+
end
|
12
|
+
|
13
|
+
def master_detail_fixed
|
14
|
+
end
|
15
|
+
|
16
|
+
def content_and_sidebar
|
17
|
+
end
|
18
|
+
|
19
|
+
def half_width
|
20
|
+
end
|
21
|
+
|
22
|
+
def full_width
|
23
|
+
end
|
24
|
+
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module ExpressUi
|
2
|
+
module ApplicationHelper
|
3
|
+
|
4
|
+
def nav_link_to(text, path)
|
5
|
+
class_name = current_page?(path) ? 'ae-nav-item active' : 'ae-nav-item'
|
6
|
+
|
7
|
+
content_tag :li, class: class_name do
|
8
|
+
link_to text, path
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def highlight_code_block(&block)
|
13
|
+
code_block = capture(&block)
|
14
|
+
|
15
|
+
code_block_in_code_element = code_block_in_code_element(code_block)
|
16
|
+
|
17
|
+
content_tag :pre do
|
18
|
+
code_block_in_code_element
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def code_block_in_code_element(code_block)
|
23
|
+
content_tag :code, class: "ae-code-block prettyprint" do
|
24
|
+
code_block.strip_heredoc.html_safe
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
<section>
|
2
|
+
<p>Hover states using CSS animations</p>
|
3
|
+
|
4
|
+
<button class="ae-btn ae-fade-in">Fade In</button>
|
5
|
+
<button class="ae-btn ae-fade-out">Fade Out</button>
|
6
|
+
<button class="ae-btn ae-ease-in-out">Ease In Out (Button Hover)</button>
|
7
|
+
|
8
|
+
<table>
|
9
|
+
<thead>
|
10
|
+
<th>Animation</th>
|
11
|
+
<th>Class</th>
|
12
|
+
<th>Usage</th>
|
13
|
+
</thead>
|
14
|
+
<tbody>
|
15
|
+
<tr>
|
16
|
+
<td>Fade In</td>
|
17
|
+
<td><code>.ae-fade-in</code></td>
|
18
|
+
<td>Show element</td>
|
19
|
+
</tr>
|
20
|
+
<tr>
|
21
|
+
<td>Fade Out</td>
|
22
|
+
<td><code>.ae-fade-out</code></td>
|
23
|
+
<td>Hide element</td>
|
24
|
+
</tr>
|
25
|
+
<tr>
|
26
|
+
<td>Ease In Out</td>
|
27
|
+
<td><code>.ae-ease-in-out</code></td>
|
28
|
+
<td>Easing in and out <br /><small>Automatically applied to buttons and image links</small></td>
|
29
|
+
</tr>
|
30
|
+
|
31
|
+
</tbody>
|
32
|
+
</table>
|
33
|
+
</section>
|
@@ -0,0 +1,129 @@
|
|
1
|
+
<section>
|
2
|
+
<p>Required. Buttons require the <code>ae-btn</code> class and <code>type="button"</code> attribute.</p>
|
3
|
+
|
4
|
+
<h4>Button Sizes</h4>
|
5
|
+
<table>
|
6
|
+
<thead>
|
7
|
+
<th>Size</th>
|
8
|
+
<th>Demo</th>
|
9
|
+
<th>Usage</th>
|
10
|
+
</thead>
|
11
|
+
<tbody>
|
12
|
+
<tr>
|
13
|
+
<td>Small</td>
|
14
|
+
<td><button type="button" class="ae-btn ae-btn-sm">Small</button></td>
|
15
|
+
<td><code>.ae-btn-sm</code></td>
|
16
|
+
</tr>
|
17
|
+
<tr>
|
18
|
+
<td>Medium</td>
|
19
|
+
<td><button type="button" class="ae-btn ae-btn-md">Medium</button></td>
|
20
|
+
<td><code>.ae-btn-md</code></td>
|
21
|
+
</tr>
|
22
|
+
<tr>
|
23
|
+
<td>Large</td>
|
24
|
+
<td><button type="button" class="ae-btn ae-btn-lg">Large</button></td>
|
25
|
+
<td><code>.ae-btn-lg</code></td>
|
26
|
+
|
27
|
+
</tr>
|
28
|
+
</tbody>
|
29
|
+
</table>
|
30
|
+
|
31
|
+
<h4>Button States</h4>
|
32
|
+
<table>
|
33
|
+
<thead>
|
34
|
+
<th>State</th>
|
35
|
+
<th>Demo</th>
|
36
|
+
</thead>
|
37
|
+
<tbody>
|
38
|
+
<tr>
|
39
|
+
<td>Default</td>
|
40
|
+
<td><button type="button" class="ae-btn">Default</button></td>
|
41
|
+
</tr>
|
42
|
+
<tr>
|
43
|
+
<td>Hover</td>
|
44
|
+
<td><button type="button" class="ae-btn ae-btn-hover">Hover</button></td>
|
45
|
+
</tr>
|
46
|
+
<tr>
|
47
|
+
<td>Active</td>
|
48
|
+
<td><button type="button" class="ae-btn ae-btn-active">Active</button></td>
|
49
|
+
</tr>
|
50
|
+
<tr>
|
51
|
+
<td>Focus</td>
|
52
|
+
<td><button type="button" class="ae-btn ae-btn-focus">Focus</button></td>
|
53
|
+
</tr>
|
54
|
+
</tbody>
|
55
|
+
</table>
|
56
|
+
|
57
|
+
<h4>Button Styles</h4>
|
58
|
+
<table>
|
59
|
+
<thead>
|
60
|
+
<th>Name</th>
|
61
|
+
<th>Demo</th>
|
62
|
+
<th>Usage</th>
|
63
|
+
<th>Notes</th>
|
64
|
+
</thead>
|
65
|
+
<tbody>
|
66
|
+
<tr>
|
67
|
+
<td>Default</td>
|
68
|
+
<td><button type="button" class="ae-btn">Default</button></td>
|
69
|
+
<td><code>.ae-btn-default</code></td>
|
70
|
+
<td>Actions</td>
|
71
|
+
</tr>
|
72
|
+
<tr>
|
73
|
+
<td>Primary</td>
|
74
|
+
<td><button type="button" class="ae-btn ae-btn-primary">Primary</button></td>
|
75
|
+
<td><code>.ae-btn-primary</code></td>
|
76
|
+
<td>Primary actions</td>
|
77
|
+
</tr>
|
78
|
+
<tr>
|
79
|
+
<td>Secondary</td>
|
80
|
+
<td><button type="button" class="ae-btn ae-btn-secondary">Secondary</button></td>
|
81
|
+
<td><code>.ae-btn-secondary</code></td>
|
82
|
+
<td>Secondary actions</td>
|
83
|
+
</tr>
|
84
|
+
|
85
|
+
<tr>
|
86
|
+
<td>Border</td>
|
87
|
+
<td><button type="button" class="ae-btn ae-btn-primary ae-btn-border">Primary Bordered</button><button type="button" class="ae-btn ae-btn-secondary ae-btn-border">Secondary Bordered</button>
|
88
|
+
</td>
|
89
|
+
<td><code>.ae-btn-border</code></td>
|
90
|
+
<td>Adds border to actions</td>
|
91
|
+
</tr>
|
92
|
+
<tr>
|
93
|
+
<td>Disabled</td>
|
94
|
+
<td><button type="button" class="ae-btn ae-btn-disabled" disabled="disabled">Disabled</button></td>
|
95
|
+
<td><code>.ae-btn-disabled</code></td>
|
96
|
+
<td>Requires <code>disabled="disabled"</code> attribute</td>
|
97
|
+
</tr>
|
98
|
+
<tr>
|
99
|
+
<td>Success</td>
|
100
|
+
<td><button type="button" class="ae-btn ae-btn-success">Submit</button></td>
|
101
|
+
<td><code>.ae-btn-success</code></td>
|
102
|
+
<td>Submit, confirm</td>
|
103
|
+
</tr>
|
104
|
+
<tr>
|
105
|
+
<td>Danger</td>
|
106
|
+
<td><button type="button" class="ae-btn ae-btn-danger">Delete</button></td>
|
107
|
+
<td><code>.ae-btn-danger</code></td>
|
108
|
+
<td>Delete, cancel, remove</td>
|
109
|
+
</tr>
|
110
|
+
|
111
|
+
</tbody>
|
112
|
+
</table>
|
113
|
+
|
114
|
+
|
115
|
+
<p>Buttons can have a badge count. </p>
|
116
|
+
|
117
|
+
<button type="button" class="ae-btn ae-btn-default">Notification <span class="ae-badge ae-badge-success">10</span></button>
|
118
|
+
|
119
|
+
<p>You can also apply button styles for <code><input></code> and <code><a href="#"></a></code>.</p>
|
120
|
+
|
121
|
+
|
122
|
+
<input type="submit" class="ae-btn ae-btn-default ae-btn-md" value="I'm a button"></button>
|
123
|
+
<a href="#" class="ae-btn ae-btn-default ae-btn-md" title="Take me to this link">I'm a link</a>
|
124
|
+
|
125
|
+
|
126
|
+
<p>To use two or more buttons in a group, see <a href="#ae-button-groups">Button Groups</a>.</p>
|
127
|
+
|
128
|
+
</section>
|
129
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<section>
|
2
|
+
<p>ExpressUI uses the Font Awesome icon library via the <code>font-awesome-sass</code> gem.</p>
|
3
|
+
<p>Font Awesome classes are used with the <code><i></i></code> element. The <code>.fa</code> class is required. Optionally, icon size can be controlled using font size multiplier classes <code>fa-2x</code>, <code>fa-3x</code>, or <code>fa-4x</code>.</p>
|
4
|
+
|
5
|
+
<%= highlight_code_block do %>
|
6
|
+
<%= "<i class=\"fa fa-chevron-right\"></i>" %>
|
7
|
+
<%= "<i class=\"fa fa-chevron-right fa-2x\"></i>" %>
|
8
|
+
<%= "<i class=\"fa fa-chevron-right fa-3x\"></i>" %>
|
9
|
+
<%= "<i class=\"fa fa-chevron-right fa-4x\"></i>" %>
|
10
|
+
<% end %>
|
11
|
+
|
12
|
+
<p>For complete usage instructions, see the official Font Awesome documentation at <a href="http://fontawesome.io/icons/" title="Go to Font Awesome">http://fontawesome.io/icons</a>.</p>
|
13
|
+
</section>
|