489495df
Path : /home3/mandnweb/mariananjie.co.uk/ |
Current < : /home3/mandnweb/mariananjie.co.uk/single-post.php |
<?php $active = 4; $post_title = ''; $categories = []; $created_at = ''; $description = ''; $featured_image = ''; $meta_keywords = []; $meta_description = []; $meta_title = ""; $post_slug = $_GET['post']; $url = "https://app.mariananjie.co.uk/articles/get_article/" . $post_slug; try{ $context = stream_context_create(array( 'http' => array( 'ignore_errors'=>true, 'method'=>'GET' ) )); $isAvailable = @file_get_contents($url); $response = file_get_contents($url); $article = json_decode($response, true); if($article){ foreach($article as $key => $value){ $post_title = $value['post_title']; $categories = $value['categories']; $created_at = $value['created_at']; $description = $value['description']; $featured_image = $value['featured_image']; $meta_keywords = $value['meta_keywords']; $meta_description = $value['meta_description']; $meta_title = $value['meta_title']; } } }catch(Exception $ex){ echo $ex; } ?> <!DOCTYPE HTML> <html prefix="og: http://ogp.me/ns#" lang="en"> <head> <?php require 'partials/analytics.php'; ?> <link type="application/rss+xml" rel="alternate" href="https://www.mariananjie.com/feed/rss2"> <link type="application/atom+xml" rel="alternate" href="https://www.mariananjie.com/feed/atom"> <meta property="og:image" content="https://www.mariananjie.com/images/logo-mariana-njie.jpg"> <meta name="facebook-domain-verification" content="w5v5seqno1et4rb084novx1mc9o3nc" /> <link rel="canonical" href="https://www.mariananjie.com/" /> <meta property="og:locale" content="en_US" /> <meta property="og:type" content="website" /> <meta property="og:title" content="<?php echo $post_title; ?> - Mariana Njie" /> <meta property="og:description" content="<?php echo $meta_description; ?>" /> <meta property="og:url" content="https://www.mariananjie.com/" /> <meta property="og:site_name" content="Mariana Njie" /> <title><?php echo $post_title; ?> | Mariana Njie</title> <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Article", "mainEntityOfPage": { "@type": "WebPage", "@id": "https://mariananjie.com/single-post?post=<?php echo $post_slug; ?>" }, "headline": "<?php echo $post_title; ?>", "image": "https://app.mariananjie.co.uk/public/storage/<?php echo $featured_image; ?>", "author": { "@type": "Organization", "name": "Mariana Njie", "url": "https://www.mariananjie.com/" }, "publisher": { "@type": "Organization", "name": "Mariana Njie", "logo": { "@type": "ImageObject", "url": "https://mariananjie.com/images/logo-mariana-njie.jpg" } }, "datePublished": "<?php echo $created_at; ?>", "dateModified": "<?php echo $created_at; ?>" } </script> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="keywords" content="<?php echo $meta_keywords; ?>"> <!-- <meta name="p:domain_verify" content="bc4cce29215687457c75135c281ba750"/> --> <meta name="description" content="<?php echo $meta_description; ?>"> <meta name="twitter:card" content="summary"> <meta name="twitter:title" content="<?php echo $post_title; ?> - Mariana Njie"> <meta name="twitter:description" content="<?php echo $meta_description; ?>"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,400;0,600;0,700;1,400&display=swap" rel="stylesheet"> <link rel="icon" type="image/png" href="images/favicon.jpg"/> <link rel="stylesheet" type="text/css" href="css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="css/style.css"> <link rel="stylesheet" type="text/css" href="fontawesome/css/all.css"> <link rel="stylesheet" type="text/css" href="css/slick.css"> <link rel="stylesheet" type="text/css" href="css/slick-theme.css"> <link rel="stylesheet" type="text/css" href="lightbox/css/lightbox.min.css"> <script type='text/javascript' src='https://platform-api.sharethis.com/js/sharethis.js#property=62fcdd6a53f05f0019e8a26a&product=inline-share-buttons' async='async'></script> </head> <style> body{font-weight: 400;} .widget-footer{ background-color: #fafafa !important; } .article-desc h1, .article-desc h2, .article-desc h3, .article-desc h4{ font-family: 'Rubik', sans-serif !important; } body p, body .article-desc{font-family: inherit !important;} </style> <body> <?php require 'partials/header.php'; ?> <div class="main-content"> <section class="section-row pt-5"> <div class="breadcrumbs"> <div class="container"> <p><a href="/">Home</a> / <a href="/news">News</a> / <span style="color: #7c7c7c;"><?php echo $post_title; ?></span></p> </div> </div> <div class="container"> <div class="row"> <?php if($isAvailable === FALSE) { ?> <div class="job__item" style="border-bottom: 1px solid #ddd;"> <p>There are no Post for now. Please try again later.</p> </div> <?php }else{ ?> <div class="col-sm-8 col-12"> <div class="featured-image"> <img loading="lazy" src="https://app.mariananjie.co.uk/public/storage/<?php echo $featured_image; ?>" class="img-fluid mb-3" alt="<?php echo $post_title; ?>"> </div> <div class="article-desc"> <h1 class="post-title"><?php echo $post_title; ?></h1> <p> <span class="post-meta"> <?php foreach ($categories as $key => $cat) { print_r($cat['category']); echo ' | '; } ?> <?php echo $created_at; ?> </span> </p> <div class="mb-3"> <!-- ShareThis BEGIN --><div class="sharethis-inline-share-buttons"></div><!-- ShareThis END --> </div> <?php echo $description; ?> </div> </div> <div class="col-sm-4 col-12"> <div class="sidebar-inner bg-semi-light p-2"> <h4 class="mb-3 p-2" style="font-size: 16px;">Recent Posts</h4> <?php $url = "https://app.mariananjie.co.uk/articles/get_all_articles"; try{ $context = stream_context_create(array( 'http' => array( 'ignore_errors'=>true, 'method'=>'GET' ) )); $isAvailable = @file_get_contents($url); if($isAvailable === FALSE) { }else{ $response = file_get_contents($url); $job_list = json_decode($response, true); if($job_list){ foreach($job_list as $job => $value){ ?> <div class="col-sm-12 mb-5"> <div class="row"> <div class="col-sm-12"> <div class="post-featured mb-3 mobile-mb-4"> <img loading="lazy" src="https://app.mariananjie.co.uk/public/storage/<?php echo $value['featured_image']; ?>" class="img-fluid " alt="<?php echo $value['post_title']; ?>"> </div> </div> <div class="col-sm-12"> <div class="d-flex align-items-center h-100"> <a href="single-post?post=<?php echo $value['post_slug'] ?>"> <div class="pl-2 pl-0-mobile"> <h5 class="text-uppercase"><?php echo $value['post_title']; ?></h5> <p> <span class="post-meta"> <?php foreach ($value['categories'] as $key => $cat) { print_r($cat['category']); echo ' | '; } ?> <?php echo $value['created_at']; ?></span> </p> <?php echo substr(strip_tags($value['description']), 0, 100). '...'; ?> </div> </a> </div> </div> </div> </div> <?php } } } }catch(Exception $ex){ echo $ex; } ?> </div> </div> <?php }?> </div> </div> </section> </div> <?php require 'partials/widgets.php'; ?> <?php require 'partials/footer.php'; ?> <?php require 'partials/foot.php'; ?> </body> </html>