aboutsummaryrefslogtreecommitdiffstats
path: root/theme/admin/html
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2021-06-12 01:37:18 +0200
committerThomas Lange <code@nerdmind.de>2021-06-12 01:37:18 +0200
commitf5ce181aa89d295e108bd25cb7c6914cf020d565 (patch)
tree8f498f457d57f467c255829667cb6afb2f7b9425 /theme/admin/html
parent4c3fc4ab3f012afc48be15193595c6b945496288 (diff)
downloadblog-f5ce181aa89d295e108bd25cb7c6914cf020d565.tar.gz
blog-f5ce181aa89d295e108bd25cb7c6914cf020d565.tar.xz
blog-f5ce181aa89d295e108bd25cb7c6914cf020d565.zip
Show first image from items content
If a item has at least one Markdown image embedded in its content, show this image within the <blockquote> tag in the item.php template files.
Diffstat (limited to 'theme/admin/html')
-rw-r--r--theme/admin/html/page/item.php5
-rw-r--r--theme/admin/html/post/item.php5
-rw-r--r--theme/admin/html/user/item.php5
3 files changed, 12 insertions, 3 deletions
diff --git a/theme/admin/html/page/item.php b/theme/admin/html/page/item.php
index a92b2fd..c61984c 100644
--- a/theme/admin/html/page/item.php
+++ b/theme/admin/html/page/item.php
@@ -8,6 +8,9 @@
</div>
</header>
<blockquote cite="<?=$PAGE['URL']?>">
+ <?php if(isset($PAGE['FILE']['LIST'][0])): ?>
+ <img class="item-image" src="<?=$PAGE['FILE']['LIST'][0]?>" alt="" />
+ <?php endif; ?>
<p><?=excerpt($PAGE['BODY']['HTML']())?></p>
</blockquote>
@@ -26,4 +29,4 @@
<li><a href="<?=Application::getAdminURL("page/delete.php?id={$PAGE['ATTR']['ID']}")?>" title="<?=$Language->text('delete_page')?>"><i class="fa fa-trash-o"></i><span class="hidden"><?=$Language->text('delete_page')?></span></a></li>
</ul>
</footer>
-</article> \ No newline at end of file
+</article>
diff --git a/theme/admin/html/post/item.php b/theme/admin/html/post/item.php
index 8258d30..ae06752 100644
--- a/theme/admin/html/post/item.php
+++ b/theme/admin/html/post/item.php
@@ -8,6 +8,9 @@
</div>
</header>
<blockquote cite="<?=$POST['URL']?>">
+ <?php if(isset($POST['FILE']['LIST'][0])): ?>
+ <img class="item-image" src="<?=$POST['FILE']['LIST'][0]?>" alt="" />
+ <?php endif; ?>
<p><?=excerpt($POST['BODY']['HTML']())?></p>
</blockquote>
@@ -26,4 +29,4 @@
<li><a href="<?=Application::getAdminURL("post/delete.php?id={$POST['ATTR']['ID']}")?>" title="<?=$Language->text('delete_post')?>"><i class="fa fa-trash-o"></i><span class="hidden"><?=$Language->text('delete_post')?></span></a></li>
</ul>
</footer>
-</article> \ No newline at end of file
+</article>
diff --git a/theme/admin/html/user/item.php b/theme/admin/html/user/item.php
index d8e43cf..ae16637 100644
--- a/theme/admin/html/user/item.php
+++ b/theme/admin/html/user/item.php
@@ -7,6 +7,9 @@
</div>
</header>
<blockquote cite="<?=$USER['URL']?>">
+ <?php if(isset($USER['FILE']['LIST'][0])): ?>
+ <img class="item-image" src="<?=$USER['FILE']['LIST'][0]?>" alt="" />
+ <?php endif; ?>
<p><?=excerpt($USER['BODY']['HTML']())?></p>
</blockquote>
@@ -25,4 +28,4 @@
<li><a href="<?=Application::getAdminURL("user/delete.php?id={$USER['ATTR']['ID']}")?>" title="<?=$Language->text('delete_user')?>"><i class="fa fa-trash-o"></i><span class="hidden"><?=$Language->text('delete_user')?></span></a></li>
</ul>
</footer>
-</article> \ No newline at end of file
+</article>