Use PageContentLayout.tsx everywhere
This commit is contained in:
parent
df39a1a217
commit
fdb1b3625f
4 changed files with 14 additions and 12 deletions
|
|
@ -34,12 +34,14 @@ export default function PageContentLayout({
|
||||||
<CircularIconButton
|
<CircularIconButton
|
||||||
onClick={() => setIsMenuOpen(true)}
|
onClick={() => setIsMenuOpen(true)}
|
||||||
buttonType={ButtonType.LightButton}
|
buttonType={ButtonType.LightButton}
|
||||||
className="sticky top-4 float-right w-10 h-10 z-20 mb-[-40px]"
|
className="absolute top-4 right-4 w-10 h-10 z-20"
|
||||||
icon={Settings}
|
icon={Settings}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Page content */}
|
{/* Page content with top padding to accommodate settings button */}
|
||||||
|
<div className="pt-8">
|
||||||
{children}
|
{children}
|
||||||
|
</div>
|
||||||
|
|
||||||
{/* Overlay Settings Menu */}
|
{/* Overlay Settings Menu */}
|
||||||
{isMenuOpen && <SettingsMenu onClose={() => setIsMenuOpen(false)}/>}
|
{isMenuOpen && <SettingsMenu onClose={() => setIsMenuOpen(false)}/>}
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,9 @@ import {InstructionStepListEditor} from "./InstructionStepListEditor"
|
||||||
import type {InstructionStepModel} from "../../models/InstructionStepModel"
|
import type {InstructionStepModel} from "../../models/InstructionStepModel"
|
||||||
import {ButtonType} from "../basics/BasicButtonDefinitions"
|
import {ButtonType} from "../basics/BasicButtonDefinitions"
|
||||||
import ButtonGroupLayout from "../basics/ButtonGroupLayout.tsx";
|
import ButtonGroupLayout from "../basics/ButtonGroupLayout.tsx";
|
||||||
import ContentBackground from "../basics/ContentBackground.tsx";
|
|
||||||
import ContentBody from "../basics/ContentBody.tsx";
|
import ContentBody from "../basics/ContentBody.tsx";
|
||||||
import PageContainer from "../basics/PageContainer.tsx";
|
import PageContainer from "../basics/PageContainer.tsx";
|
||||||
|
import PageContentLayout from "../basics/PageContentLayout.tsx";
|
||||||
|
|
||||||
type RecipeEditorProps = {
|
type RecipeEditorProps = {
|
||||||
recipe: RecipeModel
|
recipe: RecipeModel
|
||||||
|
|
@ -86,7 +86,7 @@ export function RecipeEditor({recipe, onSave, onCancel}: RecipeEditorProps) {
|
||||||
/*Container spanning entire screen used to center content horizontally */
|
/*Container spanning entire screen used to center content horizontally */
|
||||||
<PageContainer>
|
<PageContainer>
|
||||||
{/* Container defining the maximum width of the content */}
|
{/* Container defining the maximum width of the content */}
|
||||||
<ContentBackground>
|
<PageContentLayout>
|
||||||
<h1 className="border-b-2 border-gray-300 pb-4">
|
<h1 className="border-b-2 border-gray-300 pb-4">
|
||||||
{recipe.id ? "Rezept bearbeiten" : "Neues Rezept"}
|
{recipe.id ? "Rezept bearbeiten" : "Neues Rezept"}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
@ -152,7 +152,7 @@ export function RecipeEditor({recipe, onSave, onCancel}: RecipeEditorProps) {
|
||||||
/>
|
/>
|
||||||
</ButtonGroupLayout>
|
</ButtonGroupLayout>
|
||||||
</ContentBody>
|
</ContentBody>
|
||||||
</ContentBackground>
|
</PageContentLayout>
|
||||||
</PageContainer>
|
</PageContainer>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ import {useNavigate} from "react-router-dom"
|
||||||
import {getRecipeAddUrl, getRecipeDetailUrl, getRecipeListUrl} from "../../routes"
|
import {getRecipeAddUrl, getRecipeDetailUrl, getRecipeListUrl} from "../../routes"
|
||||||
import RecipeListToolbar from "./RecipeListToolbar"
|
import RecipeListToolbar from "./RecipeListToolbar"
|
||||||
import StickyHeader from "../basics/StickyHeader.tsx";
|
import StickyHeader from "../basics/StickyHeader.tsx";
|
||||||
import ContentBackground from "../basics/ContentBackground.tsx";
|
|
||||||
import PageContainer from "../basics/PageContainer.tsx";
|
import PageContainer from "../basics/PageContainer.tsx";
|
||||||
|
import PageContentLayout from "../basics/PageContentLayout.tsx";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays a list of recipes in a sidebar layout.
|
* Displays a list of recipes in a sidebar layout.
|
||||||
|
|
@ -46,7 +46,7 @@ export default function RecipeListPage() {
|
||||||
/*Container spanning entire screen used to center content horizontally */
|
/*Container spanning entire screen used to center content horizontally */
|
||||||
<PageContainer>
|
<PageContainer>
|
||||||
{/* Container defining the maximum width of the content */}
|
{/* Container defining the maximum width of the content */}
|
||||||
<ContentBackground>
|
<PageContentLayout>
|
||||||
{/* Header - remains in position when scrolling */}
|
{/* Header - remains in position when scrolling */}
|
||||||
<StickyHeader>
|
<StickyHeader>
|
||||||
<h1>Recipes</h1>
|
<h1>Recipes</h1>
|
||||||
|
|
@ -69,7 +69,7 @@ export default function RecipeListPage() {
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentBackground>
|
</PageContentLayout>
|
||||||
</PageContainer>
|
</PageContainer>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import {useEffect, useState} from "react";
|
import {useEffect, useState} from "react";
|
||||||
import {createUser, fetchAllUsers, fetchCurrentUser, updateUser,} from "../../api/points/UserPoint";
|
import {createUser, fetchAllUsers, fetchCurrentUser, updateUser,} from "../../api/points/UserPoint";
|
||||||
import type {UserDto} from "../../api/dtos/UserDto";
|
import type {UserDto} from "../../api/dtos/UserDto";
|
||||||
import ContentBackground from "../basics/ContentBackground";
|
|
||||||
import ContentBody from "../basics/ContentBody";
|
import ContentBody from "../basics/ContentBody";
|
||||||
import StickyHeader from "../basics/StickyHeader";
|
import StickyHeader from "../basics/StickyHeader";
|
||||||
import Button from "../basics/Button";
|
import Button from "../basics/Button";
|
||||||
|
|
@ -18,6 +17,7 @@ import UserList from "./UserList";
|
||||||
import UserEditForm from "./UserEditForm";
|
import UserEditForm from "./UserEditForm";
|
||||||
import ErrorPopup from "../basics/ErrorPopup";
|
import ErrorPopup from "../basics/ErrorPopup";
|
||||||
import {UserRole} from "../../api/enums/UserRole.ts";
|
import {UserRole} from "../../api/enums/UserRole.ts";
|
||||||
|
import PageContentLayout from "../basics/PageContentLayout.tsx";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UserManagementPage
|
* UserManagementPage
|
||||||
|
|
@ -151,7 +151,7 @@ export default function UserManagementPage() {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PageContainer>
|
<PageContainer>
|
||||||
<ContentBackground>
|
<PageContentLayout>
|
||||||
<StickyHeader className="flex justify-between items-center">
|
<StickyHeader className="flex justify-between items-center">
|
||||||
<h1>Benutzerverwaltung</h1>
|
<h1>Benutzerverwaltung</h1>
|
||||||
<ButtonGroupLayout>
|
<ButtonGroupLayout>
|
||||||
|
|
@ -211,7 +211,7 @@ export default function UserManagementPage() {
|
||||||
{error && (
|
{error && (
|
||||||
<ErrorPopup message={error} onClose={() => setError(null)}/>
|
<ErrorPopup message={error} onClose={() => setError(null)}/>
|
||||||
)}
|
)}
|
||||||
</ContentBackground>
|
</PageContentLayout>
|
||||||
</PageContainer>
|
</PageContainer>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue