arctic_admin 4.0.0.alpha → 4.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d80f79149e44a52c1d586e425e82313f2d83aea8455d59eaba12a72fb94abc30
4
- data.tar.gz: ff9b250756327bb54eb0ee374d4cacb0a9cb7b6090da861ee85beceda2534f62
3
+ metadata.gz: 4f527d7e2caa4c8209125ef8b4e0819d9dfac5056622e62fbb78f2bfc7950028
4
+ data.tar.gz: c137632694ed36dc983279e9e161b2415d4100b7c6daef0bcc8353f7d7514a4f
5
5
  SHA512:
6
- metadata.gz: 6844d6c0fbd22ce592aa64c9f5f27e93033564f44bd7856a3e9d2f3f0ab52ffb5c8a44c106ec9eac85e7dd50c6213649930bfa303a451b4ea867405bc9ded0fd
7
- data.tar.gz: 159bce7c3570d89754af6964c035497b6adbc0a87f6f709a06fa556c4ddfdd924a48866518336e6424a81cd0efa6ae87df472c3e9f8442d10bf4ef846bb62548
6
+ metadata.gz: 81d7c39c6fc5201af8f6543dc8033d642782489bcca767a6da9ab1badc108f546e34d9260750e1c4d46bc67dc938c84e393b4b930f1ba00915a7d49654c061a9
7
+ data.tar.gz: ab34c1df077f84627182680c0686986204c0636ea4d0e668ea9921c17136088b652933e388b90c504081be9b35e642ae72057362ac1a93a43d724cd3b82c9cb1
@@ -14,6 +14,8 @@ Simple theme for ActiveAdmin :ok_hand:
14
14
 
15
15
  ## Installation
16
16
 
17
+ ### For Sprockets users
18
+
17
19
  - Add this to your Gemfile:
18
20
 
19
21
  ```ruby
@@ -30,9 +32,17 @@ config.meta_tags = meta_tags_options
30
32
  config.meta_tags_for_logged_out_pages = meta_tags_options
31
33
  ```
32
34
 
33
- ## Usage
35
+ ### For webpacker / jsbundling-rails or other JS-based asset solutions
36
+
37
+ Install the needed assets with npm or yarn:
38
+
39
+ ```bash
40
+ yarn add arctic_admin @fortawesome/fontawesome-free
41
+ ```
42
+
43
+ ## Use with Sprockets
34
44
 
35
- ### CSS
45
+ ### 1a - CSS
36
46
 
37
47
  In your `active_admin.css`, include the css file:
38
48
 
@@ -46,7 +56,7 @@ In your `active_admin.css`, include the css file:
46
56
 
47
57
  Then restart your webserver if it was previously running.
48
58
 
49
- ### Sass Support
59
+ ### 1b - Sass Support
50
60
 
51
61
  :exclamation: **Remove the line `@import "active_admin/base"`**
52
62
 
@@ -65,7 +75,7 @@ add this to your `active_admin.sass` file:
65
75
  @import arctic_admin/base
66
76
  ```
67
77
 
68
- ### JS
78
+ ### 2 - JS
69
79
 
70
80
  In your `active_admin.js`, include the js file:
71
81
 
@@ -77,16 +87,7 @@ In your `active_admin.js`, include the js file:
77
87
 
78
88
  ## Use with webpacker
79
89
 
80
- ### 1 - Preparation
81
-
82
- Install the assets from npm or yarn
83
-
84
- ```
85
- yarn add arctic_admin
86
- ```
87
-
88
-
89
- ### 2 - CSS
90
+ ### 1 - CSS
90
91
 
91
92
  In your `app/javascript/stylesheets/active_admin.scss`, add the line:
92
93
 
@@ -101,28 +102,26 @@ Remove:
101
102
  @import "~@activeadmin/activeadmin/src/scss/base";
102
103
  ```
103
104
 
104
- ### 3 - JS
105
+ ### 2 - JS
105
106
 
106
- In your `app/javascript/packs/active_admin.js`, add the line:
107
+ Search for `app/javascript/packs/active_admin.js` in your rails project and add the following lines:
107
108
 
108
109
  ```js
110
+ import "@fortawesome/fontawesome-free/css/all.css";
109
111
  import 'arctic_admin'
110
112
  ```
111
113
 
112
114
 
113
115
  ### Customization
114
116
 
115
- For this, you need to use sass to custom the theme.
117
+ For this, you need to use SASS to customize the theming.
116
118
 
