mainsite/templates/side_menu.html
<aside class="side-menu">
<div class="padding10"></div>
{% if not is_search %}
<script>
(function() {
var cx = '{{ cx }}';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
{% endif %}
<gcse:searchbox-only resultsUrl="{% url 'search' %}">Search</gcse:searchbox-only>
<div class="padding10"></div>
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#discussed" aria-controls="discussed" role="tab" data-toggle="tab">Most Discussed</a></li>
<li role="presentation"><a href="#viewed" aria-controls="viewed" role="tab" data-toggle="tab">Most Viewed</a></li>
<li role="presentation"><a href="#recent" aria-controls="recent" role="tab" data-toggle="tab">Most Recent</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="discussed">
<section>
<h2>Most Discussed</h2>
<script type="text/javascript" src="http://pomonatsl.disqus.com/popular_threads_widget.js?num_items=5"></script>
</section>
</div>
<div role="tabpanel" class="tab-pane" id="viewed">
<section>
<h2>Most Viewed</h2>
{% for article in populars %}
<a href="{{ article.get_absolute_url }}">
<div>{{ article.title }}</div>
</a>
<p class="dsq-widget-meta">{{ article.clicks }} views</p>
{% endfor %}
</section>
</div>
<div role="tabpanel" class="tab-pane" id="recent">
<section>
<h2>Most Recent</h2>
{% for article in recents %}
<a href="{{ article.get_absolute_url }}">
<div>{{ article.title }}</div>
</a>
<p class="dsq-widget-meta">{{ article.updated_date }}</p>
{% endfor %}
</section>
</div>
</div>
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#twitter" aria-controls="twitter" role="tab" data-toggle="tab">Twitter</a></li>
<li role="presentation"><a href="#facebook" aria-controls="facebook" role="tab" data-toggle="tab">Facebook</a></li>
</ul>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="twitter">
<section>
<a class="twitter-timeline" href="https://twitter.com/TSLnews" data-widget-id="731750885844344833">Tweets by @TSLnews</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
</section>
</div>
<div role="tabpanel" class="tab-pane" id="facebook">
<div class="fb-page" data-href="https://www.facebook.com/thestudentlife/?fref=ts" data-tabs="timeline" data-height="500px" data-small-header="false" data-adapt-container-width="true" data-hide-cover="true" data-show-facepile="false"><div class="fb-xfbml-parse-ignore"><blockquote cite="https://www.facebook.com/thestudentlife/?fref=ts"><a href="https://www.facebook.com/thestudentlife/?fref=ts">The Student Life</a></blockquote></div></div>
<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/sdk.js#xfbml=1&version=v2.6&appId=1695760970662244";fjs.parentNode.insertBefore(js, fjs);}(document, 'script', 'facebook-jssdk'));</script>
</div>
</div>
{% if comic_url %}
<section class="comic">
<h2>Weekly Comic</h2>
<a href="{{ comic_url }}"><img src="{{ comic_url }}" style="max-width: 80%"></a>
</section>
{% endif %}
</aside>