Skip to content

Commit 01300dd

Browse files
committed
feat: Add mobile support for booking snippets
1 parent ffff6b9 commit 01300dd

File tree

4 files changed

+28
-18
lines changed

4 files changed

+28
-18
lines changed

assets/sass/booking.scss

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@
44
gap: 2rem;
55
width: 100%;
66
align-content: center;
7+
8+
@media (max-width: #{$breakpoint-md}) {
9+
display: flex;
10+
flex-direction: column;;
11+
gap: 1rem;
12+
align-content: start;
13+
}
714
}
815

916
.o-booking__header {
@@ -21,9 +28,17 @@
2128
}
2229

2330
.o-booking__classes {
31+
display: flex;
32+
align-items: center;
33+
justify-content: center;
34+
flex-direction: column;
2435
> p {
2536
margin-bottom: 0rem;
2637
}
38+
39+
@media (max-width: #{$breakpoint-md}) {
40+
align-items: start;
41+
}
2742
}
2843

2944
.o-booking__title-wrapper {
@@ -45,17 +60,14 @@
4560
font-size: 1.4rem;
4661
}
4762

48-
.o-booking__header-last-column {
49-
display: flex;
50-
align-items: center;
51-
justify-content: center;
52-
gap: 1rem;
53-
}
54-
5563
.o-booking__meta{
5664
text-align: center;
5765
display: flex;
5866
flex-direction: column;
5967
align-items: center;
6068
justify-content: center;
69+
70+
@media (max-width: #{$breakpoint-md}) {
71+
align-items: start;
72+
}
6173
}

assets/sass/expander.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
summary {
1+
.o-expander__summary {
22
display: flex;
33

44
&:hover,
@@ -20,7 +20,7 @@ details {
2020
margin-bottom: 1.2rem;
2121
}
2222

23-
details[open] > summary {
23+
details[open] > .o-expander__summary {
2424
margin-bottom: 0.5rem;
2525
}
2626

@@ -29,7 +29,7 @@ details > summary {
2929
}
3030

3131
.details-screen > div,
32-
.details-screen > summary {
32+
.details-screen > .o-expander__summary {
3333
margin-left: 3.2rem;
3434
}
3535

@@ -59,7 +59,7 @@ details > summary::-webkit-details-marker {
5959
@extend .material-symbols-rounded
6060
}
6161

62-
details[open] > summary {
62+
details[open] > .o-expander__summary {
6363
font-weight: 700;
6464
}
6565

layouts/shortcodes/booking.html

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,16 @@
1818
</div>
1919
</div>
2020
<div class="o-booking__meta">
21-
{{ if ne $reservations "nil" }}{{ T "booking.reservation" }} {{ if $reservations }}✅{{ else }}⛔{{ end }}{{ end }}
22-
{{ if ne $fip_50 "nil" }}{{ T "booking.fip-50" }} {{ if $fip_50 }}✅{{ else }}⛔{{ end }}{{ end }}
23-
{{ if ne $fip_global_fare "nil" }}{{ T "booking.fip-global-fare" }} {{ if $fip_global_fare }}✅{{ else }}⛔{{ end }}{{ end }}
21+
{{ if ne $reservations "nil" }}<div>{{ T "booking.reservation" }} {{ if $reservations }}✅{{ else }}⛔{{ end }}</div>{{ end }}
22+
{{ if ne $fip_50 "nil" }}<div>{{ T "booking.fip-50" }} {{ if $fip_50 }}✅{{ else }}⛔{{ end }}</div>{{ end }}
23+
{{ if ne $fip_global_fare "nil" }}<div>{{ T "booking.fip-global-fare" }} {{ if $fip_global_fare }}✅{{ else }}⛔{{ end }}</div>{{ end }}
2424
</div>
25-
<div class="o-booking__header-last-column">
2625
<div class="o-booking__classes">
2726
{{ range $k, $v := .Params.classes }}
2827
<strong>{{ T (print "booking.classes." $k) }}:</strong> {{ $v }}
2928
{{ end }}
3029
</div>
3130
</div>
32-
</div>
3331
<div class="o-booking__header-actions">
3432
{{ partial "icon" "arrow_drop_down" }}
3533
</div>

layouts/shortcodes/expander.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<details name="{{ (.Get 1) }}" class="details-screen">
2-
<summary>
2+
<summary class="o-expander__summary">
33
<span>{{ (.Get 0) }}</span>
44
</summary>
55
<div>
@@ -13,7 +13,7 @@
1313
https://github.com/w3c/csswg-drafts/issues/2084
1414
-->
1515
<details open class="details-print">
16-
<summary>
16+
<summary class="o-expander__summary">
1717
<span>{{ (.Get 0) }}</span>
1818
</summary>
1919
<div>

0 commit comments

Comments
 (0)