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:
@@ -0,0 +1,10 @@
|
||||
{%- for category in site.categories -%}
|
||||
{%- if category[0] != page.category -%}
|
||||
{%- continue -%}
|
||||
{%- endif -%}
|
||||
|
||||
{% assign posts = category[1] -%}
|
||||
{%- include posts.html posts = posts -%}
|
||||
|
||||
{%- break -%}
|
||||
{%- endfor -%}
|
||||
@@ -2,7 +2,7 @@
|
||||
<ul class="copyright">
|
||||
<li>© {{ site.time | date: "%Y" }} {{ site.title }}</li>
|
||||
{%- if site.page_contact -%}
|
||||
<li><a href="mailto:{{ site.email | escape }}?subject={{ page.title | append: ' | ' | append: site.title | url_encode }}">Contact Me About This Page</a></li>
|
||||
<li><a href="mailto:{{ site.email | escape }}{%- if seo_tag.title? -%}?subject={{ seo_tag.title | url_encode }}{%- endif -%}">Contact Me About This Page</a></li>
|
||||
{%- endif -%}
|
||||
<!-- PER LICENSE OF THEME: ATTRIBUTION IS REQUIRED, DO NOT REMOVE -->
|
||||
<li>Design: <a href="https://html5up.net">HTML5 UP</a></li>
|
||||
|
||||
+24
-31
@@ -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 -%}
|
||||
|
||||
@@ -4,4 +4,4 @@ layout: default
|
||||
|
||||
{{ content }}
|
||||
|
||||
{% include posts.html %}
|
||||
{%- include category.html -%}
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
<div id="main">
|
||||
<section id="top">
|
||||
<div class="image main" data-position="center">
|
||||
<img src="{{ page.banner | default: site.banner | default: '/images/banner.jpg' | relative_url }}" alt="" />
|
||||
<img src="{{ site.banner | default: '/images/banner.jpg' | relative_url }}" alt="" />
|
||||
</div>
|
||||
<div class="container">
|
||||
<header class="major">
|
||||
|
||||
+1
-24
@@ -4,27 +4,4 @@ layout: default
|
||||
|
||||
{{ content }}
|
||||
|
||||
{%- if site.posts.size > 0 -%}
|
||||
<section id="articles" class="">
|
||||
<div class="container">
|
||||
<h3>{{ page.list_title | default: "Posts" }}</h3>
|
||||
<div class="features">
|
||||
{%- assign date_format = site.date_format | default: "%b %-d, %Y" -%}
|
||||
{%- for post in site.posts -%}
|
||||
<article>
|
||||
<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>
|
||||
{{ post.date | date: date_format }}
|
||||
{%- if site.show_excerpts -%}
|
||||
{{ post.excerpt }}
|
||||
{%- endif -%}
|
||||
</div>
|
||||
</article>
|
||||
{%- endfor -%}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{%- endif -%}
|
||||
{%- include posts.html posts = site.posts -%}
|
||||
|
||||
@@ -1138,6 +1138,10 @@
|
||||
vertical-align: middle;
|
||||
width: 50%;
|
||||
|
||||
&:only-child {
|
||||
width: 98%;
|
||||
}
|
||||
|
||||
> :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user