Permalink
Browse files

add social sharing in brick show page

closes #19
  • Loading branch information...
inmarelibero committed Nov 29, 2012
1 parent fa58f58 commit b8f3d0ac14a2a9b61902d69a702c915292eb61c2
@@ -15,6 +15,22 @@ body.route-brick_show {
font-size: 14px;
}
+ #info {
+ overflow: hidden;
+ padding: 15px 0px;
+ margin-bottom: 40px;
+
+ border-color: #CCC;
+ border-width: 1px 0px;
+ border-style: solid;
+
+
+ #social-share {
+ float: right;
+ > * { float: left; }
+ }
+ }
+
.content {
h1 { font-size: 20px; }
@@ -25,21 +25,30 @@
<p class="description">{{ brick.description }}</p>
- <hr>
+ <div id="info">
+ <div id="social-share">
+ <div>
+ <a href="https://twitter.com/share"
+ class="twitter-share-button pull-right"
+
+ data-url="{{ app.request.uri }}"
+ data-text="{{ brick.title }}"
+ data-via="SymfonyBricks"
+ >
+ Tweet
+ </a>
+ </div>
+ <div>
+ <g:plusone width="70"></g:plusone>
+ </div>
+ </div>
<i class="icon-user"></i> <a href="{{ path('userprofile_show', {'username': brick.user.username}) }}">{{ brick.user }}</a>
|
<i class="icon-calendar"></i> {{ 'brick.last_update'|trans }}: {{ brick.updatedAt|date('d/m/Y') }}
|
{{ macrosBrick.toggleUserStarsBrick(brick) }}
- <a href="https://twitter.com/share" class="twitter-share-button pull-right"
- data-url="{{ app.request.uri }}"
- data-text="{{ brick.title }}"
- data-via="SymfonyBricks"
- >
- Tweet
- </a>
- <hr>
+ </div>
<div class="content">
{{ brick.content|markdown }}
@@ -27,6 +27,14 @@
{% block javascripts_header %}
{# twitter #}
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
+
+ <script type="text/javascript">
+ (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>
{% endblock %}
{# google analytics code #}

0 comments on commit b8f3d0a

Please sign in to comment.