Pārlūkot izejas kodu

Add Related Content to sidebar

enhancements
budparr pirms 6 gadiem
vecāks
revīzija
ebb7dc3b45
Revīzijas autora e-pasta adrese nav piesaistīta nevienam kontam
1 mainītis faili ar 19 papildinājumiem un 2 dzēšanām
  1. 19
    2
      layouts/partials/menu-contextual.html

+ 19
- 2
layouts/partials/menu-contextual.html Parādīt failu

@@ -1,6 +1,23 @@
{{- if .Params.toc -}}
<div class="bg-light-gray mb-4 pa3 nested-list-reset nested-copy-line-height nested-links">
<p class="list b mb3">What's in this {{ humanize .Type }}</p>
<div class="bg-light-gray pa3 nested-list-reset nested-copy-line-height nested-links">
<p class="f5 b mb3">What's in this {{ humanize .Type }}</p>
{{ .TableOfContents }}
</div>
{{- end -}}

{{ $related := .Site.RegularPages.Related . | first 15 }}

{{ with $related }}
<div class="bg-light-gray pa3 nested-list-reset nested-copy-line-height nested-links">
<p class="f5 b mb3">Related</p>
<ul class="pa0 list">
{{ range . }}
<li class="mb2">
<a href="{{ .RelPermalink }}">
{{- .Title -}}
</a>
</li>
{{ end }}
</ul>
</div>
{{ end }}

Notiek ielāde…
Atcelt
Saglabāt