feat(layouts): extend application

This commit is contained in:
dualfroz committed 2026-09-04 19:17:00 +02:00
1 parent b536a77cf6
commit f29e3a8ea9
1 file changed
+45 -3
@@ -1,5 +1,47 @@
<!doctype html>
<html>
<head><title><%= defined?(title) ? title : 'Prism App' %></title></head>
<body><%== content %></body>
<html lang="<%= locale %>">
<head>
<meta charset="utf-8">
<meta name="csrf-token" content="<%= csrf_token %>">
<title><%= t('blog.title') %></title>
<%== stylesheet_link_tag('stylesheets/application.css') %>
</head>
<body>
<header>
<h1><%== link_to(t('blog.title'), url_for(:root)) %></h1>
<p><%= t('blog.tagline') %></p>
<nav>
<%== link_to(t('nav.switch_to_polish'), "#{url_for(:root)}?locale=pl") %>
|
<%== link_to(t('nav.switch_to_english'), "#{url_for(:root)}?locale=en") %>
</nav>
<p class="session-status">
<% 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 %>
</p>
</header>
<div class="layout">
<main><%== content %></main>
<% if content_for?(:sidebar) %>
<aside><%== content_for(:sidebar) %></aside>
<% end %>
</div>
<%== javascript_include_tag('javascripts/application.js') %>
</body>
</html>