Skip to content

Commit 2e3a5ef

Browse files
fix: grid-hover-posts js file removed
1 parent ded9948 commit 2e3a5ef

File tree

10 files changed

+1282
-16
lines changed

10 files changed

+1282
-16
lines changed
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
.wcf--a-accordion {
2+
text-align: start;
3+
display: flex;
4+
flex-direction: column;
5+
}
6+
.wcf--a-accordion svg {
7+
width: 1em;
8+
height: 1em;
9+
}
10+
.wcf--a-accordion .accordion-item {
11+
border: 1px solid #d5d8dc;
12+
}
13+
.wcf--a-accordion .accordion-item.element-active .icon-opened {
14+
display: block;
15+
}
16+
.wcf--a-accordion .accordion-item.element-active .icon-closed {
17+
display: none;
18+
}
19+
.wcf--a-accordion .tab-title {
20+
margin: 0;
21+
padding: 15px 20px;
22+
font-weight: 700;
23+
line-height: 1;
24+
cursor: pointer;
25+
outline: none;
26+
}
27+
.wcf--a-accordion .accordion-icon {
28+
display: inline-block;
29+
width: 1.5em;
30+
}
31+
.wcf--a-accordion .accordion-icon.accordion-icon-right {
32+
float: right;
33+
text-align: right;
34+
}
35+
.wcf--a-accordion .accordion-icon.accordion-icon-left {
36+
float: left;
37+
text-align: left;
38+
}
39+
.wcf--a-accordion .tab-content {
40+
display: none;
41+
padding: 15px 20px;
42+
border-top: 1px solid #d5d8dc;
43+
}
44+
.wcf--a-accordion .icon-opened {
45+
display: none;
46+
}
47+
.wcf--a-accordion.style-2 .content-wrap {
48+
display: flex;
49+
flex-wrap: wrap;
50+
}
51+
.wcf--a-accordion.style-2 .acc-content {
52+
flex: 1;
53+
display: flex;
54+
flex-direction: column;
55+
justify-content: space-between;
56+
}
57+
.wcf--a-accordion.style-2 .acc-image {
58+
margin-right: 30px;
59+
}
60+
.wcf--a-accordion.style-2 .acc-image img {
61+
width: 100%;
62+
-o-object-fit: cover;
63+
object-fit: cover;
64+
}
65+
.wcf--a-accordion.style-2 .acc-btn {
66+
position: relative;
67+
align-self: flex-start;
68+
}
69+
.wcf--a-accordion.style-2 .acc-btn::after {
70+
position: absolute;
71+
content: "";
72+
width: 100%;
73+
height: 1px;
74+
bottom: 0;
75+
left: 0;
76+
background-color: #121212;
77+
transition: all 0.3s;
78+
}
79+
.wcf--a-accordion.style-2 .acc-btn:hover::after {
80+
width: 30%;
81+
}

assets/css/widgets/advance-accordion.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: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/* global WCF_ADDONS_JS */
2+
(function ($) {
3+
/**
4+
* @param $scope The Widget wrapper element as a jQuery element
5+
* @param $ The jQuery alias
6+
*/
7+
const AdvanceAccordion = function ($scope, $) {
8+
let item = $('.tab-title', $scope);
9+
10+
if ($scope.hasClass('accordion-first-item-yes')) {
11+
item.first().parent().toggleClass('element-active');
12+
item.first().parent().find('.tab-content').show();
13+
}
14+
15+
item.on('click', function () {
16+
$(this).parent().toggleClass('element-active');
17+
$(this).parent().find('.tab-content').slideToggle("medium");
18+
19+
item.not($(this)).parent().find('.tab-content').slideUp('medium');
20+
});
21+
};
22+
23+
// Make sure you run this code under Elementor.
24+
$(window).on('elementor/frontend/init', function () {
25+
elementorFrontend.hooks.addAction('frontend/element_ready/wcf--a-accordion.default', AdvanceAccordion);
26+
});
27+
})(jQuery);

