Save
This commit is contained in:
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@@ -13,5 +13,6 @@
|
||||
"liveSassCompile.settings.watchOnLaunch": true,
|
||||
"liveSassCompile.settings.includeItems": [
|
||||
"wp-content/themes/hello-elementor/assets/css/custom.scss",
|
||||
"wp-content/plugins/elementor-addon/assets/css/main.scss"
|
||||
]
|
||||
}
|
||||
|
||||
1
wp-content/plugins/elementor-addon/assets/css/main.css
Normal file
1
wp-content/plugins/elementor-addon/assets/css/main.css
Normal file
@@ -0,0 +1 @@
|
||||
.apartaments .apartament-card__wrapper{position:relative;width:1264px;margin:0 auto;padding:93px 126px 26px;border:4px solid #192c44}.apartaments .apartament-card__wrapper .apartament-card__title{position:absolute;left:50%;top:0;transform:translateX(-50%);background:#192c44}.apartaments .apartament-card__wrapper .apartament-card__title h2{color:#fff;font-family:"Barlow",sans-serif;font-weight:500;font-size:32px;line-height:1.3;text-align:center;margin:0;padding:5px 70px 8px}.apartaments .apartament-card__wrapper .apartament-card__gallery{position:relative;line-height:0;margin-bottom:17px}.apartaments .apartament-card__wrapper .apartament-card__gallery .swiper-button-prev{left:0;transform:translateX(calc(-100% - 30px));width:43px;height:119px}.apartaments .apartament-card__wrapper .apartament-card__gallery .swiper-button-next{right:0;transform:translateX(calc(100% + 30px));width:43px;height:119px}.apartaments .apartament-card__wrapper .apartament-card__gallery img{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center}.apartaments .apartament-card__wrapper .apartament-card__info{display:grid;grid-template-columns:1fr 1fr;gap:26px;margin-bottom:15px}.apartaments .apartament-card__wrapper .apartament-card__info .apartament-card__info_col1{border:4px solid #192c44;padding:25px 10% 10px}.apartaments .apartament-card__wrapper .apartament-card__info .apartament-card__info_col1 table,.apartaments .apartament-card__wrapper .apartament-card__info .apartament-card__info_col1 tr,.apartaments .apartament-card__wrapper .apartament-card__info .apartament-card__info_col1 td{border:none;padding:0;margin:0;background:rgba(0,0,0,0)}.apartaments .apartament-card__wrapper .apartament-card__info .apartament-card__info_col1 table tr.apartament-card__status td span{position:relative;display:inline-block}.apartaments .apartament-card__wrapper .apartament-card__info .apartament-card__info_col1 table tr.apartament-card__status td span::before{content:"";position:absolute;inset:0 -8px;z-index:-1}.apartaments .apartament-card__wrapper .apartament-card__info .apartament-card__info_col1 table tr.apartament-card__status td span.available::before{background:#c1e8a8}.apartaments .apartament-card__wrapper .apartament-card__info .apartament-card__info_col1 table tr.apartament-card__status td span.reserved::before{background:#f4eba8}.apartaments .apartament-card__wrapper .apartament-card__info .apartament-card__info_col1 table tr.apartament-card__status td span.sold::before{background:#f54040}.apartaments .apartament-card__wrapper .apartament-card__info .apartament-card__info_col1 table tr.apartament-card__price-history .apartament-card__info_table-value{font-weight:600;font-size:14px;line-height:26px;display:inline-flex;width:100%;align-items:center;gap:7px;padding-top:10px;cursor:pointer}.apartaments .apartament-card__wrapper .apartament-card__info .apartament-card__info_col1 table tr.apartament-card__price-history .apartament-card__info_table-value svg{margin-bottom:4px}.apartaments .apartament-card__wrapper .apartament-card__info .apartament-card__info_col1 table tr td{width:50%;color:#192c44;font-family:"Barlow",sans-serif;font-weight:400;font-size:22px;line-height:1.2}.apartaments .apartament-card__wrapper .apartament-card__info .apartament-card__info_col2{border:4px solid #192c44;padding:25px 10% 10px;align-content:center}.apartaments .apartament-card__wrapper .apartament-card__info .apartament-card__info_col2 .card__info_col2__img{margin-bottom:40px}.apartaments .apartament-card__wrapper .apartament-card__info .apartament-card__info_col2 .card__info_col2__img img{width:100%;max-width:-moz-fit-content;max-width:fit-content}.apartaments .apartament-card__wrapper .apartament-card__info .apartament-card__info_col2 .card__info_col2__data a{color:#192c44;font-family:"Barlow",sans-serif;font-weight:600;font-size:14px;line-height:1.8;display:inline-flex;justify-content:center;align-items:center;gap:7px;width:100%;cursor:pointer}.apartaments .apartament-card__wrapper .apartament-card__info .apartament-card__info_col2 .card__info_col2__data a svg{margin-bottom:4px}.apartaments .apartament-card__wrapper .apartament-card__desc p{color:#192c44;font-family:"Barlow",sans-serif;font-weight:500;font-size:20px;line-height:1.05}.apartaments .apartament-card__wrapper .apartament-card__desc ul{padding:0;margin:0;list-style:none}.apartaments .apartament-card__wrapper .apartament-card__desc ul li{position:relative;padding-left:25px;color:#192c44;font-family:"Barlow",sans-serif;font-weight:400;font-size:20px;line-height:30px}.apartaments .apartament-card__wrapper .apartament-card__desc ul li::before{content:"";position:absolute;left:0;top:10px;width:9px;height:13px;background-image:url("/wp-content/uploads/2026/03/Polygon-2.svg");background-position:center;background-size:contain;background-repeat:no-repeat}/*# sourceMappingURL=main.css.map */
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["main.scss"],"names":[],"mappings":"AAEE,uCACC,iBAAA,CACA,YAAA,CACA,aAAA,CACA,uBAAA,CACA,wBAAA,CAEA,+DACC,iBAAA,CACA,QAAA,CACA,KAAA,CACA,0BAAA,CAEA,kBAAA,CAEA,kEACC,UAAA,CACA,+BAAA,CACA,eAAA,CACA,cAAA,CACA,eAAA,CACA,iBAAA,CACA,QAAA,CACA,oBAAA,CAIF,iEACC,iBAAA,CACA,aAAA,CACA,kBAAA,CAEA,qFACC,MAAA,CACA,wCAAA,CAEA,UAAA,CACA,YAAA,CAED,qFACC,OAAA,CACA,uCAAA,CAEA,UAAA,CACA,YAAA,CAGD,qEACC,UAAA,CACA,WAAA,CACA,mBAAA,CAAA,gBAAA,CACA,yBAAA,CAAA,sBAAA,CAIF,8DACC,YAAA,CACA,6BAAA,CACA,QAAA,CACA,kBAAA,CAEA,0FACC,wBAAA,CACA,qBAAA,CAEA,0RAGC,WAAA,CACA,SAAA,CACA,QAAA,CACA,wBAAA,CAOG,mIACC,iBAAA,CACA,oBAAA,CAEA,2IACC,UAAA,CACA,iBAAA,CACA,YAAA,CACA,UAAA,CAIA,qJACC,kBAAA,CAID,oJACC,kBAAA,CAID,gJACC,kBAAA,CAOJ,qKACC,eAAA,CACA,cAAA,CACA,gBAAA,CAEA,mBAAA,CACA,UAAA,CACA,kBAAA,CACA,OAAA,CACA,gBAAA,CACA,cAAA,CAEA,yKACC,iBAAA,CAIH,sGACC,SAAA,CAEA,aAAA,CACA,+BAAA,CACA,eAAA,CACA,cAAA,CACA,eAAA,CAKJ,0FACC,wBAAA,CACA,qBAAA,CACA,oBAAA,CAEA,gHACC,kBAAA,CAEA,oHACC,UAAA,CACA,0BAAA,CAAA,qBAAA,CAID,mHACC,aAAA,CACA,+BAAA,CACA,eAAA,CACA,cAAA,CACA,eAAA,CAEA,mBAAA,CACA,sBAAA,CACA,kBAAA,CACA,OAAA,CACA,UAAA,CACA,cAAA,CAEA,uHACC,iBAAA,CAQJ,gEACC,aAAA,CACA,+BAAA,CACA,eAAA,CACA,cAAA,CACA,gBAAA,CAGD,iEACC,SAAA,CACA,QAAA,CACA,eAAA,CAEA,oEACC,iBAAA,CACA,iBAAA,CAEA,aAAA,CACA,+BAAA,CACA,eAAA,CACA,cAAA,CACA,gBAAA,CAEA,4EACC,UAAA,CACA,iBAAA,CACA,MAAA,CACA,QAAA,CACA,SAAA,CACA,WAAA,CACA,iEAAA,CACA,0BAAA,CACA,uBAAA,CACA,2BAAA","file":"main.css"}
|
||||
217
wp-content/plugins/elementor-addon/assets/css/main.scss
Normal file
217
wp-content/plugins/elementor-addon/assets/css/main.scss
Normal file
@@ -0,0 +1,217 @@
|
||||
.apartaments {
|
||||
.apartament-card {
|
||||
&__wrapper {
|
||||
position: relative;
|
||||
width: 1264px;
|
||||
margin: 0 auto;
|
||||
padding: 93px 126px 26px;
|
||||
border: 4px solid #192c44;
|
||||
|
||||
.apartament-card__title {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 0;
|
||||
transform: translateX(-50%);
|
||||
|
||||
background: #192c44;
|
||||
|
||||
h2 {
|
||||
color: #ffffff;
|
||||
font-family: 'Barlow', sans-serif;
|
||||
font-weight: 500;
|
||||
font-size: 32px;
|
||||
line-height: 1.3;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
padding: 5px 70px 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.apartament-card__gallery {
|
||||
position: relative;
|
||||
line-height: 0;
|
||||
margin-bottom: 17px;
|
||||
|
||||
.swiper-button-prev {
|
||||
left: 0;
|
||||
transform: translateX(calc(-100% - 30px));
|
||||
|
||||
width: 43px;
|
||||
height: 119px;
|
||||
}
|
||||
.swiper-button-next {
|
||||
right: 0;
|
||||
transform: translateX(calc(100% + 30px));
|
||||
|
||||
width: 43px;
|
||||
height: 119px;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
object-position: center;
|
||||
}
|
||||
}
|
||||
|
||||
.apartament-card__info {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 26px;
|
||||
margin-bottom: 15px;
|
||||
|
||||
.apartament-card__info_col1 {
|
||||
border: 4px solid #192c44;
|
||||
padding: 25px 10% 10px;
|
||||
|
||||
table,
|
||||
tr,
|
||||
td {
|
||||
border: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
table {
|
||||
tr {
|
||||
&.apartament-card__status {
|
||||
td {
|
||||
span {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
inset: 0 -8px;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
&.available {
|
||||
&::before {
|
||||
background: #c1e8a8;
|
||||
}
|
||||
}
|
||||
&.reserved {
|
||||
&::before {
|
||||
background: #f4eba8;
|
||||
}
|
||||
}
|
||||
&.sold {
|
||||
&::before {
|
||||
background: #f54040;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&.apartament-card__price-history {
|
||||
.apartament-card__info_table-value {
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
line-height: 26px;
|
||||
|
||||
display: inline-flex;
|
||||
width: 100%;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
padding-top: 10px;
|
||||
cursor: pointer;
|
||||
|
||||
svg {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
td {
|
||||
width: 50%;
|
||||
|
||||
color: #192c44;
|
||||
font-family: 'Barlow', sans-serif;
|
||||
font-weight: 400;
|
||||
font-size: 22px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.apartament-card__info_col2 {
|
||||
border: 4px solid #192c44;
|
||||
padding: 25px 10% 10px;
|
||||
align-content: center;
|
||||
|
||||
.card__info_col2__img {
|
||||
margin-bottom: 40px;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
max-width: fit-content;
|
||||
}
|
||||
}
|
||||
.card__info_col2__data {
|
||||
a {
|
||||
color: #192c44;
|
||||
font-family: 'Barlow', sans-serif;
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
line-height: 1.8;
|
||||
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
|
||||
svg {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.apartament-card__desc {
|
||||
p {
|
||||
color: #192c44;
|
||||
font-family: 'Barlow', sans-serif;
|
||||
font-weight: 500;
|
||||
font-size: 20px;
|
||||
line-height: 1.05;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
|
||||
li {
|
||||
position: relative;
|
||||
padding-left: 25px;
|
||||
|
||||
color: #192c44;
|
||||
font-family: 'Barlow', sans-serif;
|
||||
font-weight: 400;
|
||||
font-size: 20px;
|
||||
line-height: 30px;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 10px;
|
||||
width: 9px;
|
||||
height: 13px;
|
||||
background-image: url('/wp-content/uploads/2026/03/Polygon-2.svg');
|
||||
background-position: center;
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
20
wp-content/plugins/elementor-addon/assets/js/main.js
Normal file
20
wp-content/plugins/elementor-addon/assets/js/main.js
Normal file
@@ -0,0 +1,20 @@
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
document.querySelectorAll('.apartament-gallery-swiper').forEach(function (el) {
|
||||
new Swiper(el, {
|
||||
slidesPerView: 1,
|
||||
spaceBetween: 10,
|
||||
loop: true,
|
||||
zoom: false,
|
||||
navigation: {
|
||||
nextEl: el.parentElement.querySelector('.swiper-button-next'),
|
||||
prevEl: el.parentElement.querySelector('.swiper-button-prev'),
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
Fancybox.bind('[data-fancybox]', {
|
||||
animated: true,
|
||||
showClass: 'fancybox-fadeIn',
|
||||
hideClass: 'fancybox-fadeOut',
|
||||
});
|
||||
});
|
||||
86
wp-content/plugins/elementor-addon/elementor-addon.php
Normal file
86
wp-content/plugins/elementor-addon/elementor-addon.php
Normal file
@@ -0,0 +1,86 @@
|
||||
<?php
|
||||
/**
|
||||
* Plugin Name: Elementor Addon
|
||||
* Description: Simple hello world widgets for Elementor.
|
||||
* Version: 1.0.0
|
||||
* Author: Elementor Developer
|
||||
* Author URI: https://developers.elementor.com/
|
||||
* Text Domain: elementor-addon
|
||||
*
|
||||
* Requires Plugins: elementor
|
||||
* Elementor tested up to: 3.21.0
|
||||
* Elementor Pro tested up to: 3.21.0
|
||||
*/
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register widget files
|
||||
*/
|
||||
function register_hello_world_widget( $widgets_manager ) {
|
||||
require_once( __DIR__ . '/widgets/apartaments.php' );
|
||||
|
||||
$widgets_manager->register( new \Elementor_Apartaments() );
|
||||
}
|
||||
add_action( 'elementor/widgets/register', 'register_hello_world_widget' );
|
||||
|
||||
/**
|
||||
* Register scripts/styles only.
|
||||
* Do not enqueue them globally.
|
||||
*/
|
||||
function elementor_addon_register_assets() {
|
||||
|
||||
// Swiper CSS
|
||||
wp_register_style(
|
||||
'elementor-addon-swiper',
|
||||
plugins_url( 'plugins/swiper/swiper-bundle.min.css', __FILE__ ),
|
||||
[],
|
||||
'11.0.0'
|
||||
);
|
||||
|
||||
// Fancybox CSS
|
||||
wp_register_style(
|
||||
'elementor-addon-fancybox',
|
||||
'https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/fancybox/fancybox.css',
|
||||
[],
|
||||
'5.0'
|
||||
);
|
||||
|
||||
// Widget CSS
|
||||
wp_register_style(
|
||||
'elementor-addon-main-css',
|
||||
plugins_url( 'assets/css/main.css', __FILE__ ),
|
||||
[ 'elementor-addon-swiper', 'elementor-addon-fancybox' ],
|
||||
'1.0.0'
|
||||
);
|
||||
|
||||
// Swiper JS
|
||||
wp_register_script(
|
||||
'elementor-addon-swiper',
|
||||
plugins_url( 'plugins/swiper/swiper-bundle.min.js', __FILE__ ),
|
||||
[],
|
||||
'11.0.0',
|
||||
true
|
||||
);
|
||||
|
||||
// Fancybox JS
|
||||
wp_register_script(
|
||||
'elementor-addon-fancybox',
|
||||
'https://cdn.jsdelivr.net/npm/@fancyapps/ui@5.0/dist/fancybox/fancybox.umd.js',
|
||||
[],
|
||||
'5.0',
|
||||
true
|
||||
);
|
||||
|
||||
// Widget JS
|
||||
wp_register_script(
|
||||
'elementor-addon-main-js',
|
||||
plugins_url( 'assets/js/main.js', __FILE__ ),
|
||||
[ 'jquery', 'elementor-addon-swiper', 'elementor-addon-fancybox' ],
|
||||
'1.0.0',
|
||||
true
|
||||
);
|
||||
}
|
||||
add_action( 'wp_enqueue_scripts', 'elementor_addon_register_assets' );
|
||||
13
wp-content/plugins/elementor-addon/plugins/swiper/swiper-bundle.min.css
vendored
Normal file
13
wp-content/plugins/elementor-addon/plugins/swiper/swiper-bundle.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
14
wp-content/plugins/elementor-addon/plugins/swiper/swiper-bundle.min.js
vendored
Normal file
14
wp-content/plugins/elementor-addon/plugins/swiper/swiper-bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
219
wp-content/plugins/elementor-addon/widgets/apartaments.php
Normal file
219
wp-content/plugins/elementor-addon/widgets/apartaments.php
Normal file
@@ -0,0 +1,219 @@
|
||||
<?php
|
||||
if (!defined('ABSPATH')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
use Elementor\Controls_Manager;
|
||||
|
||||
class Elementor_Apartaments extends \Elementor\Widget_Base {
|
||||
|
||||
public function get_name() {
|
||||
return 'apartaments';
|
||||
}
|
||||
|
||||
public function get_title() {
|
||||
return esc_html__( 'Apartaments', 'elementor-addon' );
|
||||
}
|
||||
|
||||
public function get_icon() {
|
||||
return 'eicon-code';
|
||||
}
|
||||
|
||||
public function get_categories() {
|
||||
return [ 'basic' ];
|
||||
}
|
||||
|
||||
public function get_keywords() {
|
||||
return [ 'apartaments' ];
|
||||
}
|
||||
|
||||
protected function register_controls() {
|
||||
$this->start_controls_section(
|
||||
'section_setting',
|
||||
[
|
||||
'label' => esc_html__( 'Settings', 'elementor' ),
|
||||
'tab' => Controls_Manager::TAB_CONTENT,
|
||||
]
|
||||
);
|
||||
|
||||
$this->end_controls_section();
|
||||
}
|
||||
|
||||
public function get_style_depends() {
|
||||
return [ 'elementor-addon-swiper', 'elementor-addon-fancybox', 'elementor-addon-main-css' ];
|
||||
}
|
||||
|
||||
public function get_script_depends() {
|
||||
return [ 'elementor-addon-swiper', 'elementor-addon-fancybox', 'elementor-addon-main-js' ];
|
||||
}
|
||||
|
||||
protected function render() {
|
||||
$apartaments = new \WP_Query([
|
||||
'post_type' => 'apartamenty',
|
||||
'posts_per_page' => -1,
|
||||
'orderby' => 'title',
|
||||
'order' => 'ASC',
|
||||
]);
|
||||
|
||||
if ( ! $apartaments->have_posts() ) {
|
||||
echo '<p>Brak apartamentów.</p>';
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="apartaments">
|
||||
<?php while ( $apartaments->have_posts() ) : $apartaments->the_post(); ?>
|
||||
<?php
|
||||
$gallery = get_field('gallery');
|
||||
$information = get_field('information');
|
||||
$documents = get_field('documents');
|
||||
?>
|
||||
|
||||
<div class="apartament-card">
|
||||
<div class="apartament-card__wrapper">
|
||||
<div class="apartament-card__title">
|
||||
<h2><?php the_title(); ?></h2>
|
||||
</div>
|
||||
<?php if (!empty($gallery)) : ?>
|
||||
<div class="apartament-card__gallery">
|
||||
<div class="swiper apartament-gallery-swiper">
|
||||
<div class="swiper-wrapper">
|
||||
<?php foreach($gallery as $image) : ?>
|
||||
<div class="swiper-slide">
|
||||
<a href="<?php echo esc_url($image); ?>" data-fancybox="gallery-<?php echo get_the_ID(); ?>" data-elementor-open-lightbox="no">
|
||||
<img src="<?php echo esc_url($image); ?>" alt="">
|
||||
</a>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="swiper-button-prev">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="47" height="129" viewBox="0 0 47 129" fill="none"><path d="M47 5.59336L37.2672 0L0 64.5L37.2672 129L47 123.407L12.9603 64.5L47 5.59336Z" fill="#192C44"/></svg>
|
||||
</div>
|
||||
<div class="swiper-button-next">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="47" height="129" viewBox="0 0 47 129" fill="none"><g clip-path="url(#clip0_60079_176)"><path d="M4.30368e-06 123.407L9.73283 129L47 64.5L9.73285 8.50871e-07L1.46032e-05 5.59336L34.0397 64.5L4.30368e-06 123.407Z" fill="#192C44"/></g><defs><clipPath id="clip0_60079_176"><rect width="47" height="129" fill="white" transform="translate(47 129) rotate(-180)"/></clipPath></defs></svg>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($information)) : ?>
|
||||
<div class="apartament-card__info">
|
||||
<div class="apartament-card__info_col1">
|
||||
<table>
|
||||
<?php if (!empty($information['status'])) : ?>
|
||||
<tr class="apartament-card__status">
|
||||
<td class="apartament-card__info_table-title">Status:</td>
|
||||
<td class="apartament-card__info_table-value">
|
||||
<span class="<?php echo esc_attr($information['status']['value']); ?>">
|
||||
<?php echo esc_html($information['status']['label']); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($information['type'])) : ?>
|
||||
<tr>
|
||||
<td class="apartament-card__info_table-title">Typ:</td>
|
||||
<td class="apartament-card__info_table-value"><?php echo esc_html($information['type']); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($information['floor'])) : ?>
|
||||
<tr>
|
||||
<td class="apartament-card__info_table-title">Piętro:</td>
|
||||
<td class="apartament-card__info_table-value"><?php echo esc_html($information['floor']); ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($information['floor_space'])) : ?>
|
||||
<tr>
|
||||
<td class="apartament-card__info_table-title">Metraż:</td>
|
||||
<td class="apartament-card__info_table-value"><?php echo esc_html($information['floor_space']); ?> m2</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($information['balcony'])) : ?>
|
||||
<tr>
|
||||
<td class="apartament-card__info_table-title">Balkon:</td>
|
||||
<td class="apartament-card__info_table-value"><?php echo esc_html($information['balcony']); ?> m2</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($information['price'])) : ?>
|
||||
<tr>
|
||||
<td class="apartament-card__info_table-title">Cena</td>
|
||||
<td class="apartament-card__info_table-value"><?php echo esc_html($information['price']); ?> zł</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($information['price_m2'])) : ?>
|
||||
<tr>
|
||||
<td class="apartament-card__info_table-title">Cena m2</td>
|
||||
<td class="apartament-card__info_table-value"><?php echo esc_html($information['price_m2']); ?> zł</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($information['rows'])) : ?>
|
||||
<?php foreach($information['rows'] as $row) : ?>
|
||||
<tr>
|
||||
<td class="apartament-card__info_table-title"><?php echo esc_html($row['title']); ?></td>
|
||||
<td class="apartament-card__info_table-value"><?php echo esc_html($row['text']); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
<tr class="apartament-card__price-history">
|
||||
<td class="apartament-card__info_table-title"></td>
|
||||
<td class="apartament-card__info_table-value">
|
||||
HISTORIA CEN
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="7" viewBox="0 0 12 7" fill="none">
|
||||
<g clip-path="url(#clip0_14_32)">
|
||||
<path d="M6 7L0.370835 0.25L11.6292 0.250001L6 7Z" fill="#192C44"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_14_32">
|
||||
<rect width="12" height="7" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php if (!empty($documents)) : ?>
|
||||
<div class="apartament-card__info_col2">
|
||||
<?php if (!empty($documents['image_draft'])) : ?>
|
||||
<div class="card__info_col2__img">
|
||||
<a href="<?php echo esc_url($documents['image_draft']); ?>" data-fancybox="" data-elementor-open-lightbox="no">
|
||||
<img src="<?php echo esc_url($documents['image_draft']); ?>" alt="">
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($documents['file'])) : ?>
|
||||
<div class="card__info_col2__data">
|
||||
<a href="<?php echo esc_url($documents['file']); ?>">
|
||||
<?php echo esc_html($documents['btn_txt']); ?>
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="7" viewBox="0 0 12 7" fill="none">
|
||||
<g clip-path="url(#clip0_14_32)">
|
||||
<path d="M6 7L0.370835 0.25L11.6292 0.250001L6 7Z" fill="#192C44"/>
|
||||
</g>
|
||||
<defs>
|
||||
<clipPath id="clip0_14_32">
|
||||
<rect width="12" height="7" fill="white"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
</svg>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<div class="apartament-card__desc">
|
||||
<?php the_content(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
<?php wp_reset_postdata(); ?>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
@@ -307,4 +307,12 @@ function he_garage_map_shortcode($atts = [], $content = null, $tag = '') {
|
||||
|
||||
return ob_get_clean();
|
||||
}
|
||||
add_shortcode('garage_map', 'he_garage_map_shortcode');
|
||||
add_shortcode('garage_map', 'he_garage_map_shortcode');
|
||||
|
||||
function he_replace_m2_with_superscript( $content ) {
|
||||
return preg_replace( '/\bm2\b/', 'm²', $content );
|
||||
}
|
||||
add_filter( 'the_content', 'he_replace_m2_with_superscript' );
|
||||
add_filter( 'the_title', 'he_replace_m2_with_superscript' );
|
||||
add_filter( 'the_excerpt', 'he_replace_m2_with_superscript' );
|
||||
add_filter( 'widget_text', 'he_replace_m2_with_superscript' );
|
||||
Reference in New Issue
Block a user