mirror of
https://github.com/hyzendust/hyzendust.github.io.git
synced 2026-04-15 21:28:32 +02:00
Remove: empty contacts folder
This commit is contained in:
13
layouts/services/section.html
Normal file
13
layouts/services/section.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{{ define "main" }}
|
||||
{{ $pages := .Pages.ByTitle }}
|
||||
{{ $sectionPagerSize := or site.Params.sectionPagerSize 10 }}
|
||||
{{ $paginator := .Paginate $pages $sectionPagerSize }}
|
||||
{{ .Content }}
|
||||
<h1>Services</h1>
|
||||
{{ range $index, $page := $paginator.Pages }}
|
||||
<h2 class="home-post-title">{{ add $index 1 }}. <a href="{{ $page.RelPermalink }}">{{ $page.LinkTitle }}</a></h2>
|
||||
{{ end }}
|
||||
<nav class="paginator">
|
||||
{{- partial "pagination.html" . }} {{/* embedded template */}}
|
||||
</nav>
|
||||
{{ end }}
|
||||
29
layouts/services/single.html
Normal file
29
layouts/services/single.html
Normal file
@@ -0,0 +1,29 @@
|
||||
{{ define "main" }}
|
||||
|
||||
{{ .Content }}
|
||||
|
||||
{{ $currentTitle := .Title }}
|
||||
{{ $allPages := .Section | .Site.GetPage }}
|
||||
{{ $sortedPages := $allPages.Pages.ByTitle }}
|
||||
{{ $currentIndex := 0 }}
|
||||
|
||||
{{ range $index, $page := $sortedPages }}
|
||||
{{ if eq $page.Title $currentTitle }}
|
||||
{{ $currentIndex = $index }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ if gt (len $sortedPages) 1 }}
|
||||
<nav class="page-nav">
|
||||
{{ if gt $currentIndex 0 }}
|
||||
{{ $prevPage := index $sortedPages (sub $currentIndex 1) }}
|
||||
<a href="{{ $prevPage.RelPermalink }}">{{ i18n "previousPage" }}{{ $prevPage.LinkTitle }}</a>
|
||||
{{ end }}
|
||||
{{ if lt $currentIndex (sub (len $sortedPages) 1) }}
|
||||
{{ $nextPage := index $sortedPages (add $currentIndex 1) }}
|
||||
<a href="{{ $nextPage.RelPermalink }}">{{ i18n "nextPage" }}{{ $nextPage.LinkTitle }}</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user