Skip to content

Commit 0de882c

Browse files
committed
README improvements
1 parent 7cf34e2 commit 0de882c

1 file changed

Lines changed: 31 additions & 19 deletions

File tree

README.md

Lines changed: 31 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Active Admin Blaze Theme [![Gem Version](https://badge.fury.io/rb/activeadmin_blaze_theme.svg)](https://badge.fury.io/rb/activeadmin_blaze_theme)
1+
# Active Admin Blaze Theme
2+
[![Gem Version](https://badge.fury.io/rb/activeadmin_blaze_theme.svg)](https://badge.fury.io/rb/activeadmin_blaze_theme) [![CircleCI](https://circleci.com/gh/blocknotes/activeadmin_blaze_theme.svg?style=svg)](https://circleci.com/gh/blocknotes/activeadmin_blaze_theme)
23

34
A theme for Active Admin using [Blaze CSS](http://blazecss.com/).
45

@@ -17,7 +18,7 @@ Features:
1718
## Customize
1819
- To change colors add before your Active Admin styles (_app/assets/stylesheets/active_admin.scss_):
1920

20-
```css
21+
```scss
2122
// blaze colors
2223
$color-brand: #2C3E50;
2324
$color-info: #4dabf5;
@@ -51,30 +52,30 @@ $text-shadow: #000 !default;
5152

5253
- To move sidebar on the left add to your Active Admin styles (after blaze theme import):
5354

54-
```css
55+
```scss
5556
#active_admin_content.with_sidebar {
5657
@extend .sidebar_left;
5758
}
5859
```
5960

6061
- Squared style (no rounded borders):
6162

62-
```css
63+
```scss
6364
#active_admin_content, .active_admin #title_bar {
6465
@extend .no_rounded;
6566
}
6667
```
6768

6869
- More options:
6970

70-
```css
71+
```scss
7172
// scrollable table cells
7273
body.active_admin .index_content table {
7374
@extend .scrollable_cells;
7475
}
7576
```
7677

77-
```css
78+
```scss
7879
// fix ckeditor width
7980
body.active_admin .cke {
8081
@extend .ckeditor_width_fix
@@ -86,22 +87,28 @@ body.active_admin .cke {
8687
### Toggle
8788
In *form* \ *inputs* block:
8889

89-
`f.input :boolean, as: :blaze_toggle`
90+
```ruby
91+
f.input :boolean, as: :blaze_toggle
92+
```
9093

9194
To change toggle color:
9295

93-
`f.input :boolean, as: :blaze_toggle, input_html: { toggle_class: 'c-toggle--brand' }`
96+
```ruby
97+
f.input :boolean, as: :blaze_toggle, input_html: { toggle_class: 'c-toggle--brand' }
98+
```
9499

95100
Available: `c-toggle--brand, c-toggle--info, c-toggle--warning, c-toggle--success, c-toggle--error`
96101

97102
Standard checkbox with label on the left:
98103

99-
`f.input :boolean, as: :blaze_toggle, input_html: { simple_checkbox: true }`
104+
```ruby
105+
f.input :boolean, as: :blaze_toggle, input_html: { simple_checkbox: true }
106+
```
100107

101108
### Sidebar menu
102109
A sidebar menu (*priority* option permit to put the sidebar above the filters):
103110

104-
```rb
111+
```ruby
105112
sidebar :help, priority: 0 do
106113
ul class: 'blaze-menu' do
107114
li do
@@ -122,7 +129,7 @@ end
122129
### Accordion
123130
An accordion group in a form:
124131

125-
```rb
132+
```ruby
126133
f.accordion_group do
127134
f.accordion 'First accordion' do
128135
f.inputs for: [:detail, f.object.detail || Detail.new] do |f2|
@@ -142,13 +149,21 @@ end
142149
### Readonly field
143150
Some readonly fields in a form:
144151

145-
`f.readonly :position`
152+
```ruby
153+
f.readonly :position
154+
```
146155

147-
`f.readonly :position, f.object.position * 2`
156+
```ruby
157+
f.readonly :position, f.object.position * 2
158+
```
148159

149-
`f.readonly 'Code', 'Automatically set after save', class: 'a-wrapper-class'`
160+
```ruby
161+
f.readonly 'Code', 'Automatically set after save', class: 'a-wrapper-class'
162+
```
150163

151-
`f.readonly nil, 'Value only, no label'`
164+
```ruby
165+
f.readonly nil, 'Value only, no label'
166+
```
152167

153168
### Styled table
154169
Table styles:
@@ -187,21 +202,18 @@ end
187202

188203
## Screenshots
189204
Index:
190-
191205
![index](extra/screenshot1.jpg)
192206

193207
Edit:
194-
195208
![edit](extra/screenshot2.jpg)
196209

197210
Show - sidebar on the left:
198-
199211
![edit](extra/screenshot3.jpg)
200212

201213
## Do you like it? Star it!
202214
If you use this component just star it. A developer is more motivated to improve a project when there is some interest.
203215

204-
Take a look at [other ActiveAdmin components](https://github.com/blocknotes?utf8=✓&tab=repositories&q=activeadmin&type=source) that I made if you are curious.
216+
Take a look at [other Active Admin components](https://github.com/blocknotes?utf8=✓&tab=repositories&q=activeadmin&type=source) if you are curious.
205217

206218
## Contributors
207219
- [Mattia Roccoberton](http://blocknot.es): author

0 commit comments

Comments
 (0)