<div class="changelog_container">
    <?php
    $health_coach_services_changelog_entries = get_changelog_from_readme();
    if (!empty($health_coach_services_changelog_entries)) :
        foreach ($health_coach_services_changelog_entries as $health_coach_services_entry) :
            $health_coach_services_version = esc_html($health_coach_services_entry[1]);
            $health_coach_services_date = esc_html($health_coach_services_entry[2]);
            $health_coach_services_details = explode("\n", trim($health_coach_services_entry[3]));
            ?>
            <div class="changelog_element">
                <span class="theme_version">
                    <strong><?php echo 'v' . $health_coach_services_version; ?></strong>
                    <?php echo 'Release date: ' . $health_coach_services_date; ?>
                    <span class="dashicons dashicons-arrow-down-alt2"></span>
                </span>

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