assets/js/widgets/advance-accordion.min.js

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: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/* global WCF_ADDONS_JS */
2+
(function ($) {
3+
/**
4+
* @param $scope The Widget wrapper element as a jQuery element
5+
* @param $ The jQuery alias
6+
*/
7+
const AdvanceAccordion = function ($scope, $) {
8+
let item = $('.tab-title', $scope);
9+
10+
if ($scope.hasClass('accordion-first-item-yes')) {
11+
item.first().parent().toggleClass('element-active');
12+
item.first().parent().find('.tab-content').show();
13+
}
14+
15+
item.on('click', function () {
16+
$(this).parent().toggleClass('element-active');
17+
$(this).parent().find('.tab-content').slideToggle("medium");
18+
19+
item.not($(this)).parent().find('.tab-content').slideUp('medium');
20+
});
21+
};
22+
23+
// Make sure you run this code under Elementor.
24+
$(window).on('elementor/frontend/init', function () {
25+
elementorFrontend.hooks.addAction('frontend/element_ready/wcf--a-accordion.default', AdvanceAccordion);
26+
});
27+
})(jQuery);
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
.wcf--a-accordion {
2+
text-align: start;
3+
display: flex;
4+
flex-direction: column;
5+
6+
svg {
7+
width: 1em;
8+
height: 1em
9+
}
10+
11+
.accordion-item {
12+
border: 1px solid #d5d8dc;
13+
14+
&.element-active .icon-opened {
15+
display: block;
16+
}
17+
18+
&.element-active .icon-closed {
19+
display: none;
20+
}
21+
}
22+
23+
//.accordion-item + .accordion-item {
24+
// margin-top: -1px;
25+
//}
26+
27+
.tab-title {
28+
margin: 0;
29+
padding: 15px 20px;
30+
font-weight: 700;
31+
line-height: 1;
32+
cursor: pointer;
33+
outline: none
34+
}
35+
36+
.accordion-icon {
37+
display: inline-block;
38+
width: 1.5em;
39+
40+
&.accordion-icon-right {
41+
float: right;
42+
text-align: right
43+
}
44+
45+
&.accordion-icon-left {
46+
float: left;
47+
text-align: left
48+
}
49+
}
50+
51+
.tab-content {
52+
display: none;
53+
padding: 15px 20px;
54+
border-top: 1px solid #d5d8dc
55+
}
56+
57+
.icon-opened {
58+
display: none;
59+
}
60+
61+
&.style-2 {
62+
63+
.content-wrap {
64+
display: flex;
65+
flex-wrap: wrap;
66+
}
67+
68+
.acc-content {
69+
flex: 1;
70+
display: flex;
71+
flex-direction: column;
72+
justify-content: space-between;
73+
}
74+
75+
.acc-image {
76+
margin-right: 30px;
77+
78+
img {
79+
width: 100%;
80+
object-fit: cover;
81+
}
82+
}
83+
84+
.acc-btn {
85+
position: relative;
86+
align-self: flex-start;
87+
88+
&::after {
89+
position: absolute;
90+
content: "";
91+
width: 100%;
92+
height: 1px;
93+
bottom: 0;
94+
left: 0;
95+
background-color: #121212;
96+
transition: all 0.3s;
97+
}
98+
99+
&:hover::after {
100+
width: 30%;
101+
}
102+
}
103+
}
104+
105+
106+
}

class-plugin.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,13 @@ public static function get_widget_scripts()
360360
'version' => false,
361361
'arg' => true,
362362
],
363+
'wcf--a-accordion' => [
364+
'handler' => 'wcf--a-accordion',
365+
'src' => 'widgets/advance-accordion.min.js',
366+
'dep' => [],
367+
'version' => false,
368+
'arg' => true,
369+
],
363370
]);
364371
}
365372

@@ -585,6 +592,13 @@ public static function get_widget_style()
585592
'version' => false,
586593
'media' => 'all',
587594
],
595+
'wcf--a-accordion' => [
596+
'handler' => 'wcf--a-accordion',
597+
'src' => 'widgets/advance-accordion.min.css',
598+
'dep' => [],
599+
'version' => false,
600+
'media' => 'all',
601+
],
588602
];
589603
}
590604

config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1449,7 +1449,7 @@
14491449
'cTab' => 'all'
14501450
],
14511451
'is_upcoming' => false,
1452-
'is_pro' => true,
1452+
'is_pro' => false,
14531453
'is_extension' => false,
14541454
'icon' => "wcf-icon-Advanced-Accordion",
14551455
'demo_url' => 'https://animation-addons.com/widgets/aae-advanced-accordion',

0 commit comments

Comments
 (0)