administrate_tailwind_theme 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7636dc83af2cd6dbda3d5c69e386af6f5253eb0248371ec4435791a7e55e7b00
|
4
|
+
data.tar.gz: da4970821671b47d8e6c1c58444d8980aa141dc3009538e639c9440628656799
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fedacfae9608b0b164b01c96e3c5b2b8a6ada0383e81c7ff61b3e2e5c63b57402c76d54d099b459cffbf494e8b5b2624b2ce01c5ea925d70566bd5121533735
|
7
|
+
data.tar.gz: 4cc5c054d6cc38407acce1ed7f5faaed9605506b2ea054491b416faa21ed16876844d05f5da60c7c8826376eb9c90d0bb33b125c16d34063cffb5ab4ae7b616d
|
data/README.md
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
# administrate_tailwind_theme Gem
|
2
|
+
[![AdministrateTailwindTheme CI](https://github.com/Eth3rnit3/administrate-tailwind-theme/actions/workflows/main.yml/badge.svg)](https://github.com/Eth3rnit3/administrate-tailwind-theme/actions/workflows/main.yml)
|
3
|
+
[![Publish on RubyGems](https://github.com/Eth3rnit3/administrate-tailwind-theme/actions/workflows/gem-push.yml/badge.svg)](https://github.com/Eth3rnit3/administrate-tailwind-theme/actions/workflows/gem-push.yml)
|
2
4
|
|
3
5
|
## Introduction
|
6
|
+
![AdministrateTailwindTheme](images/screenshot.png)
|
4
7
|
`administrate_tailwind_theme` is a custom theme gem for the [Administrate](https://github.com/thoughtbot/administrate) gem, utilizing the [Tailwind CSS](https://tailwindcss.com/) framework. This gem revamps all views to use Tailwind CSS classes, enhancing the visual aesthetics and responsiveness of your Administrate dashboard. It also introduces additional fields like BooleanEmoji and CountryEmoji for a richer admin interface.
|
5
8
|
|
6
9
|
### Features
|
@@ -41,6 +44,32 @@
|
|
41
44
|
|
42
45
|
Once installed, `administrate_tailwind_theme` automatically overrides the default Administrate views. Your dashboard will now use Tailwind CSS styles. You can further customize the styles as per your application's needs.
|
43
46
|
|
47
|
+
### Themed views
|
48
|
+
Like [Administrate](https://github.com/thoughtbot/administrate) you can generate views to customize
|
49
|
+
```shell
|
50
|
+
./bin/rails g --help
|
51
|
+
...
|
52
|
+
AdministrateTailwindTheme:
|
53
|
+
administrate_tailwind_theme:install
|
54
|
+
administrate_tailwind_theme:view
|
55
|
+
administrate_tailwind_theme:views
|
56
|
+
administrate_tailwind_theme:views:edit
|
57
|
+
administrate_tailwind_theme:views:field
|
58
|
+
administrate_tailwind_theme:views:form
|
59
|
+
administrate_tailwind_theme:views:index
|
60
|
+
administrate_tailwind_theme:views:layout
|
61
|
+
administrate_tailwind_theme:views:navigation
|
62
|
+
administrate_tailwind_theme:views:new
|
63
|
+
administrate_tailwind_theme:views:show
|
64
|
+
```
|
65
|
+
|
66
|
+
### Kaminari Themed pagination
|
67
|
+
[Administrate](https://github.com/thoughtbot/administrate) use [kaminari](https://github.com/kaminari/kaminari) to handle pagination. Related views are themed with tailwind too
|
68
|
+
|
69
|
+
```shell
|
70
|
+
./bin/rails g administrate_tailwind_theme:views:kaminari
|
71
|
+
```
|
72
|
+
|
44
73
|
### Custom Fields
|
45
74
|
#### BooleanEmoji Field
|
46
75
|
The `BooleanEmoji` field can be used to display boolean values with emojis for a more intuitive representation.
|
@@ -64,25 +93,6 @@ ATTRIBUTE_TYPES = {
|
|
64
93
|
}.freeze
|
65
94
|
```
|
66
95
|
|
67
|
-
### Themed views
|
68
|
-
Like [Administrate](https://github.com/thoughtbot/administrate) you can generate views to customize
|
69
|
-
```shell
|
70
|
-
./bin/rails g --help
|
71
|
-
...
|
72
|
-
AdministrateTailwindTheme:
|
73
|
-
administrate_tailwind_theme:install
|
74
|
-
administrate_tailwind_theme:view
|
75
|
-
administrate_tailwind_theme:views
|
76
|
-
administrate_tailwind_theme:views:edit
|
77
|
-
administrate_tailwind_theme:views:field
|
78
|
-
administrate_tailwind_theme:views:form
|
79
|
-
administrate_tailwind_theme:views:index
|
80
|
-
administrate_tailwind_theme:views:layout
|
81
|
-
administrate_tailwind_theme:views:navigation
|
82
|
-
administrate_tailwind_theme:views:new
|
83
|
-
administrate_tailwind_theme:views:show
|
84
|
-
```
|
85
|
-
|
86
96
|
## Configuration
|
87
97
|
|
88
98
|
After installation, you can modify the initializer created by the `administrate_tailwind_theme:install` generator to fine-tune the theme settings.
|
@@ -12,7 +12,11 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.license = 'MIT'
|
13
13
|
spec.required_ruby_version = '>= 2.6.0'
|
14
14
|
|
15
|
-
|
15
|
+
if ENV.fetch('GEM_PUSHER', 'default') == 'github'
|
16
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.pkg.github.com/Eth3rnit3'
|
17
|
+
else
|
18
|
+
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
|
19
|
+
end
|
16
20
|
|
17
21
|
spec.metadata['homepage_uri'] = spec.homepage
|
18
22
|
spec.metadata['source_code_uri'] = 'https://github.com/eth3rnit3/administrate-tailwind-theme'
|
Binary file
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'administrate_tailwind_theme/view_generator'
|
4
|
+
|
5
|
+
module AdministrateTailwindTheme
|
6
|
+
module Generators
|
7
|
+
module Views
|
8
|
+
class KaminariGenerator < AdministrateTailwindTheme::ViewGenerator
|
9
|
+
def self.template_source_path
|
10
|
+
File.expand_path(
|
11
|
+
'../../../../app/views/kaminari',
|
12
|
+
__dir__
|
13
|
+
)
|
14
|
+
end
|
15
|
+
|
16
|
+
source_root template_source_path
|
17
|
+
|
18
|
+
def copy_template
|
19
|
+
copy_resource_template('_first_page')
|
20
|
+
copy_resource_template('_gap')
|
21
|
+
copy_resource_template('_last_page')
|
22
|
+
copy_resource_template('_next_page')
|
23
|
+
copy_resource_template('_page')
|
24
|
+
copy_resource_template('_paginator')
|
25
|
+
copy_resource_template('_prev_page')
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
metadata
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: administrate_tailwind_theme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eth3rnit3
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2024-01-29 00:00:00.000000000 Z
|
@@ -186,6 +186,7 @@ files:
|
|
186
186
|
- app/views/kaminari/_prev_page.html.erb
|
187
187
|
- app/views/layouts/admin/application.html.erb
|
188
188
|
- config/routes.rb
|
189
|
+
- images/screenshot.png
|
189
190
|
- lib/administrate/field/boolean_emoji.rb
|
190
191
|
- lib/administrate/field/country_emoji.rb
|
191
192
|
- lib/administrate_tailwind_theme.rb
|
@@ -199,6 +200,7 @@ files:
|
|
199
200
|
- lib/generators/administrate_tailwind_theme/views/field_generator.rb
|
200
201
|
- lib/generators/administrate_tailwind_theme/views/form_generator.rb
|
201
202
|
- lib/generators/administrate_tailwind_theme/views/index_generator.rb
|
203
|
+
- lib/generators/administrate_tailwind_theme/views/kaminari_generator.rb
|
202
204
|
- lib/generators/administrate_tailwind_theme/views/layout_generator.rb
|
203
205
|
- lib/generators/administrate_tailwind_theme/views/navigation_generator.rb
|
204
206
|
- lib/generators/administrate_tailwind_theme/views/new_generator.rb
|
@@ -213,7 +215,7 @@ metadata:
|
|
213
215
|
homepage_uri: https://github.com/eth3rnit3/administrate-tailwind-theme
|
214
216
|
source_code_uri: https://github.com/eth3rnit3/administrate-tailwind-theme
|
215
217
|
changelog_uri: https://github.com/eth3rnit3/administrate-tailwind-theme/blob/main/CHANGELOG.md
|
216
|
-
post_install_message:
|
218
|
+
post_install_message:
|
217
219
|
rdoc_options: []
|
218
220
|
require_paths:
|
219
221
|
- lib
|
@@ -229,7 +231,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
229
231
|
version: '0'
|
230
232
|
requirements: []
|
231
233
|
rubygems_version: 3.4.10
|
232
|
-
signing_key:
|
234
|
+
signing_key:
|
233
235
|
specification_version: 4
|
234
236
|
summary: A Tailwind CSS theme for the Administrate gem.
|
235
237
|
test_files: []
|