<div class="changelog_container">
    <?php
    $tree_plantation_changelog_entries = tree_plantation_get_changelog_from_readme();
    if (!empty($tree_plantation_changelog_entries)) :
        foreach ($tree_plantation_changelog_entries as $tree_plantation_entry) :
            $tree_plantation_version = esc_html($tree_plantation_entry[1]);
            $tree_plantation_date = esc_html($tree_plantation_entry[2]);
            $tree_plantation_details = explode("\n", trim($tree_plantation_entry[3]));
            ?>
            <div class="changelog_element">
                <span class="theme_version">
                    <strong><?php echo 'v' . $tree_plantation_version; ?></strong>
                    <?php echo 'Release date: ' . $tree_plantation_date; ?>
                    <span class="dashicons dashicons-arrow-down-alt2"></span>
                </span>

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