diff --git a/app/views/layouts/_messages.html.haml b/app/views/layouts/_messages.html.haml
index 73ba513d..e927a95c 100644
--- a/app/views/layouts/_messages.html.haml
+++ b/app/views/layouts/_messages.html.haml
@@ -3,8 +3,8 @@
= t 'messages.noscript'
- flash.each do |key, value|
- .alert.alert-dismissible{class: "alert-#{bootstrap_color key}", role: "alert"}
- %button.close{type: "button", "data-dismiss" => "alert"}
- %span{"aria-hidden" => "true"} ×
+ .alert.alert-dismissible{ class: "alert-#{bootstrap_color key}", role: 'alert' }
+ %button.close{ type: :button, data: { dismiss: :alert } }
+ %span{ aria: { hidden: true } } ×
%span.sr-only= t 'views.actions.close'
= value
diff --git a/app/views/layouts/application.haml b/app/views/layouts/application.haml
index 001462ad..3263dc07 100644
--- a/app/views/layouts/application.haml
+++ b/app/views/layouts/application.haml
@@ -1,3 +1,3 @@
= yield
-- parent_layout "base"
+- parent_layout 'base'
diff --git a/app/views/layouts/base.haml b/app/views/layouts/base.haml
index 7e466fe6..6910315d 100644
--- a/app/views/layouts/base.haml
+++ b/app/views/layouts/base.haml
@@ -1,21 +1,21 @@
!!! 5
-%html{lang: 'en'}
+%html{ lang: 'en' }
%head
- %meta{charset: 'utf-8'}
- %meta{'http-equiv' => 'X-UA-Compatible' ,content: 'IE=edge'}
- %meta{name: 'viewport', content: 'width=device-width, initial-scale=1, user-scalable=no'}
- %meta{name: 'theme-color', content: '#5e35b1'}
- %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: '/icon-152.png', sizes: '152x152'}
- %link{rel: 'icon', href: '/images/favicon/favicon-32.png', sizes: '32x32'}
+ %meta{ charset: 'utf-8' }
+ %meta{ 'http-equiv': 'X-UA-Compatible', content: 'IE=edge' }
+ %meta{ name: 'viewport', content: 'width=device-width, initial-scale=1, user-scalable=no' }
+ %meta{ name: 'theme-color', content: '#5e35b1' }
+ %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: '/icon-152.png', sizes: '152x152' }
+ %link{ rel: 'icon', href: '/images/favicon/favicon-32.png', sizes: '32x32' }
%title= yield(:title)
- = javascript_include_tag 'i18n', '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 'i18n', data: { 'turbolinks-track': true }
+ = stylesheet_link_tag 'application', media: 'all', data: { 'turbolinks-track': true }
+ = javascript_include_tag 'application', data: { 'turbolinks-track': true }
- if user_signed_in?
- if current_user.mod?
- = javascript_include_tag 'moderation', 'data-turbolinks-track' => true
+ = javascript_include_tag 'moderation', data: { 'turbolinks-track': true }
= csrf_meta_tags
%body
- if user_signed_in?
diff --git a/app/views/layouts/inbox.haml b/app/views/layouts/inbox.haml
index 625bdfcd..2333af9d 100644
--- a/app/views/layouts/inbox.haml
+++ b/app/views/layouts/inbox.haml
@@ -6,8 +6,9 @@
= render 'layouts/messages'
= yield
-= render "shared/links"
+= render 'shared/links'
-- Inbox.where(id: @inbox.ids).update_all(new: false)
-- provide(:title, generate_title("Inbox"))
-- parent_layout "base"
\ No newline at end of file
+:ruby
+ Inbox.where(id: @inbox.ids).update_all(new: false)
+ provide(:title, generate_title('Inbox'))
+ parent_layout 'base'
diff --git a/app/views/layouts/mail.haml b/app/views/layouts/mail.haml
new file mode 100644
index 00000000..fac5c9c5
--- /dev/null
+++ b/app/views/layouts/mail.haml
@@ -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']
diff --git a/app/views/layouts/mail.html.haml b/app/views/layouts/mail.html.haml
deleted file mode 100644
index 3b06a584..00000000
--- a/app/views/layouts/mail.html.haml
+++ /dev/null
@@ -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']
diff --git a/app/views/layouts/moderation.haml b/app/views/layouts/moderation.haml
index 18fb60a6..46954223 100644
--- a/app/views/layouts/moderation.haml
+++ b/app/views/layouts/moderation.haml
@@ -6,5 +6,5 @@
.col-md-9.col-sm-8.col-xs-12
= yield
-- provide(:title, generate_title("Moderation"))
-- parent_layout "base"
\ No newline at end of file
+- provide(:title, generate_title('Moderation'))
+- parent_layout 'base'
diff --git a/app/views/layouts/notifications.haml b/app/views/layouts/notifications.haml
index 83d74825..f495ae8e 100644
--- a/app/views/layouts/notifications.haml
+++ b/app/views/layouts/notifications.haml
@@ -6,6 +6,7 @@
.col-md-9.col-xs-12.col-sm-8
= yield
-- Notification.for(current_user).update_all(new: false)
-- provide(:title, generate_title("Notifications"))
-- parent_layout "base"
\ No newline at end of file
+:ruby
+ Notification.for(current_user).update_all(new: false)
+ provide(:title, generate_title('Notifications'))
+ parent_layout 'base'
diff --git a/app/views/layouts/user/profile.haml b/app/views/layouts/user/profile.haml
index 874d6cba..32db93f7 100644
--- a/app/views/layouts/user/profile.haml
+++ b/app/views/layouts/user/profile.haml
@@ -1,16 +1,16 @@
.profile__header-container
- %img.profile__header-image{src: @user.profile_header.url(:web)}
+ %img.profile__header-image{ src: @user.profile_header.url(:web) }
.container
.row
.col-md-3.col-xs-12.col-sm-4
= render 'user/profile', user: @user
.d-none.d-sm-block= render 'shared/links'
.col-md-9.col-xs-12.col-sm-8
- = render "questionbox"
- = render "tabs/profile", user: @user
+ = render 'questionbox'
+ = render 'tabs/profile', user: @user
= yield
- if user_signed_in?
= 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/ban', user: @user
diff --git a/app/views/layouts/user/settings.haml b/app/views/layouts/user/settings.haml
index e63f29ba..77e5a5f6 100644
--- a/app/views/layouts/user/settings.haml
+++ b/app/views/layouts/user/settings.haml
@@ -4,4 +4,4 @@
= render 'tabs/settings'
.col-md-9.col-xs-12.col-sm-8
= render 'layouts/messages'
- = yield
\ No newline at end of file
+ = yield