Skip to content

Commit

Permalink
Adding a twitter box.
Browse files Browse the repository at this point in the history
  • Loading branch information
mithro committed May 7, 2011
1 parent 0971a72 commit 5b02cea
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Expand Up @@ -7,3 +7,6 @@
[submodule "third_party/markdown-extensions/superscript"]
path = third_party/markdown-extensions/superscript
url = https://github.com/sgraber/markdown.superscript.git
[submodule "third_party/jquery.tweet"]
path = third_party/jquery.tweet
url = git://github.com/seaofclouds/tweet.git
3 changes: 3 additions & 0 deletions app.yaml
Expand Up @@ -17,6 +17,9 @@ handlers:
- url: /js
static_dir: static/js

- url: /third_party
static_dir: static/third_party

- url: /event/add
login: admin
script: editevent.py
Expand Down
1 change: 1 addition & 0 deletions static/third_party/jquery.tweet
21 changes: 21 additions & 0 deletions templates/index.html
Expand Up @@ -5,6 +5,9 @@
{% endcomment %}
{% block head %}
<link rel="StyleSheet" href="/css/index.css" type="text/css" media="screen">
<link rel="StyleSheet" href="/third_party/jquery.tweet/jquery.tweet.css" type="text/css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js" type="text/javascript"></script>
<script src="/third_party/jquery.tweet/jquery.tweet.js" type="text/javascript"></script>
{% endblock %}

{% block body %}
Expand All @@ -18,6 +21,24 @@ <h1>About Us</h1>

etc.
</div><!-- content -->
<div id=twitter class=box>
<div id=tweet></div>
</div><!-- twitter -->
<script>
$(document).ready(function(){
$("#tweet").tweet({
join_text: "auto",
query: "#sydlug",
avatar_size: 32,
count: 5,
loading_text: "loading tweets...",
refresh_interval: 10
}).bind("empty", function() {
$(this).append("No matching tweets found");
});
});
</script>

{% endblock %}

{% block leftbar %}
Expand Down
1 change: 1 addition & 0 deletions third_party/jquery.tweet
Submodule jquery.tweet added at e9dbe8

0 comments on commit 5b02cea

Please sign in to comment.