Skip to content

Commit

Permalink
Update addthis share
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenjoezhang committed Nov 12, 2022
1 parent 179176e commit 4b41762
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions layout/_macro/post.njk
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@
</div>
{%- endif %}

{{ partial('_partials/post/post-share.njk', {}, {cache: theme.cache.enable}) }}

{%- if theme.post_navigation and (post.prev or post.next) %}
{%- set prev = post.prev if theme.post_navigation === 'right' else post.next %}
{%- set next = post.next if theme.post_navigation === 'right' else post.prev %}
Expand Down
6 changes: 0 additions & 6 deletions layout/_partials/footer.njk
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,4 @@
</div>
{%- endif %}

{%- if theme.add_this_id %}
<div class="addthis_inline_share_toolbox">
<script src="//s7.addthis.com/js/300/addthis_widget.js#pubid={{ theme.add_this_id }}" async="async"></script>
</div>
{%- endif %}

{{- next_inject('footer') }}
5 changes: 5 additions & 0 deletions layout/_partials/post/post-share.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{%- if theme.add_this_id %}
<div class="addthis_inline_share_toolbox social-like">
<script src="//s7.addthis.com/js/300/addthis_widget.js#pubid={{ theme.add_this_id }}" async="async"></script>
</div>
{%- endif %}
5 changes: 3 additions & 2 deletions source/css/_common/components/post/post-widgets.styl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.social-like {
display: flex;
border-top: 1px solid $gainsboro;
font-size: $font-size-small;
justify-content: center;
margin-top: 1em;
padding-top: 1em;
text-align: center;
}

0 comments on commit 4b41762

Please sign in to comment.