Browse Source

Minor fixes

When homepage loads background image flash before main content appears.
Move `opacity` property from the external css to the html.
Track3 6 years ago
parent
commit
9112ca3922
2 changed files with 2 additions and 4 deletions
  1. 0 2
      assets/js/main.js
  2. 2 2
      layouts/index.html

+ 0 - 2
assets/js/main.js

@@ -167,5 +167,3 @@ if (header !== null) {
     }
   }, 250));
 }
-
-

+ 2 - 2
layouts/index.html

@@ -1,9 +1,9 @@
 {{ define "head" }}
 	{{ if .Site.Params.bgImg -}}
-	<style>.bg-img {background-image: url('{{.Site.Params.bgImg | absURL}}');}</style>
+	<style>.bg-img {background-image: url('{{.Site.Params.bgImg | absURL}}');opacity: .03;}</style>
 	{{- else if .Site.Params.images -}}
 		{{- range first 1 .Site.Params.images -}}
-		<style>.bg-img {background-image: url('{{. | absURL}}');}</style>
+		<style>.bg-img {background-image: url('{{. | absURL}}');opacity: .03;}</style>
 		{{- end -}}
 	{{- end -}}
 {{ end }}