Add facebook like button #209
authorCharles Connell <charles@connells.org>
Sun, 22 Dec 2013 04:01:28 +0000 (23:01 -0500)
committerCharles Connell <charles@connells.org>
Sun, 22 Dec 2013 04:01:28 +0000 (23:01 -0500)
karmaworld/templates/base.html
karmaworld/templates/notes/note_detail.html

index 0f2d719d128641edaab29a23660960db5605ebf3..74f330b80cc4f82128f2a913e45c567701780f47 100644 (file)
        
 </head>
 <body>
+
+<!-- block bodyscripts -->
+{% block bodyscripts %}
+{% endblock %}
+<!-- end block bodyscripts -->
+
 <!-- include header -->
 {% include 'header.html' %}
 <!-- end include header -->
index 5eadb1c388be19e58c30c66ce67868fef0552551..0f1951acbdd220199de78002cbb71de9b8c076e1 100644 (file)
@@ -9,6 +9,17 @@
   <script src="{{ STATIC_URL }}js/note-iframe.js" ></script>
 {% endblock %}
 
+{% block bodyscripts %}
+  <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 = "//connect.facebook.net/en_US/all.js#xfbml=1&appId=271212543025990";
+    fjs.parentNode.insertBefore(js, fjs);
+  }(document, 'script', 'facebook-jssdk'));</script>
+{% endblock %}
+
 {% block content %}
   <section id="note_content">
 
 
 
   </section><!--/note_content-->
+
+    <!--{% url 'note_detail' note.course.school.slug note.course.slug note.slug %}-->
+
+  <div id="facebook" style="position: fixed; right: 10px; bottom: 10px;">
+    <div class="fb-like" data-href="https://karmanotes.org{% url 'note_detail' note.course.school.slug note.course.slug note.slug %}" data-width="25" data-layout="box_count" data-action="recommend" data-show-faces="false" data-share="true"></div>
+  </div>
 {% endblock %}