Skip to content

Commit

Permalink
adding share buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
sujaykundu777 committed May 24, 2020
1 parent 620e38e commit e97a586
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
5 changes: 4 additions & 1 deletion _includes/blog_post_article.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ <h4 class="post-meta">{{ page.summary }}</h4>
<br />
<br />
{{ content }}
<br />
{%- include share_page.html -%}
</div>

{%- if site.hyvor_talk_website_id -%}
<div class="comments">
{%- include hyvor_comments.html -%}
Expand All @@ -45,4 +46,6 @@ <h4 class="post-meta">{{ page.summary }}</h4>
<!-- Incomment incase you want to use Disqus
<div id="disqus_thread"></div>
-->


</article>
2 changes: 1 addition & 1 deletion _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
{% endif %}

{% if page.image %}
<meta content="{{ site.url }}/assets/img/posts/{{ page.image }}" property="og:image">
<meta content="{{ site.url }}{{ page.thumbnail }}" property="og:image">
{% endif %}

{% if page.categories %}
Expand Down
6 changes: 6 additions & 0 deletions _includes/share_page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<div class="share-page">
Share this on &rarr;
<a href="https://twitter.com/intent/tweet?text={{ page.title }}&url={{ site.url }}{{ page.url }}&via={{ site.twitter_username }}&related={{ site.twitter_username }}" rel="nofollow" target="_blank" title="Share on Twitter"><i class="fa fa-twitter" aria-hidden="true"></i></a>
<a href="https://facebook.com/sharer.php?u={{ site.url }}{{ page.url }}" rel="nofollow" target="_blank" title="Share on Facebook"><i class="fa fa-facebook" aria-hidden="true"></i></a>
<a href="https://plus.google.com/share?url={{ site.url }}{{ page.url }}" rel="nofollow" target="_blank" title="Share on Google+"><i class="fa fa-google-plus" aria-hidden="true"></i></a>
</div>
20 changes: 20 additions & 0 deletions _sass/devlopr.scss
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,26 @@ header {
float:left;
}

/* Share page buttons */
.share-page {
text-align: center;
background: var(--button-background-color);
color: #111;
padding: 8px 15px;
border-radius: 5px;
margin: 1.5 * 1 * 0;

a {
font-weight: 700;
color: #fff;
margin-left: 10px;

&:hover {
border-bottom: 1px dashed #fff;
}
}
}

/* floating btn for buy me coffee */
#bmc-wbtn{
bottom: 40px !important;
Expand Down

0 comments on commit e97a586

Please sign in to comment.