Skip to content

Commit 431cc9c

Browse files
committed
Update mobile view.
1 parent a2fc8f8 commit 431cc9c

File tree

5 files changed

+67
-33
lines changed

5 files changed

+67
-33
lines changed

src/components/schedule/day.astro

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ const dateText = format(date, "eeee - do MMMM");
432432

433433
.schedule-wrapper
434434
{
435-
min-width: 780px;
435+
min-width: 360px;
436436
width: 100%;
437437
}
438438
:global(body) {
@@ -465,7 +465,7 @@ const dateText = format(date, "eeee - do MMMM");
465465

466466
header,
467467
.time {
468-
display: none;
468+
/*display: none;*/
469469
}
470470

471471
:global(.session) {
@@ -490,7 +490,29 @@ const dateText = format(date, "eeee - do MMMM");
490490
display: none;
491491
}
492492

493+
494+
.schedule-container.header {
495+
display:none;
496+
}
497+
498+
@media screen and (max-width: 799px) {
499+
.time {
500+
background:transparent;
501+
}
502+
.time h2 {
503+
text-align:center;
504+
color:#333332;
505+
font-size:2rem;
506+
}
507+
.room-info {
508+
text-align:center;
509+
}
510+
}
493511
@media screen and (min-width: 800px) {
512+
513+
.schedule-container.header {
514+
display: inherit;
515+
}
494516
.schedule-container {
495517
/*overflow-x: auto;*/
496518
padding-bottom: 2px;
@@ -510,7 +532,7 @@ const dateText = format(date, "eeee - do MMMM");
510532
position: sticky;
511533
top: 0;
512534
background: var(--color-body-background);
513-
z-index: 20;
535+
z-index: 20;inherit
514536

515537
> div > div {
516538
padding: 8px;

src/components/schedule/session.astro

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import { formatInTimeZone } from "date-fns-tz";
33
import Speakers from "./speakers.astro";
44
import { slugify } from "@utils/content";
5+
import Icon from "@ui/Icon.astro";
56
67
export interface props {
78
style: any;
@@ -47,6 +48,16 @@ const hasFooter = true;
4748
}
4849
</header>
4950
-->
51+
<header>
52+
53+
{session.rooms.length === 1 && (
54+
<div class="room-info">
55+
<span class="sr-only">Room:</span>
56+
{session.rooms && session.rooms.join(", ")}
57+
</div>
58+
)}
59+
</header>
60+
5061

5162
<!-- <div class="time">
5263
<span class="sr-only">Session start:</span>
@@ -65,18 +76,12 @@ const hasFooter = true;
6576
{
6677
hasFooter && (
6778
<footer class:list={{ "has-room": hasRoom, "has-speakers": hasSpeakers }}>
68-
{session.rooms.length === 1 && (
69-
<div class="room-info">
70-
<span class="sr-only">Room:</span>
71-
{session.rooms && session.rooms.join(", ")}
72-
{hasSpeakers && <span aria-hidden="true"> • </span>}
73-
</div>
74-
)}
7579
{session.speakers && (
7680
<>
7781
<Speakers speakers={session.speakers} />
7882
</>
7983
)}
84+
8085
</footer>
8186
)
8287
}
@@ -91,7 +96,7 @@ const hasFooter = true;
9196

9297
border: 1px solid transparent;
9398
font-weight: bold;
94-
display: grid;
99+
display: flex;
95100
flex-direction: column;
96101
/*background-color: var(--color-body-background);*/
97102

@@ -109,15 +114,17 @@ const hasFooter = true;
109114

110115
grid-template-columns: 60px 1fr;
111116

112-
@media screen and (min-width: 640px) {
113-
display: flex;
114-
}
117+
/*@media screen and (min-width: 640px) {*/
118+
/* display: flex;*/
119+
/*}*/
115120
}
116121

117122
.room-info {
118-
display: inline;
123+
display: block;
124+
text-align:center;
119125

120-
@media screen and (min-width: 640px) {
126+
127+
@media screen and (min-width: 800px) {
121128
display: none;
122129
}
123130
}
@@ -141,7 +148,15 @@ const hasFooter = true;
141148
z-index: 2;
142149
}
143150

144-
@media screen and (max-width: 639px) {
151+
@media screen and (max-width: 800px) {
152+
header {
153+
/*text-align:right;*/
154+
}
155+
.session h2{
156+
padding:0 8px ;
157+
margin:0;
158+
}
159+
145160
.session > .time {
146161
grid-area: time;
147162
padding-block: 8px;
@@ -159,7 +174,7 @@ const hasFooter = true;
159174

160175
.session > h2 {
161176
grid-area: title;
162-
padding-block: 8px;
177+
padding-block: 0;
163178
}
164179

165180
.session > footer {
@@ -214,24 +229,24 @@ const hasFooter = true;
214229
}
215230

216231
header {
217-
background-color: var(--color-primary);
232+
/*background-color: var(--color-primary);*/
218233
/*border-bottom: 2px solid var(--color-primary);*/
219-
color: black;
234+
/*background-color: #e6c8ac;*/
220235
text-transform: capitalize;
221236
font-size: 0.8em;
222237
font-weight: 500;
223238
}
224239

225240
.beginner header {
226-
background-color: var(--color-session-beginner);
241+
/*background-color: var(--color-session-beginner);*/
227242
}
228243

229244
.intermediate header {
230-
background-color: var(--color-session-intermediate);
245+
/*background-color: var(--color-session-intermediate);*/
231246
}
232247

233248
.advanced header {
234-
background-color: var(--color-session-advanced);
249+
/*background-color: var(--color-session-advanced);*/
235250
}
236251

237252
.poster header {

src/components/ui/Headline.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const isCenter = center ? "text-center" : "";
88
99
---
1010

11-
<Tag id={isAnchor ? id : undefined} class={`${isCenter} $m-5 py-2 font-bold max-w-[90vw]`}>
11+
<Tag id={isAnchor ? id : undefined} class={`${isCenter} mx-5 py-2 font-bold max-w-[90vw]`}>
1212
{isAnchor && (
1313
<a href={`#${id}`} aria-label={`Jump to ${id}`}>
1414
{Title}

src/layouts/Layout.astro

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,7 @@ const { title, description } = Astro.props;
2222
<BaseLayout title={title} description={description}>
2323
<Fragment slot="head">
2424
<BaseHead title={title} description={description} />
25-
<link rel="preconnect" href="https://fonts.googleapis.com">
26-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
27-
28-
<link href="https://fonts.googleapis.com/css2?family=Red+Hat+Display:ital,wght@0,300..900;1,300..900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&family=Sofia+Sans+Condensed:ital,wght@0,1..1000;1,1..1000&display=swap" rel="stylesheet">
29-
30-
<link href="https://fonts.googleapis.com/css2?family=Inter+Tight:ital,wght@0,100..900;1,100..900&family=Red+Hat+Display:ital,wght@0,300..900;1,300..900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&family=Sofia+Sans+Condensed:ital,wght@0,1..1000;1,1..1000&display=swap" rel="stylesheet">
25+
<slot name="head" />
3126
</Fragment>
3227

3328
<body>

src/layouts/ScheduleLayout.astro

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ export interface Props {
88
99
const { title, description } = Astro.props;
1010
---
11-
1211
<Layout title="Schedule" description="Schedule" >
12+
<Fragment slot="head">
13+
<link rel="preconnect" href="https://fonts.googleapis.com">
14+
<link href="https://fonts.googleapis.com/css2?family=Inter+Tight:ital,wght@0,100..900;1,100..900&display=block" rel="stylesheet">
15+
</Fragment>
1316
<div class="layout-wrapper2">
1417
<slot />
1518
</div>
16-
17-
</Layout>
19+
</Layout>
1820

1921
<style is:global>
2022
.layout-wrapper2 {

0 commit comments

Comments
 (0)