File tree Expand file tree Collapse file tree 7 files changed +48
-31
lines changed Expand file tree Collapse file tree 7 files changed +48
-31
lines changed Original file line number Diff line number Diff line change 14
14
}
15
15
16
16
.gitinfo {
17
+ margin : $spacer-normal 0 ;
18
+ border-top : $spacer-1 solid ;
19
+
17
20
@include themed {
18
21
color : t ($text-duller );
22
+ border-color : t ($accent );
19
23
}
20
24
21
25
@media print {
Original file line number Diff line number Diff line change 1
1
.pagination {
2
2
margin : $spacer-largest 0 ;
3
3
4
+ @media print {
5
+ display : none ;
6
+ }
7
+
4
8
& -title {
5
9
display : flex ;
6
10
text-align : center ;
Original file line number Diff line number Diff line change 117
117
}
118
118
119
119
& -footer {
120
- @media print {
121
- display : none ;
122
- }
123
120
margin : $spacer-largest 0 ;
124
121
}
125
122
Original file line number Diff line number Diff line change 31
31
32
32
{{- /* site main */}}
33
33
< main class ="site-main ">
34
- {{- if .GitInfo -}}
35
- {{- partial "gitinfo.html" . -}}
36
- {{- end -}}
37
-
38
34
{{- block "main" . -}}
39
35
{{ if .Title -}}
40
36
< h1 class ="post-title "> {{ .Title | plainify }}</ h1 >
Original file line number Diff line number Diff line change @@ -50,14 +50,19 @@ <h2>{{ "Table of Contents" | markdownify }}</h2>
50
50
</ div >
51
51
{{- end }}
52
52
53
- {{- if eq .Type "posts" }}
54
- < footer class ="post-footer ">
53
+
54
+ < footer class ="post-footer ">
55
+ {{- if .GitInfo -}}
56
+ {{- partial "gitinfo.html" . -}}
57
+ {{- end -}}
58
+
59
+ {{- if eq .Type "posts" }}
55
60
{{- if templates.Exists "partials/support-me.html" -}}
56
61
{{- partial "support-me.html" . -}}
57
62
{{- end -}}
58
63
{{- partial "pagination.html" . -}}
59
64
{{- partial "comments.html" . -}}
60
- </ footer >
61
- {{- end }}
65
+ {{- end }}
66
+ </ footer >
62
67
</ article >
63
68
{{- end -}}
Original file line number Diff line number Diff line change 14
14
< span > from commit: </ span >
15
15
16
16
{{- /* code */}}
17
- < code class =" gitinfo " >
18
- < a href =" {{ $commitUrl }} " >
17
+ < code >
18
+ {{- if eq $commitUrl "" }}
19
19
#{{ .short_hash }} |
20
20
{{ .subject }}
21
- </ a >
21
+ {{- else }}
22
+ < a href ="{{ $commitUrl }} ">
23
+ #{{ .short_hash }} |
24
+ {{ .subject }}
25
+ </ a >
26
+ {{- end }}
22
27
</ code >
23
28
{{- end -}}
24
29
{{/* gitinfo */}}
57
62
{{- $git_repo := site.Params.git_info.repo -}}
58
63
{{ $gitRepoUrl = printf "https://%s.com/%s/%s" $git_host $git_user $git_repo }}
59
64
{{- end -}}
60
- < li > < a href ="{{ $gitRepoUrl }} "> Source</ a > </ li >
65
+
66
+ {{- if not (eq $gitRepoUrl "") }}
67
+ < li > < a href ="{{ $gitRepoUrl }} "> Source</ a > </ li >
68
+ {{- end }}
61
69
</ ul >
62
70
</ nav >
63
71
</ div >
Original file line number Diff line number Diff line change 1
1
{{- $pageName := "Page" -}}
2
- {{- if .IsHome -}}
3
- {{- $pageName = "Home page" -}}
4
- {{- else if .IsSection -}}
5
- {{- $pageName = print .Title " list" | plainify -}}
6
- {{- else if eq .Type "posts" -}}
2
+ {{- if eq .Type "posts" -}}
7
3
{{- $pageName = print "Article" | plainify -}}
8
4
{{- else -}}
9
5
{{- with .File -}}
23
19
{{- end -}}
24
20
25
21
{{- /* gitinfo */}}
26
- < p class ="gitinfo ">
27
- {{- /* page name */}}
28
- {{ $pageName }} last updated on {{ .AuthorDate }} by commit
29
- {{- /* code */}}
30
- < code class ="gitinfo ">
31
- < a href ="{{ $commitUrl }} ">
32
- #{{ .AbbreviatedHash }} |
33
- {{ .Subject }}
34
- </ a >
35
- </ code >
36
- </ p >
22
+ < div class ="gitinfo ">
23
+ < p >
24
+ {{- /* page name */}}
25
+ {{ $pageName }} last updated on {{ .AuthorDate }} by commit
26
+ {{- /* code */}}
27
+ < code >
28
+ {{- if eq $commitUrl "" }}
29
+ #{{ .AbbreviatedHash }} |
30
+ {{ .Subject }}
31
+ {{- else }}
32
+ < a href ="{{ $commitUrl }} ">
33
+ #{{ .AbbreviatedHash }} |
34
+ {{ .Subject }}
35
+ </ a >
36
+ {{- end }}
37
+ </ code >
38
+ </ p >
39
+ </ div >
37
40
{{- end -}}
38
41
{{/* gitinfo */}}
You can’t perform that action at this time.
0 commit comments