Skip to content

Commit

Permalink
Merge pull request #8156 from fjordllc/bug/fix-tab-title
Browse files Browse the repository at this point in the history
ブラウザのタブのタイトルとページの種類が一致しないのを修正
  • Loading branch information
komagata authored Nov 4, 2024
2 parents 6d287a4 + 5272ed8 commit f346b7a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 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
10 changes: 6 additions & 4 deletions app/views/questions/unauthorized_show.slim
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
- title @question.title
- description "オンラインプログラミングスクール「フィヨルドブートキャンプ」のQ&A「#{@question.title}」のページです。"
- content_for :extra_body_classes
ruby:
title "Q&A: #{truncate(@question.title, length: 35, omission: '...')}"
set_meta_tags og: { title: "Q&A: #{@question.title}" }
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
2 changes: 0 additions & 2 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 Down
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 f346b7a

Please sign in to comment.