arctic_admin 3.3.0 → 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} +15 -16
- data/app/assets/javascripts/arctic_admin/base.js +0 -2
- data/app/assets/javascripts/arctic_admin/main.js +42 -89
- 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/_filter.scss +18 -1
- data/app/assets/stylesheets/arctic_admin/layouts/_sidebar.scss +6 -0
- data/app/assets/stylesheets/arctic_admin/mixins/_buttons_mixins.scss +2 -1
- data/app/assets/stylesheets/arctic_admin/pages/_index.scss +22 -2
- data/lib/arctic_admin/version.rb +1 -1
- metadata +4 -18
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,7 +14,7 @@ Simple theme for ActiveAdmin :ok_hand:
|
|
14
14
|
|
15
15
|
## Installation
|
16
16
|
|
17
|
-
|
17
|
+
### For Sprockets users
|
18
18
|
|
19
19
|
- Add this to your Gemfile:
|
20
20
|
|
@@ -32,9 +32,17 @@ config.meta_tags = meta_tags_options
|
|
32
32
|
config.meta_tags_for_logged_out_pages = meta_tags_options
|
33
33
|
```
|
34
34
|
|
35
|
-
|
35
|
+
### For webpacker / jsbundling-rails or other JS-based asset solutions
|
36
36
|
|
37
|
-
|
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
|
44
|
+
|
45
|
+
### 1a - CSS
|
38
46
|
|
39
47
|
In your `active_admin.css`, include the css file:
|
40
48
|
|
@@ -48,7 +56,7 @@ In your `active_admin.css`, include the css file:
|
|
48
56
|
|
49
57
|
Then restart your webserver if it was previously running.
|
50
58
|
|
51
|
-
### Sass Support
|
59
|
+
### 1b - Sass Support
|
52
60
|
|
53
61
|
:exclamation: **Remove the line `@import "active_admin/base"`**
|
54
62
|
|
@@ -67,7 +75,7 @@ add this to your `active_admin.sass` file:
|
|
67
75
|
@import arctic_admin/base
|
68
76
|
```
|
69
77
|
|
70
|
-
### JS
|
78
|
+
### 2 - JS
|
71
79
|
|
72
80
|
In your `active_admin.js`, include the js file:
|
73
81
|
|
@@ -79,16 +87,7 @@ In your `active_admin.js`, include the js file:
|
|
79
87
|
|
80
88
|
## Use with webpacker
|
81
89
|
|
82
|
-
### 1 -
|
83
|
-
|
84
|
-
Install the needed assets with npm or yarn:
|
85
|
-
|
86
|
-
```
|
87
|
-
yarn add arctic_admin @fortawesome/fontawesome-free
|
88
|
-
```
|
89
|
-
|
90
|
-
|
91
|
-
### 2 - CSS
|
90
|
+
### 1 - CSS
|
92
91
|
|
93
92
|
In your `app/javascript/stylesheets/active_admin.scss`, add the line:
|
94
93
|
|
@@ -103,7 +102,7 @@ Remove:
|
|
103
102
|
@import "~@activeadmin/activeadmin/src/scss/base";
|
104
103
|
```
|
105
104
|
|
106
|
-
###
|
105
|
+
### 2 - JS
|
107
106
|
|
108
107
|
Search for `app/javascript/packs/active_admin.js` in your rails project and add the following lines:
|
109
108
|
|
@@ -1,99 +1,52 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
if (
|
9
|
-
|
10
|
-
target.tagName != 'SELECT' &&
|
11
|
-
target.tagName != 'OPTION'
|
12
|
-
) {
|
13
|
-
if ($(this).css('right') == '0px') {
|
14
|
-
$(this).css('position', 'fixed')
|
15
|
-
$(this).animate(
|
16
|
-
{
|
17
|
-
right: '-=' + width
|
18
|
-
},
|
19
|
-
600,
|
20
|
-
function () {
|
21
|
-
$(this).removeAttr('style')
|
22
|
-
animationFilterDone = true
|
23
|
-
}
|
24
|
-
)
|
25
|
-
} else {
|
26
|
-
$(this).animate(
|
27
|
-
{
|
28
|
-
right: '+=' + width
|
29
|
-
},
|
30
|
-
600,
|
31
|
-
function () {
|
32
|
-
$(this).css('position', 'absolute')
|
33
|
-
animationFilterDone = true
|
34
|
-
}
|
35
|
-
)
|
36
|
-
}
|
1
|
+
document.addEventListener('DOMContentLoaded', () => {
|
2
|
+
|
3
|
+
// right filter sidebar
|
4
|
+
const sidebar = document.querySelector('#sidebar')
|
5
|
+
if (sidebar) {
|
6
|
+
sidebar.addEventListener('click', event => {
|
7
|
+
const insideSection = document.querySelector('#filters_sidebar_section')
|
8
|
+
if (!(event.target === insideSection || insideSection.contains(event.target)) && event.target.className != "select2-selection__choice__remove") {
|
9
|
+
sidebar.classList.toggle('sidebar_open')
|
37
10
|
}
|
11
|
+
})
|
12
|
+
}
|
13
|
+
|
14
|
+
const menuButton = document.querySelector('#utility_nav')
|
15
|
+
const menu = document.querySelector('#tabs')
|
16
|
+
|
17
|
+
// toggle menu sidebar with the menu button
|
18
|
+
menuButton.addEventListener('click', event => {
|
19
|
+
const currentUser = document.querySelector('#current_user')
|
20
|
+
const logout = document.querySelector('#logout')
|
21
|
+
const forbiddenLinks = event.target === logout ||
|
22
|
+
logout.contains(event.target) ||
|
23
|
+
event.target === currentUser ||
|
24
|
+
currentUser.contains(event.target)
|
25
|
+
if (!forbiddenLinks) {
|
26
|
+
menu.classList.toggle('tabs_open')
|
38
27
|
}
|
39
28
|
})
|
40
29
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
if (tabs.css('left') == '0px') {
|
50
|
-
tabs.animate(
|
51
|
-
{
|
52
|
-
left: '-=' + width
|
53
|
-
},
|
54
|
-
400,
|
55
|
-
function () {
|
56
|
-
animationDone = true
|
57
|
-
}
|
58
|
-
)
|
59
|
-
} else {
|
60
|
-
tabs.animate(
|
61
|
-
{
|
62
|
-
left: '+=' + width
|
63
|
-
},
|
64
|
-
400,
|
65
|
-
function () {
|
66
|
-
animationDone = true
|
67
|
-
}
|
68
|
-
)
|
69
|
-
}
|
70
|
-
}
|
30
|
+
// close left menu sidebar on any click outside
|
31
|
+
document.body.addEventListener('click', event => {
|
32
|
+
const forbiddenLinks = event.target === menu ||
|
33
|
+
menu.contains(event.target) ||
|
34
|
+
event.target === menuButton ||
|
35
|
+
menuButton.contains(event.target)
|
36
|
+
if (menu.classList.contains('tabs_open') && !forbiddenLinks) {
|
37
|
+
menu.classList.remove('tabs_open')
|
71
38
|
}
|
72
39
|
})
|
73
40
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
{
|
83
|
-
left: '-=' + width
|
84
|
-
},
|
85
|
-
400,
|
86
|
-
function () {
|
87
|
-
animationDone = true
|
88
|
-
}
|
89
|
-
)
|
90
|
-
}
|
91
|
-
}
|
41
|
+
// toggle of nested menu items
|
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
|
+
})
|
92
49
|
}
|
93
|
-
|
50
|
+
)
|
94
51
|
|
95
|
-
$(document).on('click', '#tabs .has_nested', function (e) {
|
96
|
-
e.stopPropagation()
|
97
|
-
$(this).toggleClass('open')
|
98
|
-
})
|
99
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
|
+
}
|
@@ -49,6 +49,11 @@
|
|
49
49
|
.filter_date_range input {
|
50
50
|
width: 45%;
|
51
51
|
display: inline-block;
|
52
|
+
|
53
|
+
// consistent look of all filters
|
54
|
+
&:nth-child(2) {
|
55
|
+
float: right;
|
56
|
+
}
|
52
57
|
}
|
53
58
|
|
54
59
|
input[type="submit"] {
|
@@ -56,9 +61,21 @@
|
|
56
61
|
line-height: 31px;
|
57
62
|
margin-right: 10px;
|
58
63
|
}
|
64
|
+
|
65
|
+
&.panel {
|
66
|
+
position: relative;
|
67
|
+
}
|
59
68
|
}
|
60
69
|
|
61
70
|
#search-status-_sidebar_section {
|
62
71
|
font-size: 14px;
|
63
72
|
}
|
64
|
-
|
73
|
+
|
74
|
+
// 'Filter' and 'Clear Filters' buttons
|
75
|
+
.buttons {
|
76
|
+
display: flex;
|
77
|
+
justify-content: space-between;
|
78
|
+
align-items: center;
|
79
|
+
margin-top: 1rem;
|
80
|
+
}
|
81
|
+
}
|
@@ -1,3 +1,5 @@
|
|
1
|
+
@use "sass:math";
|
2
|
+
|
1
3
|
body.index {
|
2
4
|
|
3
5
|
.resource_selection_toggle_cell, .resource_selection_cell {
|
@@ -41,7 +43,19 @@ body.index {
|
|
41
43
|
}
|
42
44
|
|
43
45
|
.indexes.table_tools_segmented_control {
|
44
|
-
|
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
|
+
}
|
45
59
|
}
|
46
60
|
}
|
47
61
|
|
@@ -66,7 +80,7 @@ body.index {
|
|
66
80
|
@include transform(translateY(-50%));
|
67
81
|
|
68
82
|
@media screen and (min-width: $md-width) {
|
69
|
-
font-size: $font-size
|
83
|
+
// font-size: math.div($font-size, 1px);
|
70
84
|
}
|
71
85
|
}
|
72
86
|
|
@@ -102,8 +116,14 @@ body.index {
|
|
102
116
|
|
103
117
|
#sidebar {
|
104
118
|
position: fixed;
|
119
|
+
transition: .5s;
|
120
|
+
transition-timing-function: ease-in-out;
|
105
121
|
right: - $filter-width;
|
106
122
|
|
123
|
+
&.sidebar_open {
|
124
|
+
right: 0;
|
125
|
+
}
|
126
|
+
|
107
127
|
@media screen and (min-width: $x-lg-width) {
|
108
128
|
right: - $lg-filter-width;
|
109
129
|
}
|
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
|
+
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
|
@@ -58,20 +58,6 @@ dependencies:
|
|
58
58
|
- - "<"
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '3.0'
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: jquery-rails
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - ">="
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '0'
|
68
|
-
type: :runtime
|
69
|
-
prerelease: false
|
70
|
-
version_requirements: !ruby/object:Gem::Requirement
|
71
|
-
requirements:
|
72
|
-
- - ">="
|
73
|
-
- !ruby/object:Gem::Version
|
74
|
-
version: '0'
|
75
61
|
- !ruby/object:Gem::Dependency
|
76
62
|
name: font-awesome-sass
|
77
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -93,7 +79,7 @@ extensions: []
|
|
93
79
|
extra_rdoc_files: []
|
94
80
|
files:
|
95
81
|
- LICENCE.txt
|
96
|
-
-
|
82
|
+
- README.md
|
97
83
|
- app/assets/fonts/Lato-Bold.eot
|
98
84
|
- app/assets/fonts/Lato-Bold.ttf
|
99
85
|
- app/assets/fonts/Lato-Bold.woff
|
@@ -172,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
172
158
|
- !ruby/object:Gem::Version
|
173
159
|
version: '0'
|
174
160
|
requirements: []
|
175
|
-
rubygems_version: 3.
|
161
|
+
rubygems_version: 3.3.26
|
176
162
|
signing_key:
|
177
163
|
specification_version: 4
|
178
164
|
summary: Arctic Admin theme for ActiveAdmin
|