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.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/specs.yml +26 -0
  3. data/.gitignore +11 -2
  4. data/.rspec +2 -0
  5. data/.rubocop.yml +27 -0
  6. data/Gemfile +15 -0
  7. data/LICENSE.txt +1 -1
  8. data/README.md +102 -54
  9. data/Rakefile +15 -1
  10. data/activeadmin_blaze_theme.gemspec +2 -12
  11. data/app/assets/stylesheets/activeadmin_blaze_theme/_base.scss +197 -0
  12. data/app/assets/stylesheets/activeadmin_blaze_theme/_contents.scss +43 -0
  13. data/app/assets/stylesheets/activeadmin_blaze_theme/_footer.scss +15 -0
  14. data/app/assets/stylesheets/activeadmin_blaze_theme/_form.scss +381 -0
  15. data/app/assets/stylesheets/activeadmin_blaze_theme/_header.scss +140 -0
  16. data/app/assets/stylesheets/activeadmin_blaze_theme/_navigation.scss +69 -0
  17. data/app/assets/stylesheets/activeadmin_blaze_theme/_sidebars.scss +64 -0
  18. data/app/assets/stylesheets/activeadmin_blaze_theme/_tables.scss +96 -0
  19. data/app/assets/stylesheets/activeadmin_blaze_theme/_variables.scss +46 -0
  20. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/blaze.scss +2 -0
  21. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.inputs.scss +0 -9
  22. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.overlays.scss +8 -1
  23. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/components.typography.scss +1 -0
  24. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_objects.grid.scss +4 -3
  25. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_utilities.alignment.scss +12 -0
  26. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/mixins/_utilities.visibility.scss +47 -0
  27. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/objects.containers.scss +0 -2
  28. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/objects.drawers.scss +6 -6
  29. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/objects.modals.scss +1 -1
  30. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/utilities.alignment.scss +12 -0
  31. data/app/assets/stylesheets/activeadmin_blaze_theme/blaze/utilities.visibility.scss +45 -0
  32. data/app/assets/stylesheets/activeadmin_blaze_theme/theme.scss +11 -989
  33. data/bin/rails +29 -0
  34. data/bin/rake +29 -0
  35. data/bin/rspec +29 -0
  36. data/bin/rubocop +29 -0
  37. data/extra/edit.png +0 -0
  38. data/extra/index.png +0 -0
  39. data/index.js +2 -0
  40. data/lib/activeadmin/views/activeadmin_form.rb +6 -2
  41. data/lib/activeadmin_blaze_theme.rb +8 -5
  42. data/lib/activeadmin_blaze_theme/version.rb +1 -1
  43. data/lib/formtastic/inputs/blaze_toggle_input.rb +12 -8
  44. data/package.json +13 -0
  45. data/spec/dummy/.ruby-version +1 -0
  46. data/spec/dummy/.tool-versions +1 -0
  47. data/spec/dummy/Rakefile +6 -0
  48. data/spec/dummy/app/admin/authors.rb +57 -0
  49. data/spec/dummy/app/admin/dashboard.rb +32 -0
  50. data/spec/dummy/app/admin/posts.rb +50 -0
  51. data/spec/dummy/app/admin/tags.rb +4 -0
  52. data/spec/dummy/app/assets/config/manifest.js +3 -0
  53. data/spec/dummy/app/assets/images/.keep +0 -0
  54. data/spec/dummy/app/assets/javascripts/active_admin.js +1 -0
  55. data/spec/dummy/app/assets/stylesheets/active_admin.scss +4 -0
  56. data/spec/dummy/app/assets/stylesheets/application.css +15 -0
  57. data/spec/dummy/app/channels/application_cable/channel.rb +4 -0
  58. data/spec/dummy/app/channels/application_cable/connection.rb +4 -0
  59. data/spec/dummy/app/controllers/application_controller.rb +2 -0
  60. data/spec/dummy/app/controllers/concerns/.keep +0 -0
  61. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  62. data/spec/dummy/app/javascript/packs/application.js +15 -0
  63. data/spec/dummy/app/jobs/application_job.rb +7 -0
  64. data/spec/dummy/app/mailers/application_mailer.rb +4 -0
  65. data/spec/dummy/app/models/application_record.rb +7 -0
  66. data/spec/dummy/app/models/author.rb +26 -0
  67. data/spec/dummy/app/models/concerns/.keep +0 -0
  68. data/spec/dummy/app/models/post.rb +25 -0
  69. data/spec/dummy/app/models/post_tag.rb +9 -0
  70. data/spec/dummy/app/models/profile.rb +9 -0
  71. data/spec/dummy/app/models/tag.rb +6 -0
  72. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  73. data/spec/dummy/app/views/layouts/mailer.html.erb +13 -0
  74. data/spec/dummy/app/views/layouts/mailer.text.erb +1 -0
  75. data/spec/dummy/bin/rails +4 -0
  76. data/spec/dummy/bin/rake +4 -0
  77. data/spec/dummy/bin/setup +33 -0
  78. data/spec/dummy/config.ru +5 -0
  79. data/spec/dummy/config/application.rb +18 -0
  80. data/spec/dummy/config/boot.rb +5 -0
  81. data/spec/dummy/config/cable.yml +10 -0
  82. data/spec/dummy/config/database.yml +8 -0
  83. data/spec/dummy/config/environment.rb +5 -0
  84. data/spec/dummy/config/environments/development.rb +62 -0
  85. data/spec/dummy/config/environments/production.rb +112 -0
  86. data/spec/dummy/config/environments/test.rb +49 -0
  87. data/spec/dummy/config/initializers/active_admin.rb +335 -0
  88. data/spec/dummy/config/initializers/application_controller_renderer.rb +8 -0
  89. data/spec/dummy/config/initializers/assets.rb +12 -0
  90. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  91. data/spec/dummy/config/initializers/content_security_policy.rb +28 -0
  92. data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
  93. data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  94. data/spec/dummy/config/initializers/inflections.rb +16 -0
  95. data/spec/dummy/config/initializers/mime_types.rb +4 -0
  96. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  97. data/spec/dummy/config/locales/en.yml +33 -0
  98. data/spec/dummy/config/puma.rb +38 -0
  99. data/spec/dummy/config/routes.rb +3 -0
  100. data/spec/dummy/config/spring.rb +6 -0
  101. data/spec/dummy/config/storage.yml +7 -0
  102. data/spec/dummy/db/migrate/20170806125915_create_active_storage_tables.active_storage.rb +27 -0
  103. data/spec/dummy/db/migrate/20180101010101_create_active_admin_comments.rb +16 -0
  104. data/spec/dummy/db/migrate/20180607053251_create_authors.rb +13 -0
  105. data/spec/dummy/db/migrate/20180607053254_create_profiles.rb +12 -0
  106. data/spec/dummy/db/migrate/20180607053255_create_tags.rb +11 -0
  107. data/spec/dummy/db/migrate/20180607053257_create_post_tags.rb +12 -0
  108. data/spec/dummy/db/migrate/20180607053739_create_posts.rb +17 -0
  109. data/spec/dummy/db/schema.rb +99 -0
  110. data/spec/dummy/lib/assets/.keep +0 -0
  111. data/spec/dummy/public/404.html +67 -0
  112. data/spec/dummy/public/422.html +67 -0
  113. data/spec/dummy/public/500.html +66 -0
  114. data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
  115. data/spec/dummy/public/apple-touch-icon.png +0 -0
  116. data/spec/dummy/public/favicon.ico +0 -0
  117. data/spec/rails_helper.rb +36 -0
  118. data/spec/spec_helper.rb +20 -0
  119. data/spec/support/capybara.rb +3 -0
  120. data/spec/support/drivers.rb +7 -0
  121. data/spec/system/theme_spec.rb +15 -0
  122. metadata +186 -136
  123. data/extra/screenshot1.jpg +0 -0
  124. data/extra/screenshot2.jpg +0 -0
  125. data/extra/screenshot3.jpg +0 -0
  126. data/extra/screenshot4.jpg +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 68d7d7b562bdffd55efd278288f3391cae039c58cfb277c87918e39f86e6d9db
