Skip to content

Commit

Permalink
logout menu
Browse files Browse the repository at this point in the history
  • Loading branch information
kevzettler committed Apr 4, 2012
1 parent c54db0f commit 6a23273
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
5 changes: 5 additions & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@
//= require backbone/kandan
//= require_tree .

$(function(){
$('.user_menu_link').click(function(){
$('.user_menu').toggle();
});
});
32 changes: 32 additions & 0 deletions app/assets/stylesheets/_base.sass
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,38 @@
+box-shadow(inset 0px -7px 6px -5px #3a4547)
border-bottom: 1px solid #FFF

.user_menu_link
float: right
.user
float: right
.user_flag
float: right

.user_flag
display: block
border-color: #a8aeb0 transparent transparent transparent
border-style: solid
border-width: 7px
float: right
width: 0
height: 0
margin-top: 11px

.user_menu
background-color: $header-bg-1
+background-image(linear-gradient($header-bg-1, $header-bg-2))
+border-radius(4px)
position: absolute
right: 0px
z-index: 9000
height: auto
width: 100px
padding: 5px
display: none
a
color: #FFF


/* gotta bump stuff in the header
.logo, .ui-tabs-nav
padding-top: 7px !important
Expand Down
12 changes: 10 additions & 2 deletions app/views/main/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,17 @@


<div class="header">
<%= image_tag "logo.png", :class=>"logo" %>
<%= image_tag "logo.png", :class=>"logo" %>

<a href="#" class="user_menu_link">
<cite class="user_flag"></cite>
<div class="user"></div>
</a>

<div class="user_menu">
<a href="<%= destroy_user_session_path %>">logout</a>
</div>

<div class="user"></div>
<div class="search">
<form method="get" action="/search" target="_blank">
<input type="text" class="query" name="query"/>
Expand Down

0 comments on commit 6a23273

Please sign in to comment.