Skip to content

Commit

Permalink
Renamed TM to top-menu for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
brzaik committed Jul 10, 2012
1 parent bf0141f commit 064c6e0
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 51 deletions.
File renamed without changes
File renamed without changes
47 changes: 13 additions & 34 deletions app/assets/stylesheets/application/layout/topmenu.scss.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

/*########## STRUCTURE ##########*/

nav#TM {
#top-menu {
width: 100%;
@include vertical-gradient(#fbfbfb, #d5d5d5);
@include box-shadow(0px 1px 6px $gray);
Expand All @@ -19,7 +19,7 @@ nav#TM {

// custom attributes:
@include border-radius(6px);
background: transparent image-url('layout/TM/button_TM_states.png') top left repeat-x;
background: transparent image-url('layout/top-menu/button_top-menu_states.png') top left repeat-x;

// IE fix: reset Microsoft filter attribute:
filter: none;
Expand All @@ -33,7 +33,7 @@ nav#TM {
float: left;

&:hover {
background: transparent image-url('layout/TM/button_TM_states.png') top left repeat-x;
background: transparent image-url('layout/top-menu/button_top-menu_states.png') top left repeat-x;
text-shadow: 0 1px #eee;
background-position: 100% -31px;
border: solid 1px #2f84da;
Expand All @@ -49,7 +49,7 @@ nav#TM {
}

&:active {
background: transparent image-url('layout/TM/button_TM_states.png') top left repeat-x;
background: transparent image-url('layout/top-menu/button_top-menu_states.png') top left repeat-x;
background-position: 100% -62px;
border: solid 1px #333;
}
Expand Down Expand Up @@ -88,7 +88,7 @@ nav#TM {
}
}

a#TM-logobutton {
#top-menu-logobutton {
@include vertical-gradient($concerto-blue-1, $concerto-blue-2);
float: left;
color: $white;
Expand All @@ -107,7 +107,7 @@ nav#TM {
}
}

p#TM-logintext {
#top-menu-logintext {
float: left;
padding: 4px 12px;
margin: 0px;
Expand All @@ -126,12 +126,12 @@ nav#TM {
float: right;
}

.TM-sectop {
.top-menu-sectop {
height: 34px;
padding: 0px 2px;
}

.TM-secbot {
.top-menu-secbot {
background: #f9f9f9;

h1 {
Expand All @@ -147,15 +147,15 @@ nav#TM {

}

// applies only to login section (leftmost in top menu)
&#LG-inner {
// applies only to login section (leftop-menuost in top menu)
&#login-inner {
float: left;
width: 153px;
height: 60px;
padding: 3px 28px 0px 54px;
background: image-url('layout/LG_bluebg.png') top right no-repeat;

div.TM-sectop p {
div.top-menu-sectop p {
color: #FFF;
font-size: 1em;
text-shadow: 0px -1px 0px $black;
Expand All @@ -167,7 +167,7 @@ nav#TM {

}

div.TM-secbot p {
div.top-menu-secbot p {
color: #666;
font-size: 0.8em;
text-shadow: 0 0.05em #FFF;
Expand All @@ -184,25 +184,4 @@ nav#TM {

}

}


// "Show Top Menu" banner that is only visible when the top menu is
// rolled up
nav#show-TM {
display: none;
width: 100%;

a {
background: $grayDark;
color: $grayLighter;
text-shadow: 0px -1px 0px $black;
padding: 2px 12px;
display: block;
text-transform: uppercase;
font-size: 0.7em;
letter-spacing: 0.2em;
text-align: center;
}
}

}
28 changes: 12 additions & 16 deletions app/views/elements/_topmenu_contents.html.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
<nav id="show-TM">
<a href="#">-- Show Top Menu --</a>
</nav>

<nav id="TM">
<nav id="top-menu">
<% if not user_signed_in? %>
<%= link_to "Concerto", root_url, :id => "TM-logobutton" %>
<p id="TM-logintext">
<%= link_to "Concerto", root_url, :id => "top-menu-logobutton" %>
<p id="top-menu-logintext">
<%= link_to t(:sign_in), new_user_session_path, :id => "login-dropdown" %> <%=t(:signin_login_spiel) %>
<% if can? :create, User %>
No account? <%= link_to t(:sign_up), new_user_registration_path %> now!
Expand Down Expand Up @@ -38,20 +34,20 @@
});
</script>
<% else %>
<%= link_to root_url, :id => "TM-logobutton", :class => "full" do %>
<%= link_to root_url, :id => "top-menu-logobutton", :class => "full" do %>
<i class="icon-logobutton"></i>
<% end %>

<!-- Begin Menu for CONTENT -->
<section>
<div class="TM-sectop">
<div class="top-menu-sectop">
<%= link_to t(:browse), feeds_path, :class => "btn #{ current_page?(feeds_path) || (controller.controller_name == 'submissions' && ['index', 'show'].include?(controller.action_name)) ? 'selected' : '' }" %>
<%= link_to t(:add), new_content_path, :class => "btn #{ current_page?(new_content_path) ? 'selected' : '' }" if can? :create, Content %>
<%= link_to moderate_path, :class => "btn" do %>
<%= t(:moderate) %>&nbsp;<span class="badge alert">##</span>
<% end %>
</div>
<div class="TM-secbot">
<div class="top-menu-secbot">
<h1><%= t(:content) %></h1>
</div>
</section>
Expand All @@ -60,11 +56,11 @@
<!-- Begin Menu for NETWORK -->
<% if !(Group.joins(:screens, :users).where(:users => {:id => current_user.id}) + current_user.screens).empty? %>
<section>
<div class="TM-sectop">
<div class="top-menu-sectop">
<%= link_to t(:screens), screens_path, :class => "btn #{ controller.controller_name == 'screens' ? 'selected' : '' }" %>
<%= link_to t(:users_and_groups), groups_path, :class => "btn #{ controller.controller_name == 'groups' ? 'selected' : '' }" %>
</div>
<div class="TM-secbot">
<div class="top-menu-secbot">
<h1><%= t(:network) %></h1>
</div>
</section>
Expand All @@ -73,22 +69,22 @@

<!-- Begin Menu for ADMIN -->
<section>
<div class="TM-sectop">
<div class="top-menu-sectop">
<%= link_to t(:dashboard), dashboard_path, :class => "btn #{ controller.controller_name == 'dashboard' ? 'selected' : '' }" %>
</div>
<div class="TM-secbot">
<div class="top-menu-secbot">
<h1><%= t(:admin) %></h1>
</div>
</section>
<!-- End Menu for ADMIN -->

<!-- Begin User Login Area -->
<section class="right">
<div class="TM-sectop">
<div class="top-menu-sectop">
<p><b><%= current_user.name %></b></p>
<p><%= link_to t(:settings), edit_user_path(current_user) %>, <%= link_to t(:log_out), destroy_user_session_path %></p>
</div>
<div class="TM-secbot">
<div class="top-menu-secbot">
</div>
</section>
<!-- End User Login Area -->
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title><%= yield_for_title(controller.controller_name.titleize) %> - Concerto Panel</title>
<meta name="generator" content="Concerto <%= Concerto::VERSION::STRING %>" />
<meta name="application-name" content="Concerto" />
<%= stylesheet_link_tag "application" %>
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "application" %>
<%= csrf_meta_tag %>
Expand Down

0 comments on commit 064c6e0

Please sign in to comment.