94 lines
3.0 KiB
Smarty
94 lines
3.0 KiB
Smarty
{*
|
|
* 2017-2019 Zemez
|
|
*
|
|
* JX Blog
|
|
*
|
|
* NOTICE OF LICENSE
|
|
*
|
|
* This source file is subject to the General Public License (GPL 2.0)
|
|
* that is bundled with this package in the file LICENSE.txt.
|
|
* It is also available through the world-wide-web at this URL:
|
|
* http://opensource.org/licenses/GPL-2.0
|
|
*
|
|
* DISCLAIMER
|
|
*
|
|
* Do not edit or add to this file if you wish to upgrade the module to newer
|
|
* versions in the future.
|
|
*
|
|
* @author Zemez (Alexander Grosul)
|
|
* @copyright 2017-2019 Zemez
|
|
* @license http://opensource.org/licenses/GPL-2.0 General Public License (GPL 2.0)
|
|
*}
|
|
|
|
{extends file=$layout}
|
|
|
|
{block name='head_seo_description'}{$post.meta_description}{/block}
|
|
{block name='head_seo_keywords'}{$post.meta_keyword}{/block}
|
|
|
|
{block name='content'}
|
|
<section id="main">
|
|
{if $post}
|
|
<div class="text-center blog-post-wrapper">
|
|
{block name='blog_post_header'}
|
|
<h1 class="blog-post-name">{$post.name}</h1>
|
|
{/block}
|
|
<div class="post-meta d-flex flex-wrap align-items-center justify-content-center">
|
|
<div><p>{l s='Posted on %date% at %time%'
|
|
sprintf=[
|
|
'%date%' => {$post.date_start|date_format},
|
|
'%time%' => {$post.date_start|date_format:"%H:%M"}
|
|
]
|
|
d='Shop.Theme.Global'
|
|
}
|
|
</p>
|
|
</div>
|
|
|
|
<div{if !$displayAuthor} class="d-none"{/if}><p>{l s='by [0][1"]%link%["1]%name%[/1][/0]'
|
|
sprintf=[
|
|
'%link%' => {url entity='module' name='jxblog' controller='author' params = ['author' => $post.id_author]},
|
|
'%name%' => {$post.author},
|
|
'[0]' => '<span class="post-author">',
|
|
'[/0]' => '</span>',
|
|
'[1"]' => '<a href="',
|
|
'["1]' => '">',
|
|
'[/1]' => '</a>'
|
|
]
|
|
d='Shop.Theme.Global'}</p>
|
|
</div>
|
|
{if $displayViews && $post.views}
|
|
<div>
|
|
<em class="mb-2 d-inline-block">{l s='Views' mod='jxblog'} ({$post.views})</em>
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
|
|
<div class="post-image mb-5">
|
|
<img class="img-fluid" src="{JXBlogImageManager::getImage('post', $post.id_jxblog_post, 'post_default')}" alt="{$post.name}"/>
|
|
</div>
|
|
|
|
{if $post.description}
|
|
<div class="post-description text-left">
|
|
{$post.description nofilter}
|
|
</div>
|
|
{/if}
|
|
|
|
{if $tags}
|
|
<div class="post-tags my-3">
|
|
<h5 class="mr-2 mb-1">{l s='Tagged' mod='jxblog'}</h5>
|
|
{foreach from=$tags item='tag' name="tag"}
|
|
<a class="mb-1" href="{$link->getModuleLink('jxblog', 'tag', ['id_jxblog_tag' => $tag.id_jxblog_tag])}">{$tag.tag}</a>{if !$smarty.foreach.tag.last},{/if}
|
|
{/foreach}
|
|
</div>
|
|
{/if}
|
|
</div>
|
|
|
|
|
|
{hook h="displayJXBlogPostFooter" post=$post}
|
|
|
|
{else}
|
|
<p>{l s='Post doesn\'t exist or you don\'t have permissions to access it.' mod='jxblog'}</p>
|
|
{/if}
|
|
|
|
</section>
|
|
{/block}
|