Fix lints in app/views/layouts

This commit is contained in:
Andreas Nedbal 2020-05-10 13:10:47 +02:00
parent 7414471d41
commit 2686017ad8
10 changed files with 61 additions and 59 deletions

View File

@ -3,8 +3,8 @@
= t 'messages.noscript' = t 'messages.noscript'
- flash.each do |key, value| - flash.each do |key, value|
.alert.alert-dismissible{class: "alert-#{bootstrap_color key}", role: "alert"} .alert.alert-dismissible{ class: "alert-#{bootstrap_color key}", role: 'alert' }
%button.close{type: "button", "data-dismiss" => "alert"} %button.close{ type: :button, data: { dismiss: :alert } }
%span{"aria-hidden" => "true"} × %span{ aria: { hidden: true } } ×
%span.sr-only= t 'views.actions.close' %span.sr-only= t 'views.actions.close'
= value = value

View File

@ -1,3 +1,3 @@
= yield = yield
- parent_layout "base" - parent_layout 'base'

View File

@ -1,21 +1,21 @@
!!! 5 !!! 5
%html{lang: 'en'} %html{ lang: 'en' }
%head %head
%meta{charset: 'utf-8'} %meta{ charset: 'utf-8' }
%meta{'http-equiv' => 'X-UA-Compatible' ,content: 'IE=edge'} %meta{ 'http-equiv': 'X-UA-Compatible', content: 'IE=edge' }
%meta{name: 'viewport', content: 'width=device-width, initial-scale=1, user-scalable=no'} %meta{ name: 'viewport', content: 'width=device-width, initial-scale=1, user-scalable=no' }
%meta{name: 'theme-color', content: '#5e35b1'} %meta{ name: 'theme-color', content: '#5e35b1' }
%link{rel: 'apple-touch-icon', href: '/apple-touch-icon-precomposed.png'} %link{ rel: 'apple-touch-icon', href: '/apple-touch-icon-precomposed.png' }
%link{rel: 'icon', href: '/images/favicon/favicon-16.png', sizes: '16x16'} %link{ rel: 'icon', href: '/images/favicon/favicon-16.png', sizes: '16x16' }
%link{rel: 'icon', href: '/icon-152.png', sizes: '152x152'} %link{ rel: 'icon', href: '/icon-152.png', sizes: '152x152' }
%link{rel: 'icon', href: '/images/favicon/favicon-32.png', sizes: '32x32'} %link{ rel: 'icon', href: '/images/favicon/favicon-32.png', sizes: '32x32' }
%title= yield(:title) %title= yield(:title)
= javascript_include_tag 'i18n', 'data-turbolinks-track' => true = javascript_include_tag 'i18n', data: { 'turbolinks-track': true }
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true = stylesheet_link_tag 'application', media: 'all', data: { 'turbolinks-track': true }
= javascript_include_tag 'application', 'data-turbolinks-track' => true = javascript_include_tag 'application', data: { 'turbolinks-track': true }
- if user_signed_in? - if user_signed_in?
- if current_user.mod? - if current_user.mod?
= javascript_include_tag 'moderation', 'data-turbolinks-track' => true = javascript_include_tag 'moderation', data: { 'turbolinks-track': true }
= csrf_meta_tags = csrf_meta_tags
%body %body
- if user_signed_in? - if user_signed_in?

View File

@ -6,8 +6,9 @@
= render 'layouts/messages' = render 'layouts/messages'
= yield = yield
= render "shared/links" = render 'shared/links'
- Inbox.where(id: @inbox.ids).update_all(new: false) :ruby
- provide(:title, generate_title("Inbox")) Inbox.where(id: @inbox.ids).update_all(new: false)
- parent_layout "base" provide(:title, generate_title('Inbox'))
parent_layout 'base'

View File

