Skip to content

Commit

Permalink
Admin の FAQ詳細にデザイン入れた
Browse files Browse the repository at this point in the history
  • Loading branch information
machida authored and sochi419 committed Dec 12, 2023
1 parent 00666d5 commit 4e50fb6
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 27 deletions.
28 changes: 12 additions & 16 deletions app/views/admin/faq/edit.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,24 @@ header.page-header
.page-header__inner
h1.page-header__title
| 管理ページ
.page-header-actions
.page-header-actions__items
.page-header-actions__item
= link_to new_admin_faq_path, class: 'a-button is-md is-secondary is-block' do
i.fa-regular.fa-plus
| FAQ編集
= render 'admin/admin_page_tabs'

hr.a-border-tint

.page-main
.page-main-header
.container.is-lg
.container
.page-main-header__inner
h1.page-main-header__title
= title
.page-header-actions
.page-header-actions__items
.page-header-actions__item
= link_to new_admin_faq_path, class: 'a-button is-md is-secondary is-block' do
i.fa-regular.fa-plus
| FAQ編集
.page-main-header__start
h1.page-main-header__title
= title
.page-main-header__end
.page-header-actions
.page-header-actions__items
.page-header-actions__item
= link_to admin_faq_path, class: 'a-button is-md is-secondary is-block is-back' do
| FAQ一覧
hr.a-border
.page-body
.container.is-lg
.container.is-xl
= render 'form', faq: @faq
49 changes: 40 additions & 9 deletions app/views/admin/faq/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,49 @@ main.page-main
.page-main-header__inner
.page-main-header__start
h1.page-main-header__title
| FAQ詳細
| FAQ 詳細
.page-main-header__end
.page-main-header-actions
ul.page-main-header-actions__items
li.page-main-header-actions__item
= link_to 'FAQ一覧', admin_faqs_path, class: 'a-button is-sm is-block is-secondary is-back'
= link_to admin_faqs_path, class: 'a-button is-sm is-block is-secondary is-back is-back' do
| FAQ一覧
hr.a-border
.page-body
.container.is-md
dl
dt = format_question(@faq.question)
dd = @faq.answer
p
= link_to edit_admin_faq_path(@faq) do
= '編集'
.container.is-xxl
.row.justify-center
.col-xl-7.col-xs-12
.page-content
header.page-content-header
//
.page-content-header__start
.page-content-header__user
= render 'users/icon', user: @faq.user, link_class: 'page-content-header__user-link', image_class: 'page-content-header__user-icon'
.page-content-header__end
.page-content-header__row
//
.page-content-header__before-title
= link_to @faq.user, class: 'a-user-name' do
= @faq.user.long_name
h1.page-content-header__title
= format_question(@faq.question)

.page-content-header__row
.page-content-header-metas
.page-content-header-metas__start
.page-content-header-metas__meta
.a-meta
| #{l @faq.created_at} 公開

.a-card
.card-body
.card__description
.js-markdown-view.a-long-text.is-md
= @faq.answer
.card-footer
.card-main-actions
.card-main-actions__items
.card-main-actions__item
= link_to edit_admin_faq_path(@faq), class: 'card-main-actions__action a-button is-sm is-secondary is-block' do
i.fa-solid.fa-pen
| 内容修正
4 changes: 2 additions & 2 deletions app/views/reports/_report_body.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
= render 'reactions/reactions', reactionable: report

- if report.user_id == current_user.id || mentor_login?
hr.a-border-tint
.card-footer(class="#{mentor_login? ? 'is-only-mentor' : ''}")
hr.a-border-tint(class="#{mentor_login? ? 'is-only-mentor' : ''}")
footer.card-footer(class="#{mentor_login? ? 'is-only-mentor' : ''}")
.card-main-actions
ul.card-main-actions__items
li.card-main-actions__item
Expand Down

0 comments on commit 4e50fb6

Please sign in to comment.