Skip to content

Commit

Permalink
fix: homePoster, fofPoster in main.scss
Browse files Browse the repository at this point in the history
fixed #51
  • Loading branch information
reuixiy committed Jan 10, 2020
1 parent c7ce9bb commit e6105a9
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions assets/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -292,17 +292,33 @@
{{ end }}
{{ if eq .Site.Params.homeLayout "footage" }}
@import "_common/_page/home-footage.scss";

{{ if strings.HasPrefix .Site.Params.homePoster "." }}
{{ $homePoster := printf `.%s` .Site.Params.homePoster }}
{{ .Scratch.Set "homePoster" $homePoster }}
{{ else }}
{{ .Scratch.Set "homePoster" .Site.Params.homePoster }}
{{ end }}
{{ $homePoster := .Scratch.Get "homePoster" }}

.home::before {
background-image: url({{ .Site.Params.homePoster }});
background-image: url({{ $homePoster }});
}
{{ end }}
{{ if eq .Site.Params.homeLayout "posts" }}
@import "_common/_page/home-posts.scss";
{{ end }}

@import "_common/_page/404.scss";
{{ if strings.HasPrefix .Site.Params.fofPoster "." }}
{{ $fofPoster := printf `.%s` .Site.Params.fofPoster }}
{{ .Scratch.Set "fofPoster" $fofPoster }}
{{ else }}
{{ .Scratch.Set "fofPoster" .Site.Params.fofPoster }}
{{ end }}
{{ $fofPoster := .Scratch.Get "fofPoster" }}
.fof::before {
background-image: url({{ .Site.Params.fofPoster }});
background-image: url({{ $fofPoster }});
}

{{ if .Site.Params.enableHighlight }}
Expand Down

0 comments on commit e6105a9

Please sign in to comment.