single.html 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. {{ define "header" }}
  2. {{ partial "header.html" . }}
  3. {{ end }}
  4. {{ define "main" }}
  5. <main id="site-main" class="wrapper">
  6. <article>
  7. <header class="post-header">
  8. <div class="title-area">
  9. <a id="home-btn" title="{{.Site.Title}}" href="{{"" | relURL}}"><img src="/apple-touch-icon.png" width="180" height="180" alt="Logo"></a>
  10. <div class="title-area-l">
  11. <h1 id="page-title">{{ .Title }}</h1>
  12. </div>
  13. </div>
  14. </header>
  15. <div class="album-meta sidebar">
  16. {{ with .Params.location -}}
  17. <p><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-map-pin"><path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path><circle cx="12" cy="10" r="3"></circle></svg><b>{{ . }}</b></p>
  18. {{ end -}}
  19. <p>on {{time.Format .Site.Params.dateform .Params.shot_date}}</p>
  20. {{ with .Params.shot_with -}}
  21. <p>with {{ . }}</p>
  22. {{ end -}}
  23. {{ with .Params.description -}}
  24. <p class="album-desc">{{ . }}</p>
  25. {{ end -}}
  26. </div>
  27. <div class="content">
  28. {{ .Content }}
  29. </div>
  30. </article>
  31. <div class="post-nav">
  32. {{ $list := (where site.RegularPages "Type" "in" "gallery") }}
  33. {{- with ($list.ByParam "shot_date").Reverse.Next . }}
  34. <a class="next-post" href="{{ .RelPermalink }}">
  35. <span class="post-nav-label"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-left"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg>&nbsp;Newer</span><br><span>{{ .Title }}</span>
  36. </a>
  37. {{- end }}
  38. {{- with ($list.ByParam "shot_date").Reverse.Prev . }}
  39. <a class="prev-post" href="{{ .RelPermalink }}">
  40. <span class="post-nav-label">Older&nbsp;<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-right"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg></span><br><span>{{ .Title }}</span>
  41. </a>
  42. {{- end }}
  43. </div>
  44. <button type="button" id="scroll-top-btn" title="回到顶部"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up-circle"><circle cx="12" cy="12" r="10"></circle><polyline points="16 12 12 8 8 12"></polyline><line x1="12" y1="16" x2="12" y2="8"></line></svg></button>
  45. {{ partialCached "comments.html" . }}
  46. </main>
  47. {{ end }}
  48. {{ define "footer" }}
  49. {{ partialCached "footer.html" . }}
  50. {{ end }}