arctic_admin 2.1.0 → 3.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 9c81c4c3f36dac95ddfccb6661eab8269f79458b
4
- data.tar.gz: 26d249a62455ba04523ae0e551ceac836d008276
2
+ SHA256:
3
+ metadata.gz: 0c4386023eca967f7be905c4e2668da2d9565cc1c04591e347371128544c7c1e
4
+ data.tar.gz: 0f430e0aec9ea2af5e872fc376bfa59dd26ba9e3265b8e38d4dc79da379f9c14
5
5
  SHA512:
6
- metadata.gz: a7f376f0675e4ee0147d3d00b238f67be7aadc4c536a2812461927eaa544aaadaeed93943ee2333456288d326b043da8d929d7229eb4d06384587d957adc87d5
7
- data.tar.gz: 50f3739270b41956e55ac44f6bb86b641aa54df211c3c9a9bb576acbaac5bd513e6f678eb4f338469a8d27768fa0f780e35a54ce47ada4c27bd1763b9ed3a2b6
6
+ metadata.gz: 4272e1145d3655f2125b4ffb6e664fc453af3782729ae06a8284065200d88923d17a3c6b4db8e5e89ce294ed21cdcf9a444190de1b5bdf2b8167711be0159af6
7
+ data.tar.gz: 0e5ba122c27b3baabca5caba29fe491f4df46000d6c1c26fa21b69a0baa0a82989cd002e3e9f33955bc5b3e64fb10a19efbce1d20e07fc90b48087aad721d73e
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,77 +1,4 @@
1
1
  //= require jquery
2
2
  //= require jquery_ujs
3
3
  //= require active_admin/base
4
-
5
- $(function() {
6
- $(document).on('click touchstart', '#sidebar', function(e) {
7
- var position = $(this).position();
8
- var width = $(this).width();
9
- var target = e.target;
10
- if ((e.pageX < position.left) && (target.tagName != 'SELECT') && (target.tagName != 'OPTION')) {
11
- if ($(this).css('right') == '0px') {
12
- $(this).css('position', 'fixed');
13
- $(this).animate({
14
- right: "-="+width
15
- }, 600, function() {
16
- $(this).removeAttr('style');
17
- animationFilterDone = true;
18
- });
19
- } else {
20
- $(this).animate({
21
- right: "+="+width
22
- }, 600, function() {
23
- $(this).css('position', 'absolute');
24
- animationFilterDone = true;
25
- });
26
- }
27
- }
28
- });
29
-
30
- var animationDone = true;
31
- $(document).on('click touchstart', '#utility_nav', function(e) {
32
- var position = $(this).position();
33
- var tabs = $('#tabs');
34
- var width = Math.round(tabs[0].getBoundingClientRect().width);
35
-
36
- if (e.pageX < (position.left + 40)) {
37
- if(animationDone == true) {
38
- animationDone = false;
39
- if (tabs.css('left') == '0px') {
40
- tabs.animate({
41
- left: "-="+width
42
- }, 400, function() {
43
- animationDone = true;
44
- });
45
- } else {
46
- tabs.animate({
47
- left: "+="+width
48
- }, 400, function() {
49
- animationDone = true;
50
- });
51
- }
52
- }
53
- }
54
- });
55
-
56
- $(document).on('click touchstart', 'body', function(e) {
57
- var tabs = $('#tabs');
58
- var width = Math.round(tabs[0].getBoundingClientRect().width);
59
- if (tabs.css('left') == '0px') {
60
- if (e.pageX > width && e.pageY > 60) {
61
- if(animationDone == true) {
62
- animationDone = false;
63
- tabs.animate({
64
- left: "-="+width
65
- }, 400, function() {
66
- animationDone = true;
67
- });
68
- }
69
- }
70
- }
71
- });
72
-
73
- $(document).on('click', '#tabs .has_nested', function(e) {
74
- e.stopPropagation();
75
- $(this).toggleClass('open');
76
- });
77
- });
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
+ })
@@ -2,6 +2,11 @@ code {
2
2
  display: block;
3
3
  background-color: #272822;
4
4
  padding: 5px;
5
- margin: 10px 0;
6
5
  color: white;
7
6
  }
7
+
8
+ hr {
9
+ border: 1px solid $border-color;
10
+ color: $primary-color;
11
+ margin: 10px auto 25px auto;
12
+ }
@@ -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
+ }
@@ -35,4 +35,4 @@
35
35
  text-align: center;
36
36
  }
37
37
  }
38
- }
38
+ }
@@ -40,7 +40,7 @@
40
40
 
41
41
  .inline-hints {
42
42
  margin: 5px 0 20px 25%;
43
- font-size: 14px;
43
+ font-size: $font-size;
44
44
  font-style: italic;
45
45
  }
46
46
 
@@ -48,7 +48,7 @@
48
48
  color: $error;
49
49
  margin-top: 5px;
50
50
  margin-bottom: 20px;
51
- font-size: 14px;
51
+ font-size: $font-size;
52
52
  }
53
53
 
