This is a demo rails app to test rodauth-rails tailwind integration.
git clone git@github.com:benkoshy/rodauth-rails-tailwind-demo.git
bundle install
./bin/rails db:create
rake db:migrate
- Run
rails g rodauth:views --css=tailwind
and overwrite everything using thea
option which follows. ./bin/dev
- Visit localhost
Now you can test it out.
- Add tailwindcss-rails to gemfile:
# Gemfile
gem "tailwindcss-rails"
# or
bundle add "tailwindcss-rails"
bundle install
rails g rodauth:views
and overwrite all files using thea
option - note that we have not specified the--css=tailwind
flag, but the default views should still come out as tailwind views, rather than bootstrap.
Notes:
- When using QR Codes, we are relying on the latest version of rodauth - cutting edge - which ensures the QR code will always have a white background.
- Warning: I have pointed rod-auth to be on my fork of rodauth. This is simply to test out its capabilities.
I have assumed nothing when it comes to layouts.
Rails, by standard has the following in their application.html.erb
template:
<main class="container mx-auto mt-28 px-5 flex"> <---- Note the classes here
</main>
I would propose the following rod_auth layout, which assumes nothing:
<main> <---- No classes noted here
</main>
Then it should work fine.
Free speech without any restrictions.
MIT