Permalink
Browse files

Misc amends: google+1, twitter with observer, update railway and twit…

…ter modules
  • Loading branch information...
Anatoliy Chakkaev
Anatoliy Chakkaev committed Jun 2, 2011
1 parent 3fe05c7 commit 2e95e5bcaa328a59f76d492a7b5af06c9e1d9a67
Showing with 24 additions and 3 deletions.
  1. +1 −1 .railway
  2. +5 −0 app/observers/twitter_observer.js
  3. +6 −1 app/views/layouts/cms_layout.ejs
  4. +1 −1 node_modules/twitter
  5. +1 −0 npmfile.js
  6. +5 −0 package.json
  7. +5 −0 public/stylesheets/style.css
@@ -0,0 +1,5 @@
+app.on('twitterConnect', function (user, req, res) {
+ var location = req.session && req.session.beforeTwitterAuth || '/';
+ delete req.session.beforeTwitterAuth;
+ res.redirect(location);
+});
@@ -3,7 +3,7 @@
<head>
<title><%= title %></title>
<%- stylesheet_link_tag('reset', 'style') %>
- <%- javascript_include_tag('https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js', 'rails', 'application') %>
+ <%- javascript_include_tag('https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js', 'rails', 'application', 'http://apis.google.com/js/plusone.js') %>
<meta name="viewport" content="width=480, initial-scale=0.42">
<script type="text/javascript">
@@ -30,6 +30,9 @@
<div class="flash error"><%- flash %></div>
<% }; %>
<div class="wrap">
+ <div class="social">
+ <g:plusone size="tall"></g:plusone>
+ </div>
<div class="header">
<h1 class="title">
<a href="/">Railway</a><%= page.title !== 'Railway' ? ' / ' + page.title : '' %>
@@ -44,6 +47,8 @@
<div class="content">
<%- body %>
</div>
+ <div>
+ </div>
</div>
</body>
</html>
View
@@ -1,3 +1,4 @@
require('ejs-ext');
require('timezone');
require('mailer');
+require('twitter');
View
@@ -11,6 +11,11 @@
, "connect-mongodb": ">= 0.3.0"
, "connect": ">=1.4.1"
, "mongoose": "=1.2.0"
+ , "coffee-script": ">0"
+ , "yaml": ">0"
+ , "nodemailer": ">0"
+ , "oauth": ">0"
+ , "markdown-js": ">0"
}
, "repository":
{ "type": "git"
@@ -181,3 +181,8 @@ form.new-comment {
.comment .moderate {
float: right;
}
+
+.social {
+ padding-top: 20px;
+ float: right;
+}

0 comments on commit 2e95e5b

Please sign in to comment.