Import repositories from gitlab
This commit is contained in:
25
next/components/pressBlock/index.jsx
Normal file
25
next/components/pressBlock/index.jsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import ArticleBlock from "../articleBlock";
|
||||
import ImageBlock from "../imageBlock";
|
||||
import styles from "./style.module.scss";
|
||||
|
||||
export default function PressBlock({
|
||||
left: {type: leftType, ...left},
|
||||
right: {type: rightType, ...right},
|
||||
...props
|
||||
}) {
|
||||
return (
|
||||
<section {...props} className={styles.pressBlock}>
|
||||
{
|
||||
leftType ? leftType === 'article' ?
|
||||
<ArticleBlock {...left} className={styles.pressArticle}/> :
|
||||
<ImageBlock {...left} className={styles.pressImage}/> : null
|
||||
}
|
||||
|
||||
{
|
||||
rightType ? rightType === 'article' ?
|
||||
<ArticleBlock {...right} className={styles.pressArticle}/> :
|
||||
<ImageBlock {...right} className={styles.pressImage}/> : null
|
||||
}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
36
next/components/pressBlock/style.module.scss
Normal file
36
next/components/pressBlock/style.module.scss
Normal file
@@ -0,0 +1,36 @@
|
||||
.pressBlock {
|
||||
--element-width: 30vw;
|
||||
display: flex;
|
||||
|
||||
.pressArticle, .pressImage {
|
||||
width: var(--element-width);
|
||||
margin: 1rem;
|
||||
}
|
||||
|
||||
.pressImage {
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
&:nth-of-type(2n+1) {
|
||||
flex-flow: row-reverse;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 80rem) {
|
||||
.pressBlock {
|
||||
--element-width: 45vw;
|
||||
|
||||
.pressImage {
|
||||
width: calc(var(--element-width) - 10vw);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 60rem) {
|
||||
.pressBlock {
|
||||
--element-width: 90vw;
|
||||
&, &:nth-child(2n) {
|
||||
flex-flow: column;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user