修改样式

This commit is contained in:
tanhuazhe 2016-01-07 15:26:49 +08:00
parent 7ca21d9d22
commit e2d8649aae
1 changed files with 8 additions and 4 deletions

View File

@ -24,12 +24,10 @@
%ul.nav.navbar-nav.navbar-right %ul.nav.navbar-nav.navbar-right
- if is_logined? - if is_logined?
%li.dropdown %li.dropdown
.navbar-header.navbar-avatar = link_to '#',id:'drop', class: 'dropdown-toggle pull-right',"data-toggle"=>"dropdown", "role"=>"button", "aria-haspopup"=>"true" do
= avatar @current_user
= link_to '#', class: 'dropdown-toggle pull-right', "data-toggle"=>"dropdown" do
= @current_user.nickname = @current_user.nickname
%span.caret %span.caret
%ul.dropdown-menu{role: 'menu'} %ul.dropdown-menu{role: 'menu' ,"aria-labelledby"=>"drop"}
%li %li
= link_to '#' do = link_to '#' do
= gravatar_image_tag @current_user.email, size: 100, alt: @current_user.nickname, gravatar: {default: 'https://secure.gravatar.com/avatar/08f077ea061585744ee080824f5a8e65.png?r=PG&d=identicon&s=64'} = gravatar_image_tag @current_user.email, size: 100, alt: @current_user.nickname, gravatar: {default: 'https://secure.gravatar.com/avatar/08f077ea061585744ee080824f5a8e65.png?r=PG&d=identicon&s=64'}
@ -40,6 +38,8 @@
= link_to '写博客', new_article_path = link_to '写博客', new_article_path
%li %li
= link_to '退出', logout_path = link_to '退出', logout_path
.navbar-header.navbar-avatar
= avatar @current_user
- else - else
%ul.navbar-button.navbar-right %ul.navbar-button.navbar-right
%li %li
@ -59,4 +59,8 @@
$('#search_button').click(function(){ $('#search_button').click(function(){
$('#search_form').submit(); $('#search_form').submit();
}); });
$('#drop').click(function(){
//$('.dropdown-toggle').dropdown('toggle')
});
$('.dropdown-toggle').dropdown();
}); });