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

View File

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