1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
<%% @anchor_name = <%=opt['anchor'] || false%> %>
<div class="day autopagerize_page_element">
<h2><%%= title_proc( Time::at( <%=@date.to_i%> ), <%= title.dump.gsub( /%/, '\\\\045' ) %> ) %></h2>
<div class="body">
<%%= body_enter_proc( Time::at( <%=@date.to_i%> ) ) %>
<%= to_html( opt ) %>
<%%= body_leave_proc( Time::at( <%=@date.to_i%> ) ) %>
</div>
<div class="comment">
<%
if opt['show_comment'] and count_comments > 0 then
if opt['long_mode'] then %>
<div class="caption"><%%=comment_today%><%%=comment_total( <%=count_comments%> )%> [<a name="c00" href="<%=h opt['index'] %><%%=anchor "<%= @date.strftime( '%Y%m%d' ) %>#c" %>"><%%=comment_new%></a>]</div>
<div class="commentbody"><%
each_visible_comment( opt['comment_limit'] ) do |comment,idx|
if comment.visible? %>
<div class="commentator">
<a <% if opt['anchor'] then %>name="c<%= '%02d' % idx %>" <% end %>href="<%=h opt['index'] %><%%=anchor "<%= @date.strftime( '%Y%m%d' ) %>#c<%= '%02d' % idx %>" %>"><%= opt['comment_anchor'] %></a>
<span class="commentator"><%=h comment.name %></span>
<span class="commenttime"><%%=comment_date( Time::at( <%=comment.date.to_i%> ) )%></span>
</div>
<p><% if opt['bot'] then %>
<%=h comment.body.gsub( /\n/ , "<br>" ).gsub( /<br><br>\Z/, '' ) %>
<% else %>
<%= comment.body.make_link.emojify.gsub( /\n/ , "<br>" ).gsub( /<br><br>\Z/, '' ) %>
<% end %></p><%
end
end %>
</div><%
else %>
<div class="caption"><%%=comment_today%><%%=comment_total( <%=count_comments%> )%> [<a href="<%=h opt['index'] %><%%=anchor "<%= @date.strftime( '%Y%m%d' ) %>#c" %>"><%%=comment_new%></a>]</div>
<div class="commentshort"><%
if count_comments > opt['comment_limit'] then %>
<p><a href="<%=h opt['index'] %><%%=anchor "<%= @date.strftime( '%Y%m%d' ) %>#c00" %>">Before...</a></p><%
end
each_comment_tail( opt['comment_limit'] ) do |comment,idx|
if comment.visible? %>
<p><a href="<%=h opt['index'] %><%%=anchor "<%= @date.strftime( '%Y%m%d' ) %>#c<%= '%02d' % idx %>" %>"><%= opt['comment_anchor'] %></a>
<span class="commentator"><%=h comment.name %></span> [<%=h(comment.shorten( opt['comment_length'] )).emojify %>]</p><%
end
end %>
</div><%
end
elsif !opt['hide_comment_form'] %>
<div class="caption">[<a href="<%=h opt['index'] %><%%=anchor "<%= @date.strftime( '%Y%m%d' ) %>#c" %>"><%%=comment_new%></a>]</div><%
end %>
</div>
<%% if @mode == 'day' %><div id="comment-form-section"><%%=comment_form%></div><%% 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 %>
<div class="refererlist">
<%%= referer_of_today_long( @diaries['<%=@date.strftime( '%Y%m%d' )%>'], <%=opt['referer_limit']%> )%>
</div><%
else %>
<div class="referer">
<%%=referer_of_today_short( @diaries['<%=@date.strftime( '%Y%m%d' )%>'], <%=opt['referer_limit']%> )%>
</div><%
end
end %>
</div>
|