blog

Log | Files | Refs

single.html (2284B)


      1 {{- define "main" }}
      2 
      3 <article class="post-single">
      4   <header class="post-header">
      5     {{ partial "breadcrumbs.html" . }}
      6     <h1 class="post-title entry-hint-parent">
      7       {{ .Title }}
      8       {{- if .Draft }}
      9       <span class="entry-hint" title="Draft">
     10         <svg xmlns="http://www.w3.org/2000/svg" height="35" viewBox="0 -960 960 960" fill="currentColor">
     11           <path
     12             d="M160-410v-60h300v60H160Zm0-165v-60h470v60H160Zm0-165v-60h470v60H160Zm360 580v-123l221-220q9-9 20-13t22-4q12 0 23 4.5t20 13.5l37 37q9 9 13 20t4 22q0 11-4.5 22.5T862.09-380L643-160H520Zm300-263-37-37 37 37ZM580-220h38l121-122-18-19-19-18-122 121v38Zm141-141-19-18 37 37-18-19Z" />
     13         </svg>
     14       </span>
     15       {{- end }}
     16     </h1>
     17     {{- if .Description }}
     18     <div class="post-description">
     19       {{ .Description }}
     20     </div>
     21     {{- end }}
     22     {{- if not (.Param "hideMeta") }}
     23     <div class="post-meta">
     24       {{- partial "post_meta.html" . -}}
     25       {{- partial "translation_list.html" . -}}
     26       {{- partial "edit_post.html" . -}}
     27       {{- partial "post_canonical.html" . -}}
     28     </div>
     29     {{- end }}
     30   </header>
     31   {{- $isHidden := (.Param "cover.hiddenInSingle") | default (.Param "cover.hidden") | default false }}
     32   {{- partial "cover.html" (dict "cxt" . "IsSingle" true "isHidden" $isHidden) }}
     33   {{- if (.Param "ShowToc") }}
     34   {{- partial "toc.html" . }}
     35   {{- end }}
     36 
     37   {{- if .Content }}
     38   <div class="post-content md-content">
     39     {{- if not (.Param "disableAnchoredHeadings") }}
     40     {{- partial "anchored_headings.html" .Content -}}
     41     {{- else }}{{ .Content }}{{ end }}
     42   </div>
     43   {{- end }}
     44 
     45   {{- partial "extend_post_content.html" . }}
     46 
     47   <footer class="post-footer">
     48     {{- $tags := .Language.Params.Taxonomies.tag | default "tags" }}
     49     <ul class="post-tags">
     50       {{- range ($.GetTerms $tags) }}
     51       <li><a href="{{ .Permalink }}">{{ .LinkTitle }}</a></li>
     52       {{- end }}
     53     </ul>
     54     {{- if (.Param "ShowPostNavLinks") }}
     55     {{- partial "post_nav_links.html" . }}
     56     {{- end }}
     57     {{- if (and site.Params.ShowShareButtons (ne .Params.disableShare true)) }}
     58     {{- partial "share_icons.html" . -}}
     59     {{- end }}
     60   </footer>
     61 
     62   {{- if (.Param "comments") }}
     63   {{- partial "comments.html" . }}
     64   {{- end }}
     65 </article>
     66 
     67 {{- end }}{{/* end main */}}