activeadmin_blaze_theme 0.5.14 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/specs.yml +26 -0
- data/.gitignore +11 -2
- data/.rspec +2 -0
- data/.rubocop.yml +27 -0
- data/Gemfile +15 -0
- data/LICENSE.txt +1 -1
- data/README.md +102 -54
- data/Rakefile +15 -1
- data/activeadmin_blaze_theme.gemspec +2 -12
- data/app/assets/stylesheets/activeadmin_blaze_theme/_base.scss +197 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/_contents.scss +43 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/_footer.scss +15 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/_form.scss +381 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/_header.scss +140 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/_navigation.scss +69 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/_sidebars.scss +64 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/_tables.scss +96 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/_variables.scss +46 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/blaze.scss +2 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.inputs.scss +0 -9
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.overlays.scss +8 -1
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.typography.scss +1 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_objects.grid.scss +4 -3
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_utilities.alignment.scss +12 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_utilities.visibility.scss +47 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/objects.containers.scss +0 -2
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/objects.drawers.scss +6 -6
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/objects.modals.scss +1 -1
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/utilities.alignment.scss +12 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/utilities.visibility.scss +45 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/theme.scss +11 -989
- data/bin/rails +29 -0
- data/bin/rake +29 -0
- data/bin/rspec +29 -0
- data/bin/rubocop +29 -0
- data/extra/edit.png +0 -0
- data/extra/index.png +0 -0
- data/index.js +2 -0
- data/lib/activeadmin/views/activeadmin_form.rb +6 -2
- data/lib/activeadmin_blaze_theme.rb +8 -5
- data/lib/activeadmin_blaze_theme/version.rb +1 -1
- data/lib/formtastic/inputs/blaze_toggle_input.rb +12 -8
- data/package.json +13 -0
- data/spec/dummy/.ruby-version +1 -0
- data/spec/dummy/.tool-versions +1 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/admin/authors.rb +57 -0
- data/spec/dummy/app/admin/dashboard.rb +32 -0
- data/spec/dummy/app/admin/posts.rb +50 -0
- data/spec/dummy/app/admin/tags.rb +4 -0
- data/spec/dummy/app/assets/config/manifest.js +3 -0
- data/spec/dummy/app/assets/images/.keep +0 -0
- data/spec/dummy/app/assets/javascripts/active_admin.js +1 -0
- data/spec/dummy/app/assets/stylesheets/active_admin.scss +4 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
- data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
- data/spec/dummy/app/controllers/application_controller.rb +2 -0
- data/spec/dummy/app/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/javascript/packs/application.js +15 -0
- data/spec/dummy/app/jobs/application_job.rb +7 -0
- data/spec/dummy/app/mailers/application_mailer.rb +4 -0
- data/spec/dummy/app/models/application_record.rb +7 -0
- data/spec/dummy/app/models/author.rb +26 -0
- data/spec/dummy/app/models/concerns/.keep +0 -0
- data/spec/dummy/app/models/post.rb +25 -0
- data/spec/dummy/app/models/post_tag.rb +9 -0
- data/spec/dummy/app/models/profile.rb +9 -0
- data/spec/dummy/app/models/tag.rb +6 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +33 -0
- data/spec/dummy/config.ru +5 -0
- data/spec/dummy/config/application.rb +18 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/cable.yml +10 -0
- data/spec/dummy/config/database.yml +8 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +62 -0
- data/spec/dummy/config/environments/production.rb +112 -0
- data/spec/dummy/config/environments/test.rb +49 -0
- data/spec/dummy/config/initializers/active_admin.rb +335 -0
- data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/spec/dummy/config/initializers/assets.rb +12 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/content_security_policy.rb +28 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +33 -0
- data/spec/dummy/config/puma.rb +38 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/config/spring.rb +6 -0
- data/spec/dummy/config/storage.yml +7 -0
- data/spec/dummy/db/migrate/20170806125915_create_active_storage_tables.active_storage.rb +27 -0
- data/spec/dummy/db/migrate/20180101010101_create_active_admin_comments.rb +16 -0
- data/spec/dummy/db/migrate/20180607053251_create_authors.rb +13 -0
- data/spec/dummy/db/migrate/20180607053254_create_profiles.rb +12 -0
- data/spec/dummy/db/migrate/20180607053255_create_tags.rb +11 -0
- data/spec/dummy/db/migrate/20180607053257_create_post_tags.rb +12 -0
- data/spec/dummy/db/migrate/20180607053739_create_posts.rb +17 -0
- data/spec/dummy/db/schema.rb +99 -0
- data/spec/dummy/lib/assets/.keep +0 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/spec/dummy/public/apple-touch-icon.png +0 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/rails_helper.rb +36 -0
- data/spec/spec_helper.rb +20 -0
- data/spec/support/capybara.rb +3 -0
- data/spec/support/drivers.rb +7 -0
- data/spec/system/theme_spec.rb +15 -0
- metadata +186 -136
- data/extra/screenshot1.jpg +0 -0
- data/extra/screenshot2.jpg +0 -0
- data/extra/screenshot3.jpg +0 -0
- data/extra/screenshot4.jpg +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e4b53242af49f31d662d0c774b78cad40d87ad563c771ce174b8ca8866d1b539
|
|
4
|
+
data.tar.gz: f6b941ff7872c51db2d6c47e5117420d0e5f8e611ca897f7e4db88e61a398e97
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0cd32f3785b930a07522b2ee62bde86e3ce57e75b4e881ddd8c84ae2125871b0cc8d1a0f9ec76bc8549471296f2bb28ca9e489b19eae7bfa54c48eb89bdbf163
|
|
7
|
+
data.tar.gz: 6b79a90746b9365553acf87aa98735d8fe24243cd17385f041863ef767be6ea770bdc681c214e311cdf4a6c3977dd80059b7b600558bded86fff49e4174d4c0a
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: Specs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [master]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
strategy:
|
|
14
|
+
matrix:
|
|
15
|
+
ruby: ['2.5', '2.6', '2.7']
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout
|
|
19
|
+
uses: actions/checkout@v2
|
|
20
|
+
- name: Set up Ruby
|
|
21
|
+
uses: ruby/setup-ruby@v1
|
|
22
|
+
with:
|
|
23
|
+
ruby-version: ${{ matrix.ruby }}
|
|
24
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
|
25
|
+
- name: Run tests
|
|
26
|
+
run: bundle exec rake
|
data/.gitignore
CHANGED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
inherit_from:
|
|
2
|
+
- https://relaxed.ruby.style/rubocop.yml
|
|
3
|
+
|
|
4
|
+
AllCops:
|
|
5
|
+
Exclude:
|
|
6
|
+
- bin/*
|
|
7
|
+
- spec/dummy/**/*
|
|
8
|
+
NewCops: enable
|
|
9
|
+
|
|
10
|
+
Gemspec/RequiredRubyVersion:
|
|
11
|
+
Enabled: false
|
|
12
|
+
|
|
13
|
+
Naming/FileName:
|
|
14
|
+
Enabled: false
|
|
15
|
+
|
|
16
|
+
Layout/LineLength:
|
|
17
|
+
Enabled: true
|
|
18
|
+
Max: 120
|
|
19
|
+
|
|
20
|
+
Style/HashEachMethods:
|
|
21
|
+
Enabled: true
|
|
22
|
+
|
|
23
|
+
Style/HashTransformKeys:
|
|
24
|
+
Enabled: true
|
|
25
|
+
|
|
26
|
+
Style/HashTransformValues:
|
|
27
|
+
Enabled: true
|
data/Gemfile
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
source 'https://rubygems.org'
|
|
2
4
|
|
|
3
5
|
gemspec
|
|
6
|
+
|
|
7
|
+
gem 'pry-rails'
|
|
8
|
+
|
|
9
|
+
gem 'activestorage', '~> 6.0'
|
|
10
|
+
gem 'capybara', '~> 3.33'
|
|
11
|
+
gem 'puma', '~> 4.3'
|
|
12
|
+
gem 'rspec-rails'
|
|
13
|
+
gem 'rspec_junit_formatter', '~> 0.4'
|
|
14
|
+
gem 'rubocop', '~> 1.0'
|
|
15
|
+
gem 'sassc', '~> 2.4'
|
|
16
|
+
gem 'selenium-webdriver', '~> 3.142'
|
|
17
|
+
gem 'sprockets-rails', '~> 3.2'
|
|
18
|
+
gem 'sqlite3', '~> 1.4'
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
|
@@ -1,57 +1,89 @@
|
|
|
1
|
-
# Active Admin Blaze Theme [](https://badge.fury.io/rb/activeadmin_blaze_theme)
|
|
1
|
+
# Active Admin Blaze Theme [](https://badge.fury.io/rb/activeadmin_blaze_theme) [](https://github.com/blocknotes/activeadmin_blaze_theme/actions/workflows/specs.yml)
|
|
2
2
|
|
|
3
|
-
A theme for Active Admin using [Blaze CSS](http://blazecss.com
|
|
3
|
+
A theme for Active Admin using [Blaze CSS](http://blazecss.com) 3.x
|
|
4
4
|
|
|
5
5
|
Features:
|
|
6
|
+
|
|
6
7
|
- CSS only theme with clean UI
|
|
7
8
|
- compact nested forms
|
|
8
9
|
- [customizable](#customize) options: colors, sidebar position, squared style, scroll on cells
|
|
9
10
|
- custom controls / components: [toggle](#toggle), [Sidebar menu](#sidebar-menu), [Accordion](#accordion), [Readonly field](#readonly-field), [Styled table](#styled-table)
|
|
10
11
|
- Blaze CSS [widgets](#blaze-widgets)
|
|
11
12
|
|
|
13
|
+
See some [screenshots](#screenshots).
|
|
14
|
+
|
|
12
15
|
## Install
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
|
|
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):
|
|
20
|
+
|
|
21
|
+
- Add at the end of your Active Admin styles (_app/assets/stylesheets/active_admin.scss_):
|
|
22
|
+
|
|
23
|
+
```scss
|
|
24
|
+
@import "activeadmin_blaze_theme/theme";
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Otherwise, **with Webpacker**:
|
|
28
|
+
|
|
29
|
+
- Add the component to the _package.json_: `yarn add blocknotes/activeadmin_blaze_theme`
|
|
30
|
+
- Add at the end of your Active Admin javascript pack (_app/javascript/packs/active_admin.js_):
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
require('activeadmin_blaze_theme');
|
|
34
|
+
```
|
|
35
|
+
|
|
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`
|
|
16
45
|
|
|
17
46
|
## Customize
|
|
18
|
-
- To change colors add before your Active Admin styles (_app/assets/stylesheets/active_admin.scss_):
|
|
19
47
|
|
|
20
|
-
|
|
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.
|
|
51
|
+
|
|
52
|
+
```scss
|
|
21
53
|
// blaze colors
|
|
22
|
-
$color-brand: #
|
|
54
|
+
$color-brand: #2c3e50;
|
|
23
55
|
$color-info: #4dabf5;
|
|
24
56
|
$color-warning: #ff9800;
|
|
25
57
|
$color-success: #4caf50;
|
|
26
58
|
$color-error: #f44336;
|
|
27
59
|
// main variables
|
|
28
|
-
$bg-footer: #dfdfdf
|
|
29
|
-
$bg-form1: #f4f4f4
|
|
30
|
-
$bg-form2: darken($bg-form1, 3%)
|
|
31
|
-
$bg-form3: darken($bg-form1, 6%)
|
|
32
|
-
$bg-form4: darken($bg-form1, 9%)
|
|
33
|
-
$bg-form-sub-headings: lighten(
|
|
34
|
-
$bg-header: $color-brand
|
|
35
|
-
$bg-inputs: #fff
|
|
36
|
-
$bg-menu-active: #7b929e
|
|
37
|
-
$bg-sidebar: #efefef;
|
|
38
|
-
$fg-box-title: #fff
|
|
39
|
-
$fg-button-link: #fff
|
|
40
|
-
$fg-menu-items: #f8f8f8
|
|
41
|
-
$fg-table-borders: #e4e4e4
|
|
42
|
-
$fg-table-link: #eee
|
|
60
|
+
$bg-footer: #dfdfdf; // bg footer bar
|
|
61
|
+
$bg-form1: #f4f4f4; // bg 1st level forms
|
|
62
|
+
$bg-form2: darken($bg-form1, 3%); // bg 2nd level forms (nested)
|
|
63
|
+
$bg-form3: darken($bg-form1, 6%); // bg 3rd level forms (nested)
|
|
64
|
+
$bg-form4: darken($bg-form1, 9%); // bg 4th level forms (nested)
|
|
65
|
+
$bg-form-sub-headings: lighten($color-brand, 64%); // bg nested forms title
|
|
66
|
+
$bg-header: $color-brand; // bg header bar
|
|
67
|
+
$bg-inputs: #fff; // bg forms inputs
|
|
68
|
+
$bg-menu-active: #7b929e; // bg menu item current / hover
|
|
69
|
+
$bg-sidebar: #efefef; // bg sidebar
|
|
70
|
+
$fg-box-title: #fff;
|
|
71
|
+
$fg-button-link: #fff;
|
|
72
|
+
$fg-menu-items: #f8f8f8;
|
|
73
|
+
$fg-table-borders: #e4e4e4;
|
|
74
|
+
$fg-table-link: #eee;
|
|
43
75
|
// other variables
|
|
44
|
-
$form-padding: 10px
|
|
45
|
-
$inputs-spacing: 10px
|
|
46
|
-
$height-inputs: 26px
|
|
47
|
-
$height-topbar: 40px
|
|
48
|
-
$height-titlebar: 38px
|
|
49
|
-
$text-shadow: #000
|
|
76
|
+
$form-padding: 10px;
|
|
77
|
+
$inputs-spacing: 10px;
|
|
78
|
+
$height-inputs: 26px;
|
|
79
|
+
$height-topbar: 40px;
|
|
80
|
+
$height-titlebar: 38px;
|
|
81
|
+
$text-shadow: #000;
|
|
50
82
|
```
|
|
51
83
|
|
|
52
84
|
- To move sidebar on the left add to your Active Admin styles (after blaze theme import):
|
|
53
85
|
|
|
54
|
-
```
|
|
86
|
+
```scss
|
|
55
87
|
#active_admin_content.with_sidebar {
|
|
56
88
|
@extend .sidebar_left;
|
|
57
89
|
}
|
|
@@ -59,7 +91,7 @@ $text-shadow: #000 !default;
|
|
|
59
91
|
|
|
60
92
|
- Squared style (no rounded borders):
|
|
61
93
|
|
|
62
|
-
```
|
|
94
|
+
```scss
|
|
63
95
|
#active_admin_content, .active_admin #title_bar {
|
|
64
96
|
@extend .no_rounded;
|
|
65
97
|
}
|
|
@@ -67,14 +99,14 @@ $text-shadow: #000 !default;
|
|
|
67
99
|
|
|
68
100
|
- More options:
|
|
69
101
|
|
|
70
|
-
```
|
|
102
|
+
```scss
|
|
71
103
|
// scrollable table cells
|
|
72
104
|
body.active_admin .index_content table {
|
|
73
105
|
@extend .scrollable_cells;
|
|
74
106
|
}
|
|
75
107
|
```
|
|
76
108
|
|
|
77
|
-
```
|
|
109
|
+
```scss
|
|
78
110
|
// fix ckeditor width
|
|
79
111
|
body.active_admin .cke {
|
|
80
112
|
@extend .ckeditor_width_fix
|
|
@@ -84,24 +116,32 @@ body.active_admin .cke {
|
|
|
84
116
|
## Custom fields / components
|
|
85
117
|
|
|
86
118
|
### Toggle
|
|
119
|
+
|
|
87
120
|
In *form* \ *inputs* block:
|
|
88
121
|
|
|
89
|
-
|
|
122
|
+
```ruby
|
|
123
|
+
f.input :boolean, as: :blaze_toggle
|
|
124
|
+
```
|
|
90
125
|
|
|
91
126
|
To change toggle color:
|
|
92
127
|
|
|
93
|
-
|
|
128
|
+
```ruby
|
|
129
|
+
f.input :boolean, as: :blaze_toggle, input_html: { toggle_class: 'c-toggle--brand' }
|
|
130
|
+
```
|
|
94
131
|
|
|
95
132
|
Available: `c-toggle--brand, c-toggle--info, c-toggle--warning, c-toggle--success, c-toggle--error`
|
|
96
133
|
|
|
97
134
|
Standard checkbox with label on the left:
|
|
98
135
|
|
|
99
|
-
|
|
136
|
+
```ruby
|
|
137
|
+
f.input :boolean, as: :blaze_toggle, input_html: { simple_checkbox: true }
|
|
138
|
+
```
|
|
100
139
|
|
|
101
140
|
### Sidebar menu
|
|
141
|
+
|
|
102
142
|
A sidebar menu (*priority* option permit to put the sidebar above the filters):
|
|
103
143
|
|
|
104
|
-
```
|
|
144
|
+
```ruby
|
|
105
145
|
sidebar :help, priority: 0 do
|
|
106
146
|
ul class: 'blaze-menu' do
|
|
107
147
|
li do
|
|
@@ -117,12 +157,11 @@ sidebar :help, priority: 0 do
|
|
|
117
157
|
end
|
|
118
158
|
```
|
|
119
159
|
|
|
120
|
-

|
|
121
|
-
|
|
122
160
|
### Accordion
|
|
161
|
+
|
|
123
162
|
An accordion group in a form:
|
|
124
163
|
|
|
125
|
-
```
|
|
164
|
+
```ruby
|
|
126
165
|
f.accordion_group do
|
|
127
166
|
f.accordion 'First accordion' do
|
|
128
167
|
f.inputs for: [:detail, f.object.detail || Detail.new] do |f2|
|
|
@@ -140,15 +179,24 @@ end
|
|
|
140
179
|
```
|
|
141
180
|
|
|
142
181
|
### Readonly field
|
|
182
|
+
|
|
143
183
|
Some readonly fields in a form:
|
|
144
184
|
|
|
145
|
-
|
|
185
|
+
```ruby
|
|
186
|
+
f.readonly :position
|
|
187
|
+
```
|
|
146
188
|
|
|
147
|
-
|
|
189
|
+
```ruby
|
|
190
|
+
f.readonly :position, f.object.position * 2
|
|
191
|
+
```
|
|
148
192
|
|
|
149
|
-
|
|
193
|
+
```ruby
|
|
194
|
+
f.readonly 'Code', 'Automatically set after save', class: 'a-wrapper-class'
|
|
195
|
+
```
|
|
150
196
|
|
|
151
|
-
|
|
197
|
+
```ruby
|
|
198
|
+
f.readonly nil, 'Value only, no label'
|
|
199
|
+
```
|
|
152
200
|
|
|
153
201
|
### Styled table
|
|
154
202
|
Table styles:
|
|
@@ -160,6 +208,7 @@ end
|
|
|
160
208
|
```
|
|
161
209
|
|
|
162
210
|
## Blaze widgets
|
|
211
|
+
|
|
163
212
|
See components available in Blaze CSS [docs](http://blazecss.com/components/buttons/).
|
|
164
213
|
|
|
165
214
|
Badge example:
|
|
@@ -183,28 +232,27 @@ end
|
|
|
183
232
|
```
|
|
184
233
|
|
|
185
234
|
## Notes
|
|
235
|
+
|
|
186
236
|
- 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)
|
|
187
237
|
|
|
188
238
|
## Screenshots
|
|
189
|
-
Index:
|
|
190
239
|
|
|
191
|
-
|
|
240
|
+
Index:
|
|
241
|
+

|
|
192
242
|
|
|
193
243
|
Edit:
|
|
194
|
-
|
|
195
|
-

|
|
196
|
-
|
|
197
|
-
Show - sidebar on the left:
|
|
198
|
-
|
|
199
|
-

|
|
244
|
+

|
|
200
245
|
|
|
201
246
|
## Do you like it? Star it!
|
|
202
|
-
If you use this component just star it. A developer is more motivated to improve a project when there is some interest.
|
|
203
247
|
|
|
204
|
-
|
|
248
|
+
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).
|
|
249
|
+
|
|
250
|
+
Or consider offering me a coffee, it's a small thing but it is greatly appreciated: [about me](https://www.blocknot.es/about-me).
|
|
205
251
|
|
|
206
252
|
## Contributors
|
|
253
|
+
|
|
207
254
|
- [Mattia Roccoberton](http://blocknot.es): author
|
|
208
255
|
|
|
209
256
|
## License
|
|
257
|
+
|
|
210
258
|
The gem is available as open-source under the terms of the [MIT](LICENSE.txt).
|
data/Rakefile
CHANGED
|
@@ -1,2 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
require 'bundler/gem_tasks'
|
|
4
|
+
|
|
5
|
+
begin
|
|
6
|
+
require 'rspec/core/rake_task'
|
|
7
|
+
|
|
8
|
+
RSpec::Core::RakeTask.new(:spec) do |t|
|
|
9
|
+
# t.ruby_opts = %w[-w]
|
|
10
|
+
t.rspec_opts = ['--color', '--format documentation']
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
task default: :spec
|
|
14
|
+
rescue LoadError
|
|
15
|
+
puts '! LoadError: no RSpec available'
|
|
16
|
+
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
lib = File.expand_path('
|
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
5
5
|
require 'activeadmin_blaze_theme/version'
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
|
10
10
|
spec.authors = ['Mattia Roccoberton']
|
|
11
11
|
spec.email = ['mat@blocknot.es']
|
|
12
12
|
spec.summary = 'ActiveAdmin Blaze Theme'
|
|
13
|
-
spec.description = 'An ActiveAdmin theme
|
|
13
|
+
spec.description = 'An ActiveAdmin theme based on Blaze CSS UI toolkit'
|
|
14
14
|
spec.homepage = 'https://github.com/blocknotes/activeadmin_blaze_theme'
|
|
15
15
|
spec.license = 'MIT'
|
|
16
16
|
|
|
@@ -20,14 +20,4 @@ Gem::Specification.new do |spec|
|
|
|
20
20
|
spec.require_paths = ['lib']
|
|
21
21
|
|
|
22
22
|
spec.add_runtime_dependency 'activeadmin', '~> 2.0'
|
|
23
|
-
|
|
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'
|
|
33
23
|
end
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
body.active_admin {
|
|
2
|
+
font-family: 'Roboto', sans-serif;
|
|
3
|
+
font-size: 12px;
|
|
4
|
+
min-height: 100vh;
|
|
5
|
+
|
|
6
|
+
.button-base {
|
|
7
|
+
@extend .c-button;
|
|
8
|
+
|
|
9
|
+
background-image: none;
|
|
10
|
+
box-shadow: initial;
|
|
11
|
+
color: #f4f4f4;
|
|
12
|
+
text-shadow: $text-shadow 0 1px 0;
|
|
13
|
+
}
|
|
14
|
+
.c-input-group .c-button:not(:first-child) {
|
|
15
|
+
border-left: 1px solid #ddd;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
// misc
|
|
19
|
+
a.member_link {
|
|
20
|
+
color: #f4f4f4;
|
|
21
|
+
text-decoration: none;
|
|
22
|
+
}
|
|
23
|
+
.download_links {
|
|
24
|
+
padding-bottom: 10px;
|
|
25
|
+
|
|
26
|
+
>a {
|
|
27
|
+
@extend .c-button;
|
|
28
|
+
@extend .c-button--info;
|
|
29
|
+
@extend .u-small;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
.ui-datepicker {
|
|
33
|
+
> .ui-datepicker-header {
|
|
34
|
+
border-bottom: 0 none;
|
|
35
|
+
border-radius: 0;
|
|
36
|
+
height: auto;
|
|
37
|
+
margin: 0;
|
|
38
|
+
padding: 8px 10px;
|
|
39
|
+
width: 100%;
|
|
40
|
+
}
|
|
41
|
+
.ui-datepicker-calendar th {
|
|
42
|
+
padding: 3px 0;
|
|
43
|
+
}
|
|
44
|
+
> .ui-datepicker-calendar {
|
|
45
|
+
left: 0;
|
|
46
|
+
width: 100%;
|
|
47
|
+
a {
|
|
48
|
+
text-decoration: none;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// comments
|
|
54
|
+
.comments {
|
|
55
|
+
.actions {
|
|
56
|
+
padding: 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.inputs >ol {
|
|
60
|
+
background-color: transparent;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.pagination_information {
|
|
64
|
+
float: none;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// boolean values
|
|
69
|
+
.status_tag {
|
|
70
|
+
min-width: 30px;
|
|
71
|
+
display: inline-block;
|
|
72
|
+
text-align: center;
|
|
73
|
+
&.no {
|
|
74
|
+
background-color: $color-error;
|
|
75
|
+
}
|
|
76
|
+
&.yes {
|
|
77
|
+
background-color: $color-success;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// dialogs
|
|
82
|
+
.ui-dialog {
|
|
83
|
+
button.ui-button {
|
|
84
|
+
@extend .button-base;
|
|
85
|
+
margin-right: 10px;
|
|
86
|
+
&:hover, &.ui-widget:hover {
|
|
87
|
+
background-color: #aaa;
|
|
88
|
+
background-image: none;
|
|
89
|
+
}
|
|
90
|
+
&.ui-dialog-titlebar-close {
|
|
91
|
+
// display: none; // hides close button
|
|
92
|
+
margin-right: 0;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
.ui-dialog-content {
|
|
96
|
+
min-height: auto;
|
|
97
|
+
}
|
|
98
|
+
.ui-dialog-titlebar {
|
|
99
|
+
display: flex;
|
|
100
|
+
justify-content: space-between;
|
|
101
|
+
> * {
|
|
102
|
+
align-self: center
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
// .ui-dialog-buttonset {
|
|
106
|
+
// text-align: right;
|
|
107
|
+
// }
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// special components
|
|
111
|
+
.filter_form .select-one-inputs {
|
|
112
|
+
display: flex;
|
|
113
|
+
>input[type="text"], >select {
|
|
114
|
+
width: 49%;
|
|
115
|
+
}
|
|
116
|
+
>input[type="text"] {
|
|
117
|
+
margin: 0 1% 0 0;
|
|
118
|
+
}
|
|
119
|
+
select {
|
|
120
|
+
margin: 0 0 0 1%;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
.selectize.input > .selectize-control > .selectize-input {
|
|
124
|
+
padding-left: 4px;
|
|
125
|
+
padding-top: 3px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// optional customizations
|
|
129
|
+
.compact_titlebar {
|
|
130
|
+
white-space: initial;
|
|
131
|
+
}
|
|
132
|
+
.sidebar_left {
|
|
133
|
+
#main_content_wrapper {
|
|
134
|
+
order: 2;
|
|
135
|
+
width: calc( 100% - 270px );
|
|
136
|
+
#main_content {
|
|
137
|
+
width: 100%;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
#sidebar {
|
|
141
|
+
order: 1;
|
|
142
|
+
margin-left: 0;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
table.scrollable_cells {
|
|
146
|
+
th, td {
|
|
147
|
+
max-width: 200px;
|
|
148
|
+
overflow: scroll;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
.ckeditor_width_fix {
|
|
152
|
+
display: inline-block;
|
|
153
|
+
min-width: 450px;
|
|
154
|
+
width: auto;
|
|
155
|
+
// width: calc(80% - 22px);
|
|
156
|
+
}
|
|
157
|
+
.no_rounded {
|
|
158
|
+
*, .action_items span.action_item > a, .panel {
|
|
159
|
+
border-radius: 0;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// menu
|
|
164
|
+
.blaze-menu {
|
|
165
|
+
@extend .c-card;
|
|
166
|
+
@extend .c-card--menu;
|
|
167
|
+
@extend .u-high;
|
|
168
|
+
li {
|
|
169
|
+
@extend .c-card__item;
|
|
170
|
+
padding: 0;
|
|
171
|
+
a {
|
|
172
|
+
display: block;
|
|
173
|
+
padding: 0.5em;
|
|
174
|
+
text-decoration: none;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
.sidebar_section .blaze-menu {
|
|
179
|
+
margin-bottom: 4px;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// textarea comments
|
|
183
|
+
#active_admin_comment_body {
|
|
184
|
+
width: 100%;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// misc
|
|
188
|
+
#active_admin_content.without_sidebar #main_content_wrapper #main_content {
|
|
189
|
+
width: 100%;
|
|
190
|
+
}
|
|
191
|
+
#wrapper {
|
|
192
|
+
display: block;
|
|
193
|
+
min-height: 100vh;
|
|
194
|
+
padding-bottom: 40px; // footer height
|
|
195
|
+
position: relative;
|
|
196
|
+
}
|
|
197
|
+
}
|