Fix #9
This commit is contained in:
parent
cabba4d809
commit
3c5d3c4afc
@ -3,14 +3,25 @@
|
|||||||
{{ $fg := resources.Get "images/social_card_fg.png"}}
|
{{ $fg := resources.Get "images/social_card_fg.png"}}
|
||||||
{{ $bg := resources.Get "images/social_card_bg.png"}}
|
{{ $bg := resources.Get "images/social_card_bg.png"}}
|
||||||
|
|
||||||
{{ $fg = $fg.Filter (images.Text .Title (dict
|
{{ if gt (len .Title) 45 }}
|
||||||
|
{{ $fg = $fg.Filter (images.Text .Title (dict
|
||||||
"font" $font
|
"font" $font
|
||||||
"color" "#f8f8f2"
|
"color" "#fafafa"
|
||||||
|
"size" 95
|
||||||
|
"linespacing" 16
|
||||||
|
"x" 0
|
||||||
|
"y" 0
|
||||||
|
)) }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $fg = $fg.Filter (images.Text .Title (dict
|
||||||
|
"font" $font
|
||||||
|
"color" "#fafafa"
|
||||||
"size" 130
|
"size" 130
|
||||||
"linespacing" 20
|
"linespacing" 20
|
||||||
"x" 0
|
"x" 0
|
||||||
"y" 0
|
"y" 0
|
||||||
)) }}
|
)) }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
{{ $date := .Date.Format (default "2006-01-02" .Site.Params.dateFormat) }}
|
{{ $date := .Date.Format (default "2006-01-02" .Site.Params.dateFormat) }}
|
||||||
{{ $author := (default $.Site.Params.author.name ($.Param "author") ) }}
|
{{ $author := (default $.Site.Params.author.name ($.Param "author") ) }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user