Skip to content

Commit 658d07d

Browse files
titles in ToC
1 parent 55701da commit 658d07d

File tree

6 files changed

+16
-1
lines changed

6 files changed

+16
-1
lines changed

app/views/layouts/application.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
gtag('config', '<%= setting(:google_analytics) %>');
1212
</script>
1313

14-
<title><%= setting(:name) %></title>
14+
<title><% if content_for(:title) %><%= yield :title %> - <%= setting(:name) %><% else %><%= setting(:name) %><% end %></title>
1515
<%= stylesheet_link_tag 'application', media: 'all' %>
1616
<%= javascript_importmap_tags %>
1717
<meta name="viewport" content="width=device-width, initial-scale=1">

app/views/toc/current_issue.html.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
<% content_for :title do %>
2+
Current Issue
3+
<% end %>
14
<div class="container" id="toc-header">
25
<div class="welcome"><%= link_to "Table of Contents", toc_index_path %> Current issue</div>
36
<div class="hero-small">

app/views/toc/index.html.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
<% content_for :title do %>
2+
Table of Contents
3+
<% end %>
14
<div class="container" id="toc-header">
25
<div class="welcome">All volumes and issues</div>
36
<div class="hero-small">

app/views/toc/issue.html.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
<% content_for :title do %>
2+
Issue <%= params[:issue] %>
3+
<% end %>
14
<div class="container" id="toc-header">
25
<div class="welcome"><%= link_to "Table of Contents", toc_index_path %> <%= Date::MONTHNAMES[@month] %> <%= @year %> Volume <%= @volume %></div>
36
<div class="hero-small">

app/views/toc/volume.html.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
<% content_for :title do %>
2+
Volume <%= params[:volume] %>
3+
<% end %>
14
<div class="container" id="toc-header">
25
<div class="welcome"><%= link_to "Table of Contents", toc_index_path %> <%= "Year " + @year.to_s if @year %></div>
36
<div class="hero-small">

app/views/toc/year.html.erb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
<% content_for :title do %>
2+
<%= params[:year] %>
3+
<% end %>
14
<div class="container" id="toc-header">
25
<div class="welcome"><%= link_to "Table of Contents", toc_index_path %></div>
36
<div class="hero-small">

0 commit comments

Comments
 (0)