mirror of
https://github.com/acid-info/logos-press-engine.git
synced 2025-02-23 06:38:27 +00:00
fix: restore show episodes border style
This commit is contained in:
parent
6ecdc38d52
commit
1583ca83be
@ -86,6 +86,7 @@ type Pattern = {
|
|||||||
cols: number
|
cols: number
|
||||||
maxWidth?: string
|
maxWidth?: string
|
||||||
size: PostCardProps['size']
|
size: PostCardProps['size']
|
||||||
|
rowBorder?: boolean
|
||||||
}
|
}
|
||||||
type Breakpoint = {
|
type Breakpoint = {
|
||||||
pattern: Pattern[]
|
pattern: Pattern[]
|
||||||
@ -103,7 +104,7 @@ const createGridStyles = ({
|
|||||||
postCardStyles: {
|
postCardStyles: {
|
||||||
[name: string]: SerializedStyles
|
[name: string]: SerializedStyles
|
||||||
}
|
}
|
||||||
pattern: Pick<Pattern, 'cols' | 'size' | 'maxWidth'>[]
|
pattern: Pick<Pattern, 'cols' | 'size' | 'maxWidth' | 'rowBorder'>[]
|
||||||
breakpoint?: boolean
|
breakpoint?: boolean
|
||||||
horizontal?: boolean
|
horizontal?: boolean
|
||||||
}) => {
|
}) => {
|
||||||
@ -130,12 +131,27 @@ const createGridStyles = ({
|
|||||||
> .row {
|
> .row {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(${cm}, 1fr);
|
grid-template-columns: repeat(${cm}, 1fr);
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
& > div {
|
& > div {
|
||||||
${pattern.map(
|
${pattern.map(
|
||||||
(p, i) => css`
|
(p, i) => css`
|
||||||
${selectors[i].map((s) => `&:nth-child(${s})`).join(', ')} {
|
${selectors[i].map((s) => `&:nth-child(${s})`).join(', ')} {
|
||||||
grid-column: span ${cm / p.cols};
|
grid-column: span ${cm / p.cols};
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
${p.rowBorder &&
|
||||||
|
css`
|
||||||
|
&::before {
|
||||||
|
width: calc(100% + 16px);
|
||||||
|
height: 1px;
|
||||||
|
content: ' ';
|
||||||
|
top: 0;
|
||||||
|
left: 0px;
|
||||||
|
position: absolute;
|
||||||
|
background: rgb(var(--lsd-border-primary));
|
||||||
|
}
|
||||||
|
`}
|
||||||
|
|
||||||
.post-card {
|
.post-card {
|
||||||
--post-card-size: ${p.size};
|
--post-card-size: ${p.size};
|
||||||
|
@ -91,19 +91,30 @@ export const PodcastShowsPreview: React.FC<PodcastShowsPreviewProps> = ({
|
|||||||
cols: 2,
|
cols: 2,
|
||||||
size: 'xsmall',
|
size: 'xsmall',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
cols: 2,
|
||||||
|
size: 'xsmall',
|
||||||
|
rowBorder: true,
|
||||||
|
},
|
||||||
]}
|
]}
|
||||||
breakpoints={[
|
breakpoints={[
|
||||||
{
|
{
|
||||||
breakpoint: 'xs',
|
breakpoint: 'xs',
|
||||||
pattern: [{ cols: 1, size: 'small' }],
|
pattern: [{ cols: 1, size: 'small', rowBorder: true }],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
breakpoint: 'sm',
|
breakpoint: 'sm',
|
||||||
pattern: [{ cols: 2, size: 'small' }],
|
pattern: [
|
||||||
|
{ cols: 2, size: 'small' },
|
||||||
|
{ cols: 2, size: 'small', rowBorder: true },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
breakpoint: 'md',
|
breakpoint: 'md',
|
||||||
pattern: [{ cols: 2, size: 'small' }],
|
pattern: [
|
||||||
|
{ cols: 2, size: 'small' },
|
||||||
|
{ cols: 2, size: 'small', rowBorder: true },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user