Adjust header layout for user menu

This commit is contained in:
John Firebaugh 2013-09-27 12:07:29 -07:00
parent 1b668ead62
commit f74c984a49
4 changed files with 56 additions and 46 deletions

View file

@ -493,15 +493,21 @@ a.donate {
right: 0;
}
#tabnav {
#top-bar nav > ul {
height: 29px;
margin-bottom: 0;
}
> li {
float: left;
nav.primary {
float: left;
> * {
padding: 3px $lineheight/2;
> ul {
> li {
float: left;
> * {
padding: 3px $lineheight/2;
}
}
}
@ -546,28 +552,17 @@ a.donate {
color: #000;
}
/* Utility for styling notification numbers */
.count-number {
padding: 2px $lineheight/4;
border-radius: 2px;
background: #d7d7ff;
margin: 0 2px;
font-size: 11px;
color: #333;
}
/* Rules for greeting bar in the top right corner */
#greeting {
nav.secondary {
float: right;
height: 100%;
&.secondary-actions {
> ul {
display: inline-block;
padding: 3px $lineheight/2;
}
&.dropdown {
.dropdown {
display: inline-block;
background-color: #EEE;
&:hover {
background-color: #CCC;
@ -609,6 +604,17 @@ a.donate {
}
}
/* Utility for styling notification numbers */
.count-number {
padding: 2px $lineheight/4;
border-radius: 2px;
background: #d7d7ff;
margin: 0 2px;
font-size: 11px;
color: #333;
}
/* Rules for the message shown in place of the map when javascript is disabled */
#noscript {

View file

@ -1,4 +1,4 @@
<div class='dropdown' id='greeting'>
<div class='dropdown'>
<a class='dropdown-toggle' data-toggle='dropdown' href="#">
<%= render :partial => 'layouts/inbox' %>
<%= @user.display_name %>

View file

@ -77,27 +77,32 @@
</div>
</div>
<div id='top-bar'>
<ul class='secondary-actions'>
<li><%= link_to t('layouts.help'), help_path %></li>
</ul>
<% if @user and @user.id %>
<%= render :partial => "layouts/user_menu" %>
<% else %>
<ul class='secondary-actions' id='greeting'>
<li><%= link_to t('layouts.log_in'), login_path(:referer => request.fullpath), {:id => 'loginanchor', :title => t('layouts.log_in_tooltip')} %></li>
<li><%= link_to t('layouts.sign_up'), user_new_path, {:id => 'registeranchor', :title => t('layouts.sign_up_tooltip')} %></li>
<nav class='primary'>
<ul>
<li id="view_tab">
<%= link_to t('layouts.view'), root_path, :class => 'tab geolink llz layers' %>
</li><li id="edit_tab">
<%= render :partial => 'layouts/edit_menu',
:locals => { :link_text => t('layouts.edit'), :link_class => 'llz object' }%>
</li><li id="history_tab">
<%= link_to t('layouts.history'), browse_changesets_path, :class => 'tab geolink bbox' %>
</li>
</ul>
<% end %>
<ul id="tabnav">
<li id="view_tab">
<%= link_to t('layouts.view'), root_path, :class => 'tab geolink llz layers' %>
</li><li id="edit_tab">
<%= render :partial => 'layouts/edit_menu',
:locals => { :link_text => t('layouts.edit'), :link_class => 'llz object' }%>
</li><li id="history_tab">
<%= link_to t('layouts.history'), browse_changesets_path, :class => 'tab geolink bbox' %>
</li>
</ul>
</nav>
<nav class='secondary'>
<% if @user and @user.id %>
<ul>
<li><%= link_to t('layouts.help'), help_path %></li>
</ul>
<%= render :partial => "layouts/user_menu" %>
<% else %>
<ul class="secondary-actions">
<li><%= link_to t('layouts.help'), help_path %></li>
<li><%= link_to t('layouts.log_in'), login_path(:referer => request.fullpath), {:id => 'loginanchor', :title => t('layouts.log_in_tooltip')} %></li>
<li><%= link_to t('layouts.sign_up'), user_new_path, {:id => 'registeranchor', :title => t('layouts.sign_up_tooltip')} %></li>
</ul>
<% end %>
</nav>
</div>
<div class="wrapper">
<%= render :partial => "layouts/flash", :locals => { :flash => flash } %>

View file

@ -999,9 +999,9 @@ en:
alt_text: OpenStreetMap logo
home: Go to Home Location
logout: Logout
log_in: log in
log_in: Log In
log_in_tooltip: Log in with an existing account
sign_up: sign up
sign_up: Sign Up
sign_up_tooltip: Create an account for editing
view: View
view_tooltip: View the map
@ -1031,8 +1031,7 @@ en:
osm_offline: "The OpenStreetMap database is currently offline while essential database maintenance work is carried out."
osm_read_only: "The OpenStreetMap database is currently in read-only mode while essential database maintenance work is carried out."
donate: "Support OpenStreetMap by %{link} to the Hardware Upgrade Fund."
donate_link_text: donating
help: help
help: Help
copyright: "Copyright & License"
community: Community
community_blogs: "Community Blogs"