Skip to content

Style top menu #158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 9, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 10 additions & 15 deletions app/assets/stylesheets/application.css.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@import "base";
@import "compass/css3/";
@import "compass/css3";
@import "fonts";
@import "normailze";
@import "tipTip";
Expand Down Expand Up @@ -103,31 +103,23 @@ h4 {
#nav {
float: right;
li {
float: left;
display: inline-block;
line-height: 100px;
margin-left: 30px;
&:first-child {
margin: 0px;
}
}
.new {
a:before {
content: "New";
padding: 3px 6px 2px 6px;
@include border-radius(4px);
background: $light-blue;
color: #fff;
margin-right: 10px;
font-size: 0.7em;
vertical-align: middle;
text-transform: uppercase;
}
i {
font-size: 1.4em;
color: $level2;
margin-right: 2px;
}
a {
font-size: 1.4em;
color: #fff;
@include ts-top-black;
display: block;
display: inline;
&:hover {
color: $light-blue;
}
Expand All @@ -137,6 +129,9 @@ h4 {
&:hover {
color: $light-grey;
}
i {
color: $level1;
}
}
}

Expand Down
20 changes: 0 additions & 20 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,26 +124,6 @@ def connections_nav_class
end
end

def team_nav_class
if params[:controller] == "teams" && params[:action] != 'index'
if signed_in? && current_user.team_document_id == params[:id] || params[:id].blank?
'active'
else
nil
end
else
nil
end
end

def teams_nav_class
if params[:controller] == "teams" && params[:action] == 'index'
'active'
else
nil
end
end

def jobs_nav_class
if params[:controller] == "opportunities" && params[:action] == 'index'
'active'
Expand Down
36 changes: 36 additions & 0 deletions app/views/application/_navigation.slim
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
header#masthead
.inside-masthead.cf
.mobile-panel.cf
= link_to root_path, class: 'logo'
span coderwall
a.menu-btn

nav#nav
ul
li
i.fa.fa-graduation-cap
= link_to(t('protips'), root_path)
-if signed_in?
li
i.fa.fa-user
= link_to('Profile', badge_path(username: current_user.username), class: mywall_nav_class)

li
i.fa.fa-money
= link_to('Jobs', jobs_path, class: jobs_nav_class)
-if signed_in?
li
i.fa.fa-cogs
= link_to('Settings', settings_path, class: settings_nav_class)
li
i.fa.fa-sign-out
= link_to('Sign out', sign_out_path)
-else

li
i.fa.fa-sign-in
= link_to('Sign In', signin_path, class: signin_nav_class)
li
i.fa.fa-plus-square
= link_to('Sign Up', signin_path, class: signup_nav_class)

23 changes: 0 additions & 23 deletions app/views/layouts/_navigation.html.haml

This file was deleted.

2 changes: 1 addition & 1 deletion app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
= yield :head

%body{ id: yield(:body_id) }
= render partial: 'layouts/navigation'
= render partial: 'navigation'
#main-content
- if main_content_wrapper(yield(:content_wrapper))
- if flash[:notice] || flash[:error]
Expand Down
21 changes: 1 addition & 20 deletions app/views/layouts/protip.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,8 @@
= yield :head
= csrf_meta_tag
%body.protip-single
= render partial: 'layouts/navigation'
= render partial: 'navigation'

.mobile-top
%a.new-logo{href: '/'}
%a.mobile-nav-btn#x-mobile-toggle

%nav.mobile-nav#x-mobile-menu
%ul
%li= link_to('Discover', root_path)
-if signed_in?
%li= link_to('Admin', admin_root_path) if is_admin?
%li= link_to('Profile', badge_path(username: current_user.username), class: mywall_nav_class)

%li= link_to('Teams', teams_path, class: teams_nav_class)
%li= link_to('Jobs', jobs_path, class: jobs_nav_class)
-if signed_in?
%li= link_to('Settings', settings_path, class: settings_nav_class)
%li= link_to('Sign out', sign_out_path)
-else
%li= link_to('Sign In', signin_path, class: signin_nav_class)
%li= link_to('Sign Up', signin_path, class: signup_nav_class)
%canvas.blur{src: image_path(users_background_image)}
=yield

Expand Down
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.

en:
hello: "Hello world"
protips: "Protips"