single.html 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. {{ define "header" }}
  2. {{ partialCached "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="{{.Site.BaseURL}}"><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. <div class="album-meta">
  15. {{ with .Params.location -}}
  16. <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>{{ . }}</p>
  17. {{ end -}}
  18. <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-calendar"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect><line x1="16" y1="2" x2="16" y2="6"></line><line x1="8" y1="2" x2="8" y2="6"></line><line x1="3" y1="10" x2="21" y2="10"></line></svg>{{ dateFormat .Site.Params.dateform .Date }}</p>
  19. {{ with .Params.shot_on -}}
  20. <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-camera"><path d="M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z"></path><circle cx="12" cy="13" r="4"></circle></svg>{{ . }}</p>
  21. {{ end -}}
  22. {{ with .Params.description -}}
  23. <p class="album-desc">{{ . }}</p>
  24. {{ end -}}
  25. </div>
  26. </header>
  27. <div class="content">
  28. {{ .Content }}
  29. </div>
  30. </article>
  31. <div class="post-nav">
  32. {{- with .NextInSection }}
  33. <a class="next-post" href="{{ .Permalink }}">
  34. <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>
  35. </a>
  36. {{- end }}
  37. {{- with .PrevInSection }}
  38. <a class="prev-post" href="{{ .Permalink }}">
  39. <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>
  40. </a>
  41. {{- end }}
  42. </div>
  43. <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>
  44. {{ partialCached "comments.html" . }}
  45. </main>
  46. {{ end }}
  47. {{ define "footer" }}
  48. {{ partialCached "footer.html" . }}
  49. {{ end }}