Skip to content

Commit 27cbd1e

Browse files
committed
refactor: テーブルスタイルのDRY化とアイコン・リンクスタイルの統一
- /dojos/:id ページのインラインCSS(19行)を削除し、共通の .stats-table クラスを適用 - 開催日のアイコンを統一(☯️/👥 → 🗓)、日付項目には日付アイコンを使用 - 開催日のリンクスタイルを掲載日と統一(インラインスタイルを削除) これにより、全ての統計テーブルで一貫したスタイルとアイコンを実現し、 保守性とユーザビリティが向上しました。
1 parent 6b75546 commit 27cbd1e

File tree

2 files changed

+5
-25
lines changed

2 files changed

+5
-25
lines changed

app/views/dojos/activity.html.erb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
</th>
4545
<th>
4646
<small>
47-
👥
47+
🗓
4848
<br class='ignore-pc'>
49-
<%= link_to '開催日', events_path, style: 'color: inherit; text-decoration: underline;' %>
49+
<a href='<%= events_path %>'>開催日</a>
5050
</small>
5151
</th>
5252
<th>

app/views/dojos/show.html.erb

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,35 +28,15 @@
2828
<small><%= link_to raw("&raquo; 他の Dojo 一覧を見る"), dojos_path %></small>
2929
</p>
3030

31-
<style type="text/css">
32-
/* URL 用のセルにクラスを付けておく想定 */
33-
table { table-layout: auto; }
34-
td {
35-
padding: 1px 10px 1px 10px;
36-
text-align: right;
37-
}
38-
td.url-cell {
39-
white-space: normal; /* 改行を許可 */
40-
word-wrap: break-word; /* 古めのブラウザ向け */
41-
overflow-wrap: break-word; /* 新しめのブラウザ向け */
42-
word-break: break-all; /* 英数字が続く場合の保険 (必要に応じて) */
43-
text-align: left;
44-
}
45-
th {
46-
padding: 10px;
47-
text-align: center;
48-
}
49-
</style>
50-
5131
<div style="margin-top: 20px;" align="center">
5232
<% if @event_histories.any? %>
53-
<table border="1">
33+
<table border="1" class="stats-table">
5434
<tr>
5535
<th>
5636
<small>
57-
☯️
37+
🗓
5838
<br class='ignore-pc'>
59-
<%= link_to '開催日', events_path, style: 'color: inherit; text-decoration: underline;' %>
39+
<a href='<%= events_path %>'>開催日</a>
6040
</small>
6141
</th>
6242
<th>

0 commit comments

Comments
 (0)