@ -0,0 +1,28 @@
%html
%head
:css
body {
font-size: 16px;
margin-top: 0px;
margin-bottom: 0px;
font-family: Arial, sans-serif;
}
p {
margin: 0px;
padding: 0px;
}
%body
%table{ cellpadding: 0, cellspacing: 0, border: 5, bordercolor: '#5e35b1', bgcolor: '#5e35b1', style: 'font-size:0px;', align: 'center', width: '630' }
%tbody
%tr
%td{ style: 'padding:5px 10px;', align: 'center' }
%p{ style: 'margin:0px;padding:0px' }
%font{ color: '#ffffff', size: 6, face: 'Arial, sans-serif' }= APP_CONFIG['site_name']
%tr
%td{ bgcolor: '#ffffff', style: 'padding:10px' }
%font{ color: '#000000', size: 4, face: 'Arial, sans-serif' }= yield
%p{ style: 'margin:0px;padding:5px;', align: 'center' }
%font{ size: 2, color: '#797979', face: 'Arial, sans-serif' }
©
= Time.zone.now.year
= APP_CONFIG['site_name']

View File

@ -1,28 +0,0 @@
%html
%head
:css
body {
font-size: 16px;
margin-top: 0px;
margin-bottom: 0px;
font-family: Arial, sans-serif;
}
p {
margin: 0px;
padding: 0px;
}
%body
%table{cellpadding: 0, cellspacing: 0, border: 5, bordercolor: "#5e35b1", bgcolor: "#5e35b1", style: "font-size:0px;", align: "center", width: "630"}
%tbody
%tr
%td{style: "padding:5px 10px;", align: "center"}
%p{style: "margin:0px;padding:0px"}
%font{color: "#ffffff", size: 6, face: "Arial, sans-serif"}= APP_CONFIG['site_name']
%tr
%td{bgcolor: "#ffffff", style: "padding:10px"}
%font{color: "#000000", size: 4, face: "Arial, sans-serif"}= yield
%p{style:"margin:0px;padding:5px;", align: "center"}
%font{size: 2, color: "#797979", face: "Arial, sans-serif"}
©
= Time.zone.now.year
= APP_CONFIG['site_name']

View File

@ -6,5 +6,5 @@
.col-md-9.col-sm-8.col-xs-12 .col-md-9.col-sm-8.col-xs-12
= yield = yield
- provide(:title, generate_title("Moderation")) - provide(:title, generate_title('Moderation'))
- parent_layout "base" - parent_layout 'base'

View File

@ -6,6 +6,7 @@
.col-md-9.col-xs-12.col-sm-8 .col-md-9.col-xs-12.col-sm-8
= yield = yield
- Notification.for(current_user).update_all(new: false) :ruby
- provide(:title, generate_title("Notifications")) Notification.for(current_user).update_all(new: false)
- parent_layout "base" provide(:title, generate_title('Notifications'))
parent_layout 'base'

View File

@ -1,16 +1,16 @@
.profile__header-container .profile__header-container
%img.profile__header-image{src: @user.profile_header.url(:web)} %img.profile__header-image{ src: @user.profile_header.url(:web) }
.container .container
.row .row
.col-md-3.col-xs-12.col-sm-4 .col-md-3.col-xs-12.col-sm-4
= render 'user/profile', user: @user = render 'user/profile', user: @user
.d-none.d-sm-block= render 'shared/links' .d-none.d-sm-block= render 'shared/links'
.col-md-9.col-xs-12.col-sm-8 .col-md-9.col-xs-12.col-sm-8
= render "questionbox" = render 'questionbox'
= render "tabs/profile", user: @user = render 'tabs/profile', user: @user
= yield = yield
- if user_signed_in? - if user_signed_in?
= render 'modal/group', user: @user = render 'modal/group', user: @user
- if current_user.mod? and @user != current_user - if current_user.mod? && @user != current_user
= render 'modal/privileges', user: @user = render 'modal/privileges', user: @user
= render 'modal/ban', user: @user = render 'modal/ban', user: @user

View File

@ -4,4 +4,4 @@
= render 'tabs/settings' = render 'tabs/settings'
.col-md-9.col-xs-12.col-sm-8 .col-md-9.col-xs-12.col-sm-8
= render 'layouts/messages' = render 'layouts/messages'
= yield = yield