1
Fork 0
mirror of https://github.com/Steffo99/festa.git synced 2024-12-22 14:44:21 +00:00

Move toolbar depending on the screen width

This commit is contained in:
Steffo 2022-06-07 12:34:38 +02:00
parent 0d8e7eee43
commit b4ab31ca09
Signed by: steffo
GPG key ID: 6965406171929D01
4 changed files with 27 additions and 3 deletions

View file

@ -2,7 +2,7 @@ import {default as classNames} from "classnames"
import { ReactNode } from "react"
type ToolBarProps = {
vertical: "top" | "bottom",
vertical: "top" | "bottom" | "vadapt",
horizontal: "left" | "right",
children: ReactNode,
}

View file

@ -75,7 +75,7 @@ export default function PageEventDetail({event}: PageEventDetailProps) {
<title key="title">{event.name} - {t("siteTitle")}</title>
</Head>
<EditingContext.Provider value={editState}>
<ToolBar vertical="bottom" horizontal="right">
<ToolBar vertical="vadapt" horizontal="right">
<ToolToggleEditing/>
</ToolBar>
<ViewEvent

View file

@ -24,3 +24,14 @@
right: 8px;
flex-direction: row-reverse;
}
.toolbar-vadapt {
top: 8px;
}
@media (max-width: 800px) {
.toolbar-vadapt {
top: unset;
bottom: 8px;
}
}

View file

@ -6,7 +6,7 @@
"x1 x2 de x3 x4"
"x1 x2 dr x3 x4"
;
grid-template-columns: 3fr 1fr 800px 1fr 3fr;
grid-template-columns: 1fr 80px 640px 80px 1fr;
grid-template-rows: auto auto 1fr auto;
row-gap: 4px;
@ -14,6 +14,19 @@
margin: 0 auto;
}
@media (max-width: 800px) {
.view-event {
grid-template-areas:
"ti"
"po"
"de"
"dr"
;
grid-template-columns: 1fr;
grid-template-rows: auto auto 1fr auto;
}
}
.view-event-title {
grid-area: ti;
text-align: center;