-
Notifications
You must be signed in to change notification settings - Fork 136
/
Copy pathitem.phtml
84 lines (79 loc) · 2.99 KB
/
item.phtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<?php
/**
* Copyright © Magefan ([email protected]). All rights reserved.
* Please visit Magefan.com for license details (https://magefan.com/end-user-license-agreement).
*
* Glory to Ukraine! Glory to the heroes!
*/
?>
<?php
/**
* Blog post list item template
*
* @var $block \Magefan\Blog\Block\Post\AbstractPost
*/
?>
<?php
$_post = $block->getPost();
$_postUrl = $block->escapeUrl($_post->getPostUrl());
$_postName = $block->escapeHtml($_post->getTitle());
$width = (int)$block->getWidth() ?: 800;
$height = (int)$block->getHeight() ?: 500;
?>
<li class="post-holder post-holder-<?= (int)$_post->getId() ?>">
<div class="post-header">
<div class="post-title-holder clearfix">
<h2 class="post-title">
<a class="post-item-link"
href="<?= /*@noEscape*/ $_postUrl ?>">
<?= /*@noEscape*/ $_postName ?>
</a>
</h2>
<div class="addthis_toolbox addthis_default_style"
addthis:url="<?= /*@noEscape*/ $_postUrl ?>"
addthis:title="<?= /*@noEscape*/ $_postName ?>"
<?php if ($firstImage = $_post->getFirstImage()) { ?>
addthis:media="<?= $block->escapeHtml($firstImage) ?>"
<?php } ?>>
<a class="addthis_button_facebook"></a>
<a class="addthis_button_twitter"></a>
<a class="addthis_button_email"></a>
<a class="addthis_button_compact"></a>
</div>
</div>
<?= /*@noEscape*/ $block->getInfoHtml() ?>
</div>
<div class="post-content">
<div class="post-description clearfix">
<?php $featuredImage = $_post->getFeaturedListImage() ?: $_post->getFeaturedImage(); ?>
<?php if ($featuredImage) { ?>
<?php
$featuredImgAlt = $_post->getData('featured_list_img_alt') ?: $_post->getData('featured_img_alt');
if (!$featuredImgAlt) {
$featuredImgAlt = $_postName;
}
?>
<div class="post-ftimg-hld">
<a href="<?= /*@noEscape*/ $_postUrl ?>"
title="<?= /*@noEscape*/ $_postName ?>">
<img src="<?= $block->escapeUrl($featuredImage) ?>"
alt="<?= $block->escapeHtml($featuredImgAlt) ?>"
width="<?= $width ?>"
height="<?= $height ?>"
/>
</a>
</div>
<?php } ?>
<div class="post-text-hld clearfix">
<?= /*@noEscape*/ $block->getShorContent() ?>
</div>
<a class="post-read-more"
href="<?= /*@noEscape*/ $_postUrl ?>"
title="<?= /*@noEscape*/ $_postName ?>">
<?= $block->escapeHtml(__('Read more »')) ?>
</a>
</div>
</div>
<div class="post-footer">
</div>
</li>