Add cloud.html
This commit is contained in:
10
README.md
10
README.md
@@ -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"
|
||||
---
|
||||
|
17
layouts/_default/paige/cloud.html
Normal file
17
layouts/_default/paige/cloud.html
Normal file
@@ -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 }}
|
||||
|
Reference in New Issue
Block a user