goldsmith/plugins/breadcrumbs/testdata/source/template.gohtml

27 lines
896 B
Plaintext
Raw Permalink Normal View History

2024-02-17 06:35:49 +00:00
{{define "page"}}
<html>
<body>
<h1>{{.Props.CrumbName}}</h1>
<ul>
<li><a href="child_1.html">Child 1</a></li>
<li><a href="child_2.html">Child 2</a></li>
<li><a href="child_3.html">Child 3</a></li>
<li><a href="child_4.html">Child 4</a></li>
<li><a href="parent_1.html">Parent 1</a></li>
<li><a href="parent_2.html">Parent 2</a></li>
<li><a href="root_1.html">Root 1</a></li>
<li><a href="root_2.html">Root 2</a></li>
</ul>
{{if .Props.CrumbParent}}
<div>
{{range .Props.Crumbs.Ancestors}}
<a href="{{.File.Path}}" class="breadcrumb-item">{{.File.Props.CrumbName}}</a> &gt;
{{end}}
<span class="breadcrumb-item active">{{.Props.CrumbName}}</span>
</div>
{{end}}
</body>
</html>
{{end}}