Skip to content

Commit

Permalink
Add like and dislike buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedAliRashad committed Jul 6, 2022
1 parent a6d5a23 commit 75eddb8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 4 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,14 @@ yat:
# header_transparent: true

# If you want to change the content width, you can set to another value
# content_width: "920px"
content_width: "920px"

# If you don't want to enable caching in the text editor, change this to false
editor_cache: true

# If you don't want reactions on your post, change this to false
like_btn: true

# If you want to generate website sitemap, you can set true
# sitemap: false

Expand Down
9 changes: 9 additions & 0 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
---

<div class="post">

<section>

{%- assign name = 'banner' -%}
Expand All @@ -24,7 +25,15 @@
{%- endif -%}

{%- include views/article.html -%}

{% if site.like_btn %}
<center>
<span class="likebtn-wrapper" data-theme="bootstrap" data-lang="ar" data-ef_voting="push" data-white_label="true" data-show_like_label="false" data-popup_disabled="true" data-loader_show="true" data-tooltip_enabled="false" data-rtl="true"></span>
<script>(function(d,e,s){if(d.getElementById("likebtn_wjs"))return;a=d.createElement(e);m=d.getElementsByTagName(e)[0];a.async=1;a.id="likebtn_wjs";a.src=s;m.parentNode.insertBefore(a, m)})(document,"script","//w.likebtn.com/js/w/widget.js");</script>
</center>
{% endif %}

<br>
{%- assign result = hidden | where_exp: "item", "item == 'related_posts'" -%}
{%- if result.size == 0 -%}
<div class="post-related" style="font-family:'Droid Arabic Kufi';">
Expand Down

0 comments on commit 75eddb8

Please sign in to comment.