Permalink
Browse files

minor changes

1 parent 84318c2 commit a99c59e76164a5e82935bfd684100b0eabc1c0ae @Dan12 committed Mar 4, 2016
@@ -4,7 +4,10 @@ $(document).ready(function(){
$(window).resize(function(){
$(".buttons").css("margin", "0");
- $(".buttons").css("margin","0 "+(($("body").innerWidth()-$(".buttons").width()-30)/2)+"px");
+ var margin = (($("body").innerWidth()-$(".buttons").width()-30)/2);
+ if(margin < 0)
+ margin = 0;
+ $(".buttons").css("margin","0 "+margin+"px");
});
});
@@ -25,6 +25,7 @@ h1{
.buttons{
display:inline-block;
+ min-width: 840px;
}
.link{
@@ -96,6 +97,18 @@ h1{
cursor: pointer;
}
+#signout_button{
+ position: absolute;
+ top: 26px;
+ right: 30px;
+}
+
+#signout_button a{
+ padding: 4px 10px;
+ border: 1px solid gray;
+ border-radius: 2px;
+}
+
#license{
display: inline-block;
margin-left: 20px;
@@ -14,7 +14,7 @@ def index
def logout
session[:user_id] = nil
- render :json => {"message" => "logged out"}
+ redirect_to "/"
end
def login
@@ -1,5 +1,9 @@
<h1>Online Launchpad</h1>
+<% if session[:user_id] != nil %>
+<div id="signout_button"><a href="logout">Sign Out</a></div>
+<% end %>
+
<div id="video_link" class="link">Watch the video: <a href="https://www.youtube.com/watch?v=s9FyJe_TLd8" target="_blank">Online Launchpad Demo</a></div>
<div class="buttons"></div>
View
@@ -4,7 +4,7 @@
post "/get_asset_path" => "application#getAssetUrl"
post "/login" => "application#login"
- post "/logout" => "application#logout"
+ get "/logout" => "application#logout"
#song
post "/create_song" => "song#create"

0 comments on commit a99c59e

Please sign in to comment.