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

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