Hide paper title when no title.

This commit is contained in:
邱博亞 2024-09-11 08:21:27 +08:00
parent 5b5ea57582
commit cfa596a3e7
1 changed files with 17 additions and 13 deletions

View File

@ -177,6 +177,7 @@
<img src="<%= img_src %>" alt="<%= paper.title %>" title="<%= paper.title %>" /> <img src="<%= img_src %>" alt="<%= paper.title %>" title="<%= paper.title %>" />
<% end %> <% end %>
<div class="ep-info"> <div class="ep-info">
<% if paper.title.present? %>
<div class="ep-info-title"> <div class="ep-info-title">
<span class="field-head"> <span class="field-head">
<%= t('e_paper.title') %> <%= t('e_paper.title') %>
@ -185,6 +186,7 @@
<a class="ep-content-title" href="<%= page + "/" + paper.to_param + "?method=topics" %>" target="_blank"><span><%= paper.title %></span></a> <a class="ep-content-title" href="<%= page + "/" + paper.to_param + "?method=topics" %>" target="_blank"><span><%= paper.title %></span></a>
</h3> </h3>
</div> </div>
<% end %>
<div class="ep-info-description"> <div class="ep-info-description">
<span class="field-head"> <span class="field-head">
<%= t('e_paper.description') %> <%= t('e_paper.description') %>
@ -220,11 +222,13 @@
<img src="<%= img_src %>" alt="<%= paper.title %>" title="<%= paper.title %>" /> <img src="<%= img_src %>" alt="<%= paper.title %>" title="<%= paper.title %>" />
<% end %> <% end %>
<div class="ep-info"> <div class="ep-info">
<% if paper.title.present? %>
<div class="ep-info-title"> <div class="ep-info-title">
<h3 class="epaper-show-title"> <h3 class="epaper-show-title">
<a class="ep-content-title" href="<%= page + "/" + paper.to_param + "?method=topics" %>" target="_blank"><span><%= paper.title %></span></a> <a class="ep-content-title" href="<%= page + "/" + paper.to_param + "?method=topics" %>" target="_blank"><span><%= paper.title %></span></a>
</h3> </h3>
</div> </div>
<% end %>
<div class="ep-info-description"> <div class="ep-info-description">
<%= paper.content.html_safe %> <%= paper.content.html_safe %>
</div> </div>