README.md in administrate_tailwind_theme-0.0.1 vs README.md in administrate_tailwind_theme-0.0.2
- old
+ new
@@ -1,8 +1,11 @@
# administrate_tailwind_theme Gem
+[![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)
+[![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)
## Introduction
+![AdministrateTailwindTheme](images/screenshot.png)
`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.
### Features
- **Tailwind CSS Integration:** Complete rewrite of Administrate component classes to use Tailwind CSS.
- **Additional Fields:** Adds BooleanEmoji and CountryEmoji fields to your Administrate dashboard.
@@ -39,10 +42,36 @@
## Usage
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.
+### Themed views
+Like [Administrate](https://github.com/thoughtbot/administrate) you can generate views to customize
+```shell
+./bin/rails g --help
+...
+AdministrateTailwindTheme:
+ administrate_tailwind_theme:install
+ administrate_tailwind_theme:view
+ administrate_tailwind_theme:views
+ administrate_tailwind_theme:views:edit
+ administrate_tailwind_theme:views:field
+ administrate_tailwind_theme:views:form
+ administrate_tailwind_theme:views:index
+ administrate_tailwind_theme:views:layout
+ administrate_tailwind_theme:views:navigation
+ administrate_tailwind_theme:views:new
+ administrate_tailwind_theme:views:show
+```
+
+### Kaminari Themed pagination
+[Administrate](https://github.com/thoughtbot/administrate) use [kaminari](https://github.com/kaminari/kaminari) to handle pagination. Related views are themed with tailwind too
+
+```shell
+./bin/rails g administrate_tailwind_theme:views:kaminari
+```
+
### Custom Fields
#### BooleanEmoji Field
The `BooleanEmoji` field can be used to display boolean values with emojis for a more intuitive representation.
Example usage in a dashboard resource file:
@@ -60,28 +89,9 @@
```ruby
ATTRIBUTE_TYPES = {
country_code: Field::CountryEmoji, # iso2
# ...
}.freeze
-```
-
-### Themed views
-Like [Administrate](https://github.com/thoughtbot/administrate) you can generate views to customize
-```shell
-./bin/rails g --help
-...
-AdministrateTailwindTheme:
- administrate_tailwind_theme:install
- administrate_tailwind_theme:view
- administrate_tailwind_theme:views
- administrate_tailwind_theme:views:edit
- administrate_tailwind_theme:views:field
- administrate_tailwind_theme:views:form
- administrate_tailwind_theme:views:index
- administrate_tailwind_theme:views:layout
- administrate_tailwind_theme:views:navigation
- administrate_tailwind_theme:views:new
- administrate_tailwind_theme:views:show
```
## Configuration
After installation, you can modify the initializer created by the `administrate_tailwind_theme:install` generator to fine-tune the theme settings.
\ No newline at end of file