added support for a background image on the homepage
This commit is contained in:
parent
6fa58f635e
commit
35d298ae55
4 changed files with 18 additions and 0 deletions
|
@ -330,3 +330,10 @@ hr {
|
|||
text-decoration: none;
|
||||
z-index: 100000;
|
||||
}
|
||||
|
||||
.background-image {
|
||||
background-repeat: no-repeat;
|
||||
background-attachment: fixed;
|
||||
background-size: cover;
|
||||
background-position: center center;
|
||||
}
|
|
@ -60,6 +60,9 @@ disableHugoGeneratorInject = false
|
|||
|
||||
homeSubtitle = "Hello Friend NG"
|
||||
|
||||
# Set a background for the homepage
|
||||
# background_image = "assets/images/background.jpg"
|
||||
|
||||
# Prefix of link to the git commit detail page. GitInfo must be enabled.
|
||||
# gitUrl = ""
|
||||
|
||||
|
|
|
@ -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" . }}
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue