Merge pull request #197 from ay0o/background

added support for a background image on the homepage
This commit is contained in:
Djordje Atlialp 2021-01-10 17:36:37 +01:00 committed by GitHub
commit 24b4615f73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 0 deletions

View file

@ -4,7 +4,9 @@
{{ partial "head.html" . }}
</head>
{{ block "body" . }}
<body class="{{ if ne $.Site.Params.defaultTheme "light" -}} dark-theme {{- end -}}">
{{ end }}
<div class="container">
{{ partial "header.html" . }}

View file

@ -1,3 +1,9 @@
{{ define "body" }}
<body
class="{{ if ne $.Site.Params.defaultTheme "light" -}} dark-theme {{- end -}} {{ if .Site.Params.background_image }}background-image"
style="background-image: url('{{ .Site.Params.background_image }}');" {{ else }}"{{ end }}>
{{ end }}
{{ define "main" }}
<main aria-role="main">
<div>