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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Tg1OTAyMjU3LCJmb3JjZUhUVFBTIjoibm9wZSIsImlzQWRtaW4iOmZhbHNlLCJhamF4dXJsIjoiaHR0cHM6XC9cL3Jlbm92aWVyZW4tbWl0LXN0aWwuZGVcL3dwLWFkbWluXC9hZG1pbi1hamF4LnBocCIsImlzTG9nIjpmYWxzZSwicGx1Z2luX2Jhc2UiOiJodHRwczpcL1wvcmVub3ZpZXJlbi1taXQtc3RpbC5kZVwvd3AtY29udGVudFwvcGx1Z2luc1wvZmxvdy1mbG93IiwicGx1Z2luX3ZlciI6IjQuMS4yNyJ9OwoKICAgICAgICAgICAgdmFyIGlzTFMgPSBpc0xvY2FsU3RvcmFnZU5hbWVTdXBwb3J0ZWQoKTsKCiAgICAgICAgICAgIHZhciBGRl9yZXNvdXJjZSA9IHdpbmRvdy5GRl9yZXNvdXJjZSB8fAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIHNjcmlwdERlZmVycmVkOiAkLkRlZmVycmVkKCksCiAgICAgICAgICAgICAgICAgICAgc3R5bGVEZWZlcnJlZDogICQuRGVmZXJyZWQoKSwKICAgICAgICAgICAgICAgICAgICBzY3JpcHRMb2FkaW5nOiBmYWxzZSwKICAgICAgICAgICAgICAgICAgICBzdHlsZUxvYWRpbmc6IGZhbHNlCiAgICAgICAgICAgICAgICB9OwoKICAgICAgICAgICAgaWYgKCAhd2luZG93LkZGX3Jlc291cmNlICkgd2luZG93LkZGX3Jlc291cmNlID0gRkZfcmVzb3VyY2U7CiAgICAgICAgICAgIGlmICggIXdpbmRvdy5GbG93Rmxvd09wdHMgKSB3aW5kb3cuRmxvd0Zsb3dPcHRzID0gb3B0czsKCiAgICAgICAgICAgIHZhciBkYXRhID0gewogICAgICAgICAgICAgICAgJ2FjdGlvbic6ICdmZXRjaF9wb3N0cycsCiAgICAgICAgICAgICAgICAnc3RyZWFtLWlkJzogJzEnLAogICAgICAgICAgICAgICAgJ2Rpc2FibGUtY2FjaGUnOiAnJywKICAgICAgICAgICA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ICBpZiAoaXNPdmVybGF5KSB7CiAgICAgICAgICAgICAgICBpZiAoc3RyZWFtT3B0cy50ZW1wbGF0ZVswXSAhPT0gJ2ltYWdlJykgewogICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwLCBsZW4gPSBzdHJlYW1PcHRzLnRlbXBsYXRlLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdHJlYW1PcHRzLnRlbXBsYXRlW2ldID09PSAnaW1hZ2UnKSBpbWdJbmRleCA9IGk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHN0cmVhbU9wdHMudGVtcGxhdGUuc3BsaWNlKDAsIDAsIHN0cmVhbU9wdHMudGVtcGxhdGUuc3BsaWNlKGltZ0luZGV4LCAxKVswXSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBzdHJlYW1PcHRzLmlzT3ZlcmxheSA9IHRydWU7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIGlmIChGRl9yZXNvdXJjZS5zY3JpcHREZWZlcnJlZC5zdGF0ZSgpID09PSAncGVuZGluZycgJiYgIUZGX3Jlc291cmNlLnNjcmlwdExvYWRpbmcpIHsKICAgICAgICAgICAgICAgIHNjcmlwdCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ3NjcmlwdCcpOwogICAgICAgICAgICAgICAgc2NyaXB0LnNyYyA9ICJodHRwczovL3Jlbm92aWVyZW4tbWl0LXN0aWwuZGUvd3AtY29udGVudC9wbHVnaW5zL2Zsb3ctZmxvdy9qcy9wdWJsaWMuanMiOwogICAgICAgICAgICAgICAgc2NyaXB0Lm9ubG9hZCA9IGZ1bmN0aW9uKCBzY3JpcHQsIHRleHRTdGF0dXMgKSB7CiAgICAgICAgICAgICAgICAgICAgRkZfcmVzb3VyY2Uuc2NyaXB0RGVmZXJyZWQucmVzb2x2ZSgpOwogICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgIGRvY3VtZW50LmJvZHkuYXBwZW5kQ2hpbGQoc2NyaXB0KTsKICAgICAgICAgICAgICAgIEZGX3Jlc291cmNlLnNjcmlwdExvYWRpbmcgPSB0cnVlOwogICAgICAgICAgICB9OwogICAgICAgICAgICBpZiAoRkZfcmVzb3VyY2Uuc3R5bGVEZWZlcnJlZC5zdGF0ZSgpID09PSAncGVuZGluZycgJiYgIUZGX3Jlc291cmNlLnN0eWxlTG9hZGluZykgewogICAgICAgICAgICAgICAgc3R5bGUgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdsaW5rJyk7CiAgICAgICAgICAgICAgICBzdHlsZS50eXBlID0gInRleHQvY3NzIjsKICAgICAgICAgICAgICAgIHN0eWxlLmlkID0gImZmX3N0eWxlIjsKICAgICAgICAgICAgICAgIHN0eWxlLnJlbCA9ICJzdHlsZXNoZWV0IjsKICAgICAgICAgICAgICAgIHN0eWxlLmhyZWYgPSAiaHR0cHM6Ly9yZW5vdmllcmVuLW1pdC1zdGlsLmRlL3dwLWNvbnRlbnQvcGx1Z2lucy9mbG93LWZsb3cvY3NzL3B1YmxpYy5jc3MiOwogICAgICAgICAgICAgICAgc3R5bGUubWVkaWEgPSAic2NyZWVuIjsKICAgICAgICAgICAgICAgIHN0eWxlLm9ubG9hZCA9IGZ1bmN0aW9uKCBzY3JpcHQsIHRleHRTdGF0dXMgKSB7CiAgICAgICAgICAgICAgICAgICAgRkZfcmVzb3VyY2Uuc3R5bGVEZWZlcnJlZC5yZXNvbHZlKCk7CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoImhlYWQiKVswXS5hcHBlbmRDaGlsZChzdHlsZSk7CiAgICAgICAgICAgICAgICBGRl9yZXNvdXJjZS5zdHlsZUxvYWRpbmcgPSB0cnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgICRjb250LmFkZENsYXNzKCdmZi1sYXlvdXQtJyArIHN0cmVhbU9wdHMudHJ1ZUxheW91dCk7CiAgICAgICAgICAgIGlmICghaXNNb2JpbGUgJiYgc3RyZWFtT3B0cy50cnVlTGF5b3V0ICE9PSAnY2Fyb3VzZWwnKSAkY29udC5jc3MoJ21pbkhlaWdodCcsICc1MDBweCcpOwogICAgICAgICAgICBhamF4RGVmZXJyZWQgPSBpc0xTICYmIHNlc3Npb25TdG9yYWdlLmdldEl0ZW0oaGFzaCkgPyB7fSA6ICQuZ2V0KG9wdHMuYWpheHVybCwgZGF0YSkKOwogICAgICAgICAgICAkLndoZW4oIGFqYXhEZWZlcnJlZCwgRkZfcmVzb3VyY2Uuc2NyaXB0RGVmZXJyZWQsIEZGX3Jlc291cmNlLnN0eWxlRGVmZXJyZWQgKS5kb25lKGZ1bmN0aW9uICggZGF0YSApIHsKICAgICAgICAgICAgICAgIHZhciByZXNwb25zZSwgJGVyckNvbnQsIGVycjsKICAgICAgICAgICAgICAgIHZhciBtb2RlcmF0aW9uID0gMDsKICAgICAgICAgICAgICAgIHZhciBvcmlnaW5hbCA9IChpc0xTICYmIHNlc3Npb25TdG9yYWdlLmdldEl0ZW0oaGFzaCkpID8gSlNPTi5wYXJzZSggc2Vzc2lvblN0b3JhZ2UuZ2V0SXRlbShoYXNoKSApIDogZGF0YVswXTsKICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgLy8gcmVzcG9uc2UgPSBKU09OLnBhcnNlKG9yaWdpbmFsKTsKICAgICAgICAgICAgICAgICAgICByZXNwb25zZSA9IG9yaWdpbmFsOyAvLyBzaW5jZSA0LjEKICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgICAgICB3aW5kb3cuY29uc29sZSAmJiB3aW5kb3cuY29uc29sZS5sb2coJ0Zsb3ctRmxvdyBnZXRzIGludmFsaWQgZGF0YSBmcm9tIHNlcnZlcicpOwogICAgICAgICAgICAgICAgICAgIGlmIChvcHRzLmlzQWRta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zaW9uUmVzb3VyY2VzUmVxdWVzdHMgfHwgW107CiAgICAgICAgICAgICAgICB2YXIgcmVxdWVzdCwgZXh0ZW5zaW9uLCBzdHlsZTsKCiAgICAgICAgICAgICAgICBmb3IgKCBleHRlbnNpb24gaW4gRmxvd0Zsb3dPcHRzLmRlcGVuZGVuY2llcyApIHsKICAgICAgICAgICAgICAgICAgICBpZiAoIEZsb3dGbG93T3B0cy5kZXBlbmRlbmNpZXNbZXh0ZW5zaW9uXSAmJiBGbG93Rmxvd09wdHMuZGVwZW5kZW5jaWVzW2V4dGVuc2lvbl0gIT09ICdsb2FkZWQnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVlc3QgPSAkLmdldFNjcmlwdCggb3B0cy5wbHVnaW5fYmFzZSArICctJyArIGV4dGVuc2lvbiArICcvanMvZmZfJyArIGV4dGVuc2lvbiArICdfcHVibGljLmpzJyk7CiAgICAgICAgICAgICAgICAgICAgICAgIEZsb3dGbG93LmV4dGVuc2lvblJlc291cmNlc1JlcXVlc3RzLnB1c2gocmVxdWVzdCk7CgogICAgICAgICAgICAgICAgICAgICAgICBzdHlsZSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2xpbmsnKTsKICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGUudHlwZSA9ICJ0ZXh0L2NzcyI7CiAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlLnJlbCA9ICJzdHlsZXNoZWV0IjsKICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGUuaWQgPSAiZmZfYWRfc3R5bGUiOwogICAgICAgICAgICAgICAgICAgICAgICBzdHlsZS5ocmVmID0gb3B0cy5wbHVnaW5fYmFzZSArICctJyArIGV4dGVuc2lvbiArICcvY3NzL2ZmXycgKyBleHRlbnNpb24gKyAnX3B1YmxpYy5jc3MnOwogICAgICAgICAgICAgICAgICAgICAgICBzdHlsZS5tZWRpYSA9ICJzY3JlZW4iOwogICAgICAgICAgICAgICAgICAgICAgICBkb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jYXJkcy1udW0nXSkgOiBmYWxzZTsKCiAgICAgICAgICAgICAgICAgICAgJGNvbnQuYXBwZW5kKCAkc3RyZWFtICk7CgogICAgICAgICAgICAgICAgICAgIGlmICggdHlwZW9mICRzdHJlYW0gIT09ICdzdHJpbmcnICkgewogICAgICAgICAgICAgICAgICAgICAgICBGbG93Rmxvdy5zZXR1cEdyaWQoJGNvbnQuZmluZCgnLmZmLXN0cmVhbS13cmFwcGVyJyksIG51bSwgc3RyZWFtT3B0cy5zY3JvbGx0b3AgPT09ICd5ZXAnLCBzdHJlYW1PcHRzLmdhbGxlcnkgPT09ICd5ZXAnLCBzdHJlYW1PcHRzLCAkY29udCk7CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAgICAgICAgICAgICAgICAgICAgICAgICRjb250LmZpbmQoJy5mZi1oZWFkZXInKS5yZW1vdmVDbGFzcygnZmYtbG9hZGluZycpLmVuZCgpLmZpbmQoJy5mZi1sb2FkZXInKS5hZGRDbGFzcygnZmYtc3F1ZWV6ZWQnKS5kZWxheSgzMDApLmhpZGUoKTsKICAgICAgICAgICAgICAgICAgICB9LCAwKTsKCiAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICB9KS5mYWlsKGZ1bmN0aW9uKCl7CiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ0Zsb3ctRmxvdzogcmVzb3VyY2UgbG9hZGluZyBmYWlsZWQnKTsKICAgICAgICAgICAgICAgIH0pOwoKICAgICAgICAgICAgICAgIHZhciBpc0VyciA9IHJlc3BvbnNlLnN0YXR1cyA9PT0gImVycm9ycyI7CiAgICAgICAgICAgICAgICBpZiAoKG9wdHMuaXNBZG1pbiB8fCBvcHRzLmlzTG9nKSAmJiBpc0VycikgewogICAgICAgICAgICAgICAgICAgICRlcnJDb250ID0gJCgnPGRpdiBjbGFzcz0iZmYtZXJyb3JzIj48ZGl2IGNsY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npb25TdG9yYWdlOwogICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICBzdG9yYWdlLnNldEl0ZW0odGVzdEtleSwgJzEnKTsKICAgICAgICAgICAgICAgICAgICBzdG9yYWdlLnJlbW92ZUl0ZW0odGVzdEtleSk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CiAgICAgICAgICAgICAgICB9IGNhdGNoIChlcnJvcikgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfTsKCiAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICB9CiAgICB9KSgpCgo8L3NjcmlwdD4KPCEtLSBGbG93LUZsb3cg4oCUIFNvY2lhbCBzdHJlYW1zIHBsdWdpbiBmb3IgV29yZHByZXNzIC0tPg==