diff --git a/content/blog/_index.md b/content/blog/_index.md index e5c36ae..3d16ff2 100644 --- a/content/blog/_index.md +++ b/content/blog/_index.md @@ -1,4 +1,5 @@ --- +linkTitle: FuKun.Net/Blog --- {{< hextra/hero-subtitle >}} Fukun.Net/blog diff --git a/layouts/blog/single.html b/layouts/blog/single.html new file mode 100644 index 0000000..51d4650 --- /dev/null +++ b/layouts/blog/single.html @@ -0,0 +1,55 @@ +{{ define "main" }} +
+ {{ partial "sidebar.html" (dict "context" . "disableSidebar" true "displayPlaceholder" true) }} + {{ partial "toc.html" . }} +
+
+ {{ partial "breadcrumb.html" (dict "page" . "enable" true) }} + {{ if .Title }} +
+

{{ .Title }}

+ {{ partial "components/page-context-menu" . }} +
+ {{ end }} +
+ {{- with $date := .Date }}{{ partial "utils/format-date" $date }}{{ end -}} + {{- $lazyLoading := site.Params.enableImageLazyLoading | default true -}} + {{ if and .Date .Params.authors }}ยท{{ end -}} + {{- with $.Params.authors -}} + {{- range $i, $author := . -}} + {{- if reflect.IsMap $author -}} + {{- if and $i (not $author.image) }},{{ end -}} + + {{- with $image := $author.image }} + {{- $isLocal := not (urls.Parse $image).Scheme -}} + {{- $startsWithSlash := hasPrefix $image "/" -}} + {{- if and $isLocal $startsWithSlash }} + {{- $image = (relURL (strings.TrimPrefix "/" $image)) -}} + {{ end -}} + {{ $author.name }} + {{ end -}} +
{{ $author.name }}
+
+ {{- else -}} + {{- if $i }},{{ end -}}{{ $author }} + {{- end -}} + {{- end -}} + {{- end -}} +
+
+ {{ .Content }} +
+ {{- partial "components/last-updated.html" . -}} + {{- if (site.Params.blog.article.displayPagination | default true) -}} + {{- .Store.Set "reversePagination" (.Params.reversePagination | default true) -}} + {{- partial "components/pager.html" . -}} + {{ end }} + {{- partial "components/comments.html" . -}} +
+
+
+{{ end }}