From f29e3a8ea90ebd49278afc31e1394c85fc9f00dc Mon Sep 17 00:00:00 2001 From: DualFroz Date: Fri, 4 Sep 2026 19:17:00 +0200 Subject: [PATCH] feat(layouts): extend application --- .../blog/app/views/layouts/application.erb | 48 +++++++++++++++++-- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/examples/blog/app/views/layouts/application.erb b/examples/blog/app/views/layouts/application.erb index b504c69..0247859 100644 --- a/examples/blog/app/views/layouts/application.erb +++ b/examples/blog/app/views/layouts/application.erb @@ -1,5 +1,47 @@ - - <%= defined?(title) ? title : 'Prism App' %> - <%== content %> + + + + + <%= t('blog.title') %> + <%== stylesheet_link_tag('stylesheets/application.css') %> + + +
+

<%== link_to(t('blog.title'), url_for(:root)) %>

+

<%= t('blog.tagline') %>

+ +

+ <% if user_signed_in? %> + <%= t('sessions.signed_in_as', email: current_user.email) %> + | + <%== link_to(t('account.nav_link'), url_for(:edit_account)) %> + | + <%== link_to(t('account.comments_nav_link'), url_for(:account_comments)) %> + | + <%== link_to(t('account.moderation_nav_link'), url_for(:account_moderation)) %> + | + <%== link_to(t('login_sessions.nav_link'), url_for(:login_sessions)) %> + | + <%== link_to(t('comments.trash_link'), url_for(:trash_comments)) %> + <%== button_to(t('sessions.sign_out'), '/session', method: :delete) %> + <% else %> + <%== link_to(t('sessions.sign_in'), url_for(:new_session)) %> + | + <%== link_to(t('sessions.sign_up'), url_for(:new_user)) %> + <% end %> +

+
+
+
<%== content %>
+ <% if content_for?(:sidebar) %> + + <% end %> +
+ <%== javascript_include_tag('javascripts/application.js') %> +