Skip to content

Commit 744334e

Browse files
Elle Meredithelle
authored andcommitted
Move application level partials to app/views/application
- which is the Rails convention - this dir is within the lookup paths for template inheritance (see ref) - and means we don't need to explicitly reference the `layouts/` path Ref: https://guides.rubyonrails.org/layouts_and_rendering.html#template-inheritance
1 parent dca66ff commit 744334e

13 files changed

+18
-18
lines changed

app/views/layouts/_head.html.erb renamed to app/views/application/_head.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<meta property="og:site_name" content="Buildkite" />
3636
<meta property="og:locale" content="en_US" />
3737

38-
<%= render 'layouts/analytics', application: 'docs', title: "Docs / #{content_for(:page_title)}", logged_in: probably_authenticated? %>
38+
<%= render 'analytics', application: 'docs', title: "Docs / #{content_for(:page_title)}", logged_in: probably_authenticated? %>
3939

4040
<% if ENV.fetch("ROBOTS_NO_INDEX") { "false" } == "true" %>
4141
<meta name="robots" content="noindex, nofollow">

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<div class="Nav__container PageContainer">
1414
<% nav_data.each_with_index do |children, i| %>
1515
<%=
16-
render 'layouts/nav_children',
16+
render 'nav_children',
1717
children: children,
1818
current_path: current_path,
1919
nav_level: nav_level,

app/views/layouts/_nav_children.html.erb renamed to app/views/application/_nav_children.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<%= 'Nav__item--has-dropdown' if child['type'] == 'dropdown' %>"
1515
>
1616
<%=
17-
render 'layouts/nav_link',
17+
render 'nav_link',
1818
name: child['name'],
1919
path: child['path'],
2020
current_path: current_path,
@@ -28,7 +28,7 @@
2828

2929
<% if child['children'] && nav_level < 5 %>
3030
<%=
31-
render 'layouts/nav_children',
31+
render 'nav_children',
3232
children: child['children'],
3333
current_path: current_path ,
3434
is_dropdown: child['is_dropdown'],

app/views/layouts/_site_header.html.erb renamed to app/views/application/_site_header.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@
2929
</div>
3030
</div>
3131
</div>
32-
<%= render 'layouts/nav', use_nav: use_nav %>
32+
<%= render 'nav', use_nav: use_nav %>
3333
</header>
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
<!DOCTYPE html>
22
<html lang='en'>
33
<head>
4-
<%= render "layouts/head" %>
4+
<%= render "head" %>
55
</head>
66
<body <%= beta? ? 'class=beta' : ''-%>>
7-
<%= render "layouts/site_header" %>
7+
<%= render "site_header" %>
88
<main id="main" role="main">
99
<div class="Docs__page-container StandardWhiteContentPage">
1010
<div class="Docs__page-container__inner PageContainer">
1111
<div class="Docs__article<%= is_landing_page? ? ' Docs__article--is-landing-page' : '' %>">
1212
<div class="column1">
13-
<%= render "layouts/notification" %>
13+
<%= render "notification" %>
1414
<div class="TextContent">
1515
<%= yield %>
1616
</div>
17-
<%= render "layouts/footer", :embed_emojicom => !is_landing_page? %>
17+
<%= render "footer", :embed_emojicom => !is_landing_page? %>
1818
</div>
1919
<div class="column2"></div>
2020
</div>
2121
</div>
2222
</div>
2323
</main>
24-
<%= render "layouts/algolia" %>
24+
<%= render "algolia" %>
2525
<%= javascript_include_tag "nav", nonce: true %>
2626
</body>
2727
</html>

0 commit comments

Comments
 (0)