News

In einer veränderlichen Branche wie der unseren, gibt es stets Neues zu berichten. Um Sie, unsere lieben Kunden, immer auf dem Laufenden zu halten, finden Sie unter dieser Rubrik immer wieder interessante Berichte rund um das Thema „Renovieren mit Stil“.

Wer nichts verpassen möchte, den laden wir herzlich ein uns auf Facebook, Instagram oder Xing zu folgen.

cb facebook News

Mit dem Laden des Beitrags akzeptieren Sie die Datenschutzerklärung von Facebook.
Mehr erfahren

Beitrag laden

PGxpbmsgcmVsPSdzdHlsZXNoZWV0JyBpZD0nZmYtZHluYW1pYy1jc3MxJyB0eXBlPSd0ZXh0L2NzcycgaHJlZj0naHR0cHM6Ly9yZW5vdmllcmVuLW1pdC1zdGlsLmRlL3dwLWNvbnRlbnQvcmVzb3VyY2VzL2Zsb3ctZmxvdy9jc3Mvc3RyZWFtLWlkMS5jc3M/dmVyPTE1NzQ3NzUwMDUnLz48IS0tIEZsb3ctRmxvdyDigJQgU29jaWFsIHN0cmVhbSBwbHVnaW4gZm9yIFdvcmRQcmVzcyAtLT4KPGRpdiBjbGFzcz0iZmYtc3RyZWFtIiBkYXRhLXBsdWdpbj0iZmxvd19mbG93IiBpZD0iZmYtc3RyZWFtLTEiPjxzcGFuIGNsYXNzPSJmZi1sb2FkZXIiPjxzcGFuIGNsYXNzPSJmZi1zcXVhcmUiID48L3NwYW4+PHNwYW4gY2xhc3M9ImZmLXNxdWFyZSI+PC9zcGFuPjxzcGFuIGNsYXNzPSJmZi1zcXVhcmUgZmYtbGFzdCI+PC9zcGFuPjxzcGFuIGNsYXNzPSJmZi1zcXVhcmUgZmYtY2xlYXIiPjwvc3Bhbj48c3BhbiBjbGFzcz0iZmYtc3F1YXJlIj48L3NwYW4+PHNwYW4gY2xhc3M9ImZmLXNxdWFyZSBmZi1sYXN0Ij48L3NwYW4+PHNwYW4gY2xhc3M9ImZmLXNxdWFyZSBmZi1jbGVhciI+PC9zcGFuPjxzcGFuIGNsYXNzPSJmZi1zcXVhcmUiPjwvc3Bhbj48c3BhbiBj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oxNTc2MzMxODg3LCJmb3JjZUhUVFBTIjoibm9wZSIsImlzQWRtaW4iOmZhbHNlLCJhamF4dXJsIjoiaHR0cHM6XC9cL3Jlbm92aWVyZW4tbWl0LXN0aWwuZGVcL3dwLWFkbWluXC9hZG1pbi1hamF4LnBocCIsImlzTG9nIjpmYWxzZSwicGx1Z2luX2Jhc2UiOiJodHRwczpcL1wvcmVub3ZpZXJlbi1taXQtc3RpbC5kZVwvd3AtY29udGVudFwvcGx1Z2luc1wvZmxvdy1mbG93IiwicGx1Z2luX3ZlciI6IjQuMS4yNCJ9OwoKICAgICAgICAgICAgdmFyIGlzTFMgPSBpc0xvY2FsU3RvcmFnZU5hbWVTdXBwb3J0ZWQoKTsKCiAgICAgICAgICAgIHZhciBGRl9yZXNvdXJjZSA9IHdpbmRvdy5GRl9yZXNvdXJjZSB8fAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIHNjcmlwdERlZmVycmVkOiAkLkRlZmVycmVkKCksCiAgICAgICAgICAgICAgICAgICAgc3R5bGVEZWZlcnJlZDogICQuRGVmZXJyZWQoKSwKICAgICAgICAgICAgICAgICAgICBzY3JpcHRMb2FkaW5nOiBmYWxzZSwKICAgICAgICAgICAgICAgICAgICBzdHlsZUxvYWRpbmc6IGZhbHNlCiAgICAgICAgICAgICAgICB9OwoKICAgICAgICAgICAgaWYgKCAhd2luZG93LkZGX3Jlc291cmNlICkgd2luZG93LkZGX3Jlc291cmNlID0gRkZfcmVzb3VyY2U7CiAgICAgICAgICAgIGlmICggIXdpbmRvdy5GbG93Rmxvd09wdHMgKSB3aW5kb3cuRmxvd0Zsb3dPcHRzID0gb3B0czsKCiAgICAgICAgICAgIHZhciBkYXRhID0gewogICAgICAgICAgICAgICAgJ2FjdGlvbic6ICdmZXRjaF9wb3N0cycsCiAgICAgICAgICAgICAgICAnc3RyZWFtLWlkJzogJzEnLAogICAgICAgICAgICAgICAgJ2Rpc2FibGUtY2FjaGUnOiAnJywKICAgICAgICAg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DsKICAgICAgICAgICAgaWYgKGlzT3ZlcmxheSkgewogICAgICAgICAgICAgICAgaWYgKHN0cmVhbU9wdHMudGVtcGxhdGVbMF0gIT09ICdpbWFnZScpIHsKICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMCwgbGVuID0gc3RyZWFtT3B0cy50ZW1wbGF0ZS5sZW5ndGg7IGkgPCBsZW47IGkrKykgewogICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3RyZWFtT3B0cy50ZW1wbGF0ZVtpXSA9PT0gJ2ltYWdlJykgaW1nSW5kZXggPSBpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICBzdHJlYW1PcHRzLnRlbXBsYXRlLnNwbGljZSgwLCAwLCBzdHJlYW1PcHRzLnRlbXBsYXRlLnNwbGljZShpbWdJbmRleCwgMSlbMF0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgc3RyZWFtT3B0cy5pc092ZXJsYXkgPSB0cnVlOwogICAgICAgICAgICB9OwogICAgICAgICAgICBpZiAoRkZfcmVzb3VyY2Uuc2NyaXB0RGVmZXJyZWQuc3RhdGUoKSA9PT0gJ3BlbmRpbmcnICYmICFGRl9yZXNvdXJjZS5zY3JpcHRMb2FkaW5nKSB7CiAgICAgICAgICAgICAgICBzY3JpcHQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdzY3JpcHQnKTsKICAgICAgICAgICAgICAgIHNjcmlwdC5zcmMgPSAiaHR0cHM6Ly9yZW5vdmllcmVuLW1pdC1zdGlsLmRlL3dwLWNvbnRlbnQvcGx1Z2lucy9mbG93LWZsb3cvanMvcHVibGljLmpzIjsKICAgICAgICAgICAgICAgIHNjcmlwdC5vbmxvYWQgPSBmdW5jdGlvbiggc2NyaXB0LCB0ZXh0U3RhdHVzICkgewogICAgICAgICAgICAgICAgICAgIEZGX3Jlc291cmNlLnNjcmlwdERlZmVycmVkLnJlc29sdmUoKTsKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICBkb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKHNjcmlwdCk7CiAgICAgICAgICAgICAgICBGRl9yZXNvdXJjZS5zY3JpcHRMb2FkaW5nID0gdHJ1ZTsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgaWYgKEZGX3Jlc291cmNlLnN0eWxlRGVmZXJyZWQuc3RhdGUoKSA9PT0gJ3BlbmRpbmcnICYmICFGRl9yZXNvdXJjZS5zdHlsZUxvYWRpbmcpIHsKICAgICAgICAgICAgICAgIHN0eWxlID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnbGluaycpOwogICAgICAgICAgICAgICAgc3R5bGUudHlwZSA9ICJ0ZXh0L2NzcyI7CiAgICAgICAgICAgICAgICBzdHlsZS5pZCA9ICJmZl9zdHlsZSI7CiAgICAgICAgICAgICAgICBzdHlsZS5yZWwgPSAic3R5bGVzaGVldCI7CiAgICAgICAgICAgICAgICBzdHlsZS5ocmVmID0gImh0dHBzOi8vcmVub3ZpZXJlbi1taXQtc3RpbC5kZS93cC1jb250ZW50L3BsdWdpbnMvZmxvdy1mbG93L2Nzcy9wdWJsaWMuY3NzIjsKICAgICAgICAgICAgICAgIHN0eWxlLm1lZGlhID0gInNjcmVlbiI7CiAgICAgICAgICAgICAgICBzdHlsZS5vbmxvYWQgPSBmdW5jdGlvbiggc2NyaXB0LCB0ZXh0U3RhdHVzICkgewogICAgICAgICAgICAgICAgICAgIEZGX3Jlc291cmNlLnN0eWxlRGVmZXJyZWQucmVzb2x2ZSgpOwogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCJoZWFkIilbMF0uYXBwZW5kQ2hpbGQoc3R5bGUpOwogICAgICAgICAgICAgICAgRkZfcmVzb3VyY2Uuc3R5bGVMb2FkaW5nID0gdHJ1ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICAkY29udC5hZGRDbGFzcygnZmYtbG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LmV4dGVuc2lvblJlc291cmNlc1JlcXVlc3RzIHx8IFtdOwogICAgICAgICAgICAgICAgdmFyIHJlcXVlc3QsIGV4dGVuc2lvbiwgc3R5bGU7CgogICAgICAgICAgICAgICAgZm9yICggZXh0ZW5zaW9uIGluIEZsb3dGbG93T3B0cy5kZXBlbmRlbmNpZXMgKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKCBGbG93Rmxvd09wdHMuZGVwZW5kZW5jaWVzW2V4dGVuc2lvbl0gJiYgRmxvd0Zsb3dPcHRzLmRlcGVuZGVuY2llc1tleHRlbnNpb25dICE9PSAnbG9hZGVkJykgewogICAgICAgICAgICAgICAgICAgICAgICByZXF1ZXN0ID0gJC5nZXRTY3JpcHQoIG9wdHMucGx1Z2luX2Jhc2UgKyAnLScgKyBleHRlbnNpb24gKyAnL2pzL2ZmXycgKyBleHRlbnNpb24gKyAnX3B1YmxpYy5qcycpOwogICAgICAgICAgICAgICAgICAgICAgICBGbG93Rmxvdy5leHRlbnNpb25SZXNvdXJjZXNSZXF1ZXN0cy5wdXNoKHJlcXVlc3QpOwoKICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGUgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdsaW5rJyk7CiAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlLnR5cGUgPSAidGV4dC9jc3MiOwogICAgICAgICAgICAgICAgICAgICAgICBzdHlsZS5yZWwgPSAic3R5bGVzaGVldCI7CiAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlLmlkID0gImZmX2FkX3N0eWxlIjsKICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGUuaHJlZiA9IG9wdHMucGx1Z2luX2Jhc2UgKyAnLScgKyBleHRlbnNpb24gKyAnL2Nzcy9mZl8nICsgZXh0ZW5zaW9uICsgJ19wdWJsaWMuY3NzJzsKICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGUubWVkaWEgPSAic2NyZWVuIjsKICAgICAgICAgICAgICAgICAg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B0c1snY2FyZHMtbnVtJ10pIDogZmFsc2U7CgogICAgICAgICAgICAgICAgICAgICRjb250LmFwcGVuZCggJHN0cmVhbSApOwoKICAgICAgICAgICAgICAgICAgICBpZiAoIHR5cGVvZiAkc3RyZWFtICE9PSAnc3RyaW5nJyApIHsKICAgICAgICAgICAgICAgICAgICAgICAgRmxvd0Zsb3cuc2V0dXBHcmlkKCRjb250LmZpbmQoJy5mZi1zdHJlYW0td3JhcHBlcicpLCBudW0sIHN0cmVhbU9wdHMuc2Nyb2xsdG9wID09PSAneWVwJywgc3RyZWFtT3B0cy5nYWxsZXJ5ID09PSAneWVwJywgc3RyZWFtT3B0cywgJGNvbnQpOwogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewogICAgICAgICAgICAgICAgICAgICAgICAkY29udC5maW5kKCcuZmYtaGVhZGVyJykucmVtb3ZlQ2xhc3MoJ2ZmLWxvYWRpbmcnKS5lbmQoKS5maW5kKCcuZmYtbG9hZGVyJykuYWRkQ2xhc3MoJ2ZmLXNxdWVlemVkJykuZGVsYXkoMzAwKS5oaWRlKCk7CiAgICAgICAgICAgICAgICAgICAgfSwgMCk7CgogICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgfSkuZmFpbChmdW5jdGlvbigpewogICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCdGbG93LUZsb3c6IHJlc291cmNlIGxvYWRpbmcgZmFpbGVkJyk7CiAgICAgICAgICAgICAgICB9KTsKCiAgICAgICAgICAgICAgICB2YXIgaXNFcnIgPSByZXNwb25zZS5zdGF0dXMgPT09ICJlcnJvcnMiOwogICAgICAgICAgICAgICAgaWYgKChvcHRzLmlzQWRtaW4gfHwgb3B0cy5pc0xvZykgJiYgaXNFcnIpIHsKICAgICAgICAgICAgICAgICAgICAkZXJyQ29udCA9ICQoJzxkaXYgY2xhc3M9ImZmLWVycm9ycyI+PGRpdiBjbGFzcz0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HdpbmRvdy5zZXNzaW9uU3RvcmFnZTsKICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgc3RvcmFnZS5zZXRJdGVtKHRlc3RLZXksICcxJyk7CiAgICAgICAgICAgICAgICAgICAgc3RvcmFnZS5yZW1vdmVJdGVtKHRlc3RLZXkpOwogICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH07CgogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgfSkoKQoKPC9zY3JpcHQ+CjwhLS0gRmxvdy1GbG93IOKAlCBTb2NpYWwgc3RyZWFtcyBwbHVnaW4gZm9yIFdvcmRwcmVzcyAtLT4=