fixes to accomodate news post without image
This commit is contained in:
@@ -101,8 +101,10 @@
|
||||
</section>
|
||||
</div>
|
||||
<section class="post-image mx-auto w-full">
|
||||
{% if page.extra.imgPath %}
|
||||
{% set img_url = get_url(path='/' ~ page.relative_path | replace(from='_', to='-') | replace(from='index.md', to=page.extra.imgPath)) %}
|
||||
<img src="{{img_url}}" />
|
||||
<img src="{{img_url}}" />
|
||||
{%endif%}
|
||||
</section>
|
||||
|
||||
<div class="py-12">
|
||||
|
||||
@@ -31,7 +31,9 @@
|
||||
</div>
|
||||
|
||||
<div class="-mx-4 relative lg:mt-0 max-w-full">
|
||||
{% if featured.extra.imgPath %}
|
||||
<img class="relative mx-auto w-7/12 md:w-auto md:max-w-full max-h-80" src={{featured.permalink}}{{featured.extra.imgPath}} alt="" />
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<hr class="mt-6">
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
<div class="flex-1">
|
||||
<a href={{ post.permalink }} class="block">
|
||||
<div class="flex-shrink-0">
|
||||
{% if post.extra.imgPath %}
|
||||
{% set img_url = get_url(path='/' ~ post.relative_path | replace(from='_', to='-') | replace(from='index.md', to=post.extra.imgPath)) %}
|
||||
<img class="h-48 w-full mx-auto object-cover" src={{img_url}} alt="" />
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="flex-1 bg-white p-4 flex flex-col justify-between">
|
||||
|
||||
|
||||
@@ -12,11 +12,13 @@
|
||||
<div class="flex flex-col rounded-lg shadow-lg overflow-hidden">
|
||||
<div class="flex-1 border-b">
|
||||
<a href="{{ post.permalink }}" class="block">
|
||||
{% if post.extra.imgPath %}
|
||||
{% set img_url = get_url(path='/' ~ post.relative_path | replace(from='_', to='-') | replace(from='index.md',
|
||||
to=post.extra.imgPath)) %}
|
||||
<div class="flex-shrink-0">
|
||||
<img class="h-48 w-full mx-auto object-cover" src={{img_url}} alt="{{post.title ~ ' Picture'}}" />
|
||||
</div>
|
||||
{%endif%}
|
||||
<div class="flex-1 bg-white p-6 flex flex-col justify-between">
|
||||
|
||||
<h3 class="mt-2 text-xl leading-6 font-medium text-gray-900 text-left not-italic">
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
<div class="flex-1">
|
||||
<a href={{ post.permalink }} class="block">
|
||||
<div class="flex-shrink-0">
|
||||
{% if post.extra.imgPath %}
|
||||
<img class="h-48 w-full mx-auto object-cover" src={{ post.permalink }}{{post.extra.imgPath}} alt="" />
|
||||
</div>
|
||||
{%endif %}
|
||||
</div>
|
||||
<div class="flex-1 bg-white p-6 flex flex-col justify-between">
|
||||
|
||||
<h3 class="mt-2 text-xl leading-7 font-medium text-gray-900 text-left not-italic">
|
||||
|
||||
Reference in New Issue
Block a user