Added Google+ buttons to blog posts
This commit is contained in:
parent
d3383b2883
commit
d9487c8b58
@ -19,3 +19,8 @@ p.article-date {
|
|||||||
.paginator {
|
.paginator {
|
||||||
margin: .5em 0;
|
margin: .5em 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.plusone-container {
|
||||||
|
margin-left: 1em;
|
||||||
|
display: inline;
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
<div class="post">
|
<div class="post">
|
||||||
<h3>{% if title_links %}<a href="{{ path('GergelyPolonkaiFrontBundle_blogViewPost', {year: post.createdAt|date('Y'), month: post.createdAt|date('m'), day: post.createdAt|date('d'), slug: post.slug}) }}">{% endif %}{{ post.title }}{% if title_links %}</a>{% endif %}</h3>
|
<h3>{% if title_links %}<a href="{{ path('GergelyPolonkaiFrontBundle_blogViewPost', {year: post.createdAt|date('Y'), month: post.createdAt|date('m'), day: post.createdAt|date('d'), slug: post.slug}) }}">{% endif %}{{ post.title }}{% if title_links %}</a>{% endif %}<div class="plusone-container"><div class="g-plusone" data-annotation="inline" data-size="small" data-width="300"></div></div></h3>
|
||||||
<p class="article-date">{{ post.createdAt|date('m-d-Y :: H:i') }} by {{ post.user.name }}</p>
|
<p class="article-date">{{ post.createdAt|date('m-d-Y :: H:i') }} by {{ post.user.name }}</p>
|
||||||
{{ post.content|insert_code_chunks }}
|
{{ post.content|insert_code_chunks }}
|
||||||
{% if post.tags|length > 0 %}
|
{% if post.tags|length > 0 %}
|
||||||
@ -9,4 +9,5 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<div class="g-plus" data-action="share"></div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -66,6 +66,16 @@
|
|||||||
left: e.pageX + 5
|
left: e.pageX + 5
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
(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>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user