Fix lints in app/views/navigation

This commit is contained in:
Andreas Nedbal 2020-05-10 11:35:10 +02:00
parent 979bbbd13e
commit ed3ec93f13
7 changed files with 49 additions and 59 deletions

View File

@ -1,10 +0,0 @@
%nav.navbar.navbar-light.navbar-static-top.j2-navbar.d-flex.d-sm-none.bg-white{role: "navigation"}
%a.navbar-brand{href: "/"} Timelines
%button.navbar-toggler{"data-target" => "#j2-tl-navbar-collapse", "data-toggle" => "collapse", type: "button"}
%span.sr-only Toggle navigation
%span.navbar-toggler-icon
#j2-tl-navbar-collapse.collapse.navbar-collapse
%ul.nav.navbar-nav
= nav_entry "Public", public_timeline_path
- current_user.groups.each do |group|
= nav_entry group.display_name, group_timeline_path(group.name)

View File

@ -1,10 +1,10 @@
%nav.navbar.navbar-dark.navbar-expand-lg.bg-primary.fixed-top{role: "navigation"}
.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", "data-toggle" => "collapse", type: "button"}
%nav.navbar.navbar-dark.navbar-expand-lg.bg-primary.fixed-top{ role: 'navigation' }
.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
#j2-main-navbar-collapse.collapse.navbar-collapse
.collapse.navbar-collapse#j2-main-navbar-collapse
%ul.nav.navbar-nav.ml-auto
= nav_entry t('views.sessions.create'), new_user_session_path
= nav_entry t('views.sessions.new'), new_user_registration_path

View File

@ -1,28 +1,28 @@
%nav.navbar.navbar-themed.navbar-expand-lg.bg-primary.fixed-top{role: "navigation"}
.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", "data-toggle" => "collapse", type: "button"}
%nav.navbar.navbar-themed.navbar-expand-lg.bg-primary.fixed-top{ role: 'navigation' }
.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
#j2-main-navbar-collapse.collapse.navbar-collapse
.collapse.navbar-collapse#j2-main-navbar-collapse
%ul.nav.navbar-nav.mr-auto
= nav_entry t('views.navigation.timeline'), root_path
= nav_entry t('views.navigation.inbox'), "/inbox", badge: inbox_count
= 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", "data-placement" => "bottom", title: t('views.actions.group')}
%a.nav-link{href: '#', data: { target: "#modal-group-memberships", toggle: :modal }}
%li.nav-item.d-none.d-sm-block{ data: { toggle: 'tooltip', placement: 'bottom' }, title: t('views.actions.group') }
%a.nav-link{ href: '#', data: { target: '#modal-group-memberships', toggle: :modal } }
%i.fa.fa-users.hidden-xs
%span.d-none.d-sm-inline.d-md-none= t('views.actions.group')
= render "navigation/main/notifications"
%li.nav-item.d-none.d-sm-block{"data-toggle" => "tooltip", "data-placement" => "bottom", title: t('views.actions.ask_question')}
%a.nav-link{href: "#", name: "toggle-all-ask", "data-target" => "#modal-ask-followers", "data-toggle" => "modal"}
= 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
= render "navigation/main/profile"
= render 'navigation/main/profile'
= render 'modal/ask'
%button.btn.btn-primary.btn-fab.d-block.d-sm-none{"data-target" => "#modal-ask-followers", "data-toggle" => "modal", :type => "button"}
%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

View File

@ -1,9 +1,9 @@
%nav.navbar.navbar-light.bg-light.navbar-static-top.j2-navbar.d-flex.d-sm-none{role: "navigation"}
%nav.navbar.navbar-light.bg-light.navbar-static-top.j2-navbar.d-flex.d-sm-none{ role: 'navigation' }
%a.navbar-brand{ href: moderation_path } Moderation
%button.navbar-toggler{"data-target" => "#j2-tl-navbar-collapse", "data-toggle" => "collapse", type: "button"}
%button.navbar-toggler{ data: { target: '#j2-tl-navbar-collapse', toggle: :collapse }, type: :button }
%span.sr-only Toggle navigation
%span.navbar-toggler-icon
#j2-tl-navbar-collapse.collapse.navbar-collapse
.collapse.navbar-collapse#j2-tl-navbar-collapse
%ul.nav.navbar-nav
= nav_entry t('views.moderation.tabs.all'), moderation_path
= nav_entry t('views.general.answer').pluralize(2), moderation_path('answer')

View File

@ -1,12 +1,12 @@
%nav.navbar.navbar-light.bg-white.navbar-static-top.j2-navbar.d-flex.d-sm-none{role: "navigation"}
%nav.navbar.navbar-light.bg-white.navbar-static-top.d-flex.d-sm-none{ role: 'navigation' }
%a.navbar-brand{ href: notifications_path } Notifications
%button.navbar-toggler{"data-target" => "#j2-tl-navbar-collapse", "data-toggle" => "collapse", type: "button"}
%button.navbar-toggler{ data: { target: '#j2-tl-navbar-collapse', toggle: :collapse }, type: :button }
%span.sr-only Toggle navigation
%span.navbar-toggler-icon
#j2-tl-navbar-collapse.collapse.navbar-collapse
.collapse.navbar-collapse#j2-tl-navbar-collapse
%ul.nav.navbar-nav
= nav_entry "New Notifications", notifications_path
= nav_entry "All Notifications", notifications_path('all')
= nav_entry 'New Notifications', notifications_path
= nav_entry 'All Notifications', notifications_path('all')
= nav_entry t('views.notifications.tabs.answer'), notifications_path('answer')
= nav_entry t('views.notifications.tabs.smile'), notifications_path('smile')
= nav_entry t('views.notifications.tabs.comment'), notifications_path('comment')

View File

@ -1,7 +1,7 @@
= nav_entry t('views.navigation.notifications'), notifications_path, badge: notification_count, class: 'd-block d-sm-none'
- notifications = Notification.for(current_user).where(new: true).limit(4)
%li.nav-item.dropdown.d-none.d-sm-block
%a.nav-link.dropdown-toggle{href: "#", "data-toggle" => "dropdown"}
%a.nav-link.dropdown-toggle{ href: '#', data: { toggle: :dropdown } }
- if notification_count.nil?
%i.fa.fa-bell-o
- else
@ -9,7 +9,7 @@
%span.sr-only Notifications
%span.badge= notification_count
.dropdown-menu.notification-dropdown
- if notifications.count == 0
- if notifications.count.zero?
.dropdown-item.text-center.p-2
%i.fa.fa-bell-o.notification__bell-icon
%p No new notifications.

View File

@ -1,5 +1,5 @@
%li.nav-item.dropdown.profile--image-dropdown
%a.nav-link.dropdown-toggle.p-sm-0{href: "#", "data-toggle" => "dropdown"}
%a.nav-link.dropdown-toggle.p-sm-0{ href: '#', data: { toggle: :dropdown } }
%img.avatar-md.d-none.d-sm-inline{ src: current_user.profile_picture.url(:small) }
%span.d-inline.d-sm-none
= current_user.screen_name