1
0
mirror of https://github.com/lxsang/antd-web-apps synced 2024-11-20 02:18:20 +01:00

add social media support

This commit is contained in:
Xuan Sang LE 2018-02-25 16:11:37 +01:00
parent 08a48dc525
commit b6b3d8dcb3
4 changed files with 59 additions and 3 deletions

View File

@ -135,10 +135,25 @@ button{
color:#3170B2;
text-align: right;
}
#container .card .side .fb-like{
border-right: 1px solid #cccccc;
display: block;
padding: 5px;
padding-bottom: 0;
}
#container .card .side .twitter-share-button{
display: inline;
padding:5px;
padding-bottom: 0;
border-right: 1px solid #cccccc;
}
#container .mobile .side{
width: 100%;
text-align: left;
}
#container .mobile .side .fb-like, #container .mobile .side .twitter-share-button {
border:0;
}
#container .card .side .date{
display: inline-block;
color: #662702;

View File

@ -53,7 +53,9 @@
echo(table.concat(atags, ", "))
?>
</span>
<div class="fb-like" data-href="https://blog.lxsang.me/r:id:<?=data.id?>" data-layout="button_count" data-action="like" data-size="small" data-show-faces="true" data-share="true"></div>
<div class="g-plusone" data-size="medium"></div>
<a class="twitter-share-button" href="https://twitter.com/intent/tweet"></a>
</div>
<div class = "blogentry">
<div class = "shortcontent">

View File

@ -41,7 +41,10 @@
echo(table.concat(atags, ", "))
?>
</span>
<div class="fb-like" data-href="https://blog.lxsang.me/r:id:<?=data.id?>" data-layout="button_count" data-action="like" data-size="small" data-show-faces="true" data-share="true"></div>
<div class="g-plusone" data-size="medium"></div>
<a class="twitter-share-button" href="https://twitter.com/intent/tweet">
Tweet</a>
</div>
<div class = "blogentry">
<div class = "shortcontent">

View File

@ -10,6 +10,10 @@
<html lang="en">
<head>
<title><?=title?></title>
<meta property="og:url" content="https://blog.lxsang.me" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Xuan Sang LE's blog" />
<meta property="og:description" content="My personal space" />
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="rst/ubuntu-regular.css" />
@ -19,7 +23,6 @@
<script src="rst/gscripts/jquery-3.2.1.min.js"> </script>
<script src="rst/hljs/highlight.pack.js"> </script>
<script src="rst/hljs/highlightjs-line-numbers.min.js"> </script>
<script>
$(document).ready(function() {
$('pre code').each(function(i, block) {
@ -27,9 +30,42 @@
hljs.lineNumbersBlock(block);
});
});
window.twttr = (function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0],
t = window.twttr || {};
if (d.getElementById(id)) return t;
js = d.createElement(s);
js.id = id;
js.src = "https://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
t._e = [];
t.ready = function(f) {
t._e.push(f);
};
return t;
}(document, "script", "twitter-wjs"));
// facebook
(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=v2.12';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</head>
<body>
<div id="fb-root"></div>
<div id = "top">
<div id = "navbar" class = "<?=cls?>">
<div class = "logo"><a href = "https://lxsang.me"></a></div>