76 lines
5.1 KiB
PHP
76 lines
5.1 KiB
PHP
|
<?php
|
||
|
$post_tags = get_the_tags();
|
||
|
$post_link = get_permalink();
|
||
|
$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="desktop-element flex article-card-outer xs12 sm8 md8 lg6">
|
||
|
<div class="article-card v-card v-card--link v-sheet theme--light rounded-0 emphasis">
|
||
|
<div class="layout article-card-body column fill-height" style="background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.533) 0%, rgba(0, 0, 0, 0) 100%), url(<?= $post_thumbnail_url ?>) !important; background-size: cover, cover; background-repeat: no-repeat, no-repeat; background-position: center center, center center;max-height: 280px;">
|
||
|
<div class="spacer"></div>
|
||
|
<div class="article-card-tags">
|
||
|
<?php if (!empty($post_tags)) : ?>
|
||
|
<?php foreach ($post_tags as $tag) : ?>
|
||
|
<span class="article-card-tag">#<?= $tag->name ?></span>
|
||
|
<?php endforeach; ?>
|
||
|
<?php endif; ?>
|
||
|
</div>
|
||
|
<div class="article-card-title" style="height: auto; max-width: none; margin-bottom: 0;">
|
||
|
<h3><?= $post_title ?></h3>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="layout article-card-body column ovrd" style="flex: 0 1 0; padding: 0 37px; flex-direction: column;">
|
||
|
<div class="article-card-preview ovrd" style="margin-top: 10px;margin-bottom:10px;"><?= $post_excerpt ?></div>
|
||
|
|
||
|
<div class="article-card-ad-row layout align-center">
|
||
|
<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_ID()); ?>'); background-position: center center;"></div>
|
||
|
<div class="v-responsive__content"></div>
|
||
|
</div>
|
||
|
<div class="article-card-author ovrd"><?= get_the_author($post); ?></div>
|
||
|
<div class="article-card-date ovrd"><?= get_the_date('d.m.Y', $post); ?></div>
|
||
|
</div>
|
||
|
|
||
|
<div class="spacer"></div><svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||
|
<path d="M11.9237 5.76655C11.8165 5.61991 9.26224 2.17578 5.99994 2.17578C2.73765 2.17578 0.183235 5.61991 0.0761486 5.76641C-0.0253829 5.90554 -0.0253829 6.09423 0.0761486 6.23336C0.183235 6.38001 2.73765 9.82413 5.99994 9.82413C9.26224 9.82413 11.8165 6.37999 11.9237 6.23348C12.0254 6.09438 12.0254 5.90554 11.9237 5.76655ZM5.99994 9.03293C3.59691 9.03293 1.51564 6.74699 0.899533 5.99969C1.51484 5.25173 3.59176 2.96699 5.99994 2.96699C8.40285 2.96699 10.484 5.25252 11.1004 6.00023C10.485 6.74817 8.40813 9.03293 5.99994 9.03293Z" fill="#FFF"></path>
|
||
|
<path d="M5.99961 3.62646C4.69081 3.62646 3.62598 4.6913 3.62598 6.0001C3.62598 7.3089 4.69081 8.37374 5.99961 8.37374C7.3084 8.37374 8.37324 7.3089 8.37324 6.0001C8.37324 4.6913 7.3084 3.62646 5.99961 3.62646ZM5.99961 7.58251C5.12703 7.58251 4.4172 6.87266 4.4172 6.0001C4.4172 5.12755 5.12705 4.41769 5.99961 4.41769C6.87216 4.41769 7.58201 5.12755 7.58201 6.0001C7.58201 6.87266 6.87218 7.58251 5.99961 7.58251Z" fill="#FFF"></path>
|
||
|
</svg>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</a>
|
||
|
|
||
|
<a tabindex="0" href="<?= $post_link ?>" class="mobile-element flex article-card-outer xs12 sm4 md4 lg3">
|
||
|
<div class="article-card v-card v-card--link v-sheet theme--light rounded-0" 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>
|