This commit is contained in:
2026-03-23 14:48:48 +01:00
parent 2174e730cf
commit 24a06c0b05
8 changed files with 469 additions and 12 deletions

330
.vscode/ftp-kr.sync.cache.json vendored Normal file
View File

@@ -0,0 +1,330 @@
{
"ftp://host117523.hostido.net.pl@www@wyszynskiego12.pagedev.pl": {
"public_html": {
"docs": {},
".DS_Store": {
"type": "-",
"size": 6148,
"lmtime": 0,
"modified": false
},
".htaccess": {
"type": "-",
"size": 523,
"lmtime": 0,
"modified": false
},
"index.php": {
"type": "-",
"size": 405,
"lmtime": 0,
"modified": false
},
"license.txt": {
"type": "-",
"size": 19903,
"lmtime": 0,
"modified": false
},
".paul": {},
"readme.html": {
"type": "-",
"size": 7425,
"lmtime": 0,
"modified": false
},
".serena": {},
"wp-activate.php": {
"type": "-",
"size": 7349,
"lmtime": 0,
"modified": false
},
"wp-admin": {},
"wp-blog-header.php": {
"type": "-",
"size": 351,
"lmtime": 0,
"modified": false
},
"wp-comments-post.php": {
"type": "-",
"size": 2323,
"lmtime": 0,
"modified": false
},
"wp-config.php": {
"type": "-",
"size": 3737,
"lmtime": 0,
"modified": false
},
"wp-config-sample.php": {
"type": "-",
"size": 3339,
"lmtime": 0,
"modified": false
},
"wp-content": {
"themes": {
"hello-elementor": {
"assets": {
"css": {
"custom.css": {
"type": "-",
"size": 995,
"lmtime": 1774251394159,
"modified": false
},
"custom.css.map": {
"type": "-",
"size": 201,
"lmtime": 0,
"modified": false
},
"customizer.asset.php": {
"type": "-",
"size": 84,
"lmtime": 0,
"modified": false
},
"customizer.css": {
"type": "-",
"size": 1263,
"lmtime": 0,
"modified": false
},
"customizer-rtl.css": {
"type": "-",
"size": 1264,
"lmtime": 0,
"modified": false
},
"custom.scss": {
"type": "-",
"size": 998,
"lmtime": 1774251389784,
"modified": false
},
"editor.asset.php": {
"type": "-",
"size": 84,
"lmtime": 0,
"modified": false
},
"editor.css": {
"type": "-",
"size": 260,
"lmtime": 0,
"modified": false
},
"editor-rtl.css": {
"type": "-",
"size": 260,
"lmtime": 0,
"modified": false
},
"editor-styles.asset.php": {
"type": "-",
"size": 84,
"lmtime": 0,
"modified": false
},
"editor-styles.css": {
"type": "-",
"size": 564,
"lmtime": 0,
"modified": false
},
"editor-styles-rtl.css": {
"type": "-",
"size": 564,
"lmtime": 0,
"modified": false
},
"header-footer.asset.php": {
"type": "-",
"size": 84,
"lmtime": 0,
"modified": false
},
"header-footer.css": {
"type": "-",
"size": 7182,
"lmtime": 0,
"modified": false
},
"header-footer-rtl.css": {
"type": "-",
"size": 7184,
"lmtime": 0,
"modified": false
},
"reset.asset.php": {
"type": "-",
"size": 84,
"lmtime": 0,
"modified": false
},
"reset.css": {
"type": "-",
"size": 5456,
"lmtime": 0,
"modified": false
},
"reset-rtl.css": {
"type": "-",
"size": 5456,
"lmtime": 0,
"modified": false
},
"theme.asset.php": {
"type": "-",
"size": 84,
"lmtime": 0,
"modified": false
},
"theme.css": {
"type": "-",
"size": 5097,
"lmtime": 0,
"modified": false
},
"theme-rtl.css": {
"type": "-",
"size": 5100,
"lmtime": 0,
"modified": false
}
}
},
"template-parts": {
"404.php": {
"type": "-",
"size": 605,
"lmtime": 0,
"modified": false
},
"archive.php": {
"type": "-",
"size": 1687,
"lmtime": 0,
"modified": false
},
"dynamic-footer.php": {
"type": "-",
"size": 2506,
"lmtime": 0,
"modified": false
},
"dynamic-header.php": {
"type": "-",
"size": 3235,
"lmtime": 0,
"modified": false
},
"footer.php": {
"type": "-",
"size": 679,
"lmtime": 0,
"modified": false
},
"garage-map.php": {
"type": "-",
"size": 84222,
"lmtime": 1774252620357,
"modified": false
},
"header.php": {
"type": "-",
"size": 1265,
"lmtime": 0,
"modified": false
},
"search.php": {
"type": "-",
"size": 1911,
"lmtime": 0,
"modified": false
},
"single.php": {
"type": "-",
"size": 853,
"lmtime": 0,
"modified": false
}
}
}
}
},
"wp-cron.php": {
"type": "-",
"size": 5617,
"lmtime": 0,
"modified": false
},
"wp-includes": {},
"wp-links-opml.php": {
"type": "-",
"size": 2493,
"lmtime": 0,
"modified": false
},
"wp-load.php": {
"type": "-",
"size": 3937,
"lmtime": 0,
"modified": false
},
"wp-login.php": {
"type": "-",
"size": 51437,
"lmtime": 0,
"modified": false
},
"wp-mail.php": {
"type": "-",
"size": 8727,
"lmtime": 0,
"modified": false
},
"wp-settings.php": {
"type": "-",
"size": 31055,
"lmtime": 0,
"modified": false
},
"wp-signup.php": {
"type": "-",
"size": 34516,
"lmtime": 0,
"modified": false
},
"wp-trackback.php": {
"type": "-",
"size": 5214,
"lmtime": 0,
"modified": false
},
"xmlrpc.php": {
"type": "-",
"size": 3205,
"lmtime": 0,
"modified": false
},
".tmp_inwestycja.html": {
"type": "-",
"size": 52808,
"lmtime": 1774251350329,
"modified": false
},
".tmp_lokalizacja.html": {
"type": "-",
"size": 47201,
"lmtime": 1774251350330,
"modified": false
}
}
},
"$version": 1
}

