Add homepage background image

See #2
This commit is contained in:
Track3 2018-11-22 21:33:07 +08:00
parent 0a0ee1a1c7
commit e594f1a494
2 changed files with 4 additions and 0 deletions

View file

@ -32,6 +32,7 @@ copyright = "This work is licensed under a Creative Commons Attribution-NonComme
footerCopyright = ' &#183; <a href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank" rel="noopener">CC BY-NC 4.0</a>'
# gitUrl = "https://github.com/Someone/SomeRepo/commit/" # Prefix of link to you git commit detail page. GitInfo must be enabled.
justifyContent = false # Set "text-align: justify" to .content
# bgImg = "" # Homepage background-image URL
[[params.social]]
name = "twitter"

View file

@ -1,4 +1,7 @@
{{ define "main" }}
{{- with .Site.Params.bgImg }}
<div class="bg-img" style="background-image: url('{{ . }}')"></div>
{{- end }}
<div id="spotlight" class="animated fadeIn">
<div id="home-center">
<h1 id="home-title">{{ .Site.Title }}</h1>