Change homepage layout (#112)
* Change homepage layout * Fix translations
This commit is contained in:
7 files changed
+117
-98
No files matched your search
@@ -0,0 +1,25 @@
|
||||
import clsx from 'clsx';
|
||||
import { PropsWithChildren } from 'react';
|
||||
import styles from "./styles.module.scss";
|
||||
|
||||
interface HomepageFeatureProps {
|
||||
title: string;
|
||||
image?: string;
|
||||
flipped?: boolean;
|
||||
}
|
||||
|
||||
export const HomepageFeature: React.FC<PropsWithChildren<HomepageFeatureProps>> = ({ title, image, flipped, children }) => {
|
||||
return (
|
||||
<div className={clsx(styles.feature, { [styles.flipped]: flipped })}>
|
||||
<div className={clsx(styles.content, "text--left padding-horiz--md")}>
|
||||
<h3 className={styles.title}>{title}</h3>
|
||||
{children}
|
||||
</div>
|
||||
{image && (
|
||||
<div>
|
||||
<img src={image} alt={title} />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
.feature {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.feature.flipped > *:first-child {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.feature.flipped > *:last-child {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.content {
|
||||
margin-top: auto;
|
||||
margin-bottom: auto;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 30px;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.feature {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.feature > *:first-child {
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.feature > *:last-child {
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin-top: 15px;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user