Make room names sticky, events are now at most 80% of viewport width
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Luca 2022-08-29 15:27:24 +02:00
parent 37bcf39835
commit cba4ab18f9
2 changed files with 58 additions and 36 deletions

View File

@ -4,12 +4,12 @@ $timeslot-height: 0.65em;
.schedule { .schedule {
display: flex; display: flex;
overflow-x: auto; padding-right: 0.5em;
.schedule-date { .schedule-date {
height: 0; height: 0;
position: relative; position: relative;
top: calc(-3rem - 1px); top: calc(-5rem - 1px);
visibility: hidden; visibility: hidden;
width: 0; width: 0;
} }
@ -55,23 +55,34 @@ $timeslot-height: 0.65em;
.schedule-grid { .schedule-grid {
display: grid; display: grid;
grid-auto-rows: $timeslot-height; grid-auto-rows: $timeslot-height;
grid-template-rows: 2em; grid-template-rows: 2rem;
&.schedule-room { &.schedule-room {
grid-template-columns: 80vw;
@media screen and (min-width: 501px) {
grid-template-columns: 400px; grid-template-columns: 400px;
} }
}
& > * { & > * {
grid-column: 1 / 2; grid-column: 1 / 2;
} }
& > .schedule-title {
background: $color-background;
font-size: 1.17rem;
margin-bottom: 0;
padding-bottom: 0.5em;
position: sticky;
text-align: center;
top: 3rem;
z-index: 42;
}
} }
.schedule-room { .schedule-room {
margin: 0 0.5em; margin: 0 0.5em;
& > .schedule-title {
text-align: center;
}
} }
.schedule-time { .schedule-time {
@ -81,19 +92,28 @@ $timeslot-height: 0.65em;
.schedule-timeline { .schedule-timeline {
background: $color-background; background: $color-background;
padding-right: 0.5em; padding: 0 0.5em 0 1em;
position: sticky; position: sticky;
left: 0; left: 0;
} }
} }
.schedule-container {
display: flex;
flex-direction: column;
margin-left: -1rem;
width: min-content;
}
.schedule-days { .schedule-days {
background: $color-background; background: $color-background;
display: flex; display: flex;
font-size: 1rem; font-size: 1rem;
left: 0;
line-height: 1; line-height: 1;
max-width: 100vw;
overflow-x: auto; overflow-x: auto;
padding: 1em 0; padding: 1em;
position: sticky; position: sticky;
top: 0; top: 0;
z-index: 42; z-index: 42;

View File

@ -4,6 +4,7 @@
<br>Zeitangaben in <span class="schedule-timezone">{{ .timezone }}</span> <br>Zeitangaben in <span class="schedule-timezone">{{ .timezone }}</span>
</p> </p>
<div class="schedule-container">
<div class="schedule-days"> <div class="schedule-days">
{{ range .days }} {{ range .days }}
<a href="#{{ . }}">{{ . }}</a>&middot; <a href="#{{ . }}">{{ . }}</a>&middot;
@ -44,4 +45,5 @@
</div> </div>
{{ end }} {{ end }}
</div> </div>
</div>
{{ end }} {{ end }}