Skip to content

Commit

Permalink
Fix tags WITHIN docdock
Browse files Browse the repository at this point in the history
  • Loading branch information
laakmann committed Oct 16, 2017
1 parent c7746c8 commit 55c832f
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 4 deletions.
10 changes: 7 additions & 3 deletions layouts/_default/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,23 @@


{{if not .Content }}
{{ $paginator := .Paginator }}

{{ $paginator := .Paginator }}
<div class="extra-pagination inner">
{{ partial "pagination.html" $paginator }}
</div>

{{ range $index, $page := $paginator.Pages }}
{{ .Render "li" }}
{{ range $paginator.Pages }}
{{/* note: rendering li (identical code and name) with partial instead of full template */}}
{{ partial "li" . }}
{{ end }}

<div style="margin-bottom:2rem"></div>

{{ partial "pagination.html" $paginator }}

<div><a href="/tags">List of all tags</a></div>

{{end}}

{{ partial "footer.html" . }}
20 changes: 20 additions & 0 deletions layouts/_default/terms.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{{ partial "header.html" . }}



<ul class="container content">
{{ $data := .Data }}
{{ range $key,$value := .Data.Terms.ByCount }}
<li>
<a href="{{ (print $data.Plural "/" ($value.Name | urlize) "/") | relURL }}">
{{ $value.Name }}
</a>
<strong>
{{ $value.Count }}
</strong>
</li>
{{ end }}
</ul>


{{ partial "footer.html" . }}
6 changes: 5 additions & 1 deletion layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@
{{end}}
<div id="body-inner">
{{if not .IsHome}}
<h1>{{.Title}}</h1>
{{if .Content }}
<h1>{{.Title}}</h1>
{{ else }}
<h1><b>{{.Data.Singular}}:</b> {{.Title}}</h1>
{{ end }}
{{end}}

{{define "breadcrumb"}}
Expand Down
22 changes: 22 additions & 0 deletions layouts/partials/li.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<article class="post {{ .Section }}">
<header class="post-header">
<h2 class="post-title"><a href="{{ .RelPermalink }}">{{ .Title }}</a></h2>
</header>
<section class="post-excerpt">
<p>{{ .Summary }} <a class="read-more" href="{{.RelPermalink}}">&raquo;</a></p>
</section>
<footer class=" footline" >

{{with .Params.LastModifierDisplayName}}
<i class='fa fa-user'></i> <a href="mailto:{{ $.Params.LastModifierEmail }}">{{ . }}</a> {{with $.Date}} <i class='fa fa-calendar'></i> {{ .Format "02/01/2006" }}{{end}}
{{end}}


{{if .Params.tags }}
{{ range $index, $tag := .Params.tags }}
<a class="label label-default" href="{{$.Site.BaseURL}}tags/{{ $tag | urlize }}/">{{ $tag }}</a>
{{ end }}
{{end}}

</footer>
</article>

0 comments on commit 55c832f

Please sign in to comment.