<div class="changelog_container">
    <?php
    $consultancy_services_changelog_entries = consultancy_services_get_changelog_from_readme();
    if (!empty($consultancy_services_changelog_entries)) :
        foreach ($consultancy_services_changelog_entries as $consultancy_services_entry) :
            $consultancy_services_version = esc_html($consultancy_services_entry[1]);
            $consultancy_services_date = esc_html($consultancy_services_entry[2]);
            $consultancy_services_details = explode("\n", trim($consultancy_services_entry[3]));
            ?>
            <div class="changelog_element">
                <span class="theme_version">
                    <strong><?php echo 'v' . $consultancy_services_version; ?></strong>
                    <?php echo 'Release date: ' . $consultancy_services_date; ?>
                    <span class="dashicons dashicons-arrow-down-alt2"></span>
                </span>

                <div class="changelog_details" style="display: none;">
                    <ul>
                        <?php foreach ($consultancy_services_details as $consultancy_services_detail) : ?>
                            <li><?php echo esc_html(trim($consultancy_services_detail, "- \t")); ?></li>
                        <?php endforeach; ?>
                    </ul>
                </div>
            </div>
        <?php
        endforeach;
    else :
        ?>
        <p><?php esc_html_e('No changelog available.', 'consultancy-services'); ?></p>
    <?php endif; ?>
</div>