mirror of
https://git.adityakumar.xyz/hugo-theme-introduction.git
synced 2024-11-15 01:19:44 +00:00
997c707d5b
+ Add functionality to limit projects shown on main page + Improve projects display columns + List pages show content from _index.md files + Add GetPage logic to index.html and nav menus
33 lines
1.2 KiB
HTML
33 lines
1.2 KiB
HTML
<div class="container"><!-- Begin Blog container -->
|
|
|
|
{{ if .Site.Params.showLatest }}
|
|
<h2 class="title is-2 has-text-centered">Latest Post</h2>
|
|
{{ range first 1 (where .Data.Pages.ByPublishDate.Reverse "Section" "blog") }}
|
|
<div class="summary">{{ .Date.Format (.Site.Params.dateForm | default "Jan 02, 2006") }}
|
|
<h3 class="title is-3 latest-post-title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h3>
|
|
<div class="markdown">
|
|
{{ .Summary }}
|
|
{{ if .Truncated }}
|
|
<a href="{{ .RelPermalink }}">...Read More</a>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|
|
{{ end }}
|
|
{{ end }}
|
|
|
|
{{ if .Site.Params.showAllPosts }}
|
|
<h2 class="title is-2 has-text-centered top-pad">All Posts</h2>
|
|
<ul>
|
|
{{ range .Data.Pages.ByPublishDate }}
|
|
{{ if eq .Section "blog" }}
|
|
{{ partial "li.html" . }}
|
|
{{ end }}
|
|
{{ end }}
|
|
</ul>
|
|
{{ else }}
|
|
<div class="container has-text-centered top-pad"><a href="{{ "/blog" | relURL }}">ALL BLOG POSTS</a></div>
|
|
{{ end }}
|
|
|
|
</div><!-- End Blog container -->
|
|
|
|
<div class="container has-text-centered top-pad"><a href="#top"><i class="fa fa-arrow-up"></i></a></div>
|