Created
November 14, 2024 15:15
-
-
Save duduribeiro/c215b066e7b3bd1b20a585cdeae3493e to your computer and use it in GitHub Desktop.
nested layout
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="<%= I18n.locale %>" class="h-full"> | |
<head> | |
<title><%= content_for(:title) || "AppName" %></title> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<%= csrf_meta_tags %> | |
<%= csp_meta_tag %> | |
<%= yield :head %> | |
<%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %> | |
<%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %> | |
<link rel="icon" href="/icon.png" type="image/png"> | |
<link rel="icon" href="/icon.svg" type="image/svg+xml"> | |
<link rel="apple-touch-icon" href="/icon.png"> | |
<%# Includes all stylesheet files in app/views/stylesheets %> | |
<%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %> | |
<%= stylesheet_link_tag :app, "data-turbo-track": "reload" %> | |
<%= javascript_importmap_tags %> | |
</head> | |
<body class="h-full"> | |
<%= content_for?(:content) ? yield(:content) : yield %> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% content_for :content do %> | |
<%= render partial: "layouts/dashboard/header" %> | |
<div> | |
<%= yield %> | |
</div> | |
<% end %> | |
<%= render template: "layouts/application" %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment