Skip to content

Commit

Permalink
Clearer sharing for comments - closes #362, closes #363
Browse files Browse the repository at this point in the history
  • Loading branch information
Edmund von der Burg committed Mar 15, 2012
1 parent ed67096 commit ed2140b
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 18 deletions.
2 changes: 1 addition & 1 deletion mzalendo/comments2/templates/comments/list.html
Expand Up @@ -7,7 +7,7 @@
<h4>{{ comment.title }}</h4> <h4>{{ comment.title }}</h4>
<p class="meta">by {% firstof comment.user.get_full_name comment.user.username %} <time datetime="{{ comment.submit_date }}">{{ comment.submit_date|timesince }}</time> ago</p> <p class="meta">by {% firstof comment.user.get_full_name comment.user.username %} <time datetime="{{ comment.submit_date }}">{{ comment.submit_date|timesince }}</time> ago</p>
<ul class="tools"> <ul class="tools">
<li><a href="#" class="like">like</a></li> <li><a href="{{ comment.get_absolute_url }}" class="like">share</a></li>
<li><a href="/comments/flag/{{ comment.id }}/" class="report">report</a></li> <li><a href="/comments/flag/{{ comment.id }}/" class="report">report</a></li>
<li><a href="{{ comment.get_absolute_url }}">link</a></li> <li><a href="{{ comment.get_absolute_url }}">link</a></li>
</ul> </ul>
Expand Down
26 changes: 14 additions & 12 deletions mzalendo/comments2/templates/comments/view.html
Expand Up @@ -7,6 +7,20 @@


{% block content %} {% block content %}


<ul class="social-buttons" style="float: right;">
<li>
<a
href="https://twitter.com/share"
class="twitter-share-button"
data-text="Good comment on {{ comment.content_object.name }}: {{ comment.title }}"
data-count="vertical"
>Tweet</a>
</li>
<li>
<div class="fb-like" data-send="false" data-layout="box_count"></div>
</li>
</ul>

{% if comment_rejected %} {% if comment_rejected %}
<h1>Comment has been removed</h1> <h1>Comment has been removed</h1>


Expand Down Expand Up @@ -38,18 +52,6 @@ <h1>Comment on <a href="{{ comment.content_object.get_absolute_url }}">{{ commen
<a class="permalink" href="{{ comment.get_absolute_url }}">permalink</a> <a class="permalink" href="{{ comment.get_absolute_url }}">permalink</a>
</p> </p>


<p>
Share this comment with others:
<a
href="https://twitter.com/share"
class="twitter-share-button"
data-text="Good comment on {{ comment.content_object.name }}: {{ comment.title }}"
data-count="none"
>Tweet your comment</a>

<span class="fb-send" data-href="http://{{ request.get_host }}{{ comment.get_absolute_url }}"></span>
</p>

{% endif %} {% endif %}


{% endblock %} {% endblock %}
17 changes: 15 additions & 2 deletions mzalendo/core/static/css/all.css
Expand Up @@ -1554,8 +1554,6 @@ menu#site-user-tools ul li.active a:hover {
#page .page-wrapper { #page .page-wrapper {
clear: both; clear: both;
display: block; display: block;
overflow: hidden;
position: relative;
} }
#page .title-space { #page .title-space {
max-width: 510px; max-width: 510px;
Expand Down Expand Up @@ -3476,3 +3474,18 @@ h2 a.appearances-trigger.active {
margin: 0; margin: 0;
} }
} }
ul.social-buttons {
list-style-type: none;
padding: 0;
margin: 0;
}
ul.social-buttons li {
list-style-type: none;
padding: 0;
margin: 0;
border: 0;
}
ul.social-buttons li {
float: left;
padding: 4px;
}
2 changes: 1 addition & 1 deletion mzalendo/core/static/js/loader.js
Expand Up @@ -39,6 +39,7 @@
both: [ both: [
static_url('js/analytics.js'), static_url('js/analytics.js'),
'//platform.twitter.com/widgets.js', '//platform.twitter.com/widgets.js',
'//connect.facebook.net/en_GB/all.js#xfbml=1&appId=' + mzalendo_settings.facebook_app_id,
'//www.google.com/jsapi' // ?key=INSERT-YOUR-KEY '//www.google.com/jsapi' // ?key=INSERT-YOUR-KEY
].concat( extra_js ), ].concat( extra_js ),
complete: function () { complete: function () {
Expand All @@ -48,7 +49,6 @@
} }
} }
); );

})(); })();


var mzalendo_run_when_document_ready_array = []; var mzalendo_run_when_document_ready_array = [];
Expand Down
5 changes: 3 additions & 2 deletions mzalendo/core/static/sass/_page.scss
Expand Up @@ -228,8 +228,9 @@
.page-wrapper { .page-wrapper {
clear: both; clear: both;
display: block; display: block;
overflow: hidden; // overflow: hidden;
position: relative; } // position: relative;
}
.title-space { .title-space {
max-width: 510px; max-width: 510px;
min-height: 0; min-height: 0;
Expand Down
5 changes: 5 additions & 0 deletions mzalendo/core/static/sass/_social.scss
@@ -0,0 +1,5 @@
ul.social-buttons {
@include list-reset-soft;
li {
float: left;
padding: 4px;} }
3 changes: 3 additions & 0 deletions mzalendo/core/static/sass/all.scss
Expand Up @@ -29,3 +29,6 @@
@import "auth_pages"; @import "auth_pages";
@import "appearances"; @import "appearances";
@import "info_pages"; @import "info_pages";

// overides to external features
@import "social";
2 changes: 2 additions & 0 deletions mzalendo/templates/base.html
Expand Up @@ -119,6 +119,8 @@
<div class="page-wrapper wrapper"> <div class="page-wrapper wrapper">
{% block content %}{% endblock %} {% block content %}{% endblock %}
{% block after_content %}{% endblock %} {% block after_content %}{% endblock %}

<br clear="both">
</div> </div>
</div> </div>


Expand Down

0 comments on commit ed2140b

Please sign in to comment.