10 KiB
10 KiB
{{ define "main" }}
{{ $cfg := (site.Params.node) }}
{{ $tabsID := ((printf "node-tabs-%s" (.File.UniqueID)) | md5) }}
{{ $changelog := (path.Join (.File.Dir) "changelog.md") }}
{{ (partial "breadcrumb" .) }}
{{ if ($cfg.cover.enabled) }}
{{ if ($cfg.tabs.source.enabled) }}
{{ end }}
{{ if (and ($cfg.tabs.changelog.enabled) (fileExists ($changelog))) }}
{{ end }}
{{ if ($cfg.tabs.info.enabled) }}
{{ end }}
{{ if ($cfg.tabs.comments.enabled) }}
{{ with (.Params.comments) }}
{{ end }}
{{ end }}
{{ if (.IsTranslated) }}
{{ end }}
{{ (partial "module/node/cover/02" .) }}
{{ end }}
{{ (.Title) }}
-
{{ with (.Params.date) }}
- {{ end }} {{ with (.Params.complexity) }}
- • {{ with (eq . "0") }}
- {{ end }} {{ with (eq . "1") }}
- {{ end }} {{ with (eq . "2") }}
- {{ end }} {{ end }}
- {{ if ($cfg.tabs.source.enabled) }}
- {{ end }} {{ if (and ($cfg.tabs.changelog.enabled) (fileExists ($changelog))) }}
- {{ end }} {{ if ($cfg.tabs.info.enabled) }}
- {{ end }} {{ if ($cfg.tabs.comments.enabled) }} {{ with (.Params.comments) }}
- {{ end }} {{ end }} {{ if (.IsTranslated) }}
- {{ end }} {{ if ($cfg.tabs.share.enabled) }}
- {{ end }}
{{ if (in (.Params.categories) "inDev") }}
{{ (partial "function/alert" (dict
"type" "warning"
"icon" "fas fa-edit"
"msg" (i18n "alert.in_dev")
)) }}
{{ end }}
{{ if (in (.Params.categories) "inHistory") }}
{{ (partial "function/alert" (dict
"type" "warning"
"icon" "fas fa-clock-rotate-left"
"msg" (i18n "alert.in_history")
)) }}
{{ end }}
{{ if (in (.Params.categories) "opinion") }}
{{ (partial "function/alert" (dict
"type" "warning"
"icon" "fas fa-user-graduate"
"msg" (i18n "alert.opinion")
)) }}
{{ end }}
{{ (partial "module/node/toc" .) }}
{{ (.Content) }}
{{ (partial "module/node/sources" .) }}
{{ (highlight (readFile (.File.Path)) "md") }}
{{ ((readFile ($changelog)) | markdownify) }}
{{ if ($cfg.tabs.info.categories.enabled) }}
{{ (partial "module/node/tabs/info/categories" .) }}
{{ end }}
{{ if ($cfg.tabs.info.tags.enabled) }}
{{ (partial "module/node/tabs/info/tags" .) }}
{{ end }}
{{ if ($cfg.tabs.info.authors.enabled) }}
{{ (partial "module/node/tabs/info/authors" .) }}
{{ end }}
{{ if ($cfg.tabs.info.related.enabled) }}
{{ (partial "module/node/tabs/info/related" .) }}
{{ end }}
{{ if ($cfg.tabs.info.meta.enabled) }}
{{ (partial "module/node/tabs/info/meta" .) }}
{{ end }}
{{ if ($cfg.tabs.info.stats.enabled) }}
{{ (partial "module/node/tabs/info/stats" .) }}
{{ end }}
{{ (partial "module/node/tabs/comments" .) }}
{{ (partial "module/node/tabs/languages" .) }}
{{ end }}
{{ if ($cfg.tabs.share) }}
{{ end }}