<%% @anchor_name = <%=opt['anchor'] || false%> %>

<%%= title_proc( Time::at( <%=@date.to_i%> ), <%= title.dump.gsub( /%/, '\\\\045' ) %> ) %>

<%%= body_enter_proc( Time::at( <%=@date.to_i%> ) ) %> <%= to_html( opt ) %> <%%= body_leave_proc( Time::at( <%=@date.to_i%> ) ) %>
<% if opt['show_comment'] and count_comments > 0 then if opt['long_mode'] then %>
<%%=comment_today%><%%=comment_total( <%=count_comments%> )%> [#c" %>"><%%=comment_new%>]
<% each_visible_comment( opt['comment_limit'] ) do |comment,idx| if comment.visible? %>

<% if opt['bot'] then %> <%=h comment.body.gsub( /\n/ , "
" ).gsub( /

\Z/, '' ) %> <% else %> <%= comment.body.make_link.emojify.gsub( /\n/ , "
" ).gsub( /

\Z/, '' ) %> <% end %>

<% end end %>
<% else %>
<%%=comment_today%><%%=comment_total( <%=count_comments%> )%> [#c" %>"><%%=comment_new%>]
<% if count_comments > opt['comment_limit'] then %>

#c00" %>">Before...

<% end each_comment_tail( opt['comment_limit'] ) do |comment,idx| if comment.visible? %>

#c<%= '%02d' % idx %>" %>"><%= opt['comment_anchor'] %> <%=h comment.name %> [<%=h(comment.shorten( opt['comment_length'] )).emojify %>]

<% end end %>
<% end elsif !opt['hide_comment_form'] %> <% end %>
<%% if @mode == 'day' %>
<%%=comment_form%>
<%% end %> <%%= comment_leave_proc( Time::at( <%=@date.to_i%> ) ) %> <%% unless @plugin_files.grep(/tb-show.rb\z/).empty? then %><% if opt['long_mode'] then %><%%= trackbacks_of_today_long( @diaries["<%= @date.strftime( '%Y%m%d' ) %>"] ) %><% else %><%%= trackbacks_of_today_short( @diaries["<%= @date.strftime( '%Y%m%d' ) %>"] ) %><% end %><%% end %> <%% unless @plugin_files.grep(/pb-show.rb\z/).empty? then %><% if opt['long_mode'] then %><%%= pingbacks_of_today_long( @diaries["<%= @date.strftime( '%Y%m%d' ) %>"] ) %><% else %><%%= pingbacks_of_today_short( @diaries["<%= @date.strftime( '%Y%m%d' ) %>"] ) %><% end %><%% end %> <% if opt['show_referer'] then if opt['long_mode'] then %>
<%%= referer_of_today_long( @diaries['<%=@date.strftime( '%Y%m%d' )%>'], <%=opt['referer_limit']%> )%>
<% else %>
<%%=referer_of_today_short( @diaries['<%=@date.strftime( '%Y%m%d' )%>'], <%=opt['referer_limit']%> )%>
<% end end %>