4
- data.tar.gz: 49e68e847645f14004ca6d9405fc1adc84a959611b3c9d7062856de196d0b49c
3
+ metadata.gz: e4b53242af49f31d662d0c774b78cad40d87ad563c771ce174b8ca8866d1b539
4
+ data.tar.gz: f6b941ff7872c51db2d6c47e5117420d0e5f8e611ca897f7e4db88e61a398e97
5
5
  SHA512:
6
- metadata.gz: a4ab0ae384a9b3787b09244c794aa4ef4ce0e3a93753983028bb7835f591eb7b4664be9264c65c09c622686093a30c0c3bb74d0c13a44b91cfbc6ffb84c39e2f
7
- data.tar.gz: '09b8619df3a899802d293ce7ae36ef6c029507e80a188b7a46bf5ba36bce76c2454ec2817280d6e22ab5d154effbb371ac0889d61378024b199e7a55dc3d6b6a'
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
@@ -1,4 +1,13 @@
1
- _misc/
2
- Gemfile.lock
1
+ *.gem
3
2
  *.orig
4
3
 
4
+ /.rspec_failures
5
+ /.rubocop-*
6
+ /Gemfile.lock
7
+
8
+ /_misc/
9
+ /coverage/
10
+ /spec/dummy/db/*.sqlite3*
11
+ /spec/dummy/log/
12
+ /spec/dummy/storage/
13
+ /spec/dummy/tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --require rails_helper
2
+ --format documentation
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
@@ -1,4 +1,4 @@
1
- Copyright (c) 2017 Mattia Roccoberton
1
+ Copyright (c) 2020 Mattia Roccoberton
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -1,57 +1,89 @@
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 [![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)
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
- - Add to your Gemfile: `gem 'activeadmin_blaze_theme'`
14
- - Execute bundle
15
- - Add at the end of your Active Admin styles (_app/assets/stylesheets/active_admin.scss_): `@import "activeadmin_blaze_theme/theme";`
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
- ```css
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: #2C3E50;
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 !default; // bg footer bar
29
- $bg-form1: #f4f4f4 !default; // bg 1st level forms
30
- $bg-form2: darken($bg-form1, 3%) !default; // bg 2nd level forms (nested)
31
- $bg-form3: darken($bg-form1, 6%) !default; // bg 3rd level forms (nested)
32
- $bg-form4: darken($bg-form1, 9%) !default; // bg 4th level forms (nested)
33
- $bg-form-sub-headings: lighten( $color-brand, 64% ) !default; // bg nested forms title
34
- $bg-header: $color-brand !default; // bg header bar
35
- $bg-inputs: #fff !default; // bg forms inputs
36
- $bg-menu-active: #7b929e !default; // bg menu item current / hover
37
- $bg-sidebar: #efefef; // bg sidebar
38
- $fg-box-title: #fff !default;
39
- $fg-button-link: #fff !default;
40
- $fg-menu-items: #f8f8f8 !default;
41
- $fg-table-borders: #e4e4e4 !default;
42
- $fg-table-link: #eee !default;
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 !default;
45
- $inputs-spacing: 10px !default;
46
- $height-inputs: 26px !default;
47
- $height-topbar: 40px !default;
48
- $height-titlebar: 38px !default;
49
- $text-shadow: #000 !default;
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
- ```css
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
- ```css
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
- ```css
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
- ```css
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
- `f.input :boolean, as: :blaze_toggle`
122
+ ```ruby
123
+ f.input :boolean, as: :blaze_toggle
124
+ ```
90
125
 
91
126
  To change toggle color:
92
127
 
93
- `f.input :boolean, as: :blaze_toggle, input_html: { toggle_class: 'c-toggle--brand' }`
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
- `f.input :boolean, as: :blaze_toggle, input_html: { simple_checkbox: true }`
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
- ```rb
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
- ![menu](extra/screenshot4.jpg)
121
-
122
160
  ### Accordion
161
+
123
162
  An accordion group in a form:
124
163
 
125
- ```rb
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
- `f.readonly :position`
185
+ ```ruby
186
+ f.readonly :position
187
+ ```
146
188
 
147
- `f.readonly :position, f.object.position * 2`
189
+ ```ruby
190
+ f.readonly :position, f.object.position * 2
191
+ ```
148
192
 
149
- `f.readonly 'Code', 'Automatically set after save', class: 'a-wrapper-class'`
193
+ ```ruby
194
+ f.readonly 'Code', 'Automatically set after save', class: 'a-wrapper-class'
195
+ ```
150
196
 
151
- `f.readonly nil, 'Value only, no label'`
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
- ![index](extra/screenshot1.jpg)
240
+ Index:
241
+ ![index](extra/index.png)
192
242
 
193
243
  Edit:
194
-
195
- ![edit](extra/screenshot2.jpg)
196
-
197
- Show - sidebar on the left:
198
-
199
- ![edit](extra/screenshot3.jpg)
244
+ ![edit](extra/edit.png)
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
- 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.
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
- require "bundler/gem_tasks"
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('../lib', __FILE__)
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 which use Blaze CSS UI toolkit'
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
+ }