Skip to content

Commit 8c49387

Browse files
committed
fix: タイムテーブルがうまく表示されない問題を修正
1 parent edc2000 commit 8c49387

File tree

2 files changed

+55
-22
lines changed

2 files changed

+55
-22
lines changed

_data/time_table.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ events:
6464
- room: "大会議室 (セッション)"
6565
start: "15:20"
6666
end: "16:00"
67-
title: "招待講演小宮山さん"
67+
title: "招待講演 (小宮山さん)"
6868
link: "/sessions/keynote2/"
6969

7070
- room: "大会議室 (セッション)"
@@ -124,7 +124,7 @@ events:
124124
start: "13:40"
125125
end: "14:40"
126126
title: "ぼくのかんがえたさいきょうのCoderDojoワークショップ"
127-
note: "発表・投票・表彰を行います"
127+
note: "発表・投票・表彰を行います"
128128
link: "/events/saikyo-coderdojo/"
129129

130130

@@ -140,7 +140,7 @@ events:
140140
start: "13:10"
141141
end: "13:40"
142142
title: "ぼくのかんがえたさいきょうのCoderDojoワークショップ"
143-
note: "ワークを行います"
143+
note: "ワークを行います"
144144
link: "/events/saikyo-coderdojo/"
145145

146146
- room: "中会議室 (WS3)"

_sass/pages/time-table.scss

Lines changed: 52 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,18 @@
1313

1414
/* ====== テーブル ======
1515
PCでも「時間は4桁」「会場は全文表示」できるように
16-
table-layout: auto と最小幅制約を組み合わせる
16+
table-layout: fixed と最小幅制約を組み合わせる
1717
*/
1818
.ttable{
1919
table-layout: fixed;
20+
21+
/* 行間の既定 2px を無効化して rowspan 高さと行高を一致させる */
22+
border-collapse: separate;
23+
border-spacing: 0;
24+
2025
--w-start: 5rem;
2126
--room-min: clamp(235px, calc((100dvw - var(--w-start) - 10rem)), 20rem);
22-
--row-h: 56px;
27+
--row-h: 72px;
2328

2429
width: calc(var(--w-start) + var(--room-min) * var(--room-count));
2530
}
@@ -42,8 +47,9 @@
4247
.ttable thead th.ttable__th--start{ position: sticky; z-index: 4; }
4348

4449
/* 会場ヘッダーと本文セルの最小幅をそろえる(PCで潰れない) */
45-
.ttable__th--room{ border-left: 1px solid #ececf1; color:#111; background:
46-
linear-gradient(0deg, rgba(255,255,255,0.88), rgba(255,255,255,0.88)), var(--room-color, #c43b3b);
50+
.ttable__th--room{
51+
border-left: 1px solid #ececf1; color:#111;
52+
background: linear-gradient(0deg, rgba(255,255,255,0.88), rgba(255,255,255,0.88)), var(--room-color, #c43b3b);
4753
width: var(--room-min);
4854
}
4955
.ttable tbody td{ width: var(--room-min); }
@@ -64,8 +70,7 @@
6470
padding: 8px 10px;
6571
border-right: 1px solid #f0f0f3;
6672
vertical-align: top;
67-
/* 固定高さを外し、rowspanで正しく縦に伸びるようにする */
68-
height: auto;
73+
height: auto; /* rowspan の高さを素直に反映 */
6974
background-clip: padding-box;
7075
}
7176

@@ -74,8 +79,7 @@
7479
position: sticky; z-index: 2; background: #fff; left: 0;
7580
min-width: var(--w-start); font-weight: 700; text-align: left;
7681
}
77-
/* stickyの左列は行の背景の上に乗るため、
78-
横点線が隠れないよう同じ罫線を重ねる */
82+
/* stickyの左列は行の背景の上に乗るため、横点線が隠れないよう同じ罫線を重ねる */
7983
.ttable__cell--start{
8084
background-image: linear-gradient(to right, rgba(0,0,0,0.10) 50%, rgba(0,0,0,0) 0);
8185
background-size: 6px 1px;
@@ -86,26 +90,55 @@
8690
/* 空き枠 */
8791
.ttable__cell--empty{ background: #fff; }
8892

89-
/* イベント:カード化(CEATEC風) */
90-
.ttable__cell--event{ background: #fff; }
91-
.ttable__cell--event .ttable__event{ min-height: calc(var(--row-h) * var(--span, 1)); }
93+
/* ====== イベント:カード化(CEATEC風) ======
94+
上下余白は CSS 変数 --pad-v で可変。
95+
1スロットのイベントのみ 6px、長時間は 0px(16:00 にビタッと届く)
96+
*/
97+
.ttable__cell--event{
98+
background: #fff;
99+
position: relative; /* 子の absolute の基準 */
100+
padding-top: 0; /* 上下の余白はカード側で管理 */
101+
padding-bottom: 0;
102+
/* 左右の 10px パディングは .ttable__cell 由来で維持 */
103+
}
104+
105+
.ttable__cell--event .ttable__event{ min-height: 0; }
106+
92107
.ttable__event{
93-
position: relative;
108+
position: absolute;
109+
/* top/bottom に可変の余白、左右はセルの内側にぴったり */
110+
inset: var(--pad-v, 0) 0;
111+
94112
border: 1px solid #e5e6eb;
95113
border-radius: 14px;
96114
box-shadow: 0 2px 8px rgba(0,0,0,0.06);
97-
padding: 10px 12px 12px;
115+
padding: 6px 12px 4px;
98116
background: #fff;
99-
height: 100%;
117+
height: auto;
118+
box-sizing: border-box;
100119
display: flex;
101120
flex-direction: column;
102121
overflow: clip;
103122
text-decoration: none;
104123
color: inherit;
105124
}
106125
.ttable__event[href]{ cursor: pointer; }
107-
.ttable__event::before{ content:""; position:absolute; inset:0 0 auto 0; height: 6px; background: var(--accent, #c43b3b); }
108-
.ttable__event-time{ font-weight: 800; font-size: 1.05rem; letter-spacing: .3px; margin: 8px 0 4px; color: #c43b3b; }
109-
.ttable__event-title{ font-weight: 800; line-height: 1.35; margin-bottom: 4px; color: #121212; }
110-
.ttable__event-subtitle{ color: #ee7d05; font-weight: 700; font-size: .92rem; line-height: 1.3; }
111-
.ttable__badge{ position: absolute; top: 8px; right: 10px; padding: 2px 8px; border-radius: 999px; font-size: .85rem; font-weight: 800; color: #fff; background: var(--accent,#c43b3b); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
126+
.ttable__event::before{
127+
content:""; position:absolute; inset:0 0 auto 0;
128+
height: 6px; background: var(--accent, #c43b3b);
129+
}
130+
.ttable__event-time{
131+
font-weight: 800; font-size: .97rem; letter-spacing: .18px;
132+
margin: 1px 0 0; color: #c43b3b;
133+
}
134+
.ttable__event-title{
135+
font-weight: 800; line-height: 1.2; margin-bottom: 2px; color: #121212;
136+
}
137+
.ttable__event-subtitle{
138+
color: #ee7d05; font-weight: 700; font-size: .92rem; line-height: 1.3;
139+
}
140+
.ttable__badge{
141+
position: absolute; top: 8px; right: 10px; padding: 2px 8px;
142+
border-radius: 999px; font-size: .85rem; font-weight: 800; color: #fff;
143+
background: var(--accent,#c43b3b); box-shadow: 0 1px 4px rgba(0,0,0,.1);
144+
}

0 commit comments

Comments
 (0)