Welcome to mirror list, hosted at ThFree Co, Russian Federation.

body-article-content.html « partials « layouts - github.com/vjeantet/hugo-theme-docport.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7385db55d5d6767ee17f769eac6cf447fdcee546 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{{if not .IsHome}}
	    <!-- FIL D'ARIANE -->
	    {{if not .Params.layout }}
	    <nav id="breadcrumb" aria-label="breadcrumb">
	      <ol class="breadcrumb">
	        {{ template "breadcrumbnav" (dict "p1" . "p2" .) }}
	      </ol>
	    </nav>
	    {{end}}
	    <!-- FIN FIL D'ARIANE -->

		{{if not .Params.layout }}	
			{{$pagetitle := .Title}}
	        {{if eq $pagetitle ""}}{{$pagetitle = .File.BaseFileName}}{{end}}
			<h1>{{.Section}}
				{{if .IsPage }}<span>{{$pagetitle}}</span>{{end}}
			</h1>
			{{ if gt (len .CurrentSection.Pages) 0}}
				{{- $cPage := . }}
				<nav class="subpages">
			 	{{- range .CurrentSection.Pages.ByWeight }}
		            {{- if not .Params.hidden }}
	            		{{- if eq .Kind "page" }}
	            		{{$pagetitle := .Title}}
	        			{{if eq $pagetitle ""}}{{$pagetitle = .File.BaseFileName}}{{end}}
	            	<li {{if eq . $cPage}}class="active"{{- end}}>
	            		<a title="$pagetitle" href="{{ .RelPermalink}}">{{safeHTML .Params.Pre}}{{$pagetitle}}{{safeHTML .Params.Post}}</a>
	            	</li>
	            		{{- end}}
		            {{- end}}
	        	{{- end}}
	        	</nav>
			{{end}}
		{{else}}
			<h1>{{.Title}}</h1>
		{{end}}
{{end}}
		<div class="content">
	    {{- with .Content -}}
	      {{ . | replaceRE "(<h[1-9]) id=\"([^\"]+)\"(.+)(</h[1-9]+>)" `${1}${3}${4}<a class="anchor" id="${2}"></a>` | safeHTML }}
	    {{- else -}}
	      {{with index .Pages 0}}
	      <meta http-equiv = "refresh" content = "0; url = {{.RelPermalink}}"/>
	      {{- else -}}
	      	No content
	      {{- end -}}
	    {{- end -}}
		</div>

		
		<div class="chevrons {{.Params.layout}}">
			{{ partial "_next-prev-page.html" .CurrentSection }}
		</div>

	

	

{{ define "breadcrumbnav" }}
  {{ if .p1.Parent }}
    {{ template "breadcrumbnav" (dict "p1" .p1.Parent "p2" .p2 )  }}
  {{ else if not .p1.IsHome }}
    {{ template "breadcrumbnav" (dict "p1" .p1.Site.Home "p2" .p2 )  }}
  {{ end }}
    <li class="breadcrumb-item {{ if eq .p1 .p2 }}active{{ end }}">
      {{ if ne .p1 .p2 }}<a class="text-link" href="{{ .p1.RelPermalink }}">{{ end }}
        {{ .p1.Title }}
      {{ if ne .p1 .p2 }}</a>{{ end }}
    </li>
{{ end }}