Skip to content

Commit

Permalink
Allow aligning social-icons in homeInfo mode
Browse files Browse the repository at this point in the history
In Site config
    homeInfoParams:
        AlignSocialIconsTo: "center" # or left or right
  • Loading branch information
adityatelange committed Dec 16, 2023
1 parent fb1c0ae commit 0989c28
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion layouts/partials/home_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h1>{{ .Title | markdownify }}</h1>
{{ .Content | markdownify }}
</div>
<footer class="entry-footer">
{{ partial "social_icons.html" }}
{{ partial "social_icons.html" (dict "align" site.Params.homeInfoParams.AlignSocialIconsTo) }}
</footer>
</article>
{{- end -}}
2 changes: 1 addition & 1 deletion layouts/partials/social_icons.html
Original file line number Diff line number Diff line change
@@ -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 }}">
Expand Down

0 comments on commit 0989c28

Please sign in to comment.