Skip to content

Commit

Permalink
ブラウザのタブのタイトルとページの種類が一致しないのを修正
Browse files Browse the repository at this point in the history
  • Loading branch information
hagiya0121 committed Oct 27, 2024
1 parent b3b5fdf commit bf3e726
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions app/views/pages/unauthorized_show.slim
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
- title @page.title
- title "Docs: #{@page.title}"
- description "オンラインプログラミングスクール「フィヨルドブートキャンプ」のドキュメント「#{@page.title}」のページです。"
- content_for :extra_body_classes

.page-body
article.unauthorized
= render '/unauthorized/unauthorized_header', label: 'ドキュメント', title: title
= render '/unauthorized/unauthorized_header', label: 'ドキュメント', title: @page.title
.unauthorized__body
.container.is-md
.unauthorized__contents
Expand Down
4 changes: 2 additions & 2 deletions app/views/practices/unauthorized_show.slim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- title @practice.title
- title "プラクティス #{@practice.title}"
- description "オンラインプログラミングスクール「フィヨルドブートキャンプ」のプラクティス「#{@practice.title}」のページです。"
- content_for :extra_body_classes

Expand All @@ -10,7 +10,7 @@ ruby:

.page-body
article.unauthorized
= render '/unauthorized/unauthorized_header', label: 'プラクティス', title: title
= render '/unauthorized/unauthorized_header', label: 'プラクティス', title: @practice.title

.unauthorized__body
.container.is-md
Expand Down
4 changes: 2 additions & 2 deletions app/views/questions/unauthorized_show.slim
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
- title @question.title
- title "Q&A: #{truncate(@question.title, length: 35, omission: '...')}"
- description "オンラインプログラミングスクール「フィヨルドブートキャンプ」のQ&A「#{@question.title}」のページです。"
- content_for :extra_body_classes

.page-body
article.unauthorized
= render '/unauthorized/unauthorized_header', label: 'Q&A', title: title
= render '/unauthorized/unauthorized_header', label: 'Q&A', title: @question.title
.unauthorized__body
.container.is-md
.unauthorized__contents
Expand Down
4 changes: 1 addition & 3 deletions app/views/unauthorized/_unauthorized_header.html.slim
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
- title "Q&A: #{truncate(title, length: 35, omission: '...')}"
- set_meta_tags og: { title: "Q&A: #{title}" }
header.unauthorized-header
.container
= image_tag('shared/piyo.svg', alt: 'フィヨルドブートキャンプのキャラクター画像', class: 'unauthorized-header__image')
Expand All @@ -8,5 +6,5 @@ header.unauthorized-header
= label
h1.unauthorized-header__title
span.font-thin
= title
= truncate(title, length: 35, omission: '...')
span.font-thin
4 changes: 2 additions & 2 deletions app/views/users/unauthorized_show.slim
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
- title "@#{@user.login_name}"
- title "#{@user.login_name}さんのプロフィール"
- description "オンラインプログラミングスクール「フィヨルドブートキャンプ」の@#{@user.login_name}さんのプロフィールページ"
- content_for :extra_body_classes

.page-body
article.unauthorized
= render '/unauthorized/unauthorized_header',
label: 'ユーザープロフィールページ', title: title.to_s
label: 'ユーザープロフィールページ', title: title
.unauthorized__body
.container.is-md
.unauthorized__contents
Expand Down

0 comments on commit bf3e726

Please sign in to comment.