]> git.za3k.com Git - blog.git/commitdiff
Hide comments section if there are none
authorZachary Vance <za3k@za3k.com>
Fri, 12 Jul 2024 01:17:40 +0000 (21:17 -0400)
committerZachary Vance <za3k@za3k.com>
Fri, 12 Jul 2024 01:17:40 +0000 (21:17 -0400)
templates/post.mustache.html

index 22866843ebd8c4bd5fb54c1c5719f9b55b8ff782..25216338efd3b197fb80b8f20abc9f5a962bdf30 100644 (file)
@@ -1,6 +1,10 @@
 <article class="post type-post status-publish format-standard hentry">
 
-<h1 class="entry-title">{{title}}</h1>
+<h1 class="entry-title">
+{{^main_display}}<a href="{{url}}" title="Permalink to {{title}}" rel="bookmark">{{/main_display}}
+{{title}}
+{{^main_display}}</a>{{/main_display}}
+</h1>
 
 <div class="entry-meta">
 <span class="author vcard"> By  <a class="url fn n" href="{{web_root}}/author/{{author.slug}}.html" rel="author" title="View all posts by {{author.tag}}">{{author.tag}}</a> <span class="bl_sep">|</span></span> <time class="onDate date published" datetime="{{date}}"> <a href="{{url}}" rel="bookmark" title="{{time}}"><span class="entry-date">{{day}}</span> <span class="entry-time"> - {{time}}</span></a> </time><span class="bl_sep">|</span><time class="updated" datetime="{{date}}">{{day}}</time> 
 </div>
 
 {{#main_display}}
+{{#comments}}
 <div id="comments">
     <h3 id="comments-title">Responses to <em>{{title}}</em></h3>
     {{& comments }}
 </div>
+{{/comments}}
 {{/main_display}}
 
 </article>