Skip to content

Commit 7b4ad9e

Browse files
committed
Fix layout break in Stats page due to too-long table width #1651
1 parent 9e86d2b commit 7b4ad9e

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

app/views/stats/show.html.haml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,21 @@
7676
%b Dojos
7777
%span{style: 'font-size: 10px;'} (非アクティブになった道場も含まれています)
7878

79-
#table-target{align: 'center', style: 'margin-top: 50px; scroll-margin-top: 80px;'}
79+
80+
:css
81+
.table-container {
82+
overflow-x: auto;
83+
-webkit-overflow-scrolling: touch; /* iOSでのスムーズスクロール */
84+
max-width: 99%; /* 横幅を画面サイズに合わせる */
85+
margin: auto 5px;
86+
}
87+
88+
%div#table-target{align: 'center', style: 'margin-top: 50px; scroll-margin-top: 80px;'}
8089
%b
8190
%a{href: '#table-target'} 🔍
8291
集計対象と集計割合の推移
92+
93+
%div.table-container
8394
%table.compact{style: 'margin-top: 10px;', border: '1'}
8495
%tr
8596
%th
@@ -110,10 +121,13 @@
110121
111122
非アクティブになった道場も含まれています
112123

113-
#table-actual{align: 'center', style: 'margin-top: 50px; scroll-margin-top: 80px;'}
124+
125+
%div#table-actual{align: 'center', style: 'margin-top: 50px; scroll-margin-top: 80px;'}
114126
%b
115127
%a{href: '#table-actual'} ☯️
116128
開催回数と参加者数の推移
129+
130+
%div.table-container
117131
%table.compact{style: 'margin-top: 10px;', border: '1'}
118132
%tr
119133
%th
@@ -148,10 +162,11 @@
148162
%a{href: '#graph'}<> 冒頭の推移グラフ
149163
を表にしたデータです
150164

151-
#table-estimate{align: 'center', style: 'margin-top: 50px; scroll-margin-top: 80px;'}
165+
%div#table-estimate{align: 'center', style: 'margin-top: 50px; scroll-margin-top: 80px;'}
152166
%b
153167
%a{href: '#table-estimate'} 💭
154168
開催回数と参加者数の見込み
169+
%div.table-container
155170
%table.compact{style: 'margin-top: 10px;', border: '1'}
156171
%tr
157172
%th
@@ -239,7 +254,7 @@
239254
%li
240255
%a{href: "https://bit.ly/coderdojo-japan-stats-future-works"} 統計情報に関する『これから』の開発 - GitHub
241256
%li
242-
%a{href: "https://bit.ly/coderdojo-japan-stats-data-sheet"} 日本の CoderDojo (財団 & Japan) - Spreadsheet
257+
%a{href: "https://bit.ly/coderdojo-japan-stats-data-sheet"} 日本の CoderDojo (財団&Japan) - Spreadsheet
243258
%br/
244259
245260
:css

0 commit comments

Comments
 (0)