39 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| $post_link = get_permalink();
 | |
| $post_tags = get_the_tags();
 | |
| $post_thumbnail_url = get_the_post_thumbnail_url();
 | |
| $post_excerpt = get_the_excerpt();
 | |
| $post_title = get_the_title();
 | |
| ?>
 | |
| <a tabindex="0" href="<?= $post_link ?>" class="flex article-card-outer xs12 sm4 md3 lg3">
 | |
|     <div class="article-card v-card v-card--link v-sheet theme--light" style="background-size: cover, cover; background-repeat: no-repeat, no-repeat; background-position: center center, center center;">
 | |
|       <div class="v-image v-responsive theme--light">
 | |
|         <div class="v-responsive__sizer" style="padding-bottom: 100%;"></div>
 | |
|         <div class="v-image__image v-image__image--cover" style="background-image: url(<?= $post_thumbnail_url ?>); background-position: center center;"></div>
 | |
|         <div class="v-responsive__content"></div>
 | |
|       </div>
 | |
|       <div class="layout article-card-body column fill-height">
 | |
|         <!---->
 | |
|         <div class="article-card-tags">
 | |
|         <?php if (!empty($post_tags)) : ?>
 | |
|           <?php foreach ($post_tags as $tag) : ?>
 | |
|             <span class="article-card-tag <?= $tag->slug . '__tag'?>">#<?= $tag->name ?></span>
 | |
|           <?php endforeach; ?>
 | |
|           <?php endif; ?>
 | |
|         </div>
 | |
|           <article class="article-card-title"><?= $post_title ?></article>
 | |
|         <div class="article-card-preview"><?= $post_excerpt ?></div>
 | |
|         <div class="layout align-center" style="flex: 0 1 0%;">
 | |
|           <div class="v-image v-responsive theme--light" style="height: 16px; width: 16px; flex: 0 0 auto;">
 | |
|             <div class="v-responsive__sizer" style="padding-bottom: 100%;"></div>
 | |
|             <div class="v-image__image v-image__image--cover" style="background-image: url('<?= get_avatar_url(get_the_author_meta('ID')); ?>'); background-position: center center;"></div>
 | |
|             <div class="v-responsive__content"></div>
 | |
|           </div>
 | |
|           <div class="article-card-author"><?= get_the_author($post); ?></div>
 | |
|           <div class="article-card-date"><?= get_the_date('d.m.Y', $post); ?></div>
 | |
|           <div class="spacer"></div>
 | |
|         </div>
 | |
|       </div>
 | |
|     </div>
 | |
|   </a>
 |