117
- You can even change basic color of the theme by placing some other variables:
118
-
119
- If you use the [SCSS](http://sass-lang.com/documentation/file.SASS_REFERENCE.html), add this to your
120
- `active_admin.scss` file:
119
+ Right now you can change the primary color of the theme by placing the following variable in your `active_admin.scss` file:
121
120
 
122
121
  ```scss
123
122
  $primary-color: #2dbb43;
124
123
 
125
- @import "arctic_admin/base";
124
+ @import "~arctic_admin/src/scss/main";
126
125
  ```
127
126
 
128
127
  If you use the
@@ -132,7 +131,7 @@ add this to your `active_admin.sass` file:
132
131
  ```sass
133
132
  $primary-color: #2dbb43
134
133
 
135
- @import arctic_admin/base
134
+ @import ~arctic_admin/src/scss/main
136
135
  ```
137
136
 
138
137
  Then restart your webserver if it was previously running.
@@ -5,7 +5,7 @@ document.addEventListener('DOMContentLoaded', () => {
5
5
  if (sidebar) {
6
6
  sidebar.addEventListener('click', event => {
7
7
  const insideSection = document.querySelector('#filters_sidebar_section')
8
- if (!(event.target === insideSection || insideSection.contains(event.target))) {
8
+ if (!(event.target === insideSection || insideSection.contains(event.target)) && event.target.className != "select2-selection__choice__remove") {
9
9
  sidebar.classList.toggle('sidebar_open')
10
10
  }
11
11
  })
@@ -39,12 +39,14 @@ document.addEventListener('DOMContentLoaded', () => {
39
39
  })
40
40
 
41
41
  // toggle of nested menu items
42
- const nestedMenuItem = document.querySelector('#tabs .has_nested')
43
- if (nestedMenuItem) {
44
- nestedMenuItem.addEventListener('click', (e) => {
45
- e.stopPropagation()
46
- nestedMenuItem.classList.toggle('open')
47
- })
48
- }
42
+ const nestedMenuItems = document.querySelectorAll('#tabs .has_nested')
43
+ nestedMenuItems.forEach(
44
+ (nestedMenuItem) => {
45
+ nestedMenuItem.addEventListener('click', (e) => {
46
+ e.stopPropagation()
47
+ nestedMenuItem.classList.toggle('open')
48
+ })
49
+ }
50
+ )
49
51
 
50
52
  })
@@ -62,7 +62,7 @@ input[type="checkbox"] {
62
62
 
63
63
  &:checked {
64
64
  border-color: $primary-color;
65
- background-color: $primary-color;
65
+ background-color: $primary-color !important;
66
66
  }
67
67
  }
68
68
 
@@ -34,7 +34,7 @@
34
34
  }
35
35
 
36
36
  .select2-container--default .select2-results__option[aria-selected=true]{
37
- background_color: $body-background;
37
+ background-color: $body-background;
38
38
  }
39
39
 
40
40
  .select2-search--dropdown .select2-search__field{
@@ -47,4 +47,4 @@
47
47
 
48
48
  .select2-results__option{
49
49
  padding-left: 12px;
50
- }
50
+ }
@@ -39,12 +39,6 @@ thead th {
39
39
  }
40
40
 
41
41
  tbody tr {
42
- border: 1px solid $border-color;
43
-
44
- &:hover {
45
- background-color: rgba(228, 234, 236, 0.3);
46
- }
47
-
48
42
  th {
49
43
  font-size: $font-size;
50
44
  }
@@ -64,3 +58,14 @@ tbody tr {
64
58
  }
65
59
  }
66
60
  }
61
+
62
+ // style only for table
63
+ .index_as_table {
64
+ tbody tr {
65
+ border: 1px solid $border-color;
66
+
67
+ &:hover {
68
+ background-color: rgba(228, 234, 236, 0.3);
69
+ }
70
+ }
71
+ }
@@ -101,7 +101,7 @@
101
101
  }
102
102
  }
103
103
 
104
- ul {
104
+ & > ul {
105
105
  display: block;
106
106
  }
107
107
  }
@@ -37,6 +37,7 @@
37
37
  background-color: #fff;
38
38
  color: $color;
39
39
  border: 1px solid $color;
40
+ padding: 4px 8px;
40
41
  @include button();
41
42
 
42
43
  &:hover {
@@ -117,4 +118,4 @@
117
118
 
118
119
  @mixin little-button() {
119
120
  padding: 6px 12px;
120
- }
121
+ }
@@ -1,3 +1,5 @@
1
+ @use "sass:math";
2
+
1
3
  body.index {
2
4
 
3
5
  .resource_selection_toggle_cell, .resource_selection_cell {
@@ -39,6 +41,22 @@ body.index {
39
41
  position: absolute;
40
42
  z-index: 1;
41
43
  }
44
+
45
+ .indexes.table_tools_segmented_control {
46
+ display: flex;
47
+ justify-content: right;
48
+
49
+ a {
50
+ @include secondary-button($primary-color);
51
+ }
52
+
53
+ .index {
54
+ margin-right: 4px;
55
+ &:last-child {
56
+ margin-right: 0;
57
+ }
58
+ }
59
+ }
42
60
  }
43
61
 
44
62
  .paginated_collection_contents {
@@ -62,7 +80,7 @@ body.index {
62
80
  @include transform(translateY(-50%));
63
81
 
64
82
  @media screen and (min-width: $md-width) {
65
- font-size: $font-size/1;
83
+ // font-size: math.div($font-size, 1px);
66
84
  }
67
85
  }
68
86
 
@@ -89,6 +107,10 @@ body.index {
89
107
  .scopes {
90
108
  .scope {
91
109
  @include group-button($primary-color);
110
+
111
+ a {
112
+ margin-right: .25rem;
113
+ }
92
114
  }
93
115
  }
94
116
 
@@ -1,3 +1,3 @@
1
1
  module ArcticAdmin
2
- VERSION = "4.0.0.alpha"
2
+ VERSION = "4.1.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arctic_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.alpha
4
+ version: 4.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Clément Prod'homme
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-01 00:00:00.000000000 Z
11
+ date: 2023-03-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -79,7 +79,7 @@ extensions: []
79
79
  extra_rdoc_files: []
80
80
  files:
81
81
  - LICENCE.txt
82
- - Readme.md
82
+ - README.md
83
83
  - app/assets/fonts/Lato-Bold.eot
84
84
  - app/assets/fonts/Lato-Bold.ttf
85
85
  - app/assets/fonts/Lato-Bold.woff
@@ -154,11 +154,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
154
154
  version: '0'
155
155
  required_rubygems_version: !ruby/object:Gem::Requirement
156
156
  requirements:
157
- - - ">"
157
+ - - ">="
158
158
  - !ruby/object:Gem::Version
159
- version: 1.3.1
159
+ version: '0'
160
160
  requirements: []
161
- rubygems_version: 3.0.3
161
+ rubygems_version: 3.3.26
162
162
  signing_key:
163
163
  specification_version: 4
164
164
  summary: Arctic Admin theme for ActiveAdmin