Skip to content

Commit 7f36177

Browse files
committed
Fix news page
1 parent f75d90d commit 7f36177

File tree

4 files changed

+43
-26
lines changed

4 files changed

+43
-26
lines changed

_pages/news.html

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,23 @@ <h2 class="wp-block-heading">Check out our recent news &amp; insights</h2>
1616
<li
1717
class="wp-block-post post-350 post type-post status-publish format-standard has-post-thumbnail hentry category-news">
1818

19-
<div class="wp-block-group is-layout-flow wp-container-core-group-is-layout-7 wp-block-group-is-layout-flow"
19+
<div class="wp-block-group is-layout-flow wp-container-core-group-is-layout-9 wp-block-group-is-layout-flow"
2020
style="padding-top:20px;padding-right:20px;padding-bottom:20px;padding-left:20px">
21-
{% if post.featured_image %}
21+
2222
<figure style="height:200px; margin-bottom:var(--wp--preset--spacing--small);"
23-
class="wp-block-post-featured-image"><a href="{{ post.url | relative_url }}" target="_self"
24-
style="height:200px"><img
25-
src="{{ post.featured_image | prepend: '/assets/images/' | relative_url }}"
26-
class="attachment-post-thumbnail size-post-thumbnail wp-post-image"
27-
alt="{{ post.title }}" style="border-radius:5px;height:200px;object-fit:cover;"></a>
23+
class="wp-block-post-featured-image">
24+
<a href="{{ post.url | relative_url }}" target="_self"
25+
style="height:200px">
26+
{% if post.featured_image %}
27+
<img
28+
src="{{ post.featured_image | prepend: '/assets/images/' | relative_url }}"
29+
class="attachment-post-thumbnail size-post-thumbnail wp-post-image"
30+
alt="{{ post.title }}" style="border-radius:5px;height:200px;object-fit:cover;">
31+
{% else %}
32+
<div class="missing-image"></div>
33+
{% endif %}
34+
</a>
2835
</figure>
29-
{% else %}
30-
<div class="missing-image"></div>
31-
{% endif %}
3236

3337
<div class="taxonomy-category has-link-color wp-elements-82b5603708064b06546400967d8e01c5 wp-block-post-terms">
3438
<a href="{{ site.url }}/{{ post.categories | first | downcase }}/" rel="tag">{{post.categories | first}}</a>
@@ -39,7 +43,7 @@ <h5 style="margin-bottom:var(--wp--preset--spacing--x-small);" class="wp-block-p
3943

4044

4145
<div
42-
class="wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-6 wp-block-group-is-layout-flex">
46+
class="wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-10 wp-block-group-is-layout-flex">
4347
<div class="wp-block-post-author-name has-x-small-font-size">{{ post.author }}</div>
4448

4549
<hr
@@ -56,18 +60,14 @@ <h5 style="margin-bottom:var(--wp--preset--spacing--x-small);" class="wp-block-p
5660

5761

5862
{% if paginator.total_pages > 1 %}
59-
<ul>
60-
{% if paginator.previous_page %}
61-
<li>
62-
<a href="{{ paginator.previous_page_path | prepend: site.baseurl }}">&larr; Newer</a>
63-
</li>
64-
{% endif %}
63+
<div class="paging-buttons">
6564
{% if paginator.next_page %}
66-
<li>
67-
<a href="{{ paginator.next_page_path | prepend: site.baseurl }}">Older &rarr;</a>
68-
</li>
65+
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="{{ paginator.next_page_path | prepend: site.baseurl }}">Older Posts</a></div>
6966
{% endif %}
70-
</ul>
67+
{% if paginator.previous_page %}
68+
<div class="wp-block-button"><a class="wp-block-button__link wp-element-button" href="{{ paginator.previous_page_path | prepend: site.baseurl }}">Newer Posts</a></div>
69+
{% endif %}
70+
</div>
7171
{% endif %}
7272

73-
<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | relative_url }}">via RSS</a></p>
73+
<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | relative_url }}">via RSS</a></p>

_sass/post-collection.scss

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
// style for paged post lists in index and in /news
22

33
.missing-image {
4-
background-color: rgb(220, 220, 220);height: 200px;width: 100%;
4+
background-color: rgb(220, 220, 220);
5+
height: 200px;
6+
width: 100%;
7+
}
8+
9+
.paging-buttons{
10+
width: 100%;
11+
display: flex;
12+
gap: 10px;
13+
}
14+
15+
.rss-subscribe{
16+
font-size: var(--wp--preset--font-size--small);
517
}

_sass/style.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ $site_url: "" !default;
22
@use "../assets/kortez-fse/style.css";
33
@use "legacy2";
44
@use "legacy1" with ($site_url: $site_url);
5-
@use "post-collection.scss";
5+
@use "post-collection";

index.html

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,12 +201,17 @@ <h2 class="wp-block-heading has-text-align-left">Check out our recent news &amp;
201201
<figure style="height:200px; margin-bottom:var(--wp--preset--spacing--small);"
202202
class="wp-block-post-featured-image">
203203
<a href="{{ post.url | relative_url }}"
204-
target="_self" style="height:200px"><img
204+
target="_self" style="height:200px">
205+
{% if post.featured_image %}
206+
<img
205207
src="{{ post.featured_image | prepend: '/assets/images/' | relative_url }}"
206208
class="attachment-post-thumbnail size-post-thumbnail wp-post-image"
207209
alt="{{ post.title }}"
208210
style="border-radius:5px;height:200px;object-fit:cover;">
209-
</a>
211+
{% else %}
212+
<div class="missing-image"></div>
213+
{% endif %}
214+
</a>
210215
</figure>
211216

212217
{% for category in post.categories %}

0 commit comments

Comments
 (0)