Revamp the navigation bar

This commit is contained in:
Petko Bordjukov 2015-04-20 15:42:39 +03:00
parent 4e606894b5
commit 167976eedc
4 changed files with 37 additions and 120 deletions

View File

@ -1,91 +0,0 @@
.navigation {
@extend .navbar;
@extend .navbar-inverse;
@extend .navbar-static-top;
.header {
@extend .navbar-header;
.brand {
@extend .navbar-brand;
}
.toggle {
@extend .navbar-toggle;
}
}
.right-menu {
@extend .nav;
@extend .navbar-nav;
@extend .navbar-right;
margin-right: 15px;
}
.sidebar {
@extend .navbar-default;
padding: 0;
}
.collapsable {
@extend .navbar-collapse;
margin-top: 0;
margin-bottom: 0;
}
.sidebar {
background: none;
}
.sidebar li a:hover {
background: none;
color: $link-color;
}
.sidebar ul li a {
color: $gray;
}
.sidebar ul li.active a {
color: $link-color;
}
.sidebar .arrow {
float: right;
}
.sidebar .fa.arrow:before {
content: "\f104";
}
.sidebar .active > a > .fa.arrow:before {
content: "\f107";
}
.sidebar .nav-second-level li,
.sidebar .nav-third-level li {
border-bottom: none !important;
}
.sidebar .nav-second-level li a {
padding-left: 37px;
}
.sidebar .nav-third-level li a {
padding-left: 52px;
}
@media(min-width:768px) {
.sidebar {
z-index: 1;
position: absolute;
width: 250px;
margin-top: 41px;
padding-right: 30px;
}
}
}
#side-menu {
}

View File

@ -1,30 +1,35 @@
nav.navigation role="navigation" nav.navbar.navbar-static-top.navbar-inverse role="navigation"
.header .container
= button_tag type: 'button', class: 'toggle', data: {toggle: 'collapse', target: '.collapsable'} .navbar-header
span.sr-only Toggle Navigation = button_tag type: 'button', class: 'navbar-toggle', data: {toggle: 'collapse', target: '.navbar-inverse-collapse'}
span.icon-bar span.icon-bar
span.icon-bar span.icon-bar
span.icon-bar span.icon-bar
= link_to management_path, class: 'brand' = link_to management_path, class: 'navbar-brand'
| Clarion | Clarion
ul.right-menu.collapsable .navbar-collapse.collapse.navbar-inverse-collapse
- if @conference.present? - if user_signed_in?
li.dropdown ul.nav.navbar-nav
a.dropdown-toggle href="#" data-toggle="dropdown" li.dropdown
i.fa.fa-users.fa-fw> a.dropdown-toggle href="#" data-toggle="dropdown"
span = @conference.title => icon 'users', class: 'fa-fw'
span.caret< span = Conference.model_name.human(count: 2).mb_chars.capitalize
- if Conference.count > 1 span.caret<
ul.dropdown-menu role="menu"
- Conference.all.each do |conference|
li
= link_to conference.title, management_conference_path(conference)
ul.nav.navbar-nav.navbar-right
li.dropdown
= link_to '#', class: 'dropdown-toggle', data: {toggle: 'dropdown'} do
=> icon 'flag', class: 'fa-fw'
= t("locales.#{I18n.locale}")
span.caret<
ul.dropdown-menu role="menu" ul.dropdown-menu role="menu"
- Conference.where.not(id: @conference.id).each do |conference| - I18n.available_locales.each do |locale|
li li.text-center
= link_to conference.title, management_conference_path(conference) = link_to t("locales.#{locale}"), "?locale=#{locale}"
li.dropdown - if user_signed_in?
a.dropdown-toggle href="#" data-toggle="dropdown" li
i.fa.fa-flag.fa-fw> = link_to destroy_user_session_path, method: :delete do
span = t "locales.#{I18n.locale}" = icon 'sign-out', t('sessions.sign_out')
span.caret<
ul.dropdown-menu role="menu"
- I18n.available_locales.each do |locale|
li.text-center
= link_to t("locales.#{locale}"), "?locale=#{locale}"

View File

@ -0,0 +1,3 @@
bg:
sessions:
sign_out: Изход