Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add a twitter widget which only appears for MPs on Twitter.

  • Loading branch information...
commit 205f4521e6ce355a62fa291497146d4626a5c142 1 parent 0bb9fcb
@davorg authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 PoliticalWeb/views/constituency.tt
View
7 PoliticalWeb/views/constituency.tt
@@ -56,9 +56,14 @@ $(document).ready(function () {
</div>
<div class="tab-pane" id="news">
</div>
+[% IF mp.twitter -%]
<div class="tab-pane" id="twitter">
- Twitter here
+<!-- BEGIN: Twitter website widget (http://twitterforweb.com) -->
+<div style="width:520px;font-size:8px;text-align:right;"><script type="text/javascript">
+document.write(unescape("%3Cscript src='http://twitterforweb.com/twitterbox.js?username=[% mp.twitter %]&settings=1,0,3,430,550,f4f4f4,0,c4c4c4,101010,1,1,e78b24' type='text/javascript'%3E%3C/script%3E"));</script>Created by: <a href="http://twitterforweb.com" target="_blank">twitter website widget</a></div>
+<!-- END: Twitter website widget (http://twitterforweb.com) -->
</div>
+[% END %]
<div class="tab-pane" id="blog">
Blog here
</div>
Please sign in to comment.
Something went wrong with that request. Please try again.