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


if (isset($_GET['id'])) {
    $id = $_GET['id'];
    $article = $db->getSingleArticle($id);
}

?>

    <script>

    </script>
    <div class="container">
        <div class="row">
            <style>
                @media (min-width: 1200px) {
                    #image {
                        height: 325px !important;
                        width: 680px !important;
                    }
                }
            </style>

            <div class="col-12 col-md-8 mt-5 mb-5">
                <div class="card p-4 border-0">

                    <div class="titles py-4" style="text-decoration: none; font-family: 'Roboto', sans-serif!important; color: #000;">

                        <?php echo $article['0']['title']; ?>

                    </div>

                    <style>

                        .entry-header .entry-meta {
                            margin-top: 10px;

                            border-top: 1px solid #ddd;
                        }

                        .entry-meta {
                            font-size: 10px;
                            letter-spacing: 2px;
                            text-transform: uppercase;
                            font-family: 'Roboto', sans-serif!important; color: #514f4f;
                            text-align: center;
                        }
                    </style>


                    <div class="entry-meta" style="margin-bottom: 10px!important;">
			<span class="date-bar-white-bg">



				<span class="entry-cat">By <?php echo $article['0']['author']; ?></a></span>

									<span class="entry-date updated"> | <time datetime="2019-03" itemprop="datePublished">

									     <?php $timeStamp = date("F d, Y", strtotime($article['0']['created_at']));
                                         echo $timeStamp; ?>

									   </time>
									   </span>
			</span>
                    </div>

                    <img src="assets/img/post_pic/<?php echo $article['0']['image']; ?>" class="card-img-top"
                         alt="...">
                    <div class="card-body">

                        <p style="text-decoration: none; font-family: 'Roboto', sans-serif!important; color: #6f6b6b; font-size: 16px">
                            <?php echo $article['0']['body']; ?>
                        </p>
                    </div>
                </div>
            </div>
            <div class="col-12 col-md-4 mt-5">
                <?php
                include_once "common/front_sidebar.php";
                ?>
            </div>
        </div>
    </div>
<?php
require_once "common/front_footer.php";
?>