blob: 84e68e82f1172bc72f215ad0cf1bec5f971189cd (
plain) (
blame)
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
86
87
88
89
90
91
92
|
<?php
/**
* Related Posts - Static CSS
*
* @package astra
*
* @since 3.5.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
add_filter( 'astra_dynamic_theme_css', 'astra_related_posts_static_css', 11 );
/**
* Related Posts - Static CSS
*
* @param string $dynamic_css Astra Dynamic CSS.
* @return String Generated dynamic CSS for Related Posts.
*
* @since 3.5.0
*/
function astra_related_posts_static_css( $dynamic_css ) {
if ( astra_target_rules_for_related_posts() ) {
$dynamic_css .= '
.ast-related-posts-title-section {
border-top: 1px solid #eeeeee;
}
.ast-related-posts-title {
margin: 20px 0;
}
.ast-related-post-title, .entry-meta * {
word-break: break-word;
}
.ast-separate-container .ast-related-posts-title {
margin: 0 0 20px 0;
}
.ast-page-builder-template .ast-related-posts-title-section, .ast-page-builder-template .ast-single-related-posts-container {
padding: 0 20px;
}
.ast-page-builder-template .ast-related-post .entry-header, .ast-related-post-content .entry-header, .ast-related-post-content .entry-meta {
margin: 1em auto 1em auto;
padding: 0;
}
.ast-related-posts-wrapper {
display: grid;
grid-column-gap: 25px;
grid-row-gap: 25px;
}
.ast-single-related-posts-container {
margin: 2em 0;
}
.ast-related-posts-wrapper .ast-related-post, .ast-related-post-featured-section {
padding: 0;
margin: 0;
width: 100%;
position: relative;
}
.ast-related-posts-inner-section {
height: 100%;
}
.post-has-thumb + .entry-header, .post-has-thumb + .entry-content {
margin-top: 1em;
}
.ast-related-post-content .entry-meta {
margin-top: 0.5em;
}
.ast-related-posts-inner-section .post-thumb-img-content {
margin: 0;
position: relative;
}
.ast-separate-container .ast-single-related-posts-container {
padding: 5.34em 6.67em;
}
.ast-separate-container .ast-related-posts-title-section, .ast-page-builder-template .ast-single-related-posts-container {
border-top: 0;
margin-top: 0;
}
@media (max-width: 1200px) {
.ast-separate-container .ast-single-related-posts-container {
padding: 3.34em 2.4em;
}
}';
return $dynamic_css;
}
return $dynamic_css;
}
|