Prohlížeč zdrojového kódu
app/views/layouts/application.html.erb
<!DOCTYPE html>
<html data-theme="light">
<head>
<title><%= content_for(:title) || "Ruby Webování" %></title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<link rel="preconnect" href="https://fonts.bunny.net">
<link href="https://fonts.bunny.net/css?family=inter:400,500,600,700&display=swap" rel="stylesheet">
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<%= javascript_importmap_tags %>
</head>
<body>
<header class="container">
<nav>
<ul>
<li><strong><%= link_to "Ruby Webování", root_path %></strong></li>
<li><%= link_to "Příklady", examples_path %></li>
<li><%= link_to "Zdrojový kód", source_index_path %></li>
</ul>
<ul>
<li><button data-controller="theme" data-action="click->theme#toggle" aria-label="Přepnout tmavý režim">🌙</button></li>
</ul>
</nav>
</header>
<main class="container">
<% if flash[:notice] %>
<div class="flash flash-notice"><%= flash[:notice] %></div>
<% end %>
<% if flash[:alert] %>
<div class="flash flash-alert"><%= flash[:alert] %></div>
<% end %>
<%= yield %>
</main>
<footer class="container">
<small>Ruby Webování - Petr Šedivý</small>
</footer>
</body>
</html>