<div class="changelog_container">
    <?php
    $kids_activity_center_changelog_entries = kids_activity_center_get_changelog_from_readme();
    if (!empty($kids_activity_center_changelog_entries)) :
        foreach ($kids_activity_center_changelog_entries as $kids_activity_center_entry) :
            $kids_activity_center_version = esc_html($kids_activity_center_entry[1]);
            $kids_activity_center_date = esc_html($kids_activity_center_entry[2]);
            $kids_activity_center_details = explode("\n", trim($kids_activity_center_entry[3]));
            ?>
            <div class="changelog_element">
                <span class="theme_version">
                    <strong><?php echo 'v' . $kids_activity_center_version; ?></strong>
                    <?php echo 'Release date: ' . $kids_activity_center_date; ?>
                    <span class="dashicons dashicons-arrow-down-alt2"></span>
                </span>

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