diff options
author | Urja Acharya <urja.acharya@huskers.unl.edu> | 2020-05-23 23:44:46 +0300 |
---|---|---|
committer | Urja Acharya <urja.acharya@huskers.unl.edu> | 2020-05-23 23:44:46 +0300 |
commit | e85caeeda5220ab7a7595e9734419f8c1de56e86 (patch) | |
tree | c5088e58b76113dea19542054300cdfd42599184 /layouts/index.html |
Initial Commit
Diffstat (limited to 'layouts/index.html')
-rw-r--r-- | layouts/index.html | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..696613d --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,41 @@ +{{ define "main" }} +{{ range ((where .Site.Pages "Params.pinned" true).ByDate.Reverse) | first 1 }} +<h3> + <a href="{{ .Permalink }}" aria-label="site title">{{ .Title }}</a> +</h3> +<div class="pinned-post home-page-card"> + <p>{{ .Summary | plainify | truncate 250 }}</p> + <div class="home-page-card-links"> + <a href="{{ .Permalink }}" aria-label="click to read the pinned post"> + Read More + </a> + </div> + <div class="home-page-card-links"> + <a href="{{ `pinnedposts` | relURL }}">All Pinned</a> + </div> +</div> +{{ end }} + +<h3>Recent Posts</h3> +<div class="recent-posts home-page-card"> + {{ range ((where .Site.Pages "Kind" "page").ByDate.Reverse) | first 6 }} + {{ partial "listPage" . }} + {{ end }} + <div class="home-page-card-links"> + <a href="{{ `archive` | relURL }}" aria-label="link to all posts" + >All Posts</a + > + </div> +</div> + +<h3>Sections</h3> +<div class="site-sections home-page-card"> + {{ range .Site.Sections }} + {{ if not .Params.hideFromHome }} + <p> + <a href="{{ .Permalink }}" aria-label="site sections">{{ .Title }}</a> - {{ len .Pages}} Articles + </p> + {{ end }} {{ end }} +</div> +{{ partial "taxa" (dict "taxo" .Site.Taxonomies "mysite" .) }} +{{ end }} |