Skip to content

Commit a456487

Browse files
committed
エラーページ共通のヘッダー部分をパーシャル化
1 parent 7c19b40 commit a456487

File tree

4 files changed

+9
-18
lines changed

4 files changed

+9
-18
lines changed

app/views/errors/_header.html.erb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<div id="top" class="title text-center">
2+
<i class="cd cd-logo"></i>
3+
<h1>CoderDojo Japan</h1>
4+
<p>子どものためのプログラミング道場</p>
5+
<br>
6+
</div>

app/views/errors/internal_server_error.html.erb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
<% provide(:title, "予期しないエラーが発生しました 😵‍💫") %>
22
<% provide(:desc, "申し訳ありません。サーバーで問題が発生しています。") %>
33

4-
<div id="top" class="title text-center">
5-
<i class="cd cd-logo"></i>
6-
<h1>CoderDojo Japan</h1>
7-
<p>子どものためのプログラミング道場</p>
8-
<br>
9-
</div>
4+
<%= render 'errors/header' %>
105

116
<section class="introduction text-center list">
127
<h2>予期しないエラーが発生しました 😵‍💫</h2>

app/views/errors/not_found.html.erb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
<% provide(:title, "ページが見つかりませんでした... 🥺💦") %>
22
<% provide(:desc, "ページが削除された可能性があります 🤔💭") %>
33

4-
<div id="top" class="title text-center">
5-
<i class="cd cd-logo"></i>
6-
<h1>CoderDojo Japan</h1>
7-
<p>子どものためのプログラミング道場</p>
8-
<br>
9-
</div>
4+
<%= render 'errors/header' %>
105

116
<section class="introduction text-center list">
127
<h2>

app/views/errors/unprocessable_entity.html.erb

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
<% provide(:title, "リクエストが処理できませんでした… 😢") %>
22
<% provide(:desc, "入力内容に誤りがあるか、リクエストが正しく送信されなかった可能性があります。") %>
33

4-
<div id="top" class="title text-center">
5-
<i class="cd cd-logo"></i>
6-
<h1>CoderDojo Japan</h1>
7-
<p>子どものためのプログラミング道場</p>
8-
<br>
9-
</div>
4+
<%= render 'errors/header' %>
105

116
<section class="introduction text-center list">
127
<h2>

0 commit comments

Comments
 (0)