Skip to content

Commit ded9948

Browse files
added: grid-hover-posts widget
1 parent 77de134 commit ded9948

File tree

6 files changed

+3009
-1
lines changed

6 files changed

+3009
-1
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
.wcf-grid-hover-posts {
2+
display: grid;
3+
grid-template-columns: repeat(4, 1fr);
4+
}
5+
.wcf-grid-hover-posts svg {
6+
width: 1em;
7+
height: 1em;
8+
}
9+
.wcf-grid-hover-posts .wcf-post:hover .thumb, .wcf-grid-hover-posts .wcf-post:first-child .thumb {
10+
opacity: 1;
11+
}
12+
.wcf-grid-hover-posts .wcf-post .thumb {
13+
position: absolute;
14+
width: 100%;
15+
height: 100%;
16+
left: 0;
17+
top: 0;
18+
z-index: 0;
19+
transition: all 0.5s;
20+
opacity: 0;
21+
}
22+
.wcf-grid-hover-posts .wcf-post .thumb img {
23+
-o-object-fit: cover;
24+
object-fit: cover;
25+
width: 100%;
26+
height: 100%;
27+
}
28+
.wcf-grid-hover-posts .wcf-post .thumb::after {
29+
position: absolute;
30+
content: "";
31+
width: 100%;
32+
height: 100%;
33+
left: 0;
34+
top: 0;
35+
background-color: rgba(18, 18, 18, 0.2509803922);
36+
}
37+
.wcf-grid-hover-posts .wcf-post .content {
38+
z-index: 1;
39+
position: relative;
40+
display: flex;
41+
flex-direction: column;
42+
justify-content: flex-end;
43+
border-right: 1px solid rgba(255, 255, 255, 0.3019607843);
44+
padding: 300px 30px 30px;
45+
overflow: hidden;
46+
width: 100%;
47+
height: 100%;
48+
}
49+
50+
/* Responsive */
51+
@media (max-width: 1200px) {
52+
.wcf-grid-hover-posts .wcf-post {
53+
position: relative;
54+
}
55+
.wcf-grid-hover-posts .wcf-post .thumb {
56+
opacity: 1;
57+
}
58+
}

assets/css/widgets/grid-hover-posts.min.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
.wcf-grid-hover-posts {
2+
display: grid;
3+
grid-template-columns: repeat(4, 1fr);
4+
5+
svg {
6+
width: 1em;
7+
height: 1em;
8+
}
9+
10+
.wcf-post {
11+
&:hover .thumb,
12+
&:first-child .thumb {
13+
opacity: 1;
14+
}
15+
16+
.thumb {
17+
position: absolute;
18+
width: 100%;
19+
height: 100%;
20+
left: 0;
21+
top: 0;
22+
z-index: 0;
23+
transition: all 0.5s;
24+
opacity: 0;
25+
26+
img {
27+
object-fit: cover;
28+
width: 100%;
29+
height: 100%;
30+
}
31+
32+
&::after {
33+
position: absolute;
34+
content: "";
35+
width: 100%;
36+
height: 100%;
37+
left: 0;
38+
top: 0;
39+
background-color: #12121240;
40+
}
41+
}
42+
43+
.content {
44+
z-index: 1;
45+
position: relative;
46+
display: flex;
47+
flex-direction: column;
48+
justify-content: flex-end;
49+
border-right: 1px solid #FFFFFF4D;
50+
padding: 300px 30px 30px;
51+
overflow: hidden;
52+
width: 100%;
53+
height: 100%;
54+
}
55+
}
56+
57+
}
58+
59+
60+
/* Responsive */
61+
@media (max-width: 1200px) {
62+
63+
.wcf-grid-hover-posts {
64+
.wcf-post {
65+
position: relative;
66+
67+
.thumb {
68+
opacity: 1;
69+
}
70+
}
71+
}
72+
}

class-plugin.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -578,6 +578,13 @@ public static function get_widget_style()
578578
'version' => false,
579579
'media' => 'all',
580580
],
581+
'grid-hover-posts' => [
582+
'handler' => 'grid-hover-posts',
583+
'src' => 'widgets/grid-hover-posts.css',
584+
'dep' => [],
585+
'version' => false,
586+
'media' => 'all',
587+
],
581588
];
582589
}
583590

config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -993,7 +993,7 @@
993993
'cTab' => 'all'
994994
],
995995
'is_active' => false,
996-
'is_pro' => true,
996+
'is_pro' => false,
997997
'is_extension' => false,
998998
'is_upcoming' => false,
999999
'icon' => "wcf-icon-Grid-Hover-Posts",

0 commit comments

Comments
 (0)