forked from barryclark/jekyll-now
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request barryclark#34 from sujaykundu777/feature/share-but…
…tons changes in share buttons
- Loading branch information
Showing
3 changed files
with
241 additions
and
154 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,149 +1,211 @@ | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>{% if {page.title %}{{ page.title }}{% else %}{{ site.title }} - {{ site.subtitle }}{% endif %}</title> | ||
<meta http-equip="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="description" content="{% if {page.title %}{{ page.title }}{% else %}{{ site.description }}{% endif %}" /> | ||
<meta name="keywords" content="{% if page.title %}{{ page.title }}, {{ site.title }}, {% for categ in page.categories %}{{ categ }}{% if forloop.last == false %}, {% endif %}{% endfor %}{% else %}{{ site.title }}, {% for category in site.categories %}{% capture categories_slug %}{{ category | first }}{% endcapture %}{% for categ in categories_slug %}{{ categ }}{% endfor %}{% if forloop.last == false %}, {% endif %}{% endfor %}{% endif %}" /> | ||
<link rel="alternate" type="application/rss+xml" title="RSS" href="/feed.xml"> | ||
<meta content="{{ site.share.fb_appid }}" property="fb:app_id"> | ||
<meta content="{{ site.title }}" property="og:site_name"> | ||
{% if page.noindex %} | ||
<meta name="robots" content="noindex"> | ||
{% endif %} | ||
{% if page.title %} | ||
<meta content="{{ page.title }}" property="og:title"> | ||
<meta content="article" property="og:type"> | ||
{% else %} | ||
<meta content="{{ site.title }}" property="og:title"> | ||
<meta content="website" property="og:type"> | ||
{% endif %} | ||
|
||
{% if page.summary %} | ||
<meta content="{{ page.summary }}" property="og:description"> | ||
{% else %} | ||
<meta content="{{ site.description }}" property="og:description"> | ||
{% endif %} | ||
|
||
{% if page.url %} | ||
<meta content="{{ site.url }}{{ page.url }}" property="og:url"> | ||
{% endif %} | ||
|
||
{% if page.date %} | ||
<meta content="{{ page.date | date_to_xmlschema }}" property="article:published_time"> | ||
<meta content="{{ site.url }}/about/" property="article:author"> | ||
{% endif %} | ||
|
||
{% if page.image %} | ||
<meta content="{{ site.url }}{{ page.thumbnail }}" property="og:image"> | ||
{% endif %} | ||
|
||
{% if page.categories %} | ||
{% for category in page.categories limit:1 %} | ||
<meta content="{{ category }}" property="article:section"> | ||
{% endfor %} | ||
{% endif %} | ||
|
||
{% if page.tags %} | ||
{% for tag in page.tags %} | ||
<meta content="{{ tag }}" property="article:tag"> | ||
{% endfor %} | ||
{% endif %} | ||
|
||
<meta name="twitter:card" content="summary"> | ||
<meta name="twitter:site" content="@{{ site.share.twitter_username }}"> | ||
<meta name="twitter:creator" content="@{{ site.share.twitter_username }}"> | ||
|
||
{% if page.title %} | ||
<meta name="twitter:title" content="{{ page.title }}"> | ||
{% else %} | ||
<meta name="twitter:title" content="{{ site.title }}"> | ||
{% endif %} | ||
<meta content="{{ site.title }}" property="og:site_name"> | ||
{% if page.url %} | ||
<meta name="twitter:url" content="{{ site.url }}{{ page.url }}"> | ||
{% endif %} | ||
|
||
{% if page.description %} | ||
<meta name="twitter:description" content="{{ page.description }}"> | ||
{% else %} | ||
<meta name="twitter:description" content="{{ site.description }}"> | ||
{% endif %} | ||
|
||
{% if page.header-img %} | ||
<meta name="twitter:image:src" content="{{ site.url }}/{{ page.header-img }}"> | ||
{% endif %} | ||
|
||
<link rel="stylesheet" href="/assets/css/main.css" /> | ||
<!-- <link rel="stylesheet" href="/assets/css/custom-style.css" /> --> | ||
<link rel="stylesheet" href="/assets/bower_components/lightgallery/dist/css/lightgallery.min.css"/> | ||
<link rel="stylesheet" href="https://cdn.snipcart.com/themes/v3.0.0-beta.3/default/snipcart.css" /> | ||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/instantsearch.min.css"> | ||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/instantsearch-theme-algolia.min.css"> | ||
<link rel="stylesheet" href="/assets/bower_components/bootstrap/dist/css/bootstrap.min.css" /> | ||
<link rel="stylesheet" href="/assets/bower_components/font-awesome/web-fonts-with-css/css/fontawesome-all.min.css" /> | ||
<link rel="stylesheet" href="/assets/bower_components/icono/dist/icono.min.css"/> | ||
<!-- Fonts--> | ||
<link href="https://fonts.googleapis.com/css?family=Quicksand&display=swap" rel="stylesheet"> | ||
<!-- Favicon --> | ||
<link rel="icon" href="{{site.url}}{{site.baseurl}}/assets/img/favicon.ico" type="image/gif" sizes="16x16"> | ||
|
||
<!-- Jquery --> | ||
<script src="https://code.jquery.com/jquery-3.4.1.min.js" integrity="sha384-vk5WoKIaW/vJyUAd9n/wmopsmNhiy+L2Z+SBxGYnUkunIxVxAv/UtMOhba/xskxh" crossorigin="anonymous"></script> | ||
<!-- <script src="/assets/bower_components/jquery/dist/jquery.min.js"></script> --> | ||
<script src="/assets/bower_components/jquery.easing/jquery.easing.min.js"></script> | ||
<script src="/assets/bower_components/bootstrap/dist/js/bootstrap.bundle.min.js"></script> | ||
<script src="/assets/bower_components/jquery-mousewheel/jquery.mousewheel.min.js"></script> | ||
<script src="/assets/bower_components/lightgallery/dist/js/lightgallery-all.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/picturefill/3.0.2/picturefill.min.js"></script> | ||
<script src="/assets/bower_components/imagesloaded/imagesloaded.pkgd.min.js"></script> | ||
<script src="/assets/bower_components/nanobar/nanobar.min.js"></script> | ||
<script src="/assets/bower_components/typewrite/dist/typewrite.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/instantsearch.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.20.1/moment.min.js"></script> | ||
|
||
<!-- Netlify CMS --> | ||
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script> | ||
|
||
<!-- Github Button --> | ||
<script async defer src="https://buttons.github.io/buttons.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" | ||
integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" | ||
crossorigin="anonymous"></script> | ||
<meta charset="utf-8" /> | ||
<title> | ||
{% if {page.title %}{{ page.title }}{% else %}{{ site.title }} - {{ | ||
site.subtitle }}{% endif %} | ||
</title> | ||
<meta http-equip="X-UA-Compatible" content="IE=edge" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<meta | ||
name="description" | ||
content="{% if {page.title %}{{ page.title }}{% else %}{{ site.description }}{% endif %}" | ||
/> | ||
<meta | ||
name="keywords" | ||
content="{% if page.title %}{{ page.title }}, {{ site.title }}, {% for categ in page.categories %}{{ categ }}{% if forloop.last == false %}, {% endif %}{% endfor %}{% else %}{{ site.title }}, {% for category in site.categories %}{% capture categories_slug %}{{ category | first }}{% endcapture %}{% for categ in categories_slug %}{{ categ }}{% endfor %}{% if forloop.last == false %}, {% endif %}{% endfor %}{% endif %}" | ||
/> | ||
<link | ||
rel="alternate" | ||
type="application/rss+xml" | ||
title="RSS" | ||
href="/feed.xml" | ||
/> | ||
<meta content="{{ site.share.fb_appid }}" property="fb:app_id" /> | ||
<meta content="{{ site.title }}" property="og:site_name" /> | ||
{% if page.noindex %} | ||
<meta name="robots" content="noindex" /> | ||
{% endif %} {% if page.title %} | ||
<meta content="{{ page.title }}" property="og:title" /> | ||
<meta content="article" property="og:type" /> | ||
{% else %} | ||
<meta content="{{ site.title }}" property="og:title" /> | ||
<meta content="website" property="og:type" /> | ||
{% endif %} {% if page.summary %} | ||
<meta content="{{ page.summary }}" property="og:description" /> | ||
{% else %} | ||
<meta content="{{ site.description }}" property="og:description" /> | ||
{% endif %} {% if page.url %} | ||
<meta content="{{ site.url }}{{ page.url }}" property="og:url" /> | ||
{% endif %} {% if page.date %} | ||
<meta | ||
content="{{ page.date | date_to_xmlschema }}" | ||
property="article:published_time" | ||
/> | ||
<meta content="{{ site.url }}/about/" property="article:author" /> | ||
{% endif %} {% if page.image %} | ||
<meta content="{{ site.url }}{{ page.thumbnail }}" property="og:image" /> | ||
{% endif %} {% if page.categories %} {% for category in page.categories | ||
limit:1 %} | ||
<meta content="{{ category }}" property="article:section" /> | ||
{% endfor %} {% endif %} {% if page.tags %} {% for tag in page.tags %} | ||
<meta content="{{ tag }}" property="article:tag" /> | ||
{% endfor %} {% endif %} | ||
|
||
<meta name="twitter:card" content="summary" /> | ||
<meta name="twitter:site" content="@{{ site.share.twitter_username }}" /> | ||
<meta name="twitter:creator" content="@{{ site.share.twitter_username }}" /> | ||
|
||
{% if page.title %} | ||
<meta name="twitter:title" content="{{ page.title }}" /> | ||
{% else %} | ||
<meta name="twitter:title" content="{{ site.title }}" /> | ||
{% endif %} | ||
<meta content="{{ site.title }}" property="og:site_name" /> | ||
{% if page.url %} | ||
<meta name="twitter:url" content="{{ site.url }}{{ page.url }}" /> | ||
{% endif %} {% if page.description %} | ||
<meta name="twitter:description" content="{{ page.description }}" /> | ||
{% else %} | ||
<meta name="twitter:description" content="{{ site.description }}" /> | ||
{% endif %} {% if page.header-img %} | ||
<meta | ||
name="twitter:image:src" | ||
content="{{ site.url }}/{{ page.header-img }}" | ||
/> | ||
{% endif %} | ||
|
||
<link rel="stylesheet" href="/assets/css/main.css" /> | ||
<!-- <link rel="stylesheet" href="/assets/css/custom-style.css" /> --> | ||
<link | ||
rel="stylesheet" | ||
href="/assets/bower_components/lightgallery/dist/css/lightgallery.min.css" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="https://cdn.snipcart.com/themes/v3.0.0-beta.3/default/snipcart.css" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
type="text/css" | ||
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/instantsearch.min.css" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
type="text/css" | ||
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/instantsearch-theme-algolia.min.css" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="/assets/bower_components/bootstrap/dist/css/bootstrap.min.css" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="/assets/bower_components/font-awesome/web-fonts-with-css/css/fontawesome-all.min.css" | ||
/> | ||
<link | ||
rel="stylesheet" | ||
href="/assets/bower_components/icono/dist/icono.min.css" | ||
/> | ||
<!-- Fonts--> | ||
<link | ||
href="https://fonts.googleapis.com/css?family=Quicksand&display=swap" | ||
rel="stylesheet" | ||
/> | ||
<!-- Favicon --> | ||
<link | ||
rel="icon" | ||
href="{{site.url}}{{site.baseurl}}/assets/img/favicon.ico" | ||
type="image/gif" | ||
sizes="16x16" | ||
/> | ||
|
||
<!-- Jquery --> | ||
<script | ||
src="https://code.jquery.com/jquery-3.4.1.min.js" | ||
integrity="sha384-vk5WoKIaW/vJyUAd9n/wmopsmNhiy+L2Z+SBxGYnUkunIxVxAv/UtMOhba/xskxh" | ||
crossorigin="anonymous" | ||
></script> | ||
<!-- <script src="/assets/bower_components/jquery/dist/jquery.min.js"></script> --> | ||
<script src="/assets/bower_components/jquery.easing/jquery.easing.min.js"></script> | ||
<script src="/assets/bower_components/bootstrap/dist/js/bootstrap.bundle.min.js"></script> | ||
<script src="/assets/bower_components/jquery-mousewheel/jquery.mousewheel.min.js"></script> | ||
<script src="/assets/bower_components/lightgallery/dist/js/lightgallery-all.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/picturefill/3.0.2/picturefill.min.js"></script> | ||
<script src="/assets/bower_components/imagesloaded/imagesloaded.pkgd.min.js"></script> | ||
<script src="/assets/bower_components/nanobar/nanobar.min.js"></script> | ||
<script src="/assets/bower_components/typewrite/dist/typewrite.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/instantsearch.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.20.1/moment.min.js"></script> | ||
|
||
<!-- Netlify CMS --> | ||
<script src="https://identity.netlify.com/v1/netlify-identity-widget.js"></script> | ||
|
||
<!-- Github Button --> | ||
<script async defer src="https://buttons.github.io/buttons.js"></script> | ||
<script | ||
src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" | ||
integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" | ||
crossorigin="anonymous" | ||
></script> | ||
|
||
<script> | ||
(function (d, h, m) { | ||
var js, fjs = d.getElementsByTagName(h)[0]; | ||
if (d.getElementById(m)) { return; } | ||
js = d.createElement(h); js.id = m; | ||
js.onload = function () { | ||
window.makerWidgetComInit({ | ||
position: "left", | ||
widget: "ofeeof264otl2l5g-zspk40eq2gaomj2n-higi2qphmveubksi" | ||
}) | ||
}; | ||
js.src = "https://makerwidget.com/js/embed.js"; | ||
fjs.parentNode.insertBefore(js, fjs) | ||
}(document, "script", "dhm")) | ||
</script> | ||
<!-- buy me a coffeee --> | ||
<script data-name="BMC-Widget" src="https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js" data-id="sujaykundu" data-description="Support me on Buy me a coffee!" data-message="" data-color="#FF813F" data-position="right" data-x_margin="10" data-y_margin="10"></script> | ||
|
||
{% if jekyll.environment == "production" %} | ||
|
||
<script> | ||
(function (i, s, o, g, r, a, m) { | ||
i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () { | ||
(i[r].q = i[r].q || []).push(arguments) | ||
}, i[r].l = 1 * new Date(); a = s.createElement(o), | ||
m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m) | ||
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga'); | ||
(function(d, h, m) { | ||
var js, | ||
fjs = d.getElementsByTagName(h)[0]; | ||
if (d.getElementById(m)) { | ||
return; | ||
} | ||
js = d.createElement(h); | ||
js.id = m; | ||
js.onload = function() { | ||
window.makerWidgetComInit({ | ||
position: "left", | ||
widget: "ofeeof264otl2l5g-zspk40eq2gaomj2n-higi2qphmveubksi" | ||
}); | ||
}; | ||
js.src = "https://makerwidget.com/js/embed.js"; | ||
fjs.parentNode.insertBefore(js, fjs); | ||
})(document, "script", "dhm"); | ||
</script> | ||
<!-- buy me a coffeee --> | ||
<script | ||
data-name="BMC-Widget" | ||
src="https://cdnjs.buymeacoffee.com/1.0.0/widget.prod.min.js" | ||
data-id="sujaykundu" | ||
data-description="Support me on Buy me a coffee!" | ||
data-message="" | ||
data-color="#FF813F" | ||
data-position="right" | ||
data-x_margin="10" | ||
data-y_margin="10" | ||
></script> | ||
|
||
{% if jekyll.environment == "production" %} | ||
|
||
ga('create', '{{ site.google_analytics }}', 'auto'); | ||
ga('send', 'pageview'); | ||
</script> | ||
<script> | ||
(function(i, s, o, g, r, a, m) { | ||
i["GoogleAnalyticsObject"] = r; | ||
(i[r] = | ||
i[r] || | ||
function() { | ||
(i[r].q = i[r].q || []).push(arguments); | ||
}), | ||
(i[r].l = 1 * new Date()); | ||
(a = s.createElement(o)), (m = s.getElementsByTagName(o)[0]); | ||
a.async = 1; | ||
a.src = g; | ||
m.parentNode.insertBefore(a, m); | ||
})( | ||
window, | ||
document, | ||
"script", | ||
"https://www.google-analytics.com/analytics.js", | ||
"ga" | ||
); | ||
|
||
ga("create", "{{ site.google_analytics }}", "auto"); | ||
ga("send", "pageview"); | ||
</script> | ||
|
||
{% endif %} | ||
|
||
</head> | ||
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,36 @@ | ||
<!-- Load Facebook SDK for JavaScript --> | ||
<div id="fb-root"></div> | ||
<script> | ||
(function(d, s, id) { | ||
var js, | ||
fjs = d.getElementsByTagName(s)[0]; | ||
if (d.getElementById(id)) return; | ||
js = d.createElement(s); | ||
js.id = id; | ||
js.src = "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.0"; | ||
fjs.parentNode.insertBefore(js, fjs); | ||
})(document, "script", "facebook-jssdk"); | ||
</script> | ||
<script | ||
async | ||
src="https://platform.twitter.com/widgets.js" | ||
charset="utf-8" | ||
></script> | ||
|
||
<div class="share-page"> | ||
Share this on → | ||
<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="fab fa-twitter"></i></a> | ||
<a href="https://facebook.com/sharer.php?u={{ site.url }}{{ page.url }}" rel="nofollow" target="_blank" title="Share on Facebook"><i class="fab fa-facebook"></i></a> | ||
<a href="https://plus.google.com/share?url={{ site.url }}{{ page.url }}" rel="nofollow" target="_blank" title="Share on Google+"><i class="fab fa-google-plus-g"></i></a> | ||
<p class="share-text">Share this on →</p> | ||
<a | ||
href="https://twitter.com/share?ref_src=twsrc%5Etfw" | ||
class="twitter-share-button" | ||
data-size="large" | ||
data-show-count="false" | ||
style="margin-top:5px;" | ||
>Tweet</a | ||
> | ||
<a | ||
class="fb-share-button" | ||
data-href="{{site.url}}{{page.url}}" | ||
data-size="large" | ||
data-layout="button" | ||
>Share</a> | ||
</div> |
Oops, something went wrong.