Skip to content

Commit 72be4c1

Browse files
committed
README improvements
1 parent dfcf623 commit 72be4c1

1 file changed

Lines changed: 29 additions & 7 deletions

File tree

README.md

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
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)
1+
# Active Admin Blaze Theme [![Gem Version](https://badge.fury.io/rb/activeadmin_blaze_theme.svg)](https://badge.fury.io/rb/activeadmin_blaze_theme) [![Specs](https://github.com/blocknotes/activeadmin_blaze_theme/actions/workflows/specs.yml/badge.svg)](https://github.com/blocknotes/activeadmin_blaze_theme/actions/workflows/specs.yml)
32

43
A theme for Active Admin using [Blaze CSS](http://blazecss.com/) 9.x.
54

65
Features:
6+
77
- CSS only theme with clean UI
88
- compact nested forms
99
- [customizable](#customize) options: colors, sidebar position, squared style, scroll on cells
@@ -13,17 +13,18 @@ Features:
1313
See some [screenshots](#screenshots).
1414

1515
## Install
16-
- Add to your Gemfile: `gem 'activeadmin_blaze_theme'` (and execute `bundle`)
1716

18-
If you installed Active Admin **without** Webpacker support:
17+
First, add to your Gemfile: `gem 'activeadmin_blaze_theme'` (and execute `bundle`)
18+
19+
Then, if you installed Active Admin **without Webpacker** support (so using Sprockets):
1920

2021
- Add at the end of your Active Admin styles (_app/assets/stylesheets/active_admin.scss_):
2122

2223
```scss
2324
@import "activeadmin_blaze_theme/theme";
2425
```
2526

26-
If you are using Webpacker:
27+
Otherwise, **with Webpacker**:
2728

2829
- Add the component to the _package.json_: `yarn add blocknotes/activeadmin_blaze_theme`
2930
- Add at the end of your Active Admin javascript pack (_app/javascript/packs/active_admin.js_):
@@ -32,10 +33,21 @@ If you are using Webpacker:
3233
require('activeadmin_blaze_theme');
3334
```
3435

35-
- Sometimes it could be necessary to remove the _node_modules_ path a recreate it (`yarn install --check-files`), or to clean the tmp path: `bin/rails tmp:clear`
36+
- Another option is appending to _app/javascript/stylesheets/active_admin.scss_ (in this case the JS require line is not needed):
37+
38+
```scss
39+
// ...
40+
// optionally add custom colors variables here
41+
@import "~activeadmin_blaze_theme/app/assets/stylesheets/activeadmin_blaze_theme/theme";
42+
```
43+
44+
- Sometimes it could be necessary to remove the _node_modules_ path and recreate it (using `yarn install --check-files`) or to clean the tmp path: `bin/rails tmp:clear`
3645

3746
## Customize
38-
- To change colors add to your Active Admin styles (before **activeadmin_blaze_theme/theme** import):
47+
48+
- Colors customization is available using some Sass variables;
49+
- With Sprockets: you need to update your Active Admin styles (before **activeadmin_blaze_theme/theme** import line);
50+
- With Webpacker: you need to import the theme using the Sass/Scss option as described above.
3951

4052
```scss
4153
// blaze colors
@@ -104,6 +116,7 @@ body.active_admin .cke {
104116
## Custom fields / components
105117

106118
### Toggle
119+
107120
In *form* \ *inputs* block:
108121

109122
```ruby
@@ -125,6 +138,7 @@ f.input :boolean, as: :blaze_toggle, input_html: { simple_checkbox: true }
125138
```
126139

127140
### Sidebar menu
141+
128142
A sidebar menu (*priority* option permit to put the sidebar above the filters):
129143

130144
```ruby
@@ -144,6 +158,7 @@ end
144158
```
145159

146160
### Accordion
161+
147162
An accordion group in a form:
148163

149164
```ruby
@@ -164,6 +179,7 @@ end
164179
```
165180

166181
### Readonly field
182+
167183
Some readonly fields in a form:
168184

169185
```ruby
@@ -192,6 +208,7 @@ end
192208
```
193209

194210
## Blaze widgets
211+
195212
See components available in Blaze CSS [docs](http://blazecss.com/components/buttons/).
196213

197214
Badge example:
@@ -215,22 +232,27 @@ end
215232
```
216233

217234
## Notes
235+
218236
- To use this plugins with Active Admin 1.x please use the version [0.5.12](https://github.com/blocknotes/activeadmin_blaze_theme/releases/tag/v0.5.12)
219237

220238
## Screenshots
239+
221240
Index:
222241
![index](extra/index.png)
223242

224243
Edit:
225244
![edit](extra/edit.png)
226245

227246
## Do you like it? Star it!
247+
228248
If you use this component just star it. A developer is more motivated to improve a project when there is some interest. My other [Active Admin components](https://github.com/blocknotes?utf8=✓&tab=repositories&q=activeadmin&type=source).
229249

230250
Or consider offering me a coffee, it's a small thing but it is greatly appreciated: [about me](https://www.blocknot.es/about-me).
231251
232252
## Contributors
253+
233254
- [Mattia Roccoberton](http://blocknot.es): author
234255
235256
## License
257+
236258
The gem is available as open-source under the terms of the [MIT](LICENSE.txt).

0 commit comments

Comments
 (0)