Itacomp is a View Component and Helper collection for Bootstrap Italia.
- AlertComponent
- AvatorComponent
- DimmerComponent
- NotificationComponent
- OverlayComponent
- TabComponent
- TurboFrameComponent
Itacomp is in a rapid development phase and the gem will not be released on Rubygem until the first project will be completed. At moment is required make the gem locally:
$ git clone https://github.com/isprambiente/itacomp.github
$ cd itacomp
$ gem buildwhen the gem is builded go in your project and add this row in your Gemfile:
gem "itacomp", path: '../itacomp'Change ../itacomp with your path of Itacomp project and update your project
$ bundle updateTo add the helpers in your system add this helper in your application_helper.rb
include Itacomp::CommonHelperThe ViewComponent are available with:
# render Itacomp::NameOfComponent.new
render Itacomp::TurboFrameComponent.new(id: 'nav', href: '/nav.html')Generate a new rails application "itademo" with bun or yarn as javascript approach and sass as css manager
rails new itademo -c sass -j bun
cd itademo
Add itacompp gem in Gemfile.rb
gem "itacomp", path: "../itacomp"
and bundle it
bundle update
Install bootstrap italia
bun install bootstrap-italia
Add bootstrap-italia style in app/assets/stylesheets/application.sass.scss
@forward "bootstrap-italia/src/scss/bootstrap-italia.scss";
Import bootstrap-italia in app/javascript/application.js
import "bootstrap-italia"
Generate a demo scaffold
./bin/rails g scaffold Book title:string body:text
define root as books index in /config/routes.rb
root "books#index"
Include Itacomp helper in app/helpers/application_helper.rb
include Itacomp::CommonHelper
Now you can update the layout in app/views/layouts/application.html.erb and the page in app/views/books/index.html.erb... Thats all folk!
- Open a issue
- Fork the project
- Make a pull request Your help is wellcome!
The gem is available as open source under the terms of the MIT License.