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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 85b387e796f125e77538f6b4ceaeb59b9ea23417386e08abfdca4ba772080d32
4
- data.tar.gz: eb763ed993ab5adea42b9fa768d97921d846169b4d888d1002ddbff4391398b8
3
+ metadata.gz: eb9d26e362dbe536ab4a0e4ecc13e3f1935ed019da480dfe9f659c78948f7527
4
+ data.tar.gz: 02d4b2e5676e89002e6d39bd5cf90debf51b9d8bd42aed9a2badf4f0461c0088
5
5
  SHA512:
6
- metadata.gz: 40acf3c3b78f46c28796d5de774cd9b6825e77adc455f4b6dce20434a9c686e011e05ac07c74b58e32337d70c0b09e5dece4bdd8dbf037762b0ed71cad57a282
7
- data.tar.gz: 55e9a72f6fbb7614588b497b58ca55fd10ea834b3b2520b92ac3f6265cdd4b4f32bd37ee3826743b09a4fb03edce6c434de8bcde27221f2d5197ed23810f4ced
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
- ![screenshot](screenshot.png)
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
+ ![screenshot_index](screenshot_index.png)
51
+ - Show page:
52
+ ![screenshot_show](screenshot_show.png)
53
+ - Form page:
54
+ ![screenshot_form](screenshot_form.png)
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 +1,2 @@
1
1
  //= link_directory ../stylesheets/administrate-bootstrap-theme .css
2
+ //= link_directory ../javascripts/administrate-bootstrap-theme .js
@@ -0,0 +1,2 @@
1
+ //= require bootstrap/dist/js/bootstrap.bundle
2
+
@@ -1,10 +1,11 @@
1
- @import "../../../node_modules/bootstrap/scss/bootstrap";
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,7 +1,5 @@
1
1
  .main-content__body {
2
- @extend .container-fluid;
3
-
4
- @import "form";
2
+ @extend .container-fluid, .mb-3;
5
3
 
6
4
  > dl {
7
5
  @extend .row;
@@ -1,41 +1,61 @@
1
- // Imported in content_body
1
+ .main-content__body {
2
+ legend {
3
+ @extend .fs-4, .my-2;
4
+ }
2
5
 
3
- #error_explanation {
4
- @extend .alert, .alert-danger;
6
+ .field_with_errors {
7
+ @extend .text-danger;
8
+ }
5
9
 
6
- > h2 {
7
- @extend .h4, .alert-heading;
10
+ .form-actions > input {
11
+ @extend .btn;
8
12
  }
9
13
 
10
- > ul {
11
- @extend .mb-0;
14
+ .field-unit {
15
+ @extend .row, .mb-3;
12
16
  }
13
- }
14
17
 
15
- .field_with_errors {
16
- @extend .text-danger;
17
- }
18
+ .field-unit__field {
19
+ @extend .col-10;
18
20
 
19
- .form-actions > input {
20
- @extend .btn;
21
- }
21
+ > input:not([type="checkbox"]) {
22
+ @extend .form-control;
23
+ }
22
24
 
23
- .field-unit {
24
- @extend .row;
25
- }
25
+ > input[type="checkbox"] {
26
+ @extend .form-check-input
27
+ }
26
28
 
27
- .field-unit__field {
28
- @extend .col-10;
29
+ > select {
30
+ @extend .form-select;
31
+ }
29
32
 
30
- > input[type="text"], > textarea {
31
- @extend .form-control;
33
+ > textarea {
34
+ @extend .form-control;
35
+ min-height: 150px;
36
+ }
32
37
  }
33
- }
34
38
 
35
- .field-unit__label {
36
- @extend .col-2;
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
- > label {
39
- @extend .col-form-label;
57
+ > ul {
58
+ @extend .mb-0;
59
+ }
40
60
  }
41
61
  }
@@ -3,5 +3,7 @@
3
3
  module AdministrateBootstrapTheme
4
4
  class Engine < ::Rails::Engine
5
5
  isolate_namespace AdministrateBootstrapTheme
6
+
7
+ config.assets.paths << File.expand_path('../../node_modules', __dir__)
6
8
  end
7
9
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AdministrateBootstrapTheme
4
- VERSION = '0.1.6'
4
+ VERSION = '0.1.8'
5
5
  end
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.6
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-20 00:00:00.000000000 Z
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