@import "../../resources/scss/util/variables";
@import "../../resources/scss/util/mixins";
.block-our-firms {
padding: rem-calc(40px) 0 rem-calc(20px);
@include bp($lg) {
padding: rem-calc(100px) 0 rem-calc(60px);
}
&__content {
@include bp($lg) {
margin-bottom: rem-calc(40px);
}
@include bp($xxl) {
padding-right: calc(25% + #{$grid-gutter-width});
}
}
@include accordion;
.accordion-wrapper {
margin-top: $grid-gutter-width;
@include bp($lg) {
&:first-of-type {
margin-top: 0;
}
}
@include bp($lg) {
margin-top: 0;
margin-bottom: $grid-gutter-width;
}
&:last-of-type {
.accordion-wrapper {
margin-bottom: 0;
}
}
.btn {
margin-top: 1rem;
}
.title {
font-size: $heading-8;
}
.accordion-item {
.accordion-trigger {
.icon {
width: 40px;
height: 40px;
}
}
}
.content-container {
line-height: 24px;
a:not(.btn) {
background-image: none;
margin-bottom: 5px;
word-break: break-word;
&:hover {
color: $primary-purple;
}
}
}
}
}
class OurFirms {
block;
constructor(block) {
this.block = block;
this.init();
}
init() {
/* Swiper Example
this.swiperElem = this.block.querySelector('.swiper');
this.swiper = new Swiper(this.swiperElem, {
pagination: {
el: '.swiper-pagination',
clickable: true,
type: 'custom',
},
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev'
},
});
*/
}
}
document.addEventListener('DOMContentLoaded', () => {
document.querySelectorAll('.block-our-firms').forEach((block) => {
new OurFirms(block);
})
});
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 2,
"name": "strategiq/our-firms",
"title": "Our Firms",
"description": "Example block to be used as a template",
"category": "strategiq",
"icon": "strategiq",
"acf": {
"mode": "preview",
"renderTemplate": "block-our-firms.php"
},
"supports": {
"anchor": true,
"align": false,
"color": {
"background": false,
"text": false,
"gradients": false
},
"spacing": {
"padding": [
"top",
"bottom"
],
"margin": [
"top",
"bottom"
]
}
},
"example": {
"attributes": {
"mode": "preview",
"data": {
"heading_type": "h2",
"heading_text": "Example - Our Firms",
"content": "This is some example content to represent what the content will look like"
}
}
},
"style": ["file:../../assets/css/our-firms/block-our-firms.css"],
"viewScript": ["our-firms"]
}
This component is not currently used on any pages.