blowfish/layouts/partials/sharing-links.html
Chris Banes cc1c2d70e0
Allow overwriting of sharing links
This PR changes this by grouping the links within an object key: `Site.Data.sharing.links`. This means that sites can provide their own
`data/sharing.json` file and overwrite the `links` key, to provide links of their own links.
2022-11-14 09:53:48 +00:00

15 lines
721 B
HTML

{{ with .Params.sharingLinks | default (.Site.Params.article.sharingLinks | default false) }}
<section class="flex flex-row flex-wrap justify-center pt-4 text-xl">
{{ range $.Site.Data.sharing.links }}
{{ with . }}
<a
class="m-1 inline-block min-w-[2.4rem] rounded bg-neutral-300 p-1 text-center text-neutral-700 hover:bg-primary-500 hover:text-neutral dark:bg-neutral-700 dark:text-neutral-300 dark:hover:bg-primary-400 dark:hover:text-neutral-800"
href="{{ printf .url $.Permalink $.Title }}"
title="{{ i18n .title }}"
aria-label="{{ i18n .title }}"
>{{ partial "icon.html" .icon }}</a
>
{{ end }}
{{ end }}
</section>
{{ end }}