activeadmin_blaze_theme 0.5.12 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/specs.yml +26 -0
- data/.gitignore +11 -2
- data/.rspec +2 -0
- data/.rubocop.yml +27 -0
- data/Gemfile +2 -0
- data/LICENSE.txt +1 -1
- data/README.md +82 -70
- data/Rakefile +15 -1
- data/activeadmin_blaze_theme.gemspec +24 -11
- data/app/assets/stylesheets/activeadmin_blaze_theme/_base.scss +197 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/_contents.scss +42 -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/_components.addresses.scss +11 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.alerts.scss +78 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.avatars.scss +38 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.back-to-top.scss +17 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.badges.scss +71 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.breadcrumbs.scss +24 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.buttons.scss +91 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.calendars.scss +80 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.cards.scss +195 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.divider.scss +39 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.file-upload.scss +24 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.github-buttons.scss +131 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.headings.scss +12 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.hints.scss +21 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.input-groups.scss +164 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.inputs.scss +128 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.links.scss +72 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.lists.scss +64 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.navs.scss +83 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.overlays.scss +23 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.pagination.scss +31 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.progress.scss +83 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.ranges.scss +176 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.tables.scss +86 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.tabs.scss +68 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.tags.scss +39 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.timelines.scss +113 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.toggles.scss +89 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/{components.tooltips.scss → _components.tooltips.scss} +28 -30
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_components.trees.scss +48 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_generics.global.scss +17 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_objects.containers.scss +37 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_objects.drawers.scss +91 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_objects.forms.scss +25 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/{objects.grid.responsive.scss → _objects.grid.responsive.scss} +14 -14
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/{objects.grid.scss → _objects.grid.scss} +2 -2
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/{objects.images.scss → _objects.images.scss} +1 -1
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/{objects.media.scss → _objects.media.scss} +3 -3
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_objects.modals.scss +70 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/{objects.panels.scss → _objects.panels.scss} +1 -11
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/{utilities.alignment.scss → _utilities.alignment.scss} +13 -1
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_utilities.boxing.scss +111 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_utilities.elevation.scss +17 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_utilities.radius.scss +11 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_utilities.sizes.scss +23 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_utilities.typography.scss +160 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_utilities.visibility.scss +54 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/_variables.scss +93 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/blaze.scss +49 -41
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_components.buttons.scss +82 -43
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_components.inputs.scss +2 -40
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_objects.grid.scss +35 -6
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_tools.mediaqueries.scss +13 -34
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_utilities.alignment.scss +12 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_utilities.states.scss +7 -0
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_utilities.visibility.scss +7 -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 +5 -2
- data/lib/activeadmin_blaze_theme/version.rb +3 -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 +392 -70
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/blaze.colors.scss +0 -30
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.addresses.scss +0 -12
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.alerts.scss +0 -59
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.avatars.scss +0 -36
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.badges.scss +0 -60
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.breadcrumbs.scss +0 -20
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.bubbles.scss +0 -49
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.buttons.scss +0 -77
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.calendars.scss +0 -69
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.cards.scss +0 -213
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.headings.scss +0 -14
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.hints.scss +0 -27
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.input-groups.scss +0 -163
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.inputs.scss +0 -144
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.links.scss +0 -31
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.lists.scss +0 -60
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.navs.scss +0 -126
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.overlays.scss +0 -26
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.pagination.scss +0 -42
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.progress.scss +0 -51
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.ranges.scss +0 -114
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.tables.scss +0 -88
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.tabs.scss +0 -72
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.tags.scss +0 -42
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.toggles.scss +0 -74
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.trees.scss +0 -47
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.typography.scss +0 -94
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/generics.global.scss +0 -13
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_components.alerts.scss +0 -6
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_components.badges.scss +0 -8
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_components.links.scss +0 -22
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_components.lists.scss +0 -10
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_components.navs.scss +0 -29
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_components.ranges.scss +0 -89
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_components.tabs.scss +0 -5
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_components.toggles.scss +0 -6
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_components.typography.scss +0 -25
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_objects.containers.scss +0 -10
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_settings.global.scss +0 -864
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_utilities.boxing.scss +0 -125
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/objects.containers.scss +0 -31
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/objects.drawers.scss +0 -88
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/objects.forms.scss +0 -25
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/objects.modals.scss +0 -58
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/themes/blaze.example.scss +0 -7
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/utilities.boxing.scss +0 -101
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/utilities.elevation.scss +0 -19
- data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/utilities.sizes.scss +0 -25
- 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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1418a94442dd12e46a6ffc132dbad6e4c90989c5a84c6f8823059e28126948e0
|
4
|
+
data.tar.gz: 2a6b16ebe865f37a752b7aea3d3b2bb2874963601c37b9c4dbc9febfa462655e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 509da409edafd11c8a69d1d7832bf126f34a68014c97ded5fbb91edca3efcad79a7c543182f981a3ddac786860c0eb7f27c34cc6265e4e75a119d81946960f89
|
7
|
+
data.tar.gz: 8cd4fc6fa5a2b97c81d8d35d062fa0ad5db37631eaaa89da97890bd0aecd540664b532ea66466b027b52f6a6b9dcebc3e4889abffc8ee27725395b65ec79d615
|
@@ -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
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,66 +1,77 @@
|
|
1
|
-
# Active Admin 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)
|
2
3
|
|
3
|
-
A theme for Active Admin using [Blaze CSS](http://blazecss.com/)
|
4
|
+
A theme for Active Admin using [Blaze CSS](http://blazecss.com/) 9.x.
|
4
5
|
|
5
6
|
Features:
|
6
|
-
|
7
7
|
- CSS only theme with clean UI
|
8
8
|
- compact nested forms
|
9
9
|
- [customizable](#customize) options: colors, sidebar position, squared style, scroll on cells
|
10
10
|
- custom controls / components: [toggle](#toggle), [Sidebar menu](#sidebar-menu), [Accordion](#accordion), [Readonly field](#readonly-field), [Styled table](#styled-table)
|
11
11
|
- Blaze CSS [widgets](#blaze-widgets)
|
12
12
|
|
13
|
+
See some [screenshots](#screenshots).
|
14
|
+
|
13
15
|
## Install
|
16
|
+
- Add to your Gemfile: `gem 'activeadmin_blaze_theme'` (and execute `bundle`)
|
14
17
|
|
15
|
-
|
18
|
+
If you installed Active Admin **without** Webpacker support:
|
16
19
|
|
17
|
-
|
20
|
+
- Add at the end of your Active Admin styles (_app/assets/stylesheets/active_admin.scss_):
|
18
21
|
|
19
|
-
|
22
|
+
```scss
|
23
|
+
@import "activeadmin_blaze_theme/theme";
|
24
|
+
```
|
20
25
|
|
21
|
-
|
26
|
+
If you are using Webpacker:
|
22
27
|
|
23
|
-
|
28
|
+
- Add the component to the _package.json_: `yarn add blocknotes/activeadmin_blaze_theme`
|
29
|
+
- Add at the end of your Active Admin javascript pack (_app/javascript/packs/active_admin.js_):
|
24
30
|
|
25
|
-
|
31
|
+
```js
|
32
|
+
require('activeadmin_blaze_theme');
|
33
|
+
```
|
26
34
|
|
27
|
-
-
|
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`
|
28
36
|
|
29
|
-
|
37
|
+
## Customize
|
38
|
+
- To change colors add to your Active Admin styles (before **activeadmin_blaze_theme/theme** import):
|
39
|
+
|
40
|
+
```scss
|
30
41
|
// blaze colors
|
31
|
-
$color-brand: #
|
42
|
+
$color-brand: #2c3e50;
|
32
43
|
$color-info: #4dabf5;
|
33
44
|
$color-warning: #ff9800;
|
34
45
|
$color-success: #4caf50;
|
35
46
|
$color-error: #f44336;
|
36
47
|
// main variables
|
37
|
-
$bg-footer: #dfdfdf
|
38
|
-
$bg-form1: #f4f4f4
|
39
|
-
$bg-form2: darken($bg-form1, 3%)
|
40
|
-
$bg-form3: darken($bg-form1, 6%)
|
41
|
-
$bg-form4: darken($bg-form1, 9%)
|
42
|
-
$bg-form-sub-headings: lighten(
|
43
|
-
$bg-header: $color-brand
|
44
|
-
$bg-inputs: #fff
|
45
|
-
$bg-menu-active: #7b929e
|
46
|
-
$bg-sidebar: #efefef;
|
47
|
-
$fg-box-title: #fff
|
48
|
-
$fg-button-link: #fff
|
49
|
-
$fg-menu-items: #f8f8f8
|
50
|
-
$fg-table-borders: #e4e4e4
|
51
|
-
$fg-table-link: #eee
|
48
|
+
$bg-footer: #dfdfdf; // bg footer bar
|
49
|
+
$bg-form1: #f4f4f4; // bg 1st level forms
|
50
|
+
$bg-form2: darken($bg-form1, 3%); // bg 2nd level forms (nested)
|
51
|
+
$bg-form3: darken($bg-form1, 6%); // bg 3rd level forms (nested)
|
52
|
+
$bg-form4: darken($bg-form1, 9%); // bg 4th level forms (nested)
|
53
|
+
$bg-form-sub-headings: lighten($color-brand, 64%); // bg nested forms title
|
54
|
+
$bg-header: $color-brand; // bg header bar
|
55
|
+
$bg-inputs: #fff; // bg forms inputs
|
56
|
+
$bg-menu-active: #7b929e; // bg menu item current / hover
|
57
|
+
$bg-sidebar: #efefef; // bg sidebar
|
58
|
+
$fg-box-title: #fff;
|
59
|
+
$fg-button-link: #fff;
|
60
|
+
$fg-menu-items: #f8f8f8;
|
61
|
+
$fg-table-borders: #e4e4e4;
|
62
|
+
$fg-table-link: #eee;
|
52
63
|
// other variables
|
53
|
-
$form-padding: 10px
|
54
|
-
$inputs-spacing: 10px
|
55
|
-
$height-inputs: 26px
|
56
|
-
$height-topbar: 40px
|
57
|
-
$height-titlebar: 38px
|
58
|
-
$text-shadow: #000
|
64
|
+
$form-padding: 10px;
|
65
|
+
$inputs-spacing: 10px;
|
66
|
+
$height-inputs: 26px;
|
67
|
+
$height-topbar: 40px;
|
68
|
+
$height-titlebar: 38px;
|
69
|
+
$text-shadow: #000;
|
59
70
|
```
|
60
71
|
|
61
|
-
- To move sidebar on the left add to your
|
72
|
+
- To move sidebar on the left add to your Active Admin styles (after blaze theme import):
|
62
73
|
|
63
|
-
```
|
74
|
+
```scss
|
64
75
|
#active_admin_content.with_sidebar {
|
65
76
|
@extend .sidebar_left;
|
66
77
|
}
|
@@ -68,7 +79,7 @@ $text-shadow: #000 !default;
|
|
68
79
|
|
69
80
|
- Squared style (no rounded borders):
|
70
81
|
|
71
|
-
```
|
82
|
+
```scss
|
72
83
|
#active_admin_content, .active_admin #title_bar {
|
73
84
|
@extend .no_rounded;
|
74
85
|
}
|
@@ -76,14 +87,14 @@ $text-shadow: #000 !default;
|
|
76
87
|
|
77
88
|
- More options:
|
78
89
|
|
79
|
-
```
|
90
|
+
```scss
|
80
91
|
// scrollable table cells
|
81
92
|
body.active_admin .index_content table {
|
82
93
|
@extend .scrollable_cells;
|
83
94
|
}
|
84
95
|
```
|
85
96
|
|
86
|
-
```
|
97
|
+
```scss
|
87
98
|
// fix ckeditor width
|
88
99
|
body.active_admin .cke {
|
89
100
|
@extend .ckeditor_width_fix
|
@@ -93,26 +104,30 @@ body.active_admin .cke {
|
|
93
104
|
## Custom fields / components
|
94
105
|
|
95
106
|
### Toggle
|
96
|
-
|
97
107
|
In *form* \ *inputs* block:
|
98
108
|
|
99
|
-
|
109
|
+
```ruby
|
110
|
+
f.input :boolean, as: :blaze_toggle
|
111
|
+
```
|
100
112
|
|
101
113
|
To change toggle color:
|
102
114
|
|
103
|
-
|
115
|
+
```ruby
|
116
|
+
f.input :boolean, as: :blaze_toggle, input_html: { toggle_class: 'c-toggle--brand' }
|
117
|
+
```
|
104
118
|
|
105
119
|
Available: `c-toggle--brand, c-toggle--info, c-toggle--warning, c-toggle--success, c-toggle--error`
|
106
120
|
|
107
121
|
Standard checkbox with label on the left:
|
108
122
|
|
109
|
-
|
123
|
+
```ruby
|
124
|
+
f.input :boolean, as: :blaze_toggle, input_html: { simple_checkbox: true }
|
125
|
+
```
|
110
126
|
|
111
127
|
### Sidebar menu
|
112
|
-
|
113
128
|
A sidebar menu (*priority* option permit to put the sidebar above the filters):
|
114
129
|
|
115
|
-
```
|
130
|
+
```ruby
|
116
131
|
sidebar :help, priority: 0 do
|
117
132
|
ul class: 'blaze-menu' do
|
118
133
|
li do
|
@@ -128,13 +143,10 @@ sidebar :help, priority: 0 do
|
|
128
143
|
end
|
129
144
|
```
|
130
145
|
|
131
|
-
![menu](extra/screenshot4.jpg)
|
132
|
-
|
133
146
|
### Accordion
|
134
|
-
|
135
147
|
An accordion group in a form:
|
136
148
|
|
137
|
-
```
|
149
|
+
```ruby
|
138
150
|
f.accordion_group do
|
139
151
|
f.accordion 'First accordion' do
|
140
152
|
f.inputs for: [:detail, f.object.detail || Detail.new] do |f2|
|
@@ -152,19 +164,25 @@ end
|
|
152
164
|
```
|
153
165
|
|
154
166
|
### Readonly field
|
155
|
-
|
156
167
|
Some readonly fields in a form:
|
157
168
|
|
158
|
-
|
169
|
+
```ruby
|
170
|
+
f.readonly :position
|
171
|
+
```
|
159
172
|
|
160
|
-
|
173
|
+
```ruby
|
174
|
+
f.readonly :position, f.object.position * 2
|
175
|
+
```
|
161
176
|
|
162
|
-
|
177
|
+
```ruby
|
178
|
+
f.readonly 'Code', 'Automatically set after save', class: 'a-wrapper-class'
|
179
|
+
```
|
163
180
|
|
164
|
-
|
181
|
+
```ruby
|
182
|
+
f.readonly nil, 'Value only, no label'
|
183
|
+
```
|
165
184
|
|
166
185
|
### Styled table
|
167
|
-
|
168
186
|
Table styles:
|
169
187
|
|
170
188
|
```ruby
|
@@ -174,8 +192,7 @@ end
|
|
174
192
|
```
|
175
193
|
|
176
194
|
## Blaze widgets
|
177
|
-
|
178
|
-
See components avaible in Blaze CSS [docs](http://blazecss.com/components/buttons/).
|
195
|
+
See components available in Blaze CSS [docs](http://blazecss.com/components/buttons/).
|
179
196
|
|
180
197
|
Badge example:
|
181
198
|
|
@@ -197,28 +214,23 @@ div class: 'c-progress' do
|
|
197
214
|
end
|
198
215
|
```
|
199
216
|
|
200
|
-
##
|
217
|
+
## Notes
|
218
|
+
- 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)
|
201
219
|
|
220
|
+
## Screenshots
|
202
221
|
Index:
|
203
|
-
|
204
|
-
![index](extra/screenshot1.jpg)
|
222
|
+
![index](extra/index.png)
|
205
223
|
|
206
224
|
Edit:
|
207
|
-
|
208
|
-
![edit](extra/screenshot2.jpg)
|
209
|
-
|
210
|
-
Show - sidebar on the left:
|
211
|
-
|
212
|
-
![edit](extra/screenshot3.jpg)
|
225
|
+
![edit](extra/edit.png)
|
213
226
|
|
214
227
|
## Do you like it? Star it!
|
228
|
+
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).
|
215
229
|
|
216
|
-
|
230
|
+
Or consider offering me a coffee, it's a small thing but it is greatly appreciated: [about me](https://www.blocknot.es/about-me).
|
217
231
|
|
218
232
|
## Contributors
|
219
|
-
|
220
|
-
- [Mattia Roccoberton](http://blocknot.es) - creator, maintainer
|
233
|
+
- [Mattia Roccoberton](http://blocknot.es): author
|
221
234
|
|
222
235
|
## License
|
223
|
-
|
224
|
-
[MIT](LICENSE.txt)
|
236
|
+
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,22 +1,35 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
5
|
require 'activeadmin_blaze_theme/version'
|
5
6
|
|
6
7
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
8
|
+
spec.name = 'activeadmin_blaze_theme'
|
8
9
|
spec.version = ActiveAdminBlazeTheme::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
11
|
-
spec.summary =
|
12
|
-
spec.description =
|
13
|
-
spec.homepage =
|
14
|
-
spec.license =
|
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'
|
15
16
|
|
16
17
|
spec.files = `git ls-files -z`.split("\x0")
|
17
18
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
19
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = [
|
20
|
+
spec.require_paths = ['lib']
|
21
|
+
|
22
|
+
spec.add_runtime_dependency 'activeadmin', '~> 2.0'
|
20
23
|
|
21
|
-
spec.
|
24
|
+
spec.add_development_dependency 'activestorage', '~> 6.0'
|
25
|
+
spec.add_development_dependency 'capybara', '~> 3.33'
|
26
|
+
spec.add_development_dependency 'pry', '~> 0.13'
|
27
|
+
spec.add_development_dependency 'puma', '~> 4.3'
|
28
|
+
spec.add_development_dependency 'rspec_junit_formatter', '~> 0.4'
|
29
|
+
spec.add_development_dependency 'rspec-rails', '~> 4.0'
|
30
|
+
spec.add_development_dependency 'rubocop', '~> 0.90'
|
31
|
+
spec.add_development_dependency 'sassc', '~> 2.4'
|
32
|
+
spec.add_development_dependency 'selenium-webdriver', '~> 3.142'
|
33
|
+
spec.add_development_dependency 'sprockets-rails', '~> 3.2'
|
34
|
+
spec.add_development_dependency 'sqlite3', '~> 1.4'
|
22
35
|
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
|
+
}
|