administrate-bootstrap-theme 0.1.6 → 0.1.8
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 +12 -2
- data/app/assets/config/administrate-bootstrap-theme_manifest.js +1 -0
- data/app/assets/javascripts/administrate-bootstrap-theme/theme.js +2 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/_base.scss +3 -1
- data/app/assets/stylesheets/administrate-bootstrap-theme/components/_content_body.scss +1 -3
- data/app/assets/stylesheets/administrate-bootstrap-theme/components/_form.scss +46 -26
- data/lib/administrate-bootstrap-theme/engine.rb +2 -0
- data/lib/administrate-bootstrap-theme/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb9d26e362dbe536ab4a0e4ecc13e3f1935ed019da480dfe9f659c78948f7527
|
4
|
+
data.tar.gz: 02d4b2e5676e89002e6d39bd5cf90debf51b9d8bd42aed9a2badf4f0461c0088
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da4bd70e2e13d72f2ef0af348ec28f6d61469b176ac3be83866c387d439641f112a33ea6fe8474350014668a97068c6fd7e717fbcd0e538063403811f8fbf358
|
7
|
+
data.tar.gz: d39de72ce3659ab179388ec8dc685a89696801185fe50e203894dc9b923e62d6d66f335905dfdbd58bf7e2a94a08669ebd641446d828f474079da47d44aba00b
|
data/README.md
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
A Bootstrap 5 (_beta_) theme for [Administrate](https://github.com/thoughtbot/administrate).
|
3
3
|
|
4
4
|
Features:
|
5
|
-
- easy to install, just include CSS to apply the theme to a default Administrate structure;
|
5
|
+
- easy to install, just include CSS/JS to apply the theme to a default Administrate structure;
|
6
6
|
- customizable via SASS variables;
|
7
7
|
- allow to use *Bootstrap* components in the admin.
|
8
8
|
|
9
|
-
|
9
|
+
See some [screenshots](#screenshots).
|
10
10
|
|
11
11
|
## Installation
|
12
12
|
- Add to *Gemfile* (of an Administrate project): `gem 'administrate-bootstrap-theme'` (and execute `bundle`)
|
@@ -14,6 +14,7 @@ Features:
|
|
14
14
|
|
15
15
|
```js
|
16
16
|
//= link administrate-bootstrap-theme/theme.css
|
17
|
+
//= link administrate-bootstrap-theme/theme.js
|
17
18
|
```
|
18
19
|
|
19
20
|
- Generate the layout views if they are missing: `rails generate administrate:views:layout` (only **_stylesheet** and **_javascript** partials are needed)
|
@@ -27,6 +28,7 @@ Features:
|
|
27
28
|
- Update *app/views/admin/application/_javascript.html.erb*, leaving only:
|
28
29
|
|
29
30
|
```erb
|
31
|
+
<%= javascript_include_tag 'administrate-bootstrap-theme/theme' %>
|
30
32
|
<%= yield :javascript %>
|
31
33
|
```
|
32
34
|
|
@@ -43,6 +45,14 @@ And replace the link tag in the *application.html.erb* with: `<%= stylesheet_lin
|
|
43
45
|
|
44
46
|
For the complete list of options take a look [here](app/assets/stylesheets/administrate-bootstrap-theme/_variables.scss).
|
45
47
|
|
48
|
+
## Screenshots
|
49
|
+
- Index page:
|
50
|
+

|
51
|
+
- Show page:
|
52
|
+

|
53
|
+
- Form page:
|
54
|
+

|
55
|
+
|
46
56
|
## Do you like it? Star it!
|
47
57
|
If you use this component just star it. A developer is more motivated to improve a project when there is some interest.
|
48
58
|
|
@@ -1,10 +1,11 @@
|
|
1
|
-
@import "
|
1
|
+
@import "bootstrap/scss/bootstrap";
|
2
2
|
|
3
3
|
@import "variables";
|
4
4
|
|
5
5
|
@import "components/navigation";
|
6
6
|
@import "components/content_header";
|
7
7
|
@import "components/content_body";
|
8
|
+
@import "components/form";
|
8
9
|
@import "components/pagination";
|
9
10
|
|
10
11
|
.app-container {
|
@@ -14,6 +15,7 @@
|
|
14
15
|
}
|
15
16
|
|
16
17
|
.flashes {
|
18
|
+
pointer-events: none;
|
17
19
|
position: fixed;
|
18
20
|
text-align: center;
|
19
21
|
width: calc(100% - #{$navigation-width});
|
@@ -1,41 +1,61 @@
|
|
1
|
-
|
1
|
+
.main-content__body {
|
2
|
+
legend {
|
3
|
+
@extend .fs-4, .my-2;
|
4
|
+
}
|
2
5
|
|
3
|
-
|
4
|
-
|
6
|
+
.field_with_errors {
|
7
|
+
@extend .text-danger;
|
8
|
+
}
|
5
9
|
|
6
|
-
>
|
7
|
-
@extend .
|
10
|
+
.form-actions > input {
|
11
|
+
@extend .btn;
|
8
12
|
}
|
9
13
|
|
10
|
-
|
11
|
-
@extend .mb-
|
14
|
+
.field-unit {
|
15
|
+
@extend .row, .mb-3;
|
12
16
|
}
|
13
|
-
}
|
14
17
|
|
15
|
-
.
|
16
|
-
|
17
|
-
}
|
18
|
+
.field-unit__field {
|
19
|
+
@extend .col-10;
|
18
20
|
|
19
|
-
|
20
|
-
|
21
|
-
}
|
21
|
+
> input:not([type="checkbox"]) {
|
22
|
+
@extend .form-control;
|
23
|
+
}
|
22
24
|
|
23
|
-
|
24
|
-
|
25
|
-
}
|
25
|
+
> input[type="checkbox"] {
|
26
|
+
@extend .form-check-input
|
27
|
+
}
|
26
28
|
|
27
|
-
|
28
|
-
|
29
|
+
> select {
|
30
|
+
@extend .form-select;
|
31
|
+
}
|
29
32
|
|
30
|
-
|
31
|
-
|
33
|
+
> textarea {
|
34
|
+
@extend .form-control;
|
35
|
+
min-height: 150px;
|
36
|
+
}
|
32
37
|
}
|
33
|
-
}
|
34
38
|
|
35
|
-
.field-unit__label {
|
36
|
-
|
39
|
+
.field-unit__label {
|
40
|
+
@extend .col-2;
|
41
|
+
|
42
|
+
> label {
|
43
|
+
@extend .col-form-label;
|
44
|
+
border-bottom: 1px dashed #ccc;
|
45
|
+
padding-bottom: 0;
|
46
|
+
width: 100%;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
#error_explanation {
|
51
|
+
@extend .alert, .alert-danger;
|
52
|
+
|
53
|
+
> h2 {
|
54
|
+
@extend .h4, .alert-heading;
|
55
|
+
}
|
37
56
|
|
38
|
-
|
39
|
-
|
57
|
+
> ul {
|
58
|
+
@extend .mb-0;
|
59
|
+
}
|
40
60
|
}
|
41
61
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: administrate-bootstrap-theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mattia Roccoberton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: administrate
|
@@ -133,6 +133,7 @@ files:
|
|
133
133
|
- README.md
|
134
134
|
- Rakefile
|
135
135
|
- app/assets/config/administrate-bootstrap-theme_manifest.js
|
136
|
+
- app/assets/javascripts/administrate-bootstrap-theme/theme.js
|
136
137
|
- app/assets/stylesheets/administrate-bootstrap-theme/_base.scss
|
137
138
|
- app/assets/stylesheets/administrate-bootstrap-theme/_variables.scss
|
138
139
|
- app/assets/stylesheets/administrate-bootstrap-theme/components/_content_body.scss
|