Introducing: Beautiful Layouts for Your Rails App

This article was originally published on Rails Designer

I am excited to introduce something entirely new to Rails Designer, the premier UI components library for Rails: layouts! 🥳

A layout is a template that wraps around a view, providing a comm…


This content originally appeared on DEV Community and was authored by Rails Designer

This article was originally published on Rails Designer

I am excited to introduce something entirely new to Rails Designer, the premier UI components library for Rails: layouts! 🥳

Image description

A layout is a template that wraps around a view, providing a common structure and shared HTML elements for multiple screens. The default layout is application.html.erb that typically wraps your entire app. But almost all Rails SaaS apps use multiple other layouts.

Most common is the one for the public screens, eg. the sign up or log in pages. How does this work?

class SessionsController < ApplicationController
  layout "authentication"

  # …
end

That layout "authentication" part is key. Learn all about layouts in Rails in this article.

For starters (and to get some feedback from the many users of Rails Designer) I have added three authentication layout variants. I have plenty more ideas, but love to hear your feedback.

Learn more about Layouts from Rails Designer.


This content originally appeared on DEV Community and was authored by Rails Designer


Print Share Comment Cite Upload Translate Updates
APA

Rails Designer | Sciencx (2024-08-26T17:00:00+00:00) Introducing: Beautiful Layouts for Your Rails App. Retrieved from https://www.scien.cx/2024/08/26/introducing-beautiful-layouts-for-your-rails-app/

MLA
" » Introducing: Beautiful Layouts for Your Rails App." Rails Designer | Sciencx - Monday August 26, 2024, https://www.scien.cx/2024/08/26/introducing-beautiful-layouts-for-your-rails-app/
HARVARD
Rails Designer | Sciencx Monday August 26, 2024 » Introducing: Beautiful Layouts for Your Rails App., viewed ,<https://www.scien.cx/2024/08/26/introducing-beautiful-layouts-for-your-rails-app/>
VANCOUVER
Rails Designer | Sciencx - » Introducing: Beautiful Layouts for Your Rails App. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/08/26/introducing-beautiful-layouts-for-your-rails-app/
CHICAGO
" » Introducing: Beautiful Layouts for Your Rails App." Rails Designer | Sciencx - Accessed . https://www.scien.cx/2024/08/26/introducing-beautiful-layouts-for-your-rails-app/
IEEE
" » Introducing: Beautiful Layouts for Your Rails App." Rails Designer | Sciencx [Online]. Available: https://www.scien.cx/2024/08/26/introducing-beautiful-layouts-for-your-rails-app/. [Accessed: ]
rf:citation
» Introducing: Beautiful Layouts for Your Rails App | Rails Designer | Sciencx | https://www.scien.cx/2024/08/26/introducing-beautiful-layouts-for-your-rails-app/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.