activeadmin_materialize_theme 0.1.4 → 0.2.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 +6 -2
- data/app/assets/javascripts/activeadmin_materialize_theme.js +18 -0
- data/app/assets/stylesheets/activeadmin_materialize_theme/base.scss +44 -3
- data/app/assets/stylesheets/activeadmin_materialize_theme/components/form.scss +8 -17
- data/app/assets/stylesheets/activeadmin_materialize_theme/components/header.scss +8 -0
- data/app/assets/stylesheets/activeadmin_materialize_theme/components/layout_index.scss +32 -18
- data/app/assets/stylesheets/activeadmin_materialize_theme/components/layout_show.scss +1 -2
- data/app/assets/stylesheets/activeadmin_materialize_theme/components/sidebar.scss +2 -0
- data/lib/activeadmin_materialize_theme/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fce64de7eb2b8c730129907bda8be312baa28c994b2be4d22a260e48292e8ab2
|
4
|
+
data.tar.gz: d31961832640dc2853235e37c0b98ba0b370106e716c6624c62d83eb658232a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2e37c6fdb1d1eb94629b359ca93b4df42f2fe1a64dc0bf8a6db8ce7aadb559372955ee9013f02def7a54e686c39e85487433a1030d89dd228960cf543aed5fe
|
7
|
+
data.tar.gz: 4533a14c2c4c1af5f5fe4bebe397d05256c68cfac9056db269e1554ce790d4c99af7a6e2dd71ceee2b1a753d54537af4d41713a8a676471246b0358454c1af40
|
data/README.md
CHANGED
@@ -18,8 +18,12 @@ A theme for Active Admin based on Materialize framework.
|
|
18
18
|
//= require activeadmin_materialize_theme
|
19
19
|
```
|
20
20
|
|
21
|
-
##
|
22
|
-
|
21
|
+
## Screenshots
|
22
|
+
Index page (with scopes and filters):
|
23
|
+

|
24
|
+
|
25
|
+
Edit page (with a nested form):
|
26
|
+

|
23
27
|
|
24
28
|
## Do you like it? Star it!
|
25
29
|
If you use this component just star it. A developer is more motivated to improve a project when there is some interest.
|
@@ -46,11 +46,29 @@
|
|
46
46
|
})
|
47
47
|
}
|
48
48
|
|
49
|
+
function initNestedMenu() {
|
50
|
+
let nested_menu_cnt = 0
|
51
|
+
addClassToElements('dropdown-content', '.menu_item.has_nested >ul')
|
52
|
+
document.querySelectorAll('.menu_item.has_nested').forEach((el) => {
|
53
|
+
nested_menu_cnt += 1
|
54
|
+
el.childNodes.forEach((node) => {
|
55
|
+
if(node.tagName == 'A') {
|
56
|
+
node.className += ' dropdown-trigger'
|
57
|
+
node.setAttribute('data-target', `nested-menu-${nested_menu_cnt}`)
|
58
|
+
}
|
59
|
+
else if(node.tagName == 'UL') {
|
60
|
+
node.setAttribute('id', `nested-menu-${nested_menu_cnt}`)
|
61
|
+
}
|
62
|
+
})
|
63
|
+
})
|
64
|
+
}
|
65
|
+
|
49
66
|
function setup() {
|
50
67
|
addClassToElements('no-autoinit', 'body.active_admin #header >.tabs')
|
51
68
|
initCheckboxes()
|
52
69
|
initDropdowns()
|
53
70
|
initFormFields()
|
71
|
+
initNestedMenu()
|
54
72
|
M.AutoInit()
|
55
73
|
}
|
56
74
|
|
@@ -15,12 +15,14 @@ body.active_admin {
|
|
15
15
|
}
|
16
16
|
|
17
17
|
.dropdown_menu_button {
|
18
|
-
|
19
|
-
|
18
|
+
@extend .btn, .btn-small;
|
19
|
+
|
20
|
+
vertical-align: middle;
|
20
21
|
|
21
22
|
&::after {
|
22
23
|
content: ' ≡';
|
23
|
-
font-size:
|
24
|
+
font-size: 1.8rem;
|
25
|
+
padding-left: 0.5rem;
|
24
26
|
}
|
25
27
|
}
|
26
28
|
|
@@ -57,6 +59,29 @@ body.active_admin {
|
|
57
59
|
}
|
58
60
|
}
|
59
61
|
|
62
|
+
.pagination {
|
63
|
+
background: transparent;
|
64
|
+
box-shadow: none;
|
65
|
+
color: #000;
|
66
|
+
height: auto;
|
67
|
+
line-height: initial;
|
68
|
+
margin-bottom: 1.5rem;
|
69
|
+
text-align: center;
|
70
|
+
|
71
|
+
a {
|
72
|
+
color: $link-color;
|
73
|
+
}
|
74
|
+
|
75
|
+
>span {
|
76
|
+
display: inline-block;
|
77
|
+
padding: 0.5rem;
|
78
|
+
}
|
79
|
+
|
80
|
+
>.current {
|
81
|
+
background: #eee;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
|
60
85
|
.sorted-asc::after {
|
61
86
|
content: ' ↑';
|
62
87
|
}
|
@@ -103,6 +128,12 @@ body.active_admin {
|
|
103
128
|
&.without_sidebar #main_content_wrapper {
|
104
129
|
@extend .col, .s12;
|
105
130
|
}
|
131
|
+
|
132
|
+
>#sidebar {
|
133
|
+
@extend .col, .s3;
|
134
|
+
|
135
|
+
padding-left: 0 !important;
|
136
|
+
}
|
106
137
|
}
|
107
138
|
|
108
139
|
#dashboard_default_message {
|
@@ -111,6 +142,16 @@ body.active_admin {
|
|
111
142
|
text-align: center;
|
112
143
|
}
|
113
144
|
|
145
|
+
#main_content {
|
146
|
+
@extend .card;
|
147
|
+
|
148
|
+
margin-top: 0.75rem;
|
149
|
+
|
150
|
+
>.panel {
|
151
|
+
padding: 2rem !important;
|
152
|
+
}
|
153
|
+
}
|
154
|
+
|
114
155
|
#wrapper {
|
115
156
|
@extend .container;
|
116
157
|
|
@@ -6,13 +6,12 @@ body.active_admin {
|
|
6
6
|
}
|
7
7
|
|
8
8
|
.formtastic {
|
9
|
-
padding:
|
9
|
+
padding: 2rem;
|
10
10
|
|
11
11
|
fieldset {
|
12
|
-
@extend .row;
|
13
|
-
|
14
12
|
border: none;
|
15
13
|
margin: 0;
|
14
|
+
padding: 0;
|
16
15
|
}
|
17
16
|
|
18
17
|
.actions ol, .inputs ol {
|
@@ -22,8 +21,7 @@ body.active_admin {
|
|
22
21
|
}
|
23
22
|
|
24
23
|
.actions {
|
25
|
-
margin
|
26
|
-
padding: 0;
|
24
|
+
margin: 3rem 0 0.5rem 0 !important;
|
27
25
|
|
28
26
|
a {
|
29
27
|
@extend .btn;
|
@@ -73,18 +71,12 @@ body.active_admin {
|
|
73
71
|
}
|
74
72
|
|
75
73
|
>.inputs {
|
76
|
-
@extend .card;
|
77
|
-
|
78
|
-
padding-bottom: 1rem;
|
79
|
-
padding-top: 3rem;
|
80
74
|
position: relative;
|
75
|
+
margin-bottom: 3rem;
|
81
76
|
|
82
77
|
>legend {
|
83
78
|
display: block;
|
84
|
-
font-size:
|
85
|
-
left: 1rem;
|
86
|
-
position: absolute;
|
87
|
-
top: 1rem;
|
79
|
+
font-size: 2.2rem;
|
88
80
|
}
|
89
81
|
}
|
90
82
|
|
@@ -111,10 +103,10 @@ body.active_admin {
|
|
111
103
|
}
|
112
104
|
|
113
105
|
.has_many_container {
|
114
|
-
@extend .
|
106
|
+
@extend .z-depth-1;
|
115
107
|
|
116
108
|
margin: 1.4rem -0.7rem 0 -0.8rem;
|
117
|
-
padding:
|
109
|
+
padding: 2rem;
|
118
110
|
position: relative;
|
119
111
|
|
120
112
|
>h3 {
|
@@ -132,8 +124,7 @@ body.active_admin {
|
|
132
124
|
}
|
133
125
|
|
134
126
|
>.inputs {
|
135
|
-
margin:
|
136
|
-
padding: 0.8rem;
|
127
|
+
margin-bottom: 2rem;
|
137
128
|
}
|
138
129
|
}
|
139
130
|
}
|
@@ -12,6 +12,14 @@ body.active_admin .header {
|
|
12
12
|
display: inline-block;
|
13
13
|
}
|
14
14
|
|
15
|
+
.dropdown-content {
|
16
|
+
background: darken($header-bg-color, 10%);
|
17
|
+
|
18
|
+
a:hover {
|
19
|
+
background: darken($header-bg-color, 10%);
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
15
23
|
#site_title {
|
16
24
|
@extend .col, .s3;
|
17
25
|
|
@@ -25,8 +25,6 @@ body.active_admin.index {
|
|
25
25
|
}
|
26
26
|
|
27
27
|
.paginated_collection {
|
28
|
-
@extend .row;
|
29
|
-
|
30
28
|
margin-bottom: 0;
|
31
29
|
}
|
32
30
|
|
@@ -35,10 +33,38 @@ body.active_admin.index {
|
|
35
33
|
}
|
36
34
|
|
37
35
|
.table_tools {
|
38
|
-
@extend .row;
|
39
|
-
|
40
36
|
>.batch_actions_selector {
|
41
|
-
|
37
|
+
display: inline-block;
|
38
|
+
margin-bottom: 1rem;
|
39
|
+
margin-right: 2rem;
|
40
|
+
}
|
41
|
+
|
42
|
+
>.scopes {
|
43
|
+
border: 1px solid #ddd;
|
44
|
+
border-radius: 0.5rem;
|
45
|
+
display: inline-block;
|
46
|
+
vertical-align: middle;
|
47
|
+
|
48
|
+
>ul {
|
49
|
+
margin: 0;
|
50
|
+
}
|
51
|
+
|
52
|
+
.scope {
|
53
|
+
display: inline-block;
|
54
|
+
padding: 0.2rem 1rem;
|
55
|
+
|
56
|
+
&:first-child {
|
57
|
+
border-radius: 0.6rem 0 0 0.6rem;
|
58
|
+
}
|
59
|
+
|
60
|
+
&:last-child {
|
61
|
+
border-radius: 0 0.6rem 0.6rem 0;
|
62
|
+
}
|
63
|
+
|
64
|
+
&.selected {
|
65
|
+
background: #eee;
|
66
|
+
}
|
67
|
+
}
|
42
68
|
}
|
43
69
|
}
|
44
70
|
|
@@ -47,9 +73,7 @@ body.active_admin.index {
|
|
47
73
|
}
|
48
74
|
|
49
75
|
#index_footer {
|
50
|
-
|
51
|
-
|
52
|
-
margin-top: 1rem;
|
76
|
+
margin-top: 1.5rem;
|
53
77
|
|
54
78
|
.download_links {
|
55
79
|
display: inline-block;
|
@@ -61,16 +85,6 @@ body.active_admin.index {
|
|
61
85
|
}
|
62
86
|
}
|
63
87
|
|
64
|
-
#main_content {
|
65
|
-
@extend .card;
|
66
|
-
}
|
67
|
-
|
68
|
-
#sidebar {
|
69
|
-
@extend .col, .s3;
|
70
|
-
|
71
|
-
padding-left: 0 !important;
|
72
|
-
}
|
73
|
-
|
74
88
|
&.admin_comments {
|
75
89
|
.paginated_collection {
|
76
90
|
padding: 0 1.5rem 1.5rem 1.5rem;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeadmin_materialize_theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mattia Roccoberton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeadmin
|