View File

@@ -2,7 +2,7 @@
position: relative;
width: 1264px;
max-width: 100%;
margin: 0 auto;
margin: 0 auto 40px;
padding: 93px 126px 26px;
border: 4px solid #192c44;
}
@@ -11,7 +11,6 @@
width: 100%;
padding: 50px 16px 20px;
border-width: 2px;
margin-bottom: 40px;
}
}
.apartaments .apartament-card__wrapper .apartament-card__title {

View File

@@ -4,7 +4,7 @@
position: relative;
width: 1264px;
max-width: 100%;
margin: 0 auto;
margin: 0 auto 40px;
padding: 93px 126px 26px;
border: 4px solid #192c44;
@@ -12,7 +12,6 @@
width: 100%;
padding: 50px 16px 20px;
border-width: 2px;
margin-bottom: 40px;
}
.apartament-card__title {

View File

@@ -96,6 +96,32 @@ function elementor_addon_localize_scripts() {
}
add_action( 'wp_enqueue_scripts', 'elementor_addon_localize_scripts', 20 );
/**
* Włącza wsparcie "Atrybuty wpisu" (menu_order) dla CPT apartamenty,
* aby można było ręcznie ustawiać kolejność.
*/
function elementor_addon_enable_apartamenty_menu_order( $args, $post_type ) {
if ( 'apartamenty' !== $post_type ) {
return $args;
}
$supports = $args['supports'] ?? [];
if ( true === $supports || false === $supports ) {
$supports = [ 'title', 'editor' ];
}
if ( ! is_array( $supports ) ) {
$supports = (array) $supports;
}
if ( ! in_array( 'page-attributes', $supports, true ) ) {
$supports[] = 'page-attributes';
}
$args['supports'] = $supports;
return $args;
}
add_filter( 'register_post_type_args', 'elementor_addon_enable_apartamenty_menu_order', 20, 2 );
// ===========================================================
// HISTORIA CEN — TABELA DB
// ===========================================================
@@ -283,8 +309,10 @@ function apartamenty_generate_price_xml() {
'post_type' => 'apartamenty',
'post_status' => 'publish',
'posts_per_page' => -1,
'orderby' => 'title',
'order' => 'ASC',
'orderby' => [
'menu_order' => 'ASC',
'title' => 'ASC',
],
] );
$x = function( $val ) {
@@ -502,4 +530,4 @@ function apartamenty_jawnosc_cen_page() {
}
</script>
<?php
}
}

