administrate-bootstrap-theme 0.2.2 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +65 -32
- data/app/assets/javascripts/administrate-bootstrap-theme/{bootstrap/bootstrap.bundle.js → bootstrap.bundle.js} +1058 -973
- data/app/assets/stylesheets/administrate-bootstrap-theme/_base.scss +4 -21
- data/app/assets/stylesheets/administrate-bootstrap-theme/_variables.scss +4 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_card.scss +7 -6
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_carousel.scss +2 -2
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_dropdown.scss +4 -4
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_functions.scss +100 -3
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_grid.scss +11 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_helpers.scss +2 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_images.scss +1 -1
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_mixins.scss +1 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_modal.scss +5 -15
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_navbar.scss +30 -1
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_offcanvas.scss +8 -2
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_placeholders.scss +51 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_popover.scss +10 -10
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_reboot.scss +12 -8
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_root.scss +40 -2
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_tables.scss +9 -5
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_toasts.scss +3 -3
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_tooltip.scss +4 -4
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_transitions.scss +6 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_utilities.scss +44 -8
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_variables.scss +206 -29
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap-grid.scss +3 -1
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap-reboot.scss +2 -4
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap-utilities.scss +1 -1
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap.scss +2 -1
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_floating-labels.scss +3 -1
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_form-check.scss +1 -1
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_form-control.scss +1 -1
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_form-range.scss +1 -1
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/forms/_form-select.scss +5 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_stacks.scss +15 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/helpers/_vr.scss +8 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_backdrop.scss +14 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_buttons.scss +1 -1
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_grid.scss +35 -9
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_utilities.scss +27 -6
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_visually-hidden.scss +1 -1
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/vendor/_rfs.scss +55 -13
- data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_autumn.scss +8 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_default.scss +8 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_forest.scss +9 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_industrial.scss +8 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/colors/_water.scss +8 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/components/_content_body.scss +28 -10
- data/app/assets/stylesheets/administrate-bootstrap-theme/components/_content_header.scss +4 -6
- data/app/assets/stylesheets/administrate-bootstrap-theme/components/_form.scss +6 -6
- data/app/assets/stylesheets/administrate-bootstrap-theme/components/_navigation.scss +26 -3
- data/app/assets/stylesheets/administrate-bootstrap-theme/components/_pagination.scss +1 -1
- data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_lato.scss +5 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_montserrat.scss +5 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_open_sans.scss +5 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_roboto.scss +5 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/fonts/_source_sans_pro.scss +5 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/theme.scss +10 -61
- data/lib/administrate-bootstrap-theme/version.rb +3 -1
- data/lib/generators/administrate_bootstrap_theme/install/USAGE +10 -0
- data/lib/generators/administrate_bootstrap_theme/install/install_generator.rb +33 -0
- data/package.json +2 -3
- metadata +22 -8
- data/app/assets/javascripts/administrate-bootstrap-theme/flatpickr/flatpickr.js +0 -2673
- data/app/assets/javascripts/administrate-bootstrap-theme/theme.js +0 -22
- data/app/assets/stylesheets/administrate-bootstrap-theme/flatpickr/flatpickr.scss +0 -791
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aaa5f115d75e691b8a58fc48fae125239e19afb54a0666ed1bcb278d6c215db5
|
4
|
+
data.tar.gz: eed5a7db1ef5bf99693f472c6f3df0e305f491c71ce9f7e5ddeabb5b382eaee6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e181760902fa5b61dee3329b80f40ae5186a657b0763c97b954315e13af6e80cf67d88b6f50f0c7a11ade4cf6bed276c043614b90b7fe3f855198b826e95e4db
|
7
|
+
data.tar.gz: ad94e6464663098d6cb2df4b5ba393cd798e0fff3b4b70b6375c334343497aaa87fa919ed474b7ddb873bb8c2736367e2b0185fc7b3ab00467c265090b72a78b
|
data/README.md
CHANGED
@@ -1,63 +1,96 @@
|
|
1
|
-
# Administrate Bootstrap Theme
|
1
|
+
# Administrate Bootstrap Theme
|
2
|
+
[![gem version](https://badge.fury.io/rb/administrate-bootstrap-theme.svg)](https://badge.fury.io/rb/administrate-bootstrap-theme)
|
3
|
+
[![gem downloads](https://badgen.net/rubygems/dt/administrate-bootstrap-theme)](https://rubygems.org/gems/administrate-bootstrap-theme)
|
4
|
+
[![linters](https://github.com/blocknotes/administrate-bootstrap-theme/actions/workflows/linters.yml/badge.svg)](https://github.com/blocknotes/administrate-bootstrap-theme/actions/workflows/linters.yml)
|
5
|
+
[![specs](https://github.com/blocknotes/administrate-bootstrap-theme/actions/workflows/specs.yml/badge.svg)](https://github.com/blocknotes/administrate-bootstrap-theme/actions/workflows/specs.yml)
|
6
|
+
[![CodeQL](https://github.com/blocknotes/administrate-bootstrap-theme/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/blocknotes/administrate-bootstrap-theme/actions/workflows/codeql-analysis.yml)
|
2
7
|
|
3
8
|
A Bootstrap 5 theme for [Administrate](https://github.com/thoughtbot/administrate).
|
4
9
|
|
5
10
|
Features:
|
6
|
-
- easy to install
|
11
|
+
- easy to install: just run the generator installer;
|
7
12
|
- customizable via SASS variables;
|
8
13
|
- allow to use *Bootstrap* components in the admin.
|
9
14
|
|
10
15
|
See some [screenshots](#screenshots).
|
11
16
|
|
12
|
-
|
17
|
+
Please :star: if you like it.
|
13
18
|
|
14
|
-
|
15
|
-
- Add to *app/assets/config/manifest.js*:
|
19
|
+
## Installation
|
16
20
|
|
17
|
-
|
18
|
-
|
19
|
-
//= link administrate-bootstrap-theme/theme.js
|
20
|
-
```
|
21
|
+
- Add to *Gemfile* (of an Administrate project): `gem 'administrate-bootstrap-theme', '~> 1.0'` (and execute `bundle`)
|
22
|
+
- Run the installer: `bin/rails generate administrate_bootstrap_theme:install`
|
21
23
|
|
22
|
-
|
23
|
-
- Update *app/views/admin/application/_stylesheet.html.erb*, leaving only:
|
24
|
+
## Customizations
|
24
25
|
|
25
|
-
|
26
|
-
<%= stylesheet_link_tag 'administrate-bootstrap-theme/theme', media: 'all' %>
|
27
|
-
<%= yield :stylesheet %>
|
28
|
-
```
|
26
|
+
Edit the variables defined in *app/assets/stylesheets/administrate-bootstrap-theme.scss*:
|
29
27
|
|
30
|
-
|
28
|
+
```scss
|
29
|
+
$navigation-width: 250px;
|
30
|
+
$navigation-bg: #055160;
|
31
|
+
$navigation-bg-active: #d51;
|
32
|
+
$navigation-fg: #eee;
|
33
|
+
$primary: #0d6ecd;
|
34
|
+
$secondary: #666;
|
35
|
+
$main-content-bg: #f4f8fb;
|
36
|
+
$main-content-fg: #222;
|
31
37
|
|
32
|
-
|
33
|
-
<%= javascript_include_tag 'administrate-bootstrap-theme/theme' %>
|
34
|
-
<%= yield :javascript %>
|
38
|
+
@import 'administrate-bootstrap-theme/theme'; // required after the variables setup
|
35
39
|
```
|
36
40
|
|
37
|
-
|
41
|
+
### Extra improvements
|
38
42
|
|
39
|
-
|
43
|
+
Choose a predefined color schema - *app/assets/stylesheets/administrate-bootstrap-theme.scss*:
|
40
44
|
|
41
45
|
```scss
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
46
|
+
@import 'administrate-bootstrap-theme/colors/default';
|
47
|
+
// @import 'administrate-bootstrap-theme/colors/autumn';
|
48
|
+
// @import 'administrate-bootstrap-theme/colors/forest';
|
49
|
+
// @import 'administrate-bootstrap-theme/colors/industrial';
|
50
|
+
// @import 'administrate-bootstrap-theme/colors/water';
|
48
51
|
@import 'administrate-bootstrap-theme/theme';
|
49
52
|
```
|
50
53
|
|
51
|
-
|
54
|
+
Set a UI font:
|
55
|
+
|
56
|
+
- you can of course import any font from Google fonts (or other providers);
|
57
|
+
- to use a pre-configured one - *app/assets/stylesheets/administrate-bootstrap-theme.scss*:
|
58
|
+
```scss
|
59
|
+
@import 'administrate-bootstrap-theme/fonts/roboto';
|
60
|
+
// @import 'administrate-bootstrap-theme/fonts/lato';
|
61
|
+
// @import 'administrate-bootstrap-theme/fonts/montserrat';
|
62
|
+
// @import 'administrate-bootstrap-theme/fonts/open_sans';
|
63
|
+
// @import 'administrate-bootstrap-theme/fonts/source_sans_pro';
|
64
|
+
@import 'administrate-bootstrap-theme/theme';
|
65
|
+
```
|
52
66
|
|
53
|
-
For
|
67
|
+
For more improvements to the sidebar:
|
68
|
+
|
69
|
+
- generate the navigation partial: `bin/rails generate administrate:views:navigation`
|
70
|
+
- edit the partial *app/views/admin/application/_navigation.html.erb*
|
71
|
+
- to change the _Back to app_ button to a title component: replace the classes for the first link (_back_to_app_) with `button--title`
|
72
|
+
- update the translation button title editing *config/locales/en.yml*:
|
73
|
+
```yml
|
74
|
+
en:
|
75
|
+
administrate:
|
76
|
+
navigation:
|
77
|
+
back_to_app: 'MyAdmin'
|
78
|
+
```
|
79
|
+
- to add a copyright line at the bottom, update the links part with:
|
80
|
+
```erb
|
81
|
+
<div class="mb-auto">
|
82
|
+
<% Administrate::Namespace.new(namespace).resources_with_index_route.each do |resource| %>
|
83
|
+
...
|
84
|
+
<% end %>
|
85
|
+
</div>
|
86
|
+
<div class="copy">by Mat</div>
|
87
|
+
```
|
54
88
|
|
55
89
|
## Screenshots
|
56
90
|
|
57
|
-
- Index
|
58
|
-
- Show page: ![Administrate Bootstrap Theme show page](extra/screenshot_show.png)
|
59
|
-
- Form page: ![Administrate Bootstrap Theme edit page](extra/screenshot_edit.png)
|
91
|
+
- Index, show and edit pages: ![Administrate Bootstrap Theme sections](extra/screenshot_sections.png)
|
60
92
|
- Index page with some customized colors: ![Administrate Bootstrap Theme index page customized](extra/screenshot_index_alt.png)
|
93
|
+
- Color schemas (none, default, autumn, forest, water, industrial): ![Administrate Bootstrap Theme colors](extra/screenshot_colors.png)
|
61
94
|
|
62
95
|
## Do you like it? Star it!
|
63
96
|
|