Allow aligning social-icons in homeInfo mode

In Site config
    homeInfoParams:
        AlignSocialIconsTo: "center" # or left or right
This commit is contained in:
Aditya Telange 2023-12-16 21:40:14 +05:30
parent fb1c0aeb6f
commit 0989c28a0e
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@
{{ .Content | markdownify }}
</div>
<footer class="entry-footer">
{{ partial "social_icons.html" }}
{{ partial "social_icons.html" (dict "align" site.Params.homeInfoParams.AlignSocialIconsTo) }}
</footer>
</article>
{{- end -}}

View File

@ -1,4 +1,4 @@
<div class="social-icons">
<div class="social-icons" {{ with .align}}align="{{.}}" {{- end }}>
{{- range site.Params.socialIcons }}
<a href="{{ trim .url " " | safeURL }}" target="_blank" rel="noopener noreferrer me"
title="{{ (.title | default .name) | title }}">