Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

jo

  • Loading branch information...
commit 8b6d96850c750b6b81a90beeb21cbcca20d0c179 1 parent a50874a
@Cosmo authored
View
52 app/assets/stylesheets/screen.css.sass
@@ -280,17 +280,57 @@ body.ui
color: #222
#footer
- width: 1024px
+ width: 584px
height: 44px
position: absolute
+ left: 220px
bottom: 0
- z-index: 1
+ z-index: 2
+
+ #comment_form
+
+ input
+ float: left
+ height: 44px
+ line-height: 44px
+ width: 300px
+ padding: 0
+ margin: 0
+ border: none
+ padding-left: 12px
+ font-size: 14px
+ color: #888
+ @include border-radius(0)
+
+ #stamp_comment
+ height: 26px
+ width: 26px
+ @include border-radius(18px)
+ float: left
+ background: #444
+ display: inline-block
+ border: none
+ margin: 9px
+
+ #send_comment
+ height: 26px
+ line-height: 26px
+ padding: 0 12px
+ color: #fff
+ @include border-radius(18px)
+ float: left
+ background: $orange
+ display: inline-block
+ border: none
+ margin: 9px 9px 9px 0
#login
+ position: absolute
+ top: 0
+ right: 0
height: 44px
- width: 220px
line-height: 44px
- text-indent: 16px
- background: $orange
color: #fff
- float: left
+ padding: 0 14px
+ float: right
View
6 app/controllers/sessions_controller.rb
@@ -7,7 +7,7 @@ def create
if user && user.authenticate(params[:password])
session[:user_id] = user.id
logger.info "logged in!"
- redirect_to root_url, :notice => "Logged in!"
+ redirect_to root_url
else
logger.info "invalid login!!!"
flash.now.alert = "Invalid email or password"
@@ -19,4 +19,8 @@ def destroy
session[:user_id] = nil
redirect_to root_url, :notice => "Logged out!"
end
+
+ def show
+ render "new"
+ end
end
View
3  app/views/home/index.html.erb
@@ -74,7 +74,8 @@
<%= link_to "Login", login_path, id: "login" %>
<div id="comment_form">
<input type="text" name="log_body" value="" id="log_body" autocomplete="off" />
- <button id="send_comment">Send</button>
+ <button id="stamp_comment"></button>
+ <button id="send_comment">Senden</button>
</div>
</div>
</div>
View
27 app/views/layouts/application.html.erb
@@ -12,6 +12,31 @@
<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/ui/apple-touch-icon-72x72.png" />
<%= yield(:head) %>
+
+ <div id="fb-root"></div>
+ <script>
+ window.fbAsyncInit = function() {
+ // init the FB JS SDK
+ FB.init({
+ appId : '415557498509876', // App ID from the App Dashboard
+ channelUrl : 'http://tvhackday.de/channel.html', // Channel File for x-domain communication
+ status : true, // check the login status upon init?
+ cookie : true, // set sessions cookies to allow your server to access the session?
+ xfbml : true // parse XFBML tags on this page?
+ });
+
+ };
+
+ // Load the SDK's source Asynchronously
+ (function(d){
+ var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
+ if (d.getElementById(id)) {return;}
+ js = d.createElement('script'); js.id = id; js.async = true;
+ js.src = "//connect.facebook.net/en_US/all.js";
+ ref.parentNode.insertBefore(js, ref);
+ }(document));
+ </script>
+
</head>
<%
if logged_in?
@@ -24,7 +49,7 @@ end
<% flash.each do |name, message| %>
<% message_type = (name == :notice ? "success" : name) %>
- <div>
+ <div id="flash_message">
<%= message.html_safe %>
</div>
<% end %>
Please sign in to comment.
Something went wrong with that request. Please try again.