Made posts without images use the full width, stopped having an image tag without url.

Posts list on homepage now works the same as other category pages.
Getting away from page banners on top of site.
Using seo_tag.title instead of generating the same thing by hand.
This commit is contained in:
2019-01-22 13:39:53 -05:00
committed by andrew
parent b70ca07993
commit c19e1b9d91
7 changed files with 42 additions and 58 deletions
+24 -31
View File
@@ -1,35 +1,28 @@
{%- for category in site.categories -%}
{%- if category[0] != page.category -%}
{%- continue -%}
{%- endif -%}
{%- assign posts = category[1] -%}
{%- if posts.size > 0 -%}
<section id="articles" class="">
<div class="container">
{%- if page.list_title -%}
<h3>{{ page.list_title | capitalize }}</h3>
{%- endif -%}
<div class="features">
{%- assign date_format = site.date_format | default: "%b %-d, %Y" -%}
{%- for post in posts -%}
<article>
{%- if include.posts and include.posts.size > 0 -%}
<section id="articles" class="">
<div class="container">
{%- if page.list_title -%}
<h3>{{ page.list_title | capitalize }}</h3>
{%- endif -%}
<div class="features">
{%- assign date_format = site.date_format | default: "%b %-d, %Y" -%}
{%- for post in include.posts -%}
<article>
{%- if post.banner -%}
<a href="{{ post.url | relative_url }}" class="image">
<img src="{{ post.banner }}" alt="">
</a>
<div class="inner">
<h4><a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a></h4>
<div>{{ post.date | date: date_format }}</div>
{%- if site.show_excerpts -%}
{{ post.excerpt }}
{%- endif -%}
</div>
</article>
{%- endfor -%}
</div>
{%- endif -%}
<div class="inner">
<h4><a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a></h4>
<div>{{ post.date | date: date_format }}</div>
{%- if site.show_excerpts -%}
{{ post.excerpt }}
{%- endif -%}
</div>
</article>
{%- endfor -%}
</div>
</section>
{%- endif -%}
{%- break -%}
{%- endfor -%}
</div>
</section>
{%- endif -%}