if (document.querySelector('.news-collection') !== null) {
    let moreText = document.querySelector('.news-collection').getAttribute('data-more-text');
    let htmlClose = '<div class="line-more"><div class="line"></div><div class="text close">' + moreText + '</div></div>';
    let htmlOpen = '<div class="line-more"><div class="line"></div><div class="text open">' + moreText + '</div></div>';
    $(htmlClose).insertBefore("div.more");

    $(document).on("click", ".line-more .text", function () {
        let more = $(this).parent().parent().find('.more');
        if ($(this).hasClass("open")){
            $(this).removeClass('open');
            $(this).addClass('close');
        }else{
            $(this).removeClass('close');
            $(this).addClass('open');
        }
        more.toggle();
        $(this).parent().parent().find(".line-more").remove();
        $(htmlOpen).insertAfter(more);

    });
}