View File

@@ -50,9 +50,12 @@ class Elementor_Apartaments extends \Elementor\Widget_Base {
protected function render() {
$apartaments = new \WP_Query([
'post_type' => 'apartamenty',
'post_status' => 'publish',
'posts_per_page' => -1,
'orderby' => 'title',
'order' => 'ASC',
'orderby' => [
'menu_order' => 'ASC',
'title' => 'ASC',
],
]);
if ( ! $apartaments->have_posts() ) {
@@ -244,4 +247,4 @@ class Elementor_Apartaments extends \Elementor\Widget_Base {
<?php
}
}
}

View File

@@ -41,3 +41,41 @@
.spot.is-sold {
fill: #f54040;
}
.spot.is-unavailable {
fill: #ffffff;
stroke: #192c44;
stroke-width: 1px;
}
.garage-map-legend {
margin-top: 16px;
display: flex;
flex-wrap: wrap;
gap: 24px;
align-items: center;
justify-content: center;
color: #192c44;
font-size: 14px;
line-height: 1.4;
}
.garage-map-legend__item {
display: inline-flex;
align-items: center;
gap: 8px;
}
.garage-map-legend__swatch {
width: 18px;
height: 25px;
display: inline-block;
flex: 0 0 18px;
}
.garage-map-legend__swatch--sold {
background: #f54040;
}
.garage-map-legend__swatch--reserved {
background: #f4eba8;
}
.garage-map-legend__swatch--unavailable {
background: #ffffff;
border: 1px solid #192c44;
}

View File

@@ -61,4 +61,47 @@
&.is-sold {
fill: #f54040;
}
&.is-unavailable {
fill: #ffffff;
stroke: #192c44;
stroke-width: 1px;
}
}
.garage-map-legend {
margin-top: 16px;
display: flex;
flex-wrap: wrap;
gap: 24px;
align-items: center;
justify-content: center;
color: #192c44;
font-size: 14px;
line-height: 1.4;
&__item {
display: inline-flex;
align-items: center;
gap: 8px;
}
&__swatch {
width: 18px;
height: 25px;
display: inline-block;
flex: 0 0 18px;
&--sold {
background: #f54040;
}
&--reserved {
background: #f4eba8;
}
&--unavailable {
background: #ffffff;
border: 1px solid #192c44;
}
}
}

View File

@@ -12,7 +12,9 @@
$map = [
'wolne' => 'free',
'zarezerwowane' => 'reserved',
'sprzedane' => 'sold'
'sprzedane' => 'sold',
'niedostępne' => 'unavailable',
'niedostepne' => 'unavailable'
];
if (!isset($map[$status])) {
@@ -169,4 +171,19 @@
<rect width="39" height="24" fill="white" transform="translate(22 297)"/>
</clipPath>
</defs>
</svg>
</svg>
<div class="garage-map-legend" aria-label="Legenda mapy garażu">
<div class="garage-map-legend__item">
<span class="garage-map-legend__swatch garage-map-legend__swatch--sold" aria-hidden="true"></span>
<span>Sprzedane</span>
</div>
<div class="garage-map-legend__item">
<span class="garage-map-legend__swatch garage-map-legend__swatch--reserved" aria-hidden="true"></span>
<span>Zarezerwowane</span>
</div>
<div class="garage-map-legend__item">
<span class="garage-map-legend__swatch garage-map-legend__swatch--unavailable" aria-hidden="true"></span>
<span>Niedostępne</span>
</div>
</div>