Retrospring/app/views/navigation/_main.haml

29 lines
1.7 KiB
Plaintext
Raw Normal View History

2020-05-10 13:27:39 -07:00
%nav.navbar.navbar-themed.navbar-expand-lg.bg-primary.fixed-top{ role: :navigation }
2020-05-10 02:35:10 -07:00
.container{ class: ios_web_app? ? 'ios-web-app' : '' }
%a.navbar-brand{ href: '/' }= APP_CONFIG['site_name']
%button.navbar-toggler{ data: { target: '#j2-main-navbar-collapse', toggle: :collapse }, type: :button }
%span.sr-only Toggle navigation
%span.navbar-toggler-icon
2020-05-10 02:35:10 -07:00
.collapse.navbar-collapse#j2-main-navbar-collapse
%ul.nav.navbar-nav.mr-auto
= nav_entry t('views.navigation.timeline'), root_path
2020-05-10 02:35:10 -07:00
= nav_entry t('views.navigation.inbox'), '/inbox', badge: inbox_count
- if APP_CONFIG.dig(:features, :discover, :enabled) || current_user.mod?
= nav_entry t('views.navigation.discover'), discover_path
%ul.nav.navbar-nav
- unless @user.nil?
- unless @user == current_user
%li.nav-item.d-none.d-sm-block{ data: { toggle: 'tooltip', placement: 'bottom' }, title: t('views.actions.list') }
%a.nav-link{ href: '#', data: { target: '#modal-list-memberships', toggle: :modal } }
%i.fa.fa-list.hidden-xs
%span.d-none.d-sm-inline.d-md-none= t('views.actions.list')
2020-05-10 02:35:10 -07:00
= render 'navigation/main/notifications'
%li.nav-item.d-none.d-sm-block{ data: { toggle: 'tooltip', placement: 'bottom' }, title: t('views.actions.ask_question') }
%a.nav-link{ href: '#', name: 'toggle-all-ask', data: { target: '#modal-ask-followers', toggle: :modal } }
%i.fa.fa-pencil-square-o
2020-05-10 02:35:10 -07:00
= render 'navigation/main/profile'
= render 'modal/ask'
2020-05-10 02:35:10 -07:00
%button.btn.btn-primary.btn-fab.d-block.d-sm-none{ data: { target: '#modal-ask-followers', toggle: :modal }, type: 'button' }
%i.fa.fa-pencil-square-o