Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
views/users/index.html.erb 軽くCSSあて
Browse files Browse the repository at this point in the history
application.css box変更
  • Loading branch information
MikamiShu committed Dec 21, 2023
1 parent 7235f19 commit 20b7d21
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
12 changes: 12 additions & 0 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
margin-right: auto;

width: 920px;
background:radial-gradient(#fff, #00abc5);
}
.center {
text-align: center;
Expand All @@ -40,6 +41,17 @@
margin: auto;
padding: 50px;
}
.box {
margin: 20px;
}

/*ボタン関連*/
.search-button {
height: 60px;
width: 120px;
border-radius: 20px;
background-color: rgb(185, 255, 127);
}

/*エラーメッセージ表示の際,勝手に新しいクラスが生成され,Viewを壊すようである.
以下が生成されるクラスであり,これにCSSを当てておくことで崩壊を回避する.*/
Expand Down
6 changes: 3 additions & 3 deletions app/views/users/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
<%= form.text_field :email, value: @search_params[:email]%>
</div>
</div>
<%= button_to "検索", user_path(form)%>
<%= button_to "検索", user_path(form), {class: "search-button"} %>
<% end %>

<table cellspacing="15">
<table cellspacing="15" frame="box">
<tr>
<th>ユーザ名</th><th>ユーザID</th>
</tr>
<% @users.each do |user| %>
<tr>
<td align="left"><%= link_to user.name, user %></td>
<td><%= user.email %></td>
<td align="right"><%= user.email %></td>
</tr>
<% end %>
</table>
Expand Down

0 comments on commit 20b7d21

Please sign in to comment.