<?php
require_once "common/front_header.php";
?>

    <style>
        @media (min-width: 1200px) {
            .video {
                height: 325px !important;
                width: 630px !important;
            }
        }

        .video {
            width: 100%;
            height: 300px !important;
        }
    </style>

    <div class="container">
        <div class="row">

            <div class="col-md-8">

                <?php
                $query = "SELECT * FROM `tbl_videos` WHERE status = 'published' ORDER By id DESC LIMIT 1";
                $response = $db->getAllVideos($query);
                ?>

                <?php foreach ($response as $video) : ?>
                    <div class="col-12 mt-5">
                        <div class="card p-4 border-0">
                            <div class="titles py-4"
                                 style="text-decoration: none; font-family: 'Roboto', sans-serif!important; color: #6f6b6b;"><?php echo $video['title']; ?></div>
                            <div class="card-body">
                                <iframe class="video"
                                        src="https://www.youtube.com/embed/<?php echo $video['video_url']; ?>"
                                        frameborder="0"
                                        allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
                                        allowfullscreen></iframe>
                            </div>
                        </div>
                    </div>
                <?php endforeach; ?>

                <div class="row">
                    <div class="col-12 col-md-6 mt-5">
                        <div class="card border-0">
                            <div class="titles"
                                 style="text-decoration: none; font-family: 'Roboto', sans-serif!important; color: #6f6b6b;">
                                title</div>
                            <div class="card-body">
                                <iframe class="video"
                                        src="https://www.youtube.com/embed/title"
                                        frameborder="0" style="width: 300px!important;"
                                        allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"
                                        allowfullscreen></iframe>
                            </div>
                        </div>
                    </div>
                </div>

            </div>

            <div class="col-md-4 mt-5">
                <?php
                include_once "common/front_sidebar.php";
                ?>
            </div>

        </div>


    </div>

<?php
require_once "common/front_footer.php";
?>