54
54
  label.error {
@@ -8,9 +8,9 @@ input[type="number"], textarea {
8
8
 
9
9
  display: block;
10
10
  width: 100%;
11
- height: 36px;
11
+ height: $input-height;
12
12
  padding: 6px 12px;
13
- font-size: 14px;
13
+ font-size: $font-size;
14
14
  line-height: 1.57142857;
15
15
  color: $text-color;
16
16
  background-color: #fff;
@@ -88,7 +88,7 @@ select {
88
88
  border: 1px solid $border-color;
89
89
  outline: 0;
90
90
  border-radius: $border-radius;
91
- font-size: 14px;
91
+ font-size: $font-size;
92
92
  color: #5a5a5a;
93
93
  @include transition(border-color ease-in-out .15s);
94
94
 
@@ -0,0 +1,50 @@
1
+ .select2-container--default .select2-selection--single .select2-selection__rendered{
2
+ line-height: $input-height;
3
+ color: $text-color;
4
+ font-size: $font-size;
5
+ }
6
+
7
+ .select2-container .select2-selection--single{
8
+ height: $input-height;
9
+ outline: 0;
10
+ }
11
+
12
+ .select2-container--default .select2-selection--single .select2-selection__arrow{
13
+ height: $input-height;
14
+ }
15
+
16
+ .select2-container--default .select2-selection--single {
17
+ border-color: $border-color;
18
+ }
19
+
20
+ .select2-container .select2-selection--single .select2-selection__rendered{
21
+ padding-left: 12px;
22
+ }
23
+
24
+ .select2-dropdown{
25
+ border-color: $border-color;
26
+ }
27
+
28
+ .select2-container--default .select2-results__option--highlighted[aria-selected]{
29
+ background-color: $primary_color;
30
+ }
31
+
32
+ .select2-container--default .select2-search--dropdown .select2-search__field{
33
+ border-color: $border-color;
34
+ }
35
+
36
+ .select2-container--default .select2-results__option[aria-selected=true]{
37
+ background_color: $body-background;
38
+ }
39
+
40
+ .select2-search--dropdown .select2-search__field{
41
+ padding-left: 12px;
42
+ }
43
+
44
+ .select2-results{
45
+ font-size: $font-size;
46
+ }
47
+
48
+ .select2-results__option{
49
+ padding-left: 12px;
50
+ }
@@ -6,12 +6,12 @@
6
6
  padding: 3px 5px 2px 5px;
7
7
  font-size: 0.8em;
8
8
  border-radius: $border-radius;
9
- }
10
9
 
11
- .status_tag.ok, .status_tag.published, .status_tag.complete, .status_tag.completed, .status_tag.green {
12
- background-color: $status-tag-background-valid-color;
13
- }
10
+ &.ok, &.published, &.complete, &.completed, &.green, &.yes {
11
+ background-color: $status-tag-background-valid-color;
12
+ }
14
13
 
15
- .status_tag.cancel, .status_tag.red {
16
- background-color: $status-tag-background-error-color;
17
- }
14
+ &.cancel, &.red, &.no {
15
+ background-color: $status-tag-background-error-color;
16
+ }
17
+ }
@@ -46,7 +46,7 @@ tbody tr {
46
46
  }
47
47
 
48
48
  th {
49
- font-size: 14px;
49
+ font-size: $font-size;
50
50
  }
51
51
 
52
52
  td {
@@ -2,11 +2,11 @@
2
2
  border: 1px solid $border-color;
3
3
 
4
4
  .nav {
5
- text-align: center;
6
5
  border-bottom: 1px solid $border-color;
7
6
 
8
7
  li {
9
8
  display: inline-block;
9
+ text-align: center;
10
10
  @include outline();
11
11
 
12
12
  a {
@@ -22,7 +22,7 @@
22
22
  }
23
23
 
24
24
  .input {
25
- margin-bottom: 15px;
25
+ margin-bottom: 10px;
26
26
 
27
27
  input, select {
28
28
  height: 30px;
@@ -14,11 +14,11 @@ body.active_admin.logged_in {
14
14
  }
15
15
 
16
16
  #active_admin_content {
17
- padding: 30px 0;
17
+ padding: 20px 0;
18
18
  @include clear-fix();
19
19
 
20
20
  @media screen and (min-width: $lg-width) {
21
- padding: 30px 25px;
21
+ padding: 20px 25px;
22
22
  }
23
23
  }
24
24
  }
@@ -23,7 +23,7 @@
23
23
 
24
24
  li {
25
25
  width: 100%;
26
- font-size: 14px;
26
+ font-size: $font-size;
27
27
  line-height: 38px;
28
28
  cursor: pointer;
29
29
 
@@ -95,7 +95,7 @@
95
95
  }
96
96
  }
97
97
 
98
- ul {
98
+ & > ul {
99
99
  display: block;
100
100
  }
101
101
  }
@@ -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
  }
@@ -17,7 +17,7 @@ body.logged_in {
17
17
  margin: auto 0;
18
18
  padding-top: 8px;
19
19
  text-align: right;
20
- font-size: 14px;
20
+ font-size: $font-size;
21
21
 
22
22
  @media screen and (min-width: $sm-width) {
23
23
  padding-bottom: 0;
@@ -85,7 +85,7 @@ body.logged_in {
85
85
  }
86
86
 
87
87
  label {
88
- font-size: 14px;
88
+ font-size: $font-size;
89
89
  cursor: pointer;
90
90
  padding: 5px 5px 5px 0;
91
91
  }
@@ -6,7 +6,7 @@ body.index {
6
6
 
7
7
  .table_tools {
8
8
  margin-bottom: 20px;
9
- font-size: 14px;
9
+ font-size: $font-size;
10
10
 
11
11
  &:after {
12
12
  content: '';
@@ -47,7 +47,7 @@ body.index {
47
47
  }
48
48
 
49
49
  #index_footer {
50
- font-size: 14px;
50
+ font-size: $font-size;
51
51
  }
52
52
 
53
53
  .sortable {
@@ -62,7 +62,7 @@ body.index {
62
62
  @include transform(translateY(-50%));
63
63
 
64
64
  @media screen and (min-width: $md-width) {
65
- font-size: 14px/1;
65
+ font-size: $font-size/1;
66
66
  }
67
67
  }
68
68
 
@@ -76,13 +76,16 @@ body.index {
76
76
  }
77
77
 
78
78
  .table_actions {
79
+ margin-bottom: -4px;
80
+
79
81
  .member_link {
80
82
  @include primary-button($primary-color, white);
81
- padding: 2px 9px;
83
+ padding: 4px 8px;
82
84
  margin-right: 4px;
85
+ margin-bottom: 4px;
83
86
  }
84
87
  }
85
-
88
+
86
89
  .scopes {
87
90
  .scope {
88
91
  @include group-button($primary-color);
@@ -113,4 +116,4 @@ body.index {
113
116
  padding: 15px 10px;
114
117
  }
115
118
  }
116
- }
119
+ }
@@ -6,4 +6,7 @@ $lg-screen-header-width: calc(100% - 250px) !default;
6
6
  $filter-width: 230px !default;
7
7
  $screen-filter-width: calc(100% - 230px) !default;
8
8
  $lg-filter-width: 270px !default;
9
- $lg-screen-filter-width: calc(100% - 270px) !default;
9
+ $lg-screen-filter-width: calc(100% - 270px) !default;
10
+
11
+ $font-size: 14px !default;
12
+ $input-height: 36px !default;
@@ -1,3 +1,3 @@
1
1
  module ArcticAdmin
2
- VERSION = "2.1.0"
2
+ VERSION = "3.2.2"
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: 2.1.0
4
+ version: 3.2.2
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: 2019-05-01 00:00:00.000000000 Z
11
+ date: 2020-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -47,7 +47,7 @@ dependencies:
47
47
  version: 1.1.0
48
48
  - - "<"
49
49
  - !ruby/object:Gem::Version
50
- version: '2.0'
50
+ version: '3.0'
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
@@ -57,7 +57,7 @@ dependencies:
57
57
  version: 1.1.0
58
58
  - - "<"
59
59
  - !ruby/object:Gem::Version
60
- version: '2.0'
60
+ version: '3.0'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: jquery-rails
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -78,14 +78,14 @@ dependencies:
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: 5.6.1
81
+ version: '5.0'
82
82
  type: :runtime
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: 5.6.1
88
+ version: '5.0'
89
89
  description: A responsive theme for Active Admin
90
90
  email:
91
91
  executables: []
@@ -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
@@ -126,6 +128,7 @@ files:
126
128
  - app/assets/stylesheets/arctic_admin/components/_inputs.scss
127
129
  - app/assets/stylesheets/arctic_admin/components/_pagination.scss
128
130
  - app/assets/stylesheets/arctic_admin/components/_panel_contents.scss
131
+ - app/assets/stylesheets/arctic_admin/components/_select2.scss
129
132
  - app/assets/stylesheets/arctic_admin/components/_status_tag.scss
130
133
  - app/assets/stylesheets/arctic_admin/components/_tables.scss
131
134
  - app/assets/stylesheets/arctic_admin/components/_tabs.scss
@@ -150,7 +153,7 @@ files:
150
153
  - app/assets/stylesheets/arctic_admin/variables/_variables.scss
151
154
  - lib/arctic_admin.rb
152
155
  - lib/arctic_admin/version.rb
153
- homepage: https://github.com/cle61/arctic_admin
156
+ homepage: https://github.com/cprodhomme/arctic_admin
154
157
  licenses:
155
158
  - MIT
156
159
  metadata: {}
@@ -169,8 +172,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
172
  - !ruby/object:Gem::Version
170
173
  version: '0'
171
174
  requirements: []
172
- rubyforge_project:
173
- rubygems_version: 2.6.8
175
+ rubygems_version: 3.0.3
174
176
  signing_key:
175
177
  specification_version: 4
176
178
  summary: Arctic Admin theme for ActiveAdmin