From 1e2259fe407b8448e764ff9520e2360dd4f99a12 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sat, 2 May 2020 17:37:19 +0200 Subject: [PATCH] Rename j2-page class to container--main --- app/assets/stylesheets/components/_container.scss | 4 ++++ app/views/announcement/edit.html.haml | 2 +- app/views/announcement/index.html.haml | 2 +- app/views/announcement/new.html.haml | 2 +- app/views/answer/show.haml | 2 +- app/views/layouts/feed.haml | 2 +- app/views/layouts/inbox.haml | 2 +- app/views/layouts/moderation.haml | 2 +- app/views/layouts/notifications.haml | 2 +- app/views/layouts/user/settings.haml | 2 +- app/views/modal/group/_item.haml | 2 +- app/views/modal/privileges/_item.haml | 4 ++-- app/views/shared/_links.html.haml | 2 +- app/views/static/privacy_policy.html.haml | 2 +- app/views/static/terms.html.haml | 2 +- app/views/user/groups.haml | 3 --- 16 files changed, 19 insertions(+), 18 deletions(-) create mode 100644 app/assets/stylesheets/components/_container.scss diff --git a/app/assets/stylesheets/components/_container.scss b/app/assets/stylesheets/components/_container.scss new file mode 100644 index 00000000..08d9bf08 --- /dev/null +++ b/app/assets/stylesheets/components/_container.scss @@ -0,0 +1,4 @@ +.container--main { + padding-top: map-get($spacers, 3); + padding-bottom: map-get($spacers, 3); +} \ No newline at end of file diff --git a/app/views/announcement/edit.html.haml b/app/views/announcement/edit.html.haml index ee7eb3ba..bef290f1 100644 --- a/app/views/announcement/edit.html.haml +++ b/app/views/announcement/edit.html.haml @@ -1,5 +1,5 @@ - provide(:title, generate_title("Edit announcement")) -.container.j2-page +.container.container--main = bootstrap_form_for(@announcement, url: {action: "update"}, method: "PATCH") do |f| - if @announcement.errors.any? .row diff --git a/app/views/announcement/index.html.haml b/app/views/announcement/index.html.haml index 0d117c83..ad89c83f 100644 --- a/app/views/announcement/index.html.haml +++ b/app/views/announcement/index.html.haml @@ -1,5 +1,5 @@ - provide(:title, generate_title("Announcements")) -.container.j2-page +.container.container--main .row .col-md-12 = link_to "Add new", :announcement_new, class: "btn btn-default" diff --git a/app/views/announcement/new.html.haml b/app/views/announcement/new.html.haml index 25942f28..3afa8595 100644 --- a/app/views/announcement/new.html.haml +++ b/app/views/announcement/new.html.haml @@ -1,5 +1,5 @@ - provide(:title, generate_title("Add new announcement")) -.container.j2-page +.container.container--main = bootstrap_form_for(@announcement, url: {action: "create"}) do |f| - if @announcement.errors.any? .row diff --git a/app/views/answer/show.haml b/app/views/answer/show.haml index f929089c..f1096f09 100644 --- a/app/views/answer/show.haml +++ b/app/views/answer/show.haml @@ -1,3 +1,3 @@ - provide(:title, answer_title(@answer)) -.container.j2-page +.container.container--main = render 'answerbox', a: @answer \ No newline at end of file diff --git a/app/views/layouts/feed.haml b/app/views/layouts/feed.haml index 25701108..3f373b6d 100644 --- a/app/views/layouts/feed.haml +++ b/app/views/layouts/feed.haml @@ -1,5 +1,5 @@ = render 'navigation/feed' -.container.j2-page +.container.container--main .row .col-md-3.col-sm-4.d-none.d-sm-block = render 'shared/sidebar' diff --git a/app/views/layouts/inbox.haml b/app/views/layouts/inbox.haml index 085b0aee..625bdfcd 100644 --- a/app/views/layouts/inbox.haml +++ b/app/views/layouts/inbox.haml @@ -1,4 +1,4 @@ -.container.j2-page +.container.container--main .row .col-md-3.col-xs-12.col-sm-4.order-2.order-sm-1 = render 'inbox/sidebar' diff --git a/app/views/layouts/moderation.haml b/app/views/layouts/moderation.haml index 761fae5f..18fb60a6 100644 --- a/app/views/layouts/moderation.haml +++ b/app/views/layouts/moderation.haml @@ -1,5 +1,5 @@ = render 'navigation/moderation' -.container.j2-page +.container.container--main .row .col-md-3.col-sm-4.col-xs-12 = render 'tabs/moderation' diff --git a/app/views/layouts/notifications.haml b/app/views/layouts/notifications.haml index fe56bcbd..83d74825 100644 --- a/app/views/layouts/notifications.haml +++ b/app/views/layouts/notifications.haml @@ -1,5 +1,5 @@ = render 'navigation/notification' -.container.j2-page +.container.container--main .row .col-md-3.col-xs-12.col-sm-4 = render 'tabs/notifications' diff --git a/app/views/layouts/user/settings.haml b/app/views/layouts/user/settings.haml index ab396d4b..e63f29ba 100644 --- a/app/views/layouts/user/settings.haml +++ b/app/views/layouts/user/settings.haml @@ -1,4 +1,4 @@ -.container.j2-page +.container.container--main .row .col-md-3.col-xs-12.col-sm-4 = render 'tabs/settings' diff --git a/app/views/modal/group/_item.haml b/app/views/modal/group/_item.haml index 043810ce..c060abc8 100644 --- a/app/views/modal/group/_item.haml +++ b/app/views/modal/group/_item.haml @@ -10,6 +10,6 @@ %span{id: "#{group.name}-members"}= group.members.count = t 'views.modal.group.members' ยท - %a.j2-delete#delete-group{href: "#", data: { group: group.name }} + %a.text-danger#delete-group{href: "#", data: { group: group.name }} %i.fa.fa-close = t 'views.actions.delete' diff --git a/app/views/modal/privileges/_item.haml b/app/views/modal/privileges/_item.haml index 5164a049..47c6380e 100644 --- a/app/views/modal/privileges/_item.haml +++ b/app/views/modal/privileges/_item.haml @@ -4,8 +4,8 @@ - checked = requires_role ? user.has_role?(role_mapping.fetch(privilege, privilege).to_sym) : user.public_send("#{privilege}?") %li.list-group-item{id: "privilege-#{privilege}"} .media - .pull-left.j2-table - %input.input--center{type: :checkbox, name: 'check-your-privileges', data: { type: privilege, user: user.screen_name }, checked: checked, autocomplete: 'off'} + .pull-left + %input{type: :checkbox, name: 'check-your-privileges', data: { type: privilege, user: user.screen_name }, checked: checked, autocomplete: 'off'} .media-body .list-group-item-heading= privilege.capitalize - unless description.blank? diff --git a/app/views/shared/_links.html.haml b/app/views/shared/_links.html.haml index fc06b75c..2c85b582 100644 --- a/app/views/shared/_links.html.haml +++ b/app/views/shared/_links.html.haml @@ -1,4 +1,4 @@ -.text-center.text-muted.links +.text-center.text-muted.pb-3 © = Date.today.year = APP_CONFIG['site_name'] diff --git a/app/views/static/privacy_policy.html.haml b/app/views/static/privacy_policy.html.haml index f4efae48..15c9f8aa 100644 --- a/app/views/static/privacy_policy.html.haml +++ b/app/views/static/privacy_policy.html.haml @@ -1,5 +1,5 @@ - provide(:title, generate_title("Privacy Policy")) -.container.j2-page +.container.container--main .card .card-body = raw_markdown_io "service-docs/en/policy/privacy.md" diff --git a/app/views/static/terms.html.haml b/app/views/static/terms.html.haml index c474715e..792ede73 100644 --- a/app/views/static/terms.html.haml +++ b/app/views/static/terms.html.haml @@ -1,5 +1,5 @@ - provide(:title, generate_title("Terms of Service")) -.container.j2-page +.container.container--main .card .card-body = raw_markdown_io "service-docs/en/policy/terms.md" diff --git a/app/views/user/groups.haml b/app/views/user/groups.haml index 9d550b37..0f08b0cf 100644 --- a/app/views/user/groups.haml +++ b/app/views/user/groups.haml @@ -1,6 +1,3 @@ -%h1.j2-lh.hidden-xs Groups -%h1.visible-xs Groups - %ul - @groups.each do |group| %li