Skip to content

Commit 75ce934

Browse files
author
Mattia Roccoberton
committed
Sidebar menu styles; minor style improvements
1 parent 1df7ae7 commit 75ce934

3 files changed

Lines changed: 45 additions & 2 deletions

File tree

README.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ body.active_admin .cke {
8282
}
8383
```
8484

85-
## Custom fields
85+
## Custom fields / components
8686

8787
### Toggle
8888

@@ -100,6 +100,26 @@ Standard checkbox with label on the left:
100100

101101
`f.input :boolean, as: :blaze_toggle, input_html: { simple_checkbox: true }`
102102

103+
### Sidebar menu
104+
105+
A sidebar menu (*priority* option permit to put the sidebar above the filters):
106+
107+
```rb
108+
sidebar :help, priority: 0 do
109+
ul class: 'blaze-menu' do
110+
li do
111+
link_to 'Menu item 1', admin_root_path
112+
end
113+
li do
114+
link_to 'Menu item 2', admin_root_path
115+
end
116+
li do
117+
link_to 'Menu item 3', admin_root_path
118+
end
119+
end
120+
end
121+
```
122+
103123
## Blaze widgets
104124

105125
See components avaible in Blaze CSS [docs](http://blazecss.com/components/buttons/).

app/assets/stylesheets/activeadmin_blaze_theme/theme.scss

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ $fg-table-borders: #e4e4e4 !default;
1919
$fg-table-link: #eee !default;
2020

2121
// other variables
22+
$color-validation-error: #932419 !default;
2223
$form-padding: 10px !default;
2324
$inputs-spacing: 10px !default;
2425
$height-inputs: 26px !default;
@@ -246,6 +247,9 @@ body.active_admin {
246247
width: auto;
247248
}
248249
}
250+
.input.error select {
251+
border: 1px solid $color-validation-error;
252+
}
249253
}
250254
> ol {
251255
padding: 0;
@@ -332,7 +336,10 @@ body.active_admin {
332336
padding: 10px 0 0 10px;
333337
}
334338
.inputs {
339+
border-bottom: 1px solid #ccc;
340+
border-radius: 0;
335341
margin: 0;
342+
padding: 0 0 5px 0;
336343
// padding: $form-padding;
337344
}
338345
// .has_many_fields {
@@ -778,6 +785,22 @@ body.active_admin {
778785
position: relative;
779786
}
780787

788+
.blaze-menu {
789+
@extend .c-card;
790+
@extend .c-card--menu;
791+
@extend .u-high;
792+
li {
793+
@extend .c-card__item;
794+
a {
795+
display: block;
796+
text-decoration: none;
797+
}
798+
}
799+
}
800+
.sidebar_section .blaze-menu {
801+
margin-bottom: 4px;
802+
}
803+
781804
// optional customizations
782805
.compact_titlebar {
783806
white-space: initial;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module ActiveAdminBlazeTheme
2-
VERSION = '0.4.9'
2+
VERSION = '0.5.0'
33
end

0 commit comments

Comments
 (0)