forked from alshedivat/al-folio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented latest posts on about page (alshedivat#1307)
Adresses alshedivat#340 --------- Signed-off-by: George Araújo <george.gcac@gmail.com>
- Loading branch information
1 parent
67358ab
commit efecd2a
Showing
5 changed files
with
63 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
<div class="news"> | ||
{% if site.latest_posts != blank -%} | ||
{%- assign latest_posts_size = site.posts | size -%} | ||
<div class="table-responsive" {% if site.latest_posts.scrollable and latest_posts_size > 3 %}style="max-height: 10vw"{% endif %}> | ||
<table class="table table-sm table-borderless"> | ||
{%- assign latest_posts = site.posts -%} | ||
{% if site.latest_posts.limit %} | ||
{% assign latest_posts_limit = site.latest_posts.limit %} | ||
{% else %} | ||
{% assign latest_posts_limit = latest_posts_size %} | ||
{% endif %} | ||
{% for item in latest_posts limit: latest_posts_limit %} | ||
<tr> | ||
<th scope="row">{{ item.date | date: "%b %-d, %Y" }}</th> | ||
<td> | ||
<a class="news-title" href="{{ item.url | relative_url }}">{{ item.title }}</a> | ||
</td> | ||
</tr> | ||
{%- endfor %} | ||
</table> | ||
</div> | ||
{%- else -%} | ||
<p>No posts so far...</p> | ||
{%- endif %} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
|
||
<div class="news"> | ||
{% if site.news != blank -%} | ||
{% if site.news != blank -%} | ||
{%- assign news_size = site.news | size -%} | ||
<div class="table-responsive" {% if site.news_scrollable and news_size > 3 %}style="max-height: 10vw"{% endif %}> | ||
<div class="table-responsive" {% if site.news.scrollable and news_size > 3 %}style="max-height: 10vw"{% endif %}> | ||
<table class="table table-sm table-borderless"> | ||
{%- assign news = site.news | reverse -%} | ||
{% if site.news_limit %} | ||
{% assign news_limit = site.news_limit %} | ||
{% if site.news.limit %} | ||
{% assign news_limit = site.news.limit %} | ||
{% else %} | ||
{% assign news_limit = news_size %} | ||
{% endif %} | ||
{% for item in news limit: news_limit %} | ||
{% for item in news limit: news_limit %} | ||
<tr> | ||
<th scope="row">{{ item.date | date: "%b %-d, %Y" }}</th> | ||
<td> | ||
{% if item.inline -%} | ||
{% if item.inline -%} | ||
{{ item.content | remove: '<p>' | remove: '</p>' | emojify }} | ||
{%- else -%} | ||
{%- else -%} | ||
<a class="news-title" href="{{ item.url | relative_url }}">{{ item.title }}</a> | ||
{%- endif %} | ||
{%- endif %} | ||
</td> | ||
</tr> | ||
{%- endfor %} | ||
{%- endfor %} | ||
</table> | ||
</div> | ||
{%- else -%} | ||
{%- else -%} | ||
<p>No news so far...</p> | ||
{%- endif %} | ||
{%- endif %} | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters