Merge pull request #197 from ay0o/background
added support for a background image on the homepage
This commit is contained in:
commit
24b4615f73
4 changed files with 18 additions and 0 deletions
|
@ -330,3 +330,10 @@ hr {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
z-index: 100000;
|
z-index: 100000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.background-image {
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-attachment: fixed;
|
||||||
|
background-size: cover;
|
||||||
|
background-position: center center;
|
||||||
|
}
|
|
@ -61,6 +61,9 @@ disableHugoGeneratorInject = false
|
||||||
|
|
||||||
homeSubtitle = "Hello Friend NG"
|
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.
|
# Prefix of link to the git commit detail page. GitInfo must be enabled.
|
||||||
#
|
#
|
||||||
# gitUrl = ""
|
# gitUrl = ""
|
||||||
|
|
|
@ -4,7 +4,9 @@
|
||||||
{{ partial "head.html" . }}
|
{{ partial "head.html" . }}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
{{ block "body" . }}
|
||||||
<body class="{{ if ne $.Site.Params.defaultTheme "light" -}} dark-theme {{- end -}}">
|
<body class="{{ if ne $.Site.Params.defaultTheme "light" -}} dark-theme {{- end -}}">
|
||||||
|
{{ end }}
|
||||||
<div class="container">
|
<div class="container">
|
||||||
{{ partial "header.html" . }}
|
{{ 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" }}
|
{{ define "main" }}
|
||||||
<main aria-role="main">
|
<main aria-role="main">
|
||||||
<div>
|
<div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue