BUGFIX fix incorrect url of default avatar or background images
This commit is contained in:
parent
09c1f46140
commit
cf555c8a73
5 changed files with 18 additions and 6 deletions
BIN
assets/default-avatar.png
Normal file
BIN
assets/default-avatar.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
BIN
assets/default-background.png
Normal file
BIN
assets/default-background.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 121 KiB |
|
@ -1,4 +1,11 @@
|
|||
<div class="jumbotron" style="background-image: url({{ .Site.Params.cover }});">
|
||||
{{ $background_path := "default-background.png" }}
|
||||
{{ with .Site.Params.cover }}
|
||||
{{ $background_path = . }}
|
||||
{{ end }}
|
||||
{{ if resources.Get $background_path }}
|
||||
{{ $background_path = (resources.Get $background_path).Permalink }}
|
||||
{{ end }}
|
||||
<div class="jumbotron" style="background-image: url({{ $background_path }});">
|
||||
<div class="container">
|
||||
<div class="site-title">{{ .Site.Params.title }}</div>
|
||||
<p class="signature">{{ .Site.Params.signature }}</p>
|
||||
|
|
|
@ -25,12 +25,17 @@
|
|||
{{/* user info */}}
|
||||
<div class="user-info">
|
||||
<div class="avatar-block">
|
||||
{{ with $page.Params.avatar }}
|
||||
<img src='{{ . }}' class="avatar">
|
||||
{{ else }}
|
||||
{{/* fixme check whether the default avatar path is url or not--> */}}
|
||||
<img src='{{ $page.Site.BaseURL }}/{{ $page.Site.Params.avatar }}' class="avatar">
|
||||
{{ $avatar_path := "default-avatar.png" }}
|
||||
{{ with .Site.Params.avatar }}
|
||||
{{ $avatar_path = . }}
|
||||
{{ end }}
|
||||
{{ with $page.Params.avatar }}
|
||||
{{ $avatar_path = . }}
|
||||
{{ end }}
|
||||
{{ if resources.Get $avatar_path }}
|
||||
{{ $avatar_path = (resources.Get $avatar_path).Permalink }}
|
||||
{{ end }}
|
||||
<img src='{{ $avatar_path }}' class="avatar">
|
||||
</div>
|
||||
<div class="intro">
|
||||
<div class="name">
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 12 KiB |
Loading…
Add table
Reference in a new issue