arctic_admin 3.2.0 → 3.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Readme.md +37 -0
- data/app/assets/javascripts/arctic_admin/base.js +1 -77
- data/app/assets/javascripts/arctic_admin/main.js +99 -0
- data/app/assets/stylesheets/arctic_admin/_main.scss +54 -0
- data/app/assets/stylesheets/arctic_admin/mixins/_prefix_mixins.scss +1 -1
- data/lib/arctic_admin/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6f913893bfeb6224b1dd113545dca1818da6e987d64c516d03381aa48828daf
|
4
|
+
data.tar.gz: 220f72694714143f5c79c791003fba0838ce3bbf5ed2f60675b319dcdadbecff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 41cd46ed6aaed2bf349f9ef27237b42e48869d8e025ab497e3ef39bae4fa64ece63428895f32b3c8526aec84000397d37ee643316b850faad18ed7f08a652597
|
7
|
+
data.tar.gz: ae67be0074df46fd0c19bef15866132936bd1c06900785b7654b22ac2cd8a58c6677bcf23b129dcf4f1e0647c929ba357df7d752675b17530527f74ce1be9f23
|
data/Readme.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# ArcticAdmin
|
2
2
|
[![Gem Version](https://img.shields.io/gem/v/arctic_admin.svg)](https://rubygems.org/gems/arctic_admin)
|
3
3
|
[![Gem Downloads](https://img.shields.io/gem/dt/arctic_admin.svg)](https://rubygems.org/gems/arctic_admin)
|
4
|
+
[![Gem Version](https://img.shields.io/npm/v/arctic_admin.svg)](https://www.npmjs.com/package/arctic_admin)
|
5
|
+
[![Gem Downloads](https://img.shields.io/npm/dt/arctic_admin.svg)](https://www.npmjs.com/package/arctic_admin)
|
4
6
|
|
5
7
|
Simple theme for ActiveAdmin :ok_hand:
|
6
8
|
|
@@ -73,6 +75,41 @@ In your `active_admin.js`, include the js file:
|
|
73
75
|
|
74
76
|
:exclamation: **Remove the line `//= require active_admin/base`**
|
75
77
|
|
78
|
+
## Use with webpacker
|
79
|
+
|
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
|
+
|
91
|
+
In your `app/javascript/stylesheets/active_admin.scss`, add the line:
|
92
|
+
|
93
|
+
```scss
|
94
|
+
@import '~arctic_admin/src/scss/main';
|
95
|
+
```
|
96
|
+
|
97
|
+
Remove:
|
98
|
+
|
99
|
+
```scss
|
100
|
+
@import "~@activeadmin/activeadmin/src/scss/mixins";
|
101
|
+
@import "~@activeadmin/activeadmin/src/scss/base";
|
102
|
+
```
|
103
|
+
|
104
|
+
### 3 - JS
|
105
|
+
|
106
|
+
In your `app/javascript/packs/active_admin.js`, add the line:
|
107
|
+
|
108
|
+
```js
|
109
|
+
import 'arctic_admin'
|
110
|
+
```
|
111
|
+
|
112
|
+
|
76
113
|
### Customization
|
77
114
|
|
78
115
|
For this, you need to use sass to custom the theme.
|
@@ -1,80 +1,4 @@
|
|
1
1
|
//= require jquery
|
2
2
|
//= require jquery_ujs
|
3
3
|
//= require active_admin/base
|
4
|
-
|
5
|
-
$(function() {
|
6
|
-
var animationFilterDone = true;
|
7
|
-
$(document).on('click touchstart', '#sidebar', function(e) {
|
8
|
-
if(animationFilterDone == true) {
|
9
|
-
var position = $(this).position();
|
10
|
-
var width = $(this).width();
|
11
|
-
var target = e.target;
|
12
|
-
if ((e.pageX < position.left) && (target.tagName != 'SELECT') && (target.tagName != 'OPTION')) {
|
13
|
-
if ($(this).css('right') == '0px') {
|
14
|
-
$(this).css('position', 'fixed');
|
15
|
-
$(this).animate({
|
16
|
-
right: "-="+width
|
17
|
-
}, 600, function() {
|
18
|
-
$(this).removeAttr('style');
|
19
|
-
animationFilterDone = true;
|
20
|
-
});
|
21
|
-
} else {
|
22
|
-
$(this).animate({
|
23
|
-
right: "+="+width
|
24
|
-
}, 600, function() {
|
25
|
-
$(this).css('position', 'absolute');
|
26
|
-
animationFilterDone = true;
|
27
|
-
});
|
28
|
-
}
|
29
|
-
}
|
30
|
-
}
|
31
|
-
});
|
32
|
-
|
33
|
-
var animationDone = true;
|
34
|
-
$(document).on('click touchstart', '#utility_nav', function(e) {
|
35
|
-
var position = $(this).position();
|
36
|
-
var tabs = $('#tabs');
|
37
|
-
var width = Math.round(tabs[0].getBoundingClientRect().width);
|
38
|
-
|
39
|
-
if (e.pageX < (position.left + 40)) {
|
40
|
-
if(animationDone == true) {
|
41
|
-
animationDone = false;
|
42
|
-
if (tabs.css('left') == '0px') {
|
43
|
-
tabs.animate({
|
44
|
-
left: "-="+width
|
45
|
-
}, 400, function() {
|
46
|
-
animationDone = true;
|
47
|
-
});
|
48
|
-
} else {
|
49
|
-
tabs.animate({
|
50
|
-
left: "+="+width
|
51
|
-
}, 400, function() {
|
52
|
-
animationDone = true;
|
53
|
-
});
|
54
|
-
}
|
55
|
-
}
|
56
|
-
}
|
57
|
-
});
|
58
|
-
|
59
|
-
$(document).on('click touchstart', 'body', function(e) {
|
60
|
-
var tabs = $('#tabs');
|
61
|
-
var width = Math.round(tabs[0].getBoundingClientRect().width);
|
62
|
-
if (tabs.css('left') == '0px') {
|
63
|
-
if (e.pageX > width && e.pageY > 60) {
|
64
|
-
if(animationDone == true) {
|
65
|
-
animationDone = false;
|
66
|
-
tabs.animate({
|
67
|
-
left: "-="+width
|
68
|
-
}, 400, function() {
|
69
|
-
animationDone = true;
|
70
|
-
});
|
71
|
-
}
|
72
|
-
}
|
73
|
-
}
|
74
|
-
});
|
75
|
-
|
76
|
-
$(document).on('click', '#tabs .has_nested', function(e) {
|
77
|
-
e.stopPropagation();
|
78
|
-
$(this).toggleClass('open');
|
79
|
-
});
|
80
|
-
});
|
4
|
+
//= require ./main
|
@@ -0,0 +1,99 @@
|
|
1
|
+
$(function () {
|
2
|
+
var animationFilterDone = true
|
3
|
+
$(document).on('click touchstart', '#sidebar', function (e) {
|
4
|
+
if (animationFilterDone == true) {
|
5
|
+
var position = $(this).position()
|
6
|
+
var width = $(this).width()
|
7
|
+
var target = e.target
|
8
|
+
if (
|
9
|
+
e.pageX < position.left &&
|
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
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
})
|
40
|
+
|
41
|
+
var animationDone = true
|
42
|
+
$(document).on('click touchstart', '#utility_nav', function (e) {
|
43
|
+
var position = $(this).position()
|
44
|
+
var tabs = $('#tabs')
|
45
|
+
var width = (tabs.length==0)? 0 : Math.round(tabs[0].getBoundingClientRect().width)
|
46
|
+
if (e.pageX < position.left + 40) {
|
47
|
+
if (animationDone == true) {
|
48
|
+
animationDone = false
|
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
|
+
}
|
71
|
+
}
|
72
|
+
})
|
73
|
+
|
74
|
+
$(document).on('click touchstart', 'body', function (e) {
|
75
|
+
var tabs = $('#tabs')
|
76
|
+
var width = (tabs.length==0)? 0 : Math.round(tabs[0].getBoundingClientRect().width)
|
77
|
+
if (tabs.css('left') == '0px') {
|
78
|
+
if (e.pageX > width && e.pageY > 60) {
|
79
|
+
if (animationDone == true) {
|
80
|
+
animationDone = false
|
81
|
+
tabs.animate(
|
82
|
+
{
|
83
|
+
left: '-=' + width
|
84
|
+
},
|
85
|
+
400,
|
86
|
+
function () {
|
87
|
+
animationDone = true
|
88
|
+
}
|
89
|
+
)
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
93
|
+
})
|
94
|
+
|
95
|
+
$(document).on('click', '#tabs .has_nested', function (e) {
|
96
|
+
e.stopPropagation()
|
97
|
+
$(this).toggleClass('open')
|
98
|
+
})
|
99
|
+
})
|
@@ -0,0 +1,54 @@
|
|
1
|
+
@import 'reset';
|
2
|
+
|
3
|
+
@import './variables/variables';
|
4
|
+
|
5
|
+
@import './mixins/mixins';
|
6
|
+
|
7
|
+
@import 'common';
|
8
|
+
@import 'buttons';
|
9
|
+
@import 'grid';
|
10
|
+
|
11
|
+
@import './components/columns';
|
12
|
+
@import './components/comments';
|
13
|
+
@import './components/date_picker';
|
14
|
+
@import './components/dialogs';
|
15
|
+
@import './components/flash';
|
16
|
+
@import './components/form';
|
17
|
+
@import './components/inputs';
|
18
|
+
@import './components/pagination';
|
19
|
+
@import './components/panel_contents';
|
20
|
+
@import './components/select2';
|
21
|
+
@import './components/status_tag';
|
22
|
+
@import './components/tables';
|
23
|
+
@import './components/tabs';
|
24
|
+
|
25
|
+
@import './layouts/filter';
|
26
|
+
@import './layouts/footer';
|
27
|
+
@import './layouts/header';
|
28
|
+
@import './layouts/main_content';
|
29
|
+
@import './layouts/sidebar';
|
30
|
+
@import './layouts/wrapper';
|
31
|
+
|
32
|
+
@import './pages/form';
|
33
|
+
@import './pages/index';
|
34
|
+
@import './pages/login';
|
35
|
+
@import './pages/show';
|
36
|
+
body {
|
37
|
+
font-family: $font-family-body;
|
38
|
+
background-color: $body-background;
|
39
|
+
color: $text-color;
|
40
|
+
}
|
41
|
+
|
42
|
+
h1,
|
43
|
+
h2,
|
44
|
+
h3,
|
45
|
+
h4,
|
46
|
+
h5,
|
47
|
+
h6 {
|
48
|
+
margin-top: 0;
|
49
|
+
}
|
50
|
+
|
51
|
+
a {
|
52
|
+
color: $primary-color;
|
53
|
+
text-decoration: none;
|
54
|
+
}
|
@@ -58,6 +58,6 @@
|
|
58
58
|
text-rendering: auto;
|
59
59
|
-webkit-font-smoothing: antialiased;
|
60
60
|
-moz-osx-font-smoothing: grayscale;
|
61
|
-
font: 900 normal normal 14px/1 'Font Awesome 5 Free';
|
61
|
+
font: 900 normal normal 14px/1 'Font Awesome 5 Free', 'Font Awesome 5 Pro';
|
62
62
|
content: $code-icon;
|
63
63
|
}
|
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: 3.2.
|
4
|
+
version: 3.2.1
|
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-
|
11
|
+
date: 2020-10-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -111,11 +111,13 @@ files:
|
|
111
111
|
- app/assets/fonts/Lato-Regular.woff
|
112
112
|
- app/assets/fonts/Lato-Regular.woff2
|
113
113
|
- app/assets/javascripts/arctic_admin/base.js
|
114
|
+
- app/assets/javascripts/arctic_admin/main.js
|
114
115
|
- app/assets/stylesheets/arctic_admin/_base.scss
|
115
116
|
- app/assets/stylesheets/arctic_admin/_buttons.scss
|
116
117
|
- app/assets/stylesheets/arctic_admin/_common.scss
|
117
118
|
- app/assets/stylesheets/arctic_admin/_fonts.scss
|
118
119
|
- app/assets/stylesheets/arctic_admin/_grid.scss
|
120
|
+
- app/assets/stylesheets/arctic_admin/_main.scss
|
119
121
|
- app/assets/stylesheets/arctic_admin/_reset.scss
|
120
122
|
- app/assets/stylesheets/arctic_admin/components/_columns.scss
|
121
123
|
- app/assets/stylesheets/arctic_admin/components/_comments.scss
|