Add cloud.html

master
Will Faught 2 years ago
parent 5d0c865ace
commit 05e84c46d5

@ -315,6 +315,16 @@ paige:
## Layouts
### Cloud
The `paige/cloud` layout provides a link cloud for sub-pages.
Example `content/tags/_index.md`:
```yaml
layout: "paige/cloud"
```
### Home
The `paige/home` layout provides a home page.

@ -1,4 +1,5 @@
---
description: "Browse by category."
layout: "paige/cloud"
title: "Categories"
---

@ -1,4 +1,5 @@
---
description: "Browse by tag."
layout: "paige/cloud"
title: "Tags"
---

@ -0,0 +1,17 @@
{{ define "main" }}
{{ $page := . }}
{{ partial "paige/article.html" $page }}
{{ with $page.Pages }}
<div id="paige-pages">
<ul class="list-inline text-center">
{{ range (sort . "Title") }}
<li class="list-inline-item">
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
</li>
{{ end }}
</ul>
</div>
{{ end }}
{{ end }}

@ -2,20 +2,5 @@
{{ $page := . }}
{{ partial "paige/article.html" $page }}
{{ if or (eq $page.RelPermalink "/categories/") (eq $page.RelPermalink "/tags/") }}
{{ if $page.Pages }}
<div id="paige-pages">
<ul class="list-inline text-center">
{{ range (sort $page.Pages "Title") }}
<li class="list-inline-item">
<a href="{{ .RelPermalink }}">{{ .Title | markdownify }}</a>
</li>
{{ end }}
</ul>
</div>
{{ end }}
{{ else }}
{{ partial "paige/pages.html" $page }}
{{ end }}
{{ partial "paige/pages.html" $page }}
{{ end }}

Loading…
Cancel
Save