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

35 lines
2.0 KiB
Plaintext
Raw Normal View History

2020-04-19 15:04:01 -07:00
%nav.navbar.navbar-dark.navbar-expand-lg.bg-primary.fixed-top{role: "navigation"}
2014-12-06 08:08:10 -08:00
.container{class: ios_web_app? ? "ios-web-app" : ''}
2020-04-19 14:03:34 -07:00
%a.navbar-brand{href: "/"}= APP_CONFIG['site_name']
%button.navbar-toggler{"data-target" => "#j2-main-navbar-collapse", "data-toggle" => "collapse", type: "button"}
%span.sr-only Toggle navigation
%span.navbar-toggler-icon
2014-11-02 04:47:35 -08:00
#j2-main-navbar-collapse.collapse.navbar-collapse
2014-11-10 14:46:51 -08:00
- if user_signed_in?
2020-04-19 14:03:34 -07:00
%ul.nav.navbar-nav.mr-auto
2015-06-08 12:51:46 -07:00
= nav_entry t('views.navigation.timeline'), root_path
= nav_entry t('views.navigation.inbox'), "/inbox", badge: inbox_count
2020-04-19 04:55:13 -07:00
- if APP_CONFIG.dig(:features, :discover, :enabled) || current_user.mod?
= nav_entry t('views.navigation.discover'), discover_path
2020-04-19 14:03:34 -07:00
%ul.nav.navbar-nav
- unless @user.nil?
- unless @user == current_user
2020-04-19 14:03:34 -07:00
%li.nav-item.hidden-xs{"data-toggle" => "tooltip", "data-placement" => "bottom", title: t('views.actions.group')}
%a.nav-link{href: '#', data: { target: "#modal-group-memberships", toggle: :modal }}
%i.fa.fa-users.hidden-xs
2020-04-19 14:03:34 -07:00
%span.d-none.d-sm-inline.d-md-none= t('views.actions.group')
2015-02-09 07:48:31 -08:00
= render "layouts/notifications"
2020-04-19 14:03:34 -07:00
%li.nav-item.hidden-xs{"data-toggle" => "tooltip", "data-placement" => "bottom", title: t('views.actions.ask_question')}
2015-02-09 10:58:58 -08: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 07:37:07 -08:00
= render "layouts/profile"
2014-11-10 14:46:51 -08:00
- else
%ul.nav.navbar-nav.ml-auto
2015-06-07 14:52:03 -07:00
= nav_entry t('views.sessions.create'), new_user_session_path
2015-06-08 12:51:46 -07:00
= nav_entry t('views.sessions.new'), new_user_registration_path
2014-12-07 11:13:45 -08:00
- if user_signed_in?
= render 'modal/ask'
2020-04-19 14:03:34 -07:00
%button.btn.btn-primary.btn-fab.d-block.d-sm-none{"data-target" => "#modal-ask-followers", "data-toggle" => "modal", :type => "button"}
2015-01-03 09:13:18 -08:00
%i.fa.fa-pencil-square-o