administrate-bootstrap-theme 0.2.0 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +71 -37
- data/app/assets/javascripts/administrate-bootstrap-theme/{bootstrap/bootstrap.bundle.js → bootstrap.bundle.js} +1376 -1310
- 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/_accordion.scss +4 -2
- 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 +11 -17
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_functions.scss +94 -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/_list-group.scss +5 -5
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_mixins.scss +2 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_modal.scss +7 -35
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_navbar.scss +30 -1
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_offcanvas.scss +19 -13
- 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 +39 -2
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_spinners.scss +2 -2
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/_tables.scss +1 -0
- 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 +193 -28
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap-grid.scss +1 -1
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/bootstrap-reboot.scss +1 -1
- 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 +3 -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/_color-scheme.scss +7 -0
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_forms.scss +15 -5
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_grid.scss +40 -10
- data/app/assets/stylesheets/administrate-bootstrap-theme/bootstrap/mixins/_utilities.scss +27 -6
- 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 +2 -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 +10 -0
- metadata +24 -9
- data/Rakefile +0 -16
- 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.css +0 -791
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c469872149e9ebaf3ed3f3ddaaecca287b5d84ddf8dbed7b53c4d564a6826cd
|
4
|
+
data.tar.gz: 124aa1f1f9802e81de1757dadf0260e2248564061864fa39419633ac58ac5287
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4048036b1a91e27f1eb248368899f528a80f098bc1319aaee940a22a5dbfef5917bb53f044c74230a50063fcc39d19af486a1588e8d3718b409daf20559fced0
|
7
|
+
data.tar.gz: 327f630cd85bf0e28d552f5a5b21496aeaa0f376fd26d92f380f1e1170ca94cfd6cc48cb74b272fa64c9ee8811307481ad6f37c896e63f639c1c323350cbdf7f
|
data/README.md
CHANGED
@@ -1,72 +1,106 @@
|
|
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)
|
2
6
|
|
3
|
-
A Bootstrap 5
|
7
|
+
A Bootstrap 5 theme for [Administrate](https://github.com/thoughtbot/administrate).
|
4
8
|
|
5
9
|
Features:
|
6
|
-
- easy to install
|
10
|
+
- easy to install: just run the generator installer;
|
7
11
|
- customizable via SASS variables;
|
8
12
|
- allow to use *Bootstrap* components in the admin.
|
9
13
|
|
10
14
|
See some [screenshots](#screenshots).
|
11
15
|
|
16
|
+
Please :star: if you like it.
|
17
|
+
|
12
18
|
## Installation
|
13
|
-
- Add to *Gemfile* (of an Administrate project): `gem 'administrate-bootstrap-theme'` (and execute `bundle`)
|
14
|
-
- Add to *app/assets/config/manifest.js*:
|
15
19
|
|
16
|
-
|
17
|
-
|
18
|
-
//= link administrate-bootstrap-theme/theme.js
|
19
|
-
```
|
20
|
+
- Add to *Gemfile* (of an Administrate project): `gem 'administrate-bootstrap-theme', '~> 1.0'` (and execute `bundle`)
|
21
|
+
- Run the installer: `bin/rails generate administrate_bootstrap_theme:install`
|
20
22
|
|
21
|
-
|
22
|
-
- Update *app/views/admin/application/_stylesheet.html.erb*, leaving only:
|
23
|
+
## Customizations
|
23
24
|
|
24
|
-
|
25
|
-
<%= stylesheet_link_tag 'administrate-bootstrap-theme/theme', media: 'all' %>
|
26
|
-
<%= yield :stylesheet %>
|
27
|
-
```
|
25
|
+
Edit the variables defined in *app/assets/stylesheets/administrate-bootstrap-theme.scss*:
|
28
26
|
|
29
|
-
|
27
|
+
```scss
|
28
|
+
$navigation-width: 250px;
|
29
|
+
$navigation-bg: #055160;
|
30
|
+
$navigation-bg-active: #d51;
|
31
|
+
$navigation-fg: #eee;
|
32
|
+
$primary: #0d6ecd;
|
33
|
+
$secondary: #666;
|
34
|
+
$main-content-bg: #f4f8fb;
|
35
|
+
$main-content-fg: #222;
|
30
36
|
|
31
|
-
|
32
|
-
<%= javascript_include_tag 'administrate-bootstrap-theme/theme' %>
|
33
|
-
<%= yield :javascript %>
|
37
|
+
@import 'administrate-bootstrap-theme/theme'; // required after the variables setup
|
34
38
|
```
|
35
39
|
|
36
|
-
|
37
|
-
To change variables it's necessary to create a new *.scss* (or *.sass*) file like this one (ex. *admin.scss*):
|
40
|
+
### Extra improvements
|
38
41
|
|
39
|
-
|
40
|
-
// app/assets/stylesheets/admin.scss
|
41
|
-
$navigation-bg: #055160;
|
42
|
-
$navigation-bg-active: #d51;
|
43
|
-
$navigation-width: 300px;
|
44
|
-
$primary: #087990;
|
42
|
+
Choose a predefined color schema - *app/assets/stylesheets/administrate-bootstrap-theme.scss*:
|
45
43
|
|
44
|
+
```scss
|
45
|
+
@import 'administrate-bootstrap-theme/colors/default';
|
46
|
+
// @import 'administrate-bootstrap-theme/colors/autumn';
|
47
|
+
// @import 'administrate-bootstrap-theme/colors/forest';
|
48
|
+
// @import 'administrate-bootstrap-theme/colors/industrial';
|
49
|
+
// @import 'administrate-bootstrap-theme/colors/water';
|
46
50
|
@import 'administrate-bootstrap-theme/theme';
|
47
51
|
```
|
48
52
|
|
49
|
-
|
53
|
+
Set a UI font:
|
54
|
+
|
55
|
+
- you can of course import any font from Google fonts (or other providers);
|
56
|
+
- to use a pre-configured one - *app/assets/stylesheets/administrate-bootstrap-theme.scss*:
|
57
|
+
```scss
|
58
|
+
@import 'administrate-bootstrap-theme/fonts/roboto';
|
59
|
+
// @import 'administrate-bootstrap-theme/fonts/lato';
|
60
|
+
// @import 'administrate-bootstrap-theme/fonts/montserrat';
|
61
|
+
// @import 'administrate-bootstrap-theme/fonts/open_sans';
|
62
|
+
// @import 'administrate-bootstrap-theme/fonts/source_sans_pro';
|
63
|
+
@import 'administrate-bootstrap-theme/theme';
|
64
|
+
```
|
50
65
|
|
51
|
-
For
|
66
|
+
For more improvements to the sidebar:
|
67
|
+
|
68
|
+
- generate the navigation partial: `bin/rails generate administrate:views:navigation`
|
69
|
+
- edit the partial *app/views/admin/application/_navigation.html.erb*
|
70
|
+
- to change the _Back to app_ button to a title component: replace the classes for the first link (_back_to_app_) with `button--title`
|
71
|
+
- update the translation button title editing *config/locales/en.yml*:
|
72
|
+
```yml
|
73
|
+
en:
|
74
|
+
administrate:
|
75
|
+
navigation:
|
76
|
+
back_to_app: 'MyAdmin'
|
77
|
+
```
|
78
|
+
- to add a copyright line at the bottom, update the links part with:
|
79
|
+
```erb
|
80
|
+
<div class="mb-auto">
|
81
|
+
<% Administrate::Namespace.new(namespace).resources_with_index_route.each do |resource| %>
|
82
|
+
...
|
83
|
+
<% end %>
|
84
|
+
</div>
|
85
|
+
<div class="copy">by Mat</div>
|
86
|
+
```
|
52
87
|
|
53
88
|
## Screenshots
|
54
|
-
|
55
|
-
![Administrate Bootstrap Theme
|
56
|
-
-
|
57
|
-
![Administrate Bootstrap Theme
|
58
|
-
- Form page:
|
59
|
-
![Administrate Bootstrap Theme edit page](extra/screenshot_edit.png)
|
60
|
-
- Index page with some customized colors:
|
61
|
-
![Administrate Bootstrap Theme index page customized](extra/screenshot_index_alt.png)
|
89
|
+
|
90
|
+
- Index, show and edit pages: ![Administrate Bootstrap Theme sections](extra/screenshot_sections.png)
|
91
|
+
- Index page with some customized colors: ![Administrate Bootstrap Theme index page customized](extra/screenshot_index_alt.png)
|
92
|
+
- Color schemas (none, default, autumn, forest, water, industrial): ![Administrate Bootstrap Theme colors](extra/screenshot_colors.png)
|
62
93
|
|
63
94
|
## Do you like it? Star it!
|
95
|
+
|
64
96
|
If you use this component just star it. A developer is more motivated to improve a project when there is some interest.
|
65
97
|
|
66
98
|
Or consider offering me a coffee, it's a small thing but it is greatly appreciated: [about me](https://www.blocknot.es/about-me).
|
67
99
|
|
68
100
|
## Contributors
|
101
|
+
|
69
102
|
- [Mattia Roccoberton](https://blocknot.es/): author
|
70
103
|
|
71
104
|
## License
|
105
|
+
|
72
106
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|