Skip to content

Commit 566ff10

Browse files
committed
Move layout partial templates
1 parent 9fcf8c9 commit 566ff10

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed
File renamed without changes.
File renamed without changes.
File renamed without changes.

app/views/shared/_meta.html.erb renamed to app/views/layouts/_meta.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<title><%= h page_title %></title>
22
<meta name="viewport" content="width=device-width, initial-scale=1.0">
33
<meta name="description" content="<%= h page_description %>" />
4-
<% if @search %>
4+
<% if @search || controller_name == "errors" %>
55
<meta name="robots" content="noindex, nofollow">
66
<% else %>
77
<meta name="robots" content="index, follow">

app/views/shared/_nav.html.erb renamed to app/views/layouts/_nav.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<% if controller_name != 'yard' %>
1+
<% unless ['yard', 'errors'].include?(controller_name) %>
22
<nav class="tabbed-links">
33
<% nav_links.each do |title, link| %>
44
<% if "/#{controller_name}" == link %>

app/views/layouts/application.html.erb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<%= render "shared/meta" %>
4+
<%= render "layouts/meta" %>
55
<%= csrf_meta_tags %>
66
<%= csp_meta_tag %>
77
<%= yield :head %>
@@ -14,7 +14,7 @@
1414
<link rel="stylesheet" href="/assets/css/style.css" type="text/css" media="screen" charset="utf-8" />
1515
<link rel="stylesheet" href="/assets/css/custom.css" type="text/css" media="screen" charset="utf-8" />
1616
<%= javascript_importmap_tags %>
17-
<%= render "shared/analytics" %>
17+
<%= render "layouts/analytics" %>
1818
</head>
1919
<body class="root">
2020
<% if controller_name == "github" && request.referrer.blank? %>
@@ -23,12 +23,12 @@
2323
<% if %w[ featured stdlib gems github ].include?(controller_name) %>
2424
<span data-controller="path-saver" data-path="<%= controller_name %>"></span>
2525
<% end %>
26-
<%= render 'shared/header' %>
26+
<%= render 'layouts/header' %>
2727
<%= turbo_frame_tag "modal" %>
2828
<div id="content">
29-
<%= render 'shared/nav' %>
29+
<%= render 'layouts/nav' %>
3030
<%= yield %>
3131
</div>
32-
<%= render 'shared/footer' %>
32+
<%= render 'layouts/footer' %>
3333
</body>
3434
</html>

app/views/layouts/yard.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title><%= [@title, content_for(:title) || Rubydoc.config.name].compact.join(" – ") %></title>
4+
<title><%= [@title, Rubydoc.config.name].compact.join(" – ") %></title>
55
<%= yield :head %>
66
<% if request.path.starts_with? "/list" %>
77
<link rel="stylesheet" href="/assets/css/full_list.css" type="text/css" media="screen" charset="utf-8" />
@@ -13,7 +13,7 @@
1313
<link rel="stylesheet" href="/assets/css/custom.css" type="text/css" media="screen" charset="utf-8" />
1414
<% end %>
1515
<link rel="stylesheet" href="/assets/css/common.css" type="text/css" media="screen" charset="utf-8" />
16-
<%= render "shared/analytics" %>
16+
<%= render "layouts/analytics" %>
1717
</head>
1818
<body>
1919
<%= yield %>

0 commit comments

Comments
 (0)