<?php
the_post();
$page_title = get_the_title();
$thisContent = get_the_content();
$page_description = str_replace(PHP_EOL, '', mb_strimwidth(strip_tags($thisContent), 0, 350, '...'));
$tmpOgimage = '';
$hasThumbnail = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'full');
if ($hasThumbnail) {
    $tmpOgimage = $hasThumbnail[0];
}
if (!$hasThumbnail) {
    $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $thisContent, $matches);
    $tmpOgimage = $matches[1][0] ?? null;
}
$OG_Img = $tmpOgimage ?? 'https://kobe-canna.com/img/og_image.jpg';
?>

<!doctype html>
<html><!-- InstanceBegin template="/Templates/index.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-MT9E2CN89G"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'G-MT9E2CN89G');
</script>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge,chrome=1">
<meta name="viewport" content="width=device-width">
<!-- InstanceBeginEditable name="doctitle" -->
<title><?= $page_title ?> - NEWSLIST - Salon Bar Canna－カンナ</title>
<meta name="description" content="<?= $page_description ?>">
<meta property="og:title" content="<?= $page_title ?> - NEWSLIST - Salon Bar Canna－カンナ">
<meta property="og:type" content="article">
<meta property="og:url" content="<?php the_permalink() ?>">
<meta property="og:image" content="<?= $OG_Img ?>">
<meta property="og:description" content="<?= $page_description ?>">
<!-- InstanceEndEditable -->
<meta name="keywords" content="Canna,カンナ,神戸市,中央区,スナック,サロン,バー">
<meta property="og:site_name" content="Salon Bar Canna－カンナ">
<link rel="SHORTCUT ICON" href="https://kobe-canna.com/img/favicons/favicon.ico">
<link rel="apple-touch-icon" sizes="180x180" href="https://kobe-canna.com/img/favicons/apple-touch-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="https://kobe-canna.com/img/favicons/android-chrome-192x192.png">
<script src="https://kit.fontawesome.com/cfffd57400.js" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link rel="stylesheet" href="https://kobe-canna.com/css/opt.css">
<link rel="stylesheet" href="https://kobe-canna.com/css/common.css">
<link rel="stylesheet" href="https://kobe-canna.com/css/nav.css">
<script>
  (function(d) {
    var config = {
      kitId: 'rav6ypf',
      scriptTimeout: 3000,
      async: true
    },
    h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";},config.scriptTimeout),tk=d.createElement("script"),f=false,s=d.getElementsByTagName("script")[0],a;h.className+=" wf-loading";tk.src='https://use.typekit.net/'+config.kitId+'.js';tk.async=true;tk.onload=tk.onreadystatechange=function(){a=this.readyState;if(f||a&&a!="complete"&&a!="loaded")return;f=true;clearTimeout(t);try{Typekit.load(config)}catch(e){}};s.parentNode.insertBefore(tk,s)
  })(document);
</script>
<script>
  (function(d) {
    var config = {
      kitId: 'aat7hkl',
      scriptTimeout: 3000,
      async: true
    },
    h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";},config.scriptTimeout),tk=d.createElement("script"),f=false,s=d.getElementsByTagName("script")[0],a;h.className+=" wf-loading";tk.src='https://use.typekit.net/'+config.kitId+'.js';tk.async=true;tk.onload=tk.onreadystatechange=function(){a=this.readyState;if(f||a&&a!="complete"&&a!="loaded")return;f=true;clearTimeout(t);try{Typekit.load(config)}catch(e){}};s.parentNode.insertBefore(tk,s)
  })(document);
</script>	
<script>
setTimeout(function () {
document.getElementsByTagName("html")[0].classList.add("loading-delay");
}, 1000);
</script>
<script src="https://kobe-canna.com/js/base.js"></script>
<script src="https://kobe-canna.com/js/fade.js"></script>
<!-- InstanceBeginEditable name="head" -->
<link rel="stylesheet" href="https://kobe-canna.com/css/sub.css">
<link rel="stylesheet" href="https://kobe-canna.com/css/news.css">
<?php wp_head(); ?>
<!-- InstanceEndEditable -->
</head>
<body>
  <header>
	<div class="logo-area">
		<div class="logo"><a href="https://kobe-canna.com/"><img src="https://kobe-canna.com/img/common/canna_logo.svg" alt="Canna－カンナ"></a></div>
	</div>
    <div class="custom-header">
        <div id="nav-toggle">
            <div>
                <span class="toggle"></span>
                <span class="toggle"></span>
                <span class="toggle"></span>
            </div>
        </div>
        <div id="gloval-nav">
            <nav>
                <ul>
					<li><a href="https://kobe-canna.com/">HOME</a></li>
					<li><a href="https://kobe-canna.com/newslist/">NEWS</a></li>
					<li><a href="https://kobe-canna.com/system.html">SYSTEM</a></li>
					<li><a href="https://kobe-canna.com/access.html">ACCESS</a></li>
					<li><a href="https://kobe-canna.com/contact/">CONTACT</a></li>
                </ul>
            </nav>
        </div>
	</div>
</header>
<main>
<!-- InstanceBeginEditable name="main" -->
<div class="main-area"></div>
<div class="h1-area">
    <div class="inner">
      <h1 class="yum" data-subtitle="NEWS">ニュースリリース</h1>
    </div>
</div>
<div class="breadArea02">
	<ul class="inner">
		<li><a href="https://kobe-canna.com/">HOME</a></li>
		<li><a href="https://kobe-canna.com/newslist">NEWS LIST</a></li>
		<li><?php echo mb_strimwidth(get_the_title(), 0, 30, "..."); ?></li>
	</ul>
</div>
<section class="bg-beige">
    <div class="single-area">
		<div class="inner">
			<div class="desc">
				<h1 class="tit yum"><?php the_title(); ?></h1>
				<div class="date"><?php the_date("Y-m-d"); ?></div>
				<div class="content">
					<?php the_content();?>
				</div>
			</div>
			<div class="pager">
				<ul>
					<span class="fleft"><?php previous_post_link("<li class=\"prev\">%link</li>", "< prev"); ?></span>
					<span class="fright"><?php next_post_link("<li class=\"next\">%link</li>", "next >"); ?></span>
				</ul>
			</div>
		</div>
    </div>
</section>
  <!-- InstanceEndEditable -->
</main>
<footer>
	<div class="inner">
		<div class="logo-area">
			<div class="logo"><a href="https://kobe-canna.com/"><img src="https://kobe-canna.com/img/common/canna_logo.svg" alt="Canna－カンナ"></a></div>
			<ul class="sns-area">
				<li><a href="https://www.facebook.com/profile.php?id=100074830567020" target="_blank"><img src="https://kobe-canna.com/img/common/mark-fb.svg" alt="Canna-カンナ facebook"></a></li>
				<li><a href="https://line.me/ti/p/yz04rP8BH4" target="_blank"><img src="https://kobe-canna.com/img/common/mark-line.svg" alt="Canna-カンナ line"></a></li>
				<li><a href="https://www.instagram.com/canna7.27/" target="_blank"><img src="https://kobe-canna.com/img/common/mark-insta.svg" alt="Canna-カンナ Instagram"></a></li>
			</ul>
		</div>
		<ul class="f_navi">
			<li><a href="https://kobe-canna.com/">HOME</a></li>
			<li><a href="https://kobe-canna.com/newslist/">NEWS</a></li>
			<li><a href="https://kobe-canna.com/system.html">SYSTEM</a></li>
			<li><a href="https://kobe-canna.com/access.html">ACCESS</a></li>
			<li><a href="https://kobe-canna.com/contact/">CONTACT</a></li>
			<li><a href="https://kobe-canna.com/privacy.html">PRIVACY</a></li>
		</ul>
		<div class="copy">&copy; kobe-canna.com</div>
	</div>
</footer>
<!-- InstanceBeginEditable name="footer-js" -->
<!-- InstanceEndEditable -->
</body>
<!-- InstanceEnd --></html>