summaryrefslogtreecommitdiff
blob: bc753513c9e6696af74f20baf14d2b2d58b60bcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
.jp-related-posts-i2 {
	&__row {
		display: flex;
		margin-top: 1.5rem;

		&:first-child {
			margin-top: 0;
		}

		&[data-post-count='3'] .jp-related-posts-i2__post {
			max-width: calc( 33% - 20px );
		}

		&[data-post-count='2'] .jp-related-posts-i2__post,
		&[data-post-count='1'] .jp-related-posts-i2__post {
			max-width: calc( 50% - 20px );
		}
	}

	&__post {
		flex-grow: 1;
		flex-basis: 0;
		margin: 0 10px;
		display: flex;
		flex-direction: column;
	}

	&__post-heading, &__post-img-link, &__post-date, &__post-context {
		flex-direction: row;
	}

	&__post-img-link, &__post-image-placeholder {
		order: -1;
	}

	&__post-heading {
		margin: 0.5rem 0;
		font-size: 1rem;
		line-height: 1.2em;
	}

	&__post-link {
		display: block;
		width: 100%;
		line-height: 1.2em;
		margin: 0.2em 0;
	}

	&__post-img {
		width: 100%;
	}

	&__post-image-placeholder {
		display: block;
		position: relative;
		margin: 0 auto;
		max-width: 350px;
		&-icon {
			position: absolute;
			top: calc( 50% - 12px );
			left: calc( 50% - 12px );
		}
	}
}

/* List view */

.jp-relatedposts-i2[data-layout='list'] {
	.jp-related-posts-i2__row {
		margin-top: 0;
		display: block;
	}
	.jp-related-posts-i2__post {
		max-width: none;
		margin: 0;
		margin-top: 1rem;
	}
	.jp-related-posts-i2__post-image-placeholder {
		max-width: 350px;
		margin: 0;
	}
	.jp-related-posts-i2__post-img-link {
		margin-top: 1rem;
	}
}