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 +4 -4
- data/{Readme.md → README.md} +22 -23
- data/app/assets/javascripts/arctic_admin/main.js +10 -8
- data/app/assets/stylesheets/arctic_admin/components/_inputs.scss +1 -1
- data/app/assets/stylesheets/arctic_admin/components/_select2.scss +2 -2
- data/app/assets/stylesheets/arctic_admin/components/_tables.scss +11 -6
- data/app/assets/stylesheets/arctic_admin/layouts/_sidebar.scss +1 -1
- data/app/assets/stylesheets/arctic_admin/mixins/_buttons_mixins.scss +2 -1
- data/app/assets/stylesheets/arctic_admin/pages/_index.scss +23 -1
- data/lib/arctic_admin/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f527d7e2caa4c8209125ef8b4e0819d9dfac5056622e62fbb78f2bfc7950028
|
4
|
+
data.tar.gz: c137632694ed36dc983279e9e161b2415d4100b7c6daef0bcc8353f7d7514a4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81d7c39c6fc5201af8f6543dc8033d642782489bcca767a6da9ab1badc108f546e34d9260750e1c4d46bc67dc938c84e393b4b930f1ba00915a7d49654c061a9
|
7
|
+
data.tar.gz: ab34c1df077f84627182680c0686986204c0636ea4d0e668ea9921c17136088b652933e388b90c504081be9b35e642ae72057362ac1a93a43d724cd3b82c9cb1
|
data/{Readme.md → README.md}
RENAMED
@@ -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
|
-
|
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 -
|
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
|
-
###
|
105
|
+
### 2 - JS
|
105
106
|
|
106
|
-
|
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
|
117
|
+
For this, you need to use SASS to customize the theming.
|
116
118
|
|
117
|
-
|
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/
|
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/
|
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
|
43
|
-
|
44
|
-
nestedMenuItem
|
45
|
-
|
46
|
-
|
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
|
})
|
@@ -34,7 +34,7 @@
|
|
34
34
|
}
|
35
35
|
|
36
36
|
.select2-container--default .select2-results__option[aria-selected=true]{
|
37
|
-
|
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
|
+
}
|
@@ -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
|
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
|
|
data/lib/arctic_admin/version.rb
CHANGED
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.
|
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:
|
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
|
-
-
|
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:
|
159
|
+
version: '0'
|
160
160
|
requirements: []
|
161
|
-
rubygems_version: 3.
|
161
|
+
rubygems_version: 3.3.26
|
162
162
|
signing_key:
|
163
163
|
specification_version: 4
|
164
164
|
summary: Arctic Admin theme for ActiveAdmin
|