Show date as block and inline depeding on the screen size

This commit is contained in:
Diego Najar 2021-10-13 21:41:49 +02:00
parent 1f6dd0b6e7
commit 72d89576f1

View file

@ -67,16 +67,30 @@
</a>
<!-- End Page title -->
<!-- Page date -->
<?php if ($theme->dateFormat()=='relative'): ?>
<small class="color-blue"><?php echo $pageTmp->relativeTime() ?></small>
<?php else: ?>
<small class="color-blue"><?php echo $pageTmp->date() ?></small>
<?php endif ?>
<!-- End Page date -->
<!-- Page date -->
<!-- This block is not visible on small devices -->
<div class="d-none d-sm-block">
<?php if ($theme->dateFormat()=='relative'): ?>
<small class="color-blue"><?php echo $pageTmp->relativeTime() ?></small>
<?php else: ?>
<small class="color-blue"><?php echo $pageTmp->date() ?></small>
<?php endif ?>
</div>
<!-- End Page date -->
</div>
<!-- Page date -->
<!-- This block is only visible on small devices -->
<div class="d-block d-sm-none">
<?php if ($theme->dateFormat()=='relative'): ?>
<small class="color-blue"><?php echo $pageTmp->relativeTime() ?></small>
<?php else: ?>
<small class="color-blue"><?php echo $pageTmp->date() ?></small>
<?php endif ?>
</div>
<!-- End Page date -->
<!-- Page description -->
<?php if ($pageTmp->description()): ?>
<p class="mb-1 form-text"><?php echo $pageTmp->description(); ?></p>