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

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