list.html 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. {{/* Author profile page. */}}
  2. {{ partial "header.html" . }}
  3. {{ partial "navbar.html" . }}
  4. {{/* If an account has not been created for this user, just display their name as the title. */}}
  5. {{ if not .File }}
  6. <div class="universal-wrapper pt-3">
  7. <h1 itemprop="name">{{ .Title }}</h1>
  8. </div>
  9. {{ end }}
  10. <section id="profile-page" class="pt-5">
  11. <div class="container">
  12. {{/* Show the About widget if an account exists for this user. */}}
  13. {{ if .File }}
  14. {{ $widget := "widgets/about.html" }}
  15. {{ $slug := delimit (last 1 (split (trim .File.Dir "/") "/")) "" }}{{/* Alternatively, use `index .Params.authors 0` */}}
  16. {{ $params := dict "root" $ "page" . "author" $slug }}
  17. {{ partial $widget $params }}
  18. {{end}}
  19. {{ $query := where .Pages ".IsNode" false }}
  20. {{ $count := len $query }}
  21. {{ if $count }}
  22. <div class="article-widget">
  23. <div class="hr-light"></div>
  24. <h3>{{ i18n "user_profile_latest" | default "Latest" }}</h3>
  25. <ul>
  26. {{ range $query }}
  27. <li>
  28. <a href="{{ .RelPermalink }}">{{ .Title }}</a>
  29. </li>
  30. {{ end }}
  31. </ul>
  32. </div>
  33. </div>
  34. {{ end }}
  35. </section>
  36. {{ partial "footer_container.html" . }}
  37. {{ partial "footer.html" . }}