Skip to content

Commit

Permalink
Switch landing image to one off bg-img
Browse files Browse the repository at this point in the history
  • Loading branch information
HendrikSchmidt committed Sep 27, 2024
1 parent 3d4fe26 commit 19d9fdf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/dito/app/routes/_index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default function Index() {
content={landing.dataNotice.content}
/>
</Container> */}
<Background backgroundImage="trainings.jpeg">
<div className="bg-[url('/assets/images/trainings.jpeg')] bg-[0%_35%] bg-cover">
<Container>
<div className="max-w-[630px] bg-white px-16 py-28 md:px-80 md:py-40 rounded-lg">
<Box
Expand All @@ -58,7 +58,7 @@ export default function Index() {
/>
</div>
</Container>
</Background>
</div>
<Container>
<InfoBox
heading={{
Expand Down
6 changes: 1 addition & 5 deletions packages/shared/components/Background.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,16 @@ import type { CommonWrapperProps } from "./CommonWrapperProps";
const DEFAULT_PADDING_TOP = "0";
const DEFAULT_PADDING_BOTTOM = "0";

type BackgroundProps = PropsWithChildren<CommonWrapperProps> & {
backgroundImage?: string;
};
type BackgroundProps = PropsWithChildren<CommonWrapperProps>;

export default function Background({
backgroundColor = "default",
backgroundImage,
paddingTop = "default",
paddingBottom = "default",
children,
}: BackgroundProps) {
const cssClasses = classNames(
backgroundColor !== "default" && BACKGROUND_COLORS[backgroundColor],
backgroundImage && `bg-[url('/assets/images/${backgroundImage}')] bg-cover`,
`!pt-${paddingTop === "default" ? DEFAULT_PADDING_TOP : paddingTop}`,
`!pb-${
paddingBottom === "default" ? DEFAULT_PADDING_BOTTOM : paddingBottom
Expand Down

0 comments on commit 19d9fdf

Please sign in to comment.