Skip to content

Commit 475bd6c

Browse files
committed
Support Active Admin 2.X
1 parent d17dad0 commit 475bd6c

3 files changed

Lines changed: 35 additions & 38 deletions

File tree

README.md

Lines changed: 11 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,21 @@
11
# Active Admin Blaze Theme [![Gem Version](https://badge.fury.io/rb/activeadmin_blaze_theme.svg)](https://badge.fury.io/rb/activeadmin_blaze_theme)
22

3-
A theme for Active Admin using [Blaze CSS](http://blazecss.com/)
3+
A theme for Active Admin using [Blaze CSS](http://blazecss.com/).
44

55
Features:
6-
76
- CSS only theme with clean UI
87
- compact nested forms
98
- [customizable](#customize) options: colors, sidebar position, squared style, scroll on cells
109
- custom controls / components: [toggle](#toggle), [Sidebar menu](#sidebar-menu), [Accordion](#accordion), [Readonly field](#readonly-field), [Styled table](#styled-table)
1110
- Blaze CSS [widgets](#blaze-widgets)
1211

1312
## Install
14-
15-
- Add to your Gemfile:
16-
17-
`gem 'activeadmin_blaze_theme'`
18-
13+
- Add to your Gemfile: `gem 'activeadmin_blaze_theme'`
1914
- Execute bundle
20-
21-
- Add at the end of your ActiveAdmin styles (_app/assets/stylesheets/active_admin.scss_):
22-
23-
`@import "activeadmin_blaze_theme/theme";`
15+
- Add at the end of your Active Admin styles (_app/assets/stylesheets/active_admin.scss_): `@import "activeadmin_blaze_theme/theme";`
2416

2517
## Customize
26-
27-
- To change colors add before your ActiveAdmin styles (_app/assets/stylesheets/active_admin.scss_):
18+
- To change colors add before your Active Admin styles (_app/assets/stylesheets/active_admin.scss_):
2819

2920
```css
3021
// blaze colors
@@ -58,7 +49,7 @@ $height-titlebar: 38px !default;
5849
$text-shadow: #000 !default;
5950
```
6051

61-
- To move sidebar on the left add to your ActiveAdmin styles (after blaze theme import):
52+
- To move sidebar on the left add to your Active Admin styles (after blaze theme import):
6253

6354
```css
6455
#active_admin_content.with_sidebar {
@@ -93,7 +84,6 @@ body.active_admin .cke {
9384
## Custom fields / components
9485

9586
### Toggle
96-
9787
In *form* \ *inputs* block:
9888

9989
`f.input :boolean, as: :blaze_toggle`
@@ -109,7 +99,6 @@ Standard checkbox with label on the left:
10999
`f.input :boolean, as: :blaze_toggle, input_html: { simple_checkbox: true }`
110100

111101
### Sidebar menu
112-
113102
A sidebar menu (*priority* option permit to put the sidebar above the filters):
114103

115104
```rb
@@ -131,7 +120,6 @@ end
131120
![menu](extra/screenshot4.jpg)
132121

133122
### Accordion
134-
135123
An accordion group in a form:
136124

137125
```rb
@@ -152,7 +140,6 @@ end
152140
```
153141

154142
### Readonly field
155-
156143
Some readonly fields in a form:
157144

158145
`f.readonly :position`
@@ -164,7 +151,6 @@ Some readonly fields in a form:
164151
`f.readonly nil, 'Value only, no label'`
165152

166153
### Styled table
167-
168154
Table styles:
169155

170156
```ruby
@@ -174,8 +160,7 @@ end
174160
```
175161

176162
## Blaze widgets
177-
178-
See components avaible in Blaze CSS [docs](http://blazecss.com/components/buttons/).
163+
See components available in Blaze CSS [docs](http://blazecss.com/components/buttons/).
179164

180165
Badge example:
181166

@@ -197,8 +182,10 @@ div class: 'c-progress' do
197182
end
198183
```
199184

200-
## Screenshots
185+
## Notes
186+
- 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)
201187

188+
## Screenshots
202189
Index:
203190

204191
![index](extra/screenshot1.jpg)
@@ -212,15 +199,12 @@ Show - sidebar on the left:
212199
![edit](extra/screenshot3.jpg)
213200

214201
## Do you like it? Star it!
215-
216202
If you use this component just star it. A developer is more motivated to improve a project when there is some interest.
217203

218204
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.
219205

220206
## Contributors
221-
222-
- [Mattia Roccoberton](http://blocknot.es) - creator, maintainer
207+
- [Mattia Roccoberton](http://blocknot.es): author
223208

224209
## License
225-
226-
[MIT](LICENSE.txt)
210+
The gem is available as open-source under the terms of the [MIT](LICENSE.txt).

activeadmin_blaze_theme.gemspec

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,33 @@
1-
# coding: utf-8
1+
# frozen_string_literal: true
2+
23
lib = File.expand_path('../lib', __FILE__)
34
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
45
require 'activeadmin_blaze_theme/version'
56

67
Gem::Specification.new do |spec|
7-
spec.name = "activeadmin_blaze_theme"
8+
spec.name = 'activeadmin_blaze_theme'
89
spec.version = ActiveAdminBlazeTheme::VERSION
9-
spec.authors = ["Mattia Roccoberton"]
10-
spec.email = ["mat@blocknot.es"]
11-
spec.summary = "ActiveAdmin Blaze Theme"
12-
spec.description = "An ActiveAdmin theme which use Blaze CSS UI toolkit"
13-
spec.homepage = "https://github.com/blocknotes/activeadmin_blaze_theme"
14-
spec.license = "MIT"
10+
spec.authors = ['Mattia Roccoberton']
11+
spec.email = ['mat@blocknot.es']
12+
spec.summary = 'ActiveAdmin Blaze Theme'
13+
spec.description = 'An ActiveAdmin theme which use Blaze CSS UI toolkit'
14+
spec.homepage = 'https://github.com/blocknotes/activeadmin_blaze_theme'
15+
spec.license = 'MIT'
1516

1617
spec.files = `git ls-files -z`.split("\x0")
1718
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
1819
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19-
spec.require_paths = ["lib"]
20+
spec.require_paths = ['lib']
21+
22+
spec.add_runtime_dependency 'activeadmin', '~> 2.0'
2023

21-
spec.add_runtime_dependency 'activeadmin', '~> 1.0'
24+
spec.add_development_dependency 'activestorage', '~> 6.0.3.2'
25+
spec.add_development_dependency 'capybara', '~> 3.33.0'
26+
spec.add_development_dependency 'pry', '~> 0.13.1'
27+
spec.add_development_dependency 'puma', '~> 4.3.5'
28+
spec.add_development_dependency 'rspec_junit_formatter', '~> 0.4.1'
29+
spec.add_development_dependency 'rspec-rails', '~> 4.0.1'
30+
spec.add_development_dependency 'rubocop', '~> 0.90.0'
31+
spec.add_development_dependency 'selenium-webdriver', '~> 3.142.7'
32+
spec.add_development_dependency 'sqlite3', '~> 1.4.2'
2233
end
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module ActiveAdminBlazeTheme
2-
VERSION = '0.5.12'
4+
VERSION = '0.5.14'
35
end

0 commit comments

Comments
 (0)