index.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. {{ define "head" }}
  2. {{ if .Site.Params.bgImg -}}
  3. <style>:root{ --bg-img: url({{.Site.Params.bgImg | relURL}});}</style>
  4. {{- end -}}
  5. {{.Scratch.Set "pageClass" "home"}}
  6. {{ end }}
  7. {{ define "main" }}
  8. <div id="home-center">
  9. <h1 id="home-title">{{.Site.Title}}</h1>
  10. {{- with .Site.Params.social }}
  11. <div id="home-social">
  12. {{ partialCached "social-icons.html" . }}
  13. </div>
  14. {{- end }}
  15. <nav id="home-nav">
  16. {{- range .Site.Menus.main }}
  17. <a href="{{ .URL }}">{{ .Name }}</a>
  18. {{- end }}
  19. </nav>
  20. <div id="recent-posts">
  21. <div>Recent Posts</div>
  22. <ul class="recent-posts-list">
  23. {{ range first 3 (where site.RegularPages "Type" "in" "writing") -}}
  24. <li>
  25. <span>{{ .Date.Format .Site.Params.dateformNum }} </span>
  26. <a href="{{.RelPermalink}}">{{.Title}}</a>
  27. </li>
  28. {{ end }}
  29. </ul>
  30. </div>
  31. <div id="home-footer">
  32. <p>
  33. &copy; {{ now.Format "2006" }} <a href="{{ .Site.BaseURL }}">{{ .Site.Author.name }}</a>
  34. {{- with (not (in .Site.Params.disableKinds "RSS")) }} &#183; <a href="{{ "writing/index.xml" | absURL }}" target="_blank" title="rss"><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-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg></a>{{ end -}}
  35. &nbsp;&#183; <a href="https://xn--sr8hvo.ws/%F0%9F%90%A3%F0%9F%8E%91%F0%9F%8D%A5/previous">←</a> 🕸💍 <a href="https://xn--sr8hvo.ws/%F0%9F%90%A3%F0%9F%8E%91%F0%9F%8D%A5/next">→</a>
  36. </p>
  37. </div>
  38. </div>
  39. {{ end }}