change to hugo-blog-awesome theme
This commit is contained in:
parent
113e3650f1
commit
15b6142a8e
131 changed files with 5895 additions and 124 deletions
41
themes/hugo-blog-awesome/layouts/index.html
Normal file
41
themes/hugo-blog-awesome/layouts/index.html
Normal file
|
@ -0,0 +1,41 @@
|
|||
<!DOCTYPE html>
|
||||
{{- $defaultColor := .Site.Params.defaultColor | default "auto" -}}
|
||||
|
||||
{{/* allow website developer to enforce default dark mode */}}
|
||||
{{- if eq $defaultColor "dark" -}}
|
||||
<html lang="{{ .Site.LanguageCode }}" class="dark">
|
||||
{{- else if eq $defaultColor "light" -}}
|
||||
<html lang="{{ .Site.LanguageCode }}" class="light">
|
||||
{{- else -}}
|
||||
<html lang="{{ .Site.LanguageCode }}">
|
||||
{{- end -}}
|
||||
|
||||
{{- partial "head.html" . -}}
|
||||
|
||||
<body data-theme="{{ $defaultColor }}" class="notransition">
|
||||
{{- partial "scriptsBodyStart.html" . -}}
|
||||
{{- partial "header.html" . -}}
|
||||
<div class="wrapper">
|
||||
{{ partial "bio" . }}
|
||||
<main aria-label="Content">
|
||||
<h3 class="posts-item-note" aria-label="Recent Posts">{{ T "home.recent_posts" }}</h3>
|
||||
{{/* Show last 5 posts in reverse date order */}}
|
||||
{{ $pagesToShow := where .Site.RegularPages "Type" "in" site.Params.mainSections }}
|
||||
{{ $posts := $pagesToShow.ByDate.Reverse }}
|
||||
{{ range first 5 $posts }}
|
||||
{{ partial "postCard" . }}
|
||||
{{ end }}
|
||||
{{ if gt (len $posts) 5 }}
|
||||
<p>
|
||||
{{ range $firstSection := (where .Site.Sections "Section" "in" (first 1 (.Site.Params.mainSections))) }}
|
||||
<a href="{{ $firstSection.Permalink }}">{{ T "home.see_all_posts" }}</a>
|
||||
{{ end }}
|
||||
</p>
|
||||
{{ end }}
|
||||
</main>
|
||||
</div>
|
||||
{{- partial "footer.html" . -}}
|
||||
{{- partial "scriptsBodyEnd.html" . -}}
|
||||
</body>
|
||||
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue