| |
@@ -1,8 +1,8 @@
|
| |
<div class="stats-container row">
|
| |
<div class="col-sm-7 col-md-12 col-lg-7">
|
| |
<table class="stats-table">
|
| |
- <tr><th>subscribers</th><th>subscribed to</th></tr>
|
| |
- <tr class="text-info"><td>{{subscribers_text}}</td><td class="text-center">{{subscribed_text}}</td></tr>
|
| |
+ <tr><th>subscribers</th><th>subscribed to</th><th>karma</th></tr>
|
| |
+ <tr class="text-info"><td>{{subscribers_text}}</td><td class="text-center">{{subscribed_text}}</td><td class="text-center" id="karma_current"></td></tr>
|
| |
</table>
|
| |
</div>
|
| |
<div class="col-sm-5 col-md-12 col-lg-5">
|
| |
@@ -21,3 +21,26 @@
|
| |
{% endif %}
|
| |
</div>
|
| |
</div>
|
| |
+
|
| |
+ <script type="text/javascript">
|
| |
+
|
| |
+ function get_karma_stats() {
|
| |
+ var karma_url = '{{ karma_url }}'
|
| |
+ $.ajax({
|
| |
+ method: "GET",
|
| |
+ url: karma_url,
|
| |
+ dataType: 'html',
|
| |
+ success: function(html) {
|
| |
+ console.log('Success: ' + html);
|
| |
+ karma_arr = JSON.parse(html);
|
| |
+ $('#karma_current').html(karma_arr['current']);
|
| |
+ },
|
| |
+ error: function() {
|
| |
+ console.log('Error: getting karma');
|
| |
+ },
|
| |
+ });
|
| |
+ }
|
| |
+
|
| |
+ get_karma_stats()
|
| |
+
|
| |
+ </script>
|
| |
\ No newline at end of file
|
| |
Initial hookup to the front end, disclaimer the ui isnt fixed and text overflows.
Looking for recommendations and some comments.