/rodauth-rails-tailwind-demo

A Demo App by which we can test rodauth-rails tailwind view generator

Primary LanguageHTMLMIT LicenseMIT

What is this?

This is a demo rails app to test rodauth-rails tailwind integration.

Instructions:

  1. git clone git@github.com:benkoshy/rodauth-rails-tailwind-demo.git
  2. bundle install
  3. ./bin/rails db:create
  4. rake db:migrate
  5. Run rails g rodauth:views --css=tailwind and overwrite everything using the a option which follows.
  6. ./bin/dev
  7. Visit localhost

Now you can test it out.

Testing with tailwindcss-rails

  1. Add tailwindcss-rails to gemfile:
# Gemfile
gem "tailwindcss-rails"

# or
bundle add "tailwindcss-rails"
  1. bundle install
  2. rails g rodauth:views and overwrite all files using the a 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.

Potential Issues

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.

Code of Conduct

Free speech without any restrictions.

License

MIT