retrospring/app/views/layouts/_header.html.haml

47 lines
2.2 KiB
Text
Raw Normal View History

2014-11-28 20:23:17 +01:00
%nav.navbar.navbar-inverse.navbar-fixed-top{role: "navigation"}
2014-12-06 17:08:10 +01:00
.container{class: ios_web_app? ? "ios-web-app" : ''}
2014-11-02 13:47:35 +01:00
.navbar-header
%button.navbar-toggle{"data-target" => "#j2-main-navbar-collapse", "data-toggle" => "collapse", type: "button"}
%span.sr-only Toggle navigation
2014-12-11 17:56:52 +01:00
- if user_signed_in?
- unless inbox_count.nil? or notification_count.nil?
2014-12-11 17:56:52 +01:00
%span.icon-bar.navbar--inbox-animation
%span.icon-bar.navbar--inbox-animation
%span.icon-bar.navbar--inbox-animation
- else
%span.icon-bar
%span.icon-bar
%span.icon-bar
2014-12-11 15:49:01 +01:00
- else
%span.icon-bar
%span.icon-bar
%span.icon-bar
%a.navbar-brand{href: "/"}= APP_CONFIG['site_name']
2014-11-02 13:47:35 +01:00
#j2-main-navbar-collapse.collapse.navbar-collapse
2014-11-10 23:46:51 +01:00
- if user_signed_in?
%ul.nav.navbar-nav
= nav_entry "Timeline", root_path
2014-11-30 02:06:15 +01:00
= nav_entry "Inbox", "/inbox", badge: inbox_count
2015-05-13 23:55:10 +02:00
= nav_entry "Discover", discover_path
2014-12-07 21:06:57 +01:00
%ul.nav.navbar-nav.navbar-right
- unless @user.nil?
- unless @user == current_user
2015-06-07 23:52:03 +02:00
%li.hidden-xs{"data-toggle" => "tooltip", "data-placement" => "bottom", title: t('views.actions.group')}
%a{href: '#', data: { target: "#modal-group-memberships", toggle: :modal }}
%i.fa.fa-users.hidden-xs
2015-06-07 23:52:03 +02:00
%span.visible-xs= t('views.actions.group')
2015-02-09 16:48:31 +01:00
= render "layouts/notifications"
2015-06-07 23:52:03 +02:00
%li.hidden-xs{"data-toggle" => "tooltip", "data-placement" => "bottom", title: t('views.actions.ask_question')}
2015-02-09 19:58:58 +01:00
.btn.btn-link.navbar-btn{name: "toggle-all-ask", "data-target" => "#modal-ask-followers", "data-toggle" => "modal", :type => "button"}
%i.fa.fa-pencil-square-o
2015-02-12 16:37:07 +01:00
= render "layouts/profile"
2014-11-10 23:46:51 +01:00
- else
%ul.nav.navbar-nav.navbar-right
2015-06-07 23:52:03 +02:00
= nav_entry t('views.sessions.create'), new_user_session_path
= nav_entry t('views.actions.new'), new_user_registration_path
2014-12-07 20:13:45 +01:00
- if user_signed_in?
2014-12-11 06:51:26 +01:00
= render 'shared/modal_ask_followers'
%button.btn.btn-primary.btn-fab.visible-xs{"data-target" => "#modal-ask-followers", "data-toggle" => "modal", :type => "button"}
2015-01-03 18:13:18 +01:00
%i.fa.fa-pencil-square-o