🏗️ Finish post reward widget coding.
This commit is contained in:
21
layouts/partials/post/post_footer/post_reward.html
Normal file
21
layouts/partials/post/post_footer/post_reward.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{{- with .Site.Params.rewardSets }}
|
||||
{{- if .enable }}
|
||||
<div class="reward-container">
|
||||
<div>{{- .comment | safeHTML -}}</div>
|
||||
<button>
|
||||
{{- T "RewardDonate" -}}
|
||||
</button>
|
||||
<div class="post-reward">
|
||||
{{- range $name,$img := $.Site.Params.reward }}
|
||||
{{- $fw := substr $name 0 1 }}
|
||||
{{- $pay := replace $name $fw ($fw | upper) 1 }}
|
||||
{{- $payName := T (printf "Reward%s" $pay) }}
|
||||
<div class="post-reward-item">
|
||||
<img src="{{ $img }}" alt="{{ $.Site.Params.author }} - {{ $payName }}">
|
||||
<span>{{ $payName }}</span>
|
||||
</div>
|
||||
{{- end }}
|
||||
</div>
|
||||
</div>
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user