diff --git a/wp-content/themes/hello-elementor/assets/css/custom.css b/wp-content/themes/hello-elementor/assets/css/custom.css index 32f7a25..41841c9 100644 --- a/wp-content/themes/hello-elementor/assets/css/custom.css +++ b/wp-content/themes/hello-elementor/assets/css/custom.css @@ -1 +1 @@ -.elementor-element.elementor-arrows-position-outside .swiper,.elementor-lightbox.elementor-arrows-position-outside .swiper{width:calc(100% - 160px)}#header-nav ul.elementor-nav-menu li.menu-item a::after{bottom:-5px}/*# sourceMappingURL=custom.css.map */ \ No newline at end of file +.elementor-element.elementor-arrows-position-outside .swiper,.elementor-lightbox.elementor-arrows-position-outside .swiper{width:calc(100% - 160px)}#header-nav ul.elementor-nav-menu li.menu-item a::after{bottom:-5px}.spot.is-reserved{fill:#f4eba8}.spot.is-sold{fill:#f54040}/*# sourceMappingURL=custom.css.map */ \ No newline at end of file diff --git a/wp-content/themes/hello-elementor/assets/css/custom.css.map b/wp-content/themes/hello-elementor/assets/css/custom.css.map index 165e665..359b844 100644 --- a/wp-content/themes/hello-elementor/assets/css/custom.css.map +++ b/wp-content/themes/hello-elementor/assets/css/custom.css.map @@ -1 +1 @@ -{"version":3,"sources":["custom.scss"],"names":[],"mappings":"AAAA,2HAEC,wBAAA,CAQG,wDACC,WAAA","file":"custom.css"} \ No newline at end of file +{"version":3,"sources":["custom.scss"],"names":[],"mappings":"AAAA,2HAEC,wBAAA,CAQG,wDACC,WAAA,CASJ,kBACC,YAAA,CAED,cACC,YAAA","file":"custom.css"} \ No newline at end of file diff --git a/wp-content/themes/hello-elementor/assets/css/custom.scss b/wp-content/themes/hello-elementor/assets/css/custom.scss index 08e34bb..d3d3f1f 100644 --- a/wp-content/themes/hello-elementor/assets/css/custom.scss +++ b/wp-content/themes/hello-elementor/assets/css/custom.scss @@ -16,3 +16,12 @@ } } } + +.spot { + &.is-reserved { + fill: #f4eba8; + } + &.is-sold { + fill: #f54040; + } +} diff --git a/wp-content/themes/hello-elementor/functions.php b/wp-content/themes/hello-elementor/functions.php index 35ce886..03a807a 100644 --- a/wp-content/themes/hello-elementor/functions.php +++ b/wp-content/themes/hello-elementor/functions.php @@ -286,4 +286,25 @@ add_action( 'wp_enqueue_scripts', function() { ); } -}, PHP_INT_MAX ); \ No newline at end of file +}, PHP_INT_MAX ); + +function he_garage_map_shortcode($atts = [], $content = null, $tag = '') { + $atts = shortcode_atts([ + // 'example' => '', + ], $atts, $tag); + + $template = locate_template('template-parts/garage-map.php', false, false); + + if (empty($template) || !file_exists($template)) { + return ''; + } + + ob_start(); + + $garage_map_atts = $atts; + + include $template; + + return ob_get_clean(); +} +add_shortcode('garage_map', 'he_garage_map_shortcode'); \ No newline at end of file diff --git a/wp-content/themes/hello-elementor/template-parts/garage-map.php b/wp-content/themes/hello-elementor/template-parts/garage-map.php new file mode 100644 index 0000000..bc8e2ea --- /dev/null +++ b/wp-content/themes/hello-elementor/template-parts/garage-map.php @@ -0,0 +1,166 @@ + 'free', + 'zarezerwowane' => 'reserved', + 'sprzedane' => 'sold' + ]; + + if (!isset($map[$status])) { + return ''; + } + + return 'is-' . $map[$status]; + } +?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file