Rev 3415 | Rev 3421 | Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
<?php
$this->headMeta()->appendName('og:url', "$share_url");
$this->headMeta()->appendName('og:title', "$share_title");
$this->headMeta()->appendName('og:description', "$share_description");
$this->headMeta()->appendName('og:image', "$share_image");
//summary_large_image
$this->headMeta()->appendName('twitter:card', "summary");
$this->headMeta()->appendName('twitter:title', "$share_title");
$this->headMeta()->appendName('twitter:description', "$share_description");
$this->headMeta()->appendName('twitter:image', "$share_image");
$js = <<<JS
const backendVars = {
title: `$share_title`,
url: `$share_url`,
image: `$share_image`,
description: `$share_description`
}
console.log(backendVars)
JS;
$this->inlineScript()->appendScript($js);
$this->inlineScript()->appendFile('/react-bundles/public-post/publicPostViewBundle.js');
?>
<div class='d-flex align-items-center justify-content-center' style="background: #fff; min-height: 100vh;">
<div class='row p-2 m-2'>
<div class='col-md-6 col-sm-12 col-12'>
<div class="card">
<img class="card-img-top" src=<?php echo $share_image ?> alt=<?php echo $share_title ?> />
</div>
</div>
<div class='col-md-6 col-sm-12 col-12 d-flex align-items-center position-relative'>
<div class="card border-0">
<div class="card-body">
<h1 class="card-title font-weight-bold border-bottom"><?php echo $share_title ?></h1>
<p class="card-text">
<?php echo $share_description ?>
</p>
<a href=<?php echo $share_url ?> target='_blank' class="btn btn-primary mt-2" rel="noreferrer">
Ir al post
</a>
</div>
</div>
</div>
